This commit is contained in:
Andrej730
2025-02-05 18:40:02 +05:00
committed by Dion Moult
parent 1e58a517a0
commit 667223da8e
4 changed files with 5 additions and 2 deletions
@@ -241,6 +241,7 @@ class IfcProperty(PropertyGroup):
if TYPE_CHECKING: if TYPE_CHECKING:
metadata: Attribute metadata: Attribute
value_type: IfcPropertyValueType value_type: IfcPropertyValueType
enumerated_value: IfcPropertyEnumeratedValue
class PsetProperties(PropertyGroup): class PsetProperties(PropertyGroup):
@@ -43,7 +43,7 @@ class EnableReassignClass(bpy.types.Operator):
def execute(self, context): def execute(self, context):
obj = context.active_object obj = context.active_object
self.file = IfcStore.get_file() self.file = tool.Ifc.get()
ifc_class = obj.name.split("/")[0] ifc_class = obj.name.split("/")[0]
context.active_object.BIMObjectProperties.is_reassigning_class = True context.active_object.BIMObjectProperties.is_reassigning_class = True
ifc_products = [ ifc_products = [
@@ -93,7 +93,7 @@ class ReassignClass(bpy.types.Operator, tool.Ifc.Operator):
objects = [bpy.data.objects.get(self.obj)] objects = [bpy.data.objects.get(self.obj)]
else: else:
objects = set(context.selected_objects + [context.active_object]) objects = set(context.selected_objects + [context.active_object])
self.file = IfcStore.get_file() self.file = tool.Ifc.get()
root_props = context.scene.BIMRootProperties root_props = context.scene.BIMRootProperties
ifc_product: str = root_props.ifc_product ifc_product: str = root_props.ifc_product
ifc_class: str = root_props.ifc_class ifc_class: str = root_props.ifc_class
@@ -20,6 +20,7 @@ import bpy
import ifcopenshell import ifcopenshell
import ifcopenshell.util.element import ifcopenshell.util.element
import ifcopenshell.util.schema import ifcopenshell.util.schema
import ifcopenshell.util.type
import bonsai.tool as tool import bonsai.tool as tool
from bonsai.bim.module.root.data import IfcClassData from bonsai.bim.module.root.data import IfcClassData
from bpy.types import PropertyGroup from bpy.types import PropertyGroup
+1
View File
@@ -22,6 +22,7 @@ import ifcopenshell
import ifcopenshell.api.pset import ifcopenshell.api.pset
import ifcopenshell.util.attribute import ifcopenshell.util.attribute
import ifcopenshell.util.element import ifcopenshell.util.element
import bonsai.bim.helper
import bonsai.core.tool import bonsai.core.tool
import bonsai.tool as tool import bonsai.tool as tool
import bonsai.bim.schema import bonsai.bim.schema