mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
import_attributes2 -> import_attributes
import_attributes were removed in 76f0b57ff
This commit is contained in:
@@ -156,8 +156,7 @@ def draw_attribute(
|
||||
op.name = attribute.name
|
||||
|
||||
|
||||
# TODO: rename to 'import_attributes'.
|
||||
def import_attributes2(
|
||||
def import_attributes(
|
||||
element: Union[str, ifcopenshell.entity_instance],
|
||||
props: bpy.types.bpy_prop_collection_idprop[Attribute],
|
||||
callback: Optional[ImportCallback] = None,
|
||||
|
||||
@@ -107,7 +107,7 @@ class EnableEditingAttributes(bpy.types.Operator, AttributesOperator):
|
||||
if value is not None:
|
||||
new.enum_value = str(value.id())
|
||||
|
||||
bonsai.bim.helper.import_attributes2(element, props.attributes, callback=callback)
|
||||
bonsai.bim.helper.import_attributes(element, props.attributes, callback=callback)
|
||||
props.is_editing_attributes = True
|
||||
|
||||
def execute(self, context):
|
||||
|
||||
@@ -146,7 +146,7 @@ class EnableAddingManualClassification(bpy.types.Operator):
|
||||
props.is_adding = True
|
||||
props.active_classification_id = 0
|
||||
props.classification_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2("IfcClassification", props.classification_attributes)
|
||||
bonsai.bim.helper.import_attributes("IfcClassification", props.classification_attributes)
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@ class EnableAddingManualClassificationReference(bpy.types.Operator):
|
||||
props = tool.Classification.get_classification_reference_props()
|
||||
props.is_adding = True
|
||||
props.reference_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2("IfcClassificationReference", props.reference_attributes)
|
||||
bonsai.bim.helper.import_attributes("IfcClassificationReference", props.reference_attributes)
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ class EnableEditingClassification(bpy.types.Operator):
|
||||
|
||||
props = tool.Classification.get_classification_props()
|
||||
props.classification_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(
|
||||
bonsai.bim.helper.import_attributes(
|
||||
tool.Ifc.get().by_id(self.classification), props.classification_attributes, callback
|
||||
)
|
||||
props.active_classification_id = self.classification
|
||||
@@ -274,7 +274,7 @@ class EnableEditingClassificationReference(bpy.types.Operator):
|
||||
def execute(self, context):
|
||||
props = tool.Classification.get_classification_reference_props()
|
||||
props.reference_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(tool.Ifc.get().by_id(self.reference), props.reference_attributes)
|
||||
bonsai.bim.helper.import_attributes(tool.Ifc.get().by_id(self.reference), props.reference_attributes)
|
||||
props.active_reference_id = self.reference
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ class EnableEditingConstraint(bpy.types.Operator):
|
||||
def execute(self, context):
|
||||
props = tool.Blender.get_constraint_props()
|
||||
props.constraint_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(tool.Ifc.get().by_id(self.constraint), props.constraint_attributes)
|
||||
bonsai.bim.helper.import_attributes(tool.Ifc.get().by_id(self.constraint), props.constraint_attributes)
|
||||
props.active_constraint_id = self.constraint
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
@@ -3045,7 +3045,7 @@ class AddTextLiteral(bpy.types.Operator):
|
||||
"Path": "RIGHT",
|
||||
"BoxAlignment": "bottom_left",
|
||||
}
|
||||
# emulates `bonsai.bim.helper.import_attributes2(ifc_literal, literal_props.attributes)`
|
||||
# emulates `bonsai.bim.helper.import_attributes(ifc_literal, literal_props.attributes)`
|
||||
for attr_name in literal_attr_values:
|
||||
attr = literal_attributes.add()
|
||||
attr.name = attr_name
|
||||
|
||||
@@ -165,7 +165,7 @@ class EnableEditingGroup(bpy.types.Operator, tool.Ifc.Operator):
|
||||
def _execute(self, context):
|
||||
props = tool.Blender.get_group_props()
|
||||
props.group_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(tool.Ifc.get().by_id(self.group), props.group_attributes)
|
||||
bonsai.bim.helper.import_attributes(tool.Ifc.get().by_id(self.group), props.group_attributes)
|
||||
props.active_group_id = self.group
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ class EnableEditingLayer(bpy.types.Operator):
|
||||
def execute(self, context):
|
||||
props = tool.Layer.get_layer_props()
|
||||
props.layer_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(tool.Ifc.get().by_id(self.layer), props.layer_attributes)
|
||||
bonsai.bim.helper.import_attributes(tool.Ifc.get().by_id(self.layer), props.layer_attributes)
|
||||
props.active_layer_id = self.layer
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
@@ -503,12 +503,12 @@ class EnableEditingAssignedMaterial(bpy.types.Operator):
|
||||
props.material_set_attributes.clear()
|
||||
|
||||
if "Usage" in material.is_a():
|
||||
bonsai.bim.helper.import_attributes2(
|
||||
bonsai.bim.helper.import_attributes(
|
||||
material, props.material_set_usage_attributes, callback=self.import_attributes_callback
|
||||
)
|
||||
bonsai.bim.helper.import_attributes2(material[0], props.material_set_attributes)
|
||||
bonsai.bim.helper.import_attributes(material[0], props.material_set_attributes)
|
||||
else:
|
||||
bonsai.bim.helper.import_attributes2(material, props.material_set_attributes)
|
||||
bonsai.bim.helper.import_attributes(material, props.material_set_attributes)
|
||||
return {"FINISHED"}
|
||||
|
||||
def import_attributes_callback(
|
||||
@@ -652,7 +652,7 @@ class EnableEditingMaterialSetItemProfile(bpy.types.Operator):
|
||||
self.props.active_material_set_item_id = self.material_set_item
|
||||
self.props.material_set_item_profile_attributes.clear()
|
||||
profile = tool.Ifc.get().by_id(self.material_set_item).Profile
|
||||
bonsai.bim.helper.import_attributes2(profile, self.props.material_set_item_profile_attributes)
|
||||
bonsai.bim.helper.import_attributes(profile, self.props.material_set_item_profile_attributes)
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
@@ -713,7 +713,7 @@ class EnableEditingMaterialSetItem(bpy.types.Operator):
|
||||
self.props.material_set_item_material = str(material_set_item.Material.id())
|
||||
|
||||
self.props.material_set_item_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(material_set_item, self.props.material_set_item_attributes)
|
||||
bonsai.bim.helper.import_attributes(material_set_item, self.props.material_set_item_attributes)
|
||||
|
||||
if material_set_item.is_a("IfcMaterialProfile"):
|
||||
if material_set_item.Profile and material_set_item.Profile.ProfileName:
|
||||
|
||||
@@ -118,7 +118,7 @@ class EnableEditingProfile(bpy.types.Operator):
|
||||
def execute(self, context):
|
||||
props = tool.Profile.get_profile_props()
|
||||
props.profile_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(tool.Ifc.get().by_id(self.profile), props.profile_attributes)
|
||||
bonsai.bim.helper.import_attributes(tool.Ifc.get().by_id(self.profile), props.profile_attributes)
|
||||
props.active_profile_id = self.profile
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ def is_editing_project_library_update(self: "BIMProjectProperties", context: bpy
|
||||
self.editing_project_library_id = int(self.selected_project_library)
|
||||
project_library = library_file.by_id(int(self.selected_project_library))
|
||||
self.project_library_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(project_library, self.project_library_attributes)
|
||||
bonsai.bim.helper.import_attributes(project_library, self.project_library_attributes)
|
||||
self.parent_library = str(tool.Project.get_parent_library(project_library).id())
|
||||
ProjectLibraryData.load() # Show edit icon in enum.
|
||||
return
|
||||
|
||||
@@ -581,7 +581,7 @@ class EnableEditingStructuralLoadCase(bpy.types.Operator):
|
||||
self.props.active_load_case_id = self.load_case
|
||||
self.props.load_case_editing_type = "ATTRIBUTES"
|
||||
self.props.load_case_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(
|
||||
bonsai.bim.helper.import_attributes(
|
||||
tool.Ifc.get().by_id(self.load_case),
|
||||
self.props.load_case_attributes,
|
||||
callback=self.import_attributes_callback,
|
||||
@@ -782,7 +782,7 @@ class EnableEditingStructuralLoad(bpy.types.Operator):
|
||||
def execute(self, context):
|
||||
props = tool.Structural.get_structural_props()
|
||||
props.structural_load_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(
|
||||
bonsai.bim.helper.import_attributes(
|
||||
tool.Ifc.get().by_id(self.structural_load), props.structural_load_attributes
|
||||
)
|
||||
props.active_structural_load_id = self.structural_load
|
||||
|
||||
@@ -753,7 +753,7 @@ class EnableEditingSurfaceStyle(bpy.types.Operator):
|
||||
|
||||
if attributes is not None:
|
||||
attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(surface_style or self.ifc_class, attributes, callback)
|
||||
bonsai.bim.helper.import_attributes(surface_style or self.ifc_class, attributes, callback)
|
||||
|
||||
material = tool.Ifc.get_object(style)
|
||||
msprops = tool.Style.get_material_style_props(material)
|
||||
|
||||
@@ -422,7 +422,7 @@ class EnableEditingZone(bpy.types.Operator):
|
||||
def execute(self, context):
|
||||
props = tool.System.get_zone_props()
|
||||
props.attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(tool.Ifc.get().by_id(self.zone), props.attributes)
|
||||
bonsai.bim.helper.import_attributes(tool.Ifc.get().by_id(self.zone), props.attributes)
|
||||
props.is_editing = self.zone
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ class Attribute(bonsai.core.tool.Attribute):
|
||||
@classmethod
|
||||
def import_entity_attributes(cls, entity: ifcopenshell.entity_instance) -> None:
|
||||
props = cls.get_explorer_props()
|
||||
helper.import_attributes2(entity, props.entity_attributes)
|
||||
helper.import_attributes(entity, props.entity_attributes)
|
||||
|
||||
@classmethod
|
||||
def export_entity_attributes(cls) -> dict[str, Any]:
|
||||
|
||||
@@ -72,7 +72,7 @@ class Context(bonsai.core.tool.Context):
|
||||
assert prop
|
||||
prop.data_type = "string"
|
||||
|
||||
bonsai.bim.helper.import_attributes2(context, props.context_attributes, callback)
|
||||
bonsai.bim.helper.import_attributes(context, props.context_attributes, callback)
|
||||
|
||||
@classmethod
|
||||
def clear_context(cls) -> None:
|
||||
|
||||
@@ -130,7 +130,7 @@ class Cost(bonsai.core.tool.Cost):
|
||||
|
||||
props = cls.get_cost_props()
|
||||
props.cost_schedule_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(cost_schedule, props.cost_schedule_attributes, callback=special_import)
|
||||
bonsai.bim.helper.import_attributes(cost_schedule, props.cost_schedule_attributes, callback=special_import)
|
||||
|
||||
@classmethod
|
||||
def enable_editing_cost_items(cls, cost_schedule: ifcopenshell.entity_instance) -> None:
|
||||
@@ -236,7 +236,7 @@ class Cost(bonsai.core.tool.Cost):
|
||||
def load_cost_item_attributes(cls, cost_item: ifcopenshell.entity_instance) -> None:
|
||||
props = cls.get_cost_props()
|
||||
props.cost_item_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(cost_item, props.cost_item_attributes)
|
||||
bonsai.bim.helper.import_attributes(cost_item, props.cost_item_attributes)
|
||||
|
||||
@classmethod
|
||||
def disable_editing_cost_item(cls) -> None:
|
||||
@@ -381,7 +381,7 @@ class Cost(bonsai.core.tool.Cost):
|
||||
def load_cost_item_quantity_attributes(cls, physical_quantity: ifcopenshell.entity_instance) -> None:
|
||||
props = cls.get_cost_props()
|
||||
props.quantity_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(physical_quantity, props.quantity_attributes)
|
||||
bonsai.bim.helper.import_attributes(physical_quantity, props.quantity_attributes)
|
||||
|
||||
@classmethod
|
||||
def enable_editing_cost_item_values(cls, cost_item: ifcopenshell.entity_instance) -> None:
|
||||
@@ -460,7 +460,7 @@ class Cost(bonsai.core.tool.Cost):
|
||||
break
|
||||
return True
|
||||
|
||||
bonsai.bim.helper.import_attributes2(
|
||||
bonsai.bim.helper.import_attributes(
|
||||
cost_value, props.cost_value_attributes, callback=import_attributes_callback
|
||||
)
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ class Document(bonsai.core.tool.Document):
|
||||
return False
|
||||
|
||||
import_callback = callback if document.is_a("IfcDocumentReference") else None
|
||||
bonsai.bim.helper.import_attributes2(document, props.document_attributes, callback=import_callback)
|
||||
bonsai.bim.helper.import_attributes(document, props.document_attributes, callback=import_callback)
|
||||
|
||||
@classmethod
|
||||
def import_project_documents(cls) -> None:
|
||||
|
||||
@@ -1075,7 +1075,7 @@ class Drawing(bonsai.core.tool.Drawing):
|
||||
|
||||
for ifc_literal in cls.get_text_literal(obj, return_list=True):
|
||||
literal_props = props.literals.add()
|
||||
bonsai.bim.helper.import_attributes2(ifc_literal, literal_props.attributes)
|
||||
bonsai.bim.helper.import_attributes(ifc_literal, literal_props.attributes)
|
||||
|
||||
box_alignment_mask = [False] * 9
|
||||
position_string = literal_props.attributes["BoxAlignment"].string_value
|
||||
|
||||
@@ -1802,7 +1802,7 @@ class Geometry(bonsai.core.tool.Geometry):
|
||||
return False
|
||||
return None
|
||||
|
||||
bonsai.bim.helper.import_attributes2(item, props.item_attributes, callback=callback)
|
||||
bonsai.bim.helper.import_attributes(item, props.item_attributes, callback=callback)
|
||||
|
||||
profile = None
|
||||
if item.is_a("IfcSweptAreaSolid"):
|
||||
|
||||
@@ -81,7 +81,7 @@ class Georeference(bonsai.core.tool.Georeference):
|
||||
for context in tool.Ifc.get().by_type("IfcGeometricRepresentationContext", include_subtypes=False):
|
||||
if context.HasCoordinateOperation:
|
||||
projected_crs = context.HasCoordinateOperation[0].TargetCRS
|
||||
bonsai.bim.helper.import_attributes2(projected_crs, props.projected_crs, callback=callback)
|
||||
bonsai.bim.helper.import_attributes(projected_crs, props.projected_crs, callback=callback)
|
||||
return
|
||||
|
||||
@classmethod
|
||||
@@ -153,9 +153,7 @@ class Georeference(bonsai.core.tool.Georeference):
|
||||
for context in tool.Ifc.get().by_type("IfcGeometricRepresentationContext", include_subtypes=False):
|
||||
if context.HasCoordinateOperation:
|
||||
coordinate_operation = context.HasCoordinateOperation[0]
|
||||
bonsai.bim.helper.import_attributes2(
|
||||
coordinate_operation, props.coordinate_operation, callback=callback
|
||||
)
|
||||
bonsai.bim.helper.import_attributes(coordinate_operation, props.coordinate_operation, callback=callback)
|
||||
return
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -61,13 +61,13 @@ class Library(bonsai.core.tool.Library):
|
||||
def import_library_attributes(cls, library: ifcopenshell.entity_instance) -> None:
|
||||
props = cls.get_library_props()
|
||||
props.library_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(library, props.library_attributes)
|
||||
bonsai.bim.helper.import_attributes(library, props.library_attributes)
|
||||
|
||||
@classmethod
|
||||
def import_reference_attributes(cls, reference: ifcopenshell.entity_instance) -> None:
|
||||
props = cls.get_library_props()
|
||||
props.reference_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(reference, props.reference_attributes)
|
||||
bonsai.bim.helper.import_attributes(reference, props.reference_attributes)
|
||||
|
||||
@classmethod
|
||||
def import_references(cls, library: ifcopenshell.entity_instance) -> None:
|
||||
|
||||
@@ -170,7 +170,7 @@ class Material(bonsai.core.tool.Material):
|
||||
def load_material_attributes(cls, material: ifcopenshell.entity_instance) -> None:
|
||||
props = tool.Material.get_material_props()
|
||||
props.material_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(material, props.material_attributes)
|
||||
bonsai.bim.helper.import_attributes(material, props.material_attributes)
|
||||
|
||||
@classmethod
|
||||
def enable_editing_material(cls, material: ifcopenshell.entity_instance) -> None:
|
||||
|
||||
@@ -97,7 +97,7 @@ class Owner(bonsai.core.tool.Owner):
|
||||
for line in data[name] or []:
|
||||
collection.add().name = line
|
||||
|
||||
bonsai.bim.helper.import_attributes2(address, props.address_attributes, callback)
|
||||
bonsai.bim.helper.import_attributes(address, props.address_attributes, callback)
|
||||
|
||||
@classmethod
|
||||
def clear_address(cls) -> None:
|
||||
@@ -154,7 +154,7 @@ class Owner(bonsai.core.tool.Owner):
|
||||
organisation = tool.Ifc.get().by_id(props.active_organisation_id)
|
||||
props.organisation_attributes.clear()
|
||||
|
||||
bonsai.bim.helper.import_attributes2(organisation, props.organisation_attributes)
|
||||
bonsai.bim.helper.import_attributes(organisation, props.organisation_attributes)
|
||||
|
||||
@classmethod
|
||||
def clear_organisation(cls) -> None:
|
||||
@@ -209,7 +209,7 @@ class Owner(bonsai.core.tool.Owner):
|
||||
for name_ in data[name] or []:
|
||||
collection.add().name = name_ or ""
|
||||
|
||||
bonsai.bim.helper.import_attributes2(person, props.person_attributes, callback)
|
||||
bonsai.bim.helper.import_attributes(person, props.person_attributes, callback)
|
||||
|
||||
@classmethod
|
||||
def clear_person(cls) -> None:
|
||||
@@ -253,7 +253,7 @@ class Owner(bonsai.core.tool.Owner):
|
||||
role = cls.get_role()
|
||||
props = cls.get_owner_props()
|
||||
props.role_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(role, props.role_attributes)
|
||||
bonsai.bim.helper.import_attributes(role, props.role_attributes)
|
||||
|
||||
@classmethod
|
||||
def clear_role(cls) -> None:
|
||||
@@ -279,7 +279,7 @@ class Owner(bonsai.core.tool.Owner):
|
||||
def import_actor_attributes(cls, actor: ifcopenshell.entity_instance) -> None:
|
||||
props = cls.get_owner_props()
|
||||
props.actor_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(actor, props.actor_attributes)
|
||||
bonsai.bim.helper.import_attributes(actor, props.actor_attributes)
|
||||
|
||||
@classmethod
|
||||
def clear_actor(cls) -> None:
|
||||
@@ -329,7 +329,7 @@ class Owner(bonsai.core.tool.Owner):
|
||||
new.enum_value = str(data["ApplicationDeveloper"].id())
|
||||
return True
|
||||
|
||||
bonsai.bim.helper.import_attributes2(application, props.application_attributes, callback)
|
||||
bonsai.bim.helper.import_attributes(application, props.application_attributes, callback)
|
||||
|
||||
@classmethod
|
||||
def export_application_attributes(cls) -> dict[str, Any]:
|
||||
|
||||
@@ -98,7 +98,7 @@ class Resource(bonsai.core.tool.Resource):
|
||||
|
||||
@classmethod
|
||||
def load_resource_attributes(cls, resource: ifcopenshell.entity_instance) -> None:
|
||||
bonsai.bim.helper.import_attributes2(resource, bpy.context.scene.BIMResourceProperties.resource_attributes)
|
||||
bonsai.bim.helper.import_attributes(resource, bpy.context.scene.BIMResourceProperties.resource_attributes)
|
||||
|
||||
@classmethod
|
||||
def enable_editing_resource(cls, resource: ifcopenshell.entity_instance) -> None:
|
||||
@@ -136,7 +136,7 @@ class Resource(bonsai.core.tool.Resource):
|
||||
prop.string_value = "" if prop.is_null else ifcdateutils.datetime2ifc(data[name], "IfcDuration")
|
||||
return True
|
||||
|
||||
bonsai.bim.helper.import_attributes2(
|
||||
bonsai.bim.helper.import_attributes(
|
||||
resource_time, bpy.context.scene.BIMResourceProperties.resource_time_attributes, callback
|
||||
)
|
||||
|
||||
@@ -231,7 +231,7 @@ class Resource(bonsai.core.tool.Resource):
|
||||
return True
|
||||
|
||||
props = bpy.context.scene.BIMResourceProperties
|
||||
bonsai.bim.helper.import_attributes2(cost_value, props.cost_value_attributes, callback)
|
||||
bonsai.bim.helper.import_attributes(cost_value, props.cost_value_attributes, callback)
|
||||
|
||||
@classmethod
|
||||
def enable_editing_cost_value_attributes(cls, cost_value: ifcopenshell.entity_instance) -> None:
|
||||
@@ -282,7 +282,7 @@ class Resource(bonsai.core.tool.Resource):
|
||||
props = bpy.context.scene.BIMResourceProperties
|
||||
props.quantity_attributes.clear()
|
||||
props.is_editing_quantity = True
|
||||
bonsai.bim.helper.import_attributes2(resource_quantity, props.quantity_attributes)
|
||||
bonsai.bim.helper.import_attributes(resource_quantity, props.quantity_attributes)
|
||||
|
||||
@classmethod
|
||||
def disable_editing_resource_quantity(cls) -> None:
|
||||
|
||||
@@ -112,7 +112,7 @@ class Sequence(bonsai.core.tool.Sequence):
|
||||
|
||||
props = cls.get_work_plan_props()
|
||||
props.work_plan_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(work_plan, props.work_plan_attributes, callback)
|
||||
bonsai.bim.helper.import_attributes(work_plan, props.work_plan_attributes, callback)
|
||||
|
||||
@classmethod
|
||||
def enable_editing_work_plan(cls, work_plan: Union[ifcopenshell.entity_instance, None]) -> None:
|
||||
@@ -163,7 +163,7 @@ class Sequence(bonsai.core.tool.Sequence):
|
||||
|
||||
props = cls.get_work_schedule_props()
|
||||
props.work_schedule_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(work_schedule, props.work_schedule_attributes, callback)
|
||||
bonsai.bim.helper.import_attributes(work_schedule, props.work_schedule_attributes, callback)
|
||||
|
||||
@classmethod
|
||||
def enable_editing_work_schedule(cls, work_schedule: ifcopenshell.entity_instance) -> None:
|
||||
@@ -382,7 +382,7 @@ class Sequence(bonsai.core.tool.Sequence):
|
||||
def load_task_attributes(cls, task: ifcopenshell.entity_instance) -> None:
|
||||
props = cls.get_work_schedule_props()
|
||||
props.task_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(task, props.task_attributes)
|
||||
bonsai.bim.helper.import_attributes(task, props.task_attributes)
|
||||
|
||||
@classmethod
|
||||
def enable_editing_task_attributes(cls, task: ifcopenshell.entity_instance) -> None:
|
||||
@@ -424,7 +424,7 @@ class Sequence(bonsai.core.tool.Sequence):
|
||||
|
||||
props.task_time_attributes.clear()
|
||||
props.durations_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(task_time, props.task_time_attributes, callback)
|
||||
bonsai.bim.helper.import_attributes(task_time, props.task_time_attributes, callback)
|
||||
|
||||
@classmethod
|
||||
def enable_editing_task_time(cls, task: ifcopenshell.entity_instance) -> None:
|
||||
@@ -562,7 +562,7 @@ class Sequence(bonsai.core.tool.Sequence):
|
||||
def load_work_calendar_attributes(cls, work_calendar: ifcopenshell.entity_instance) -> dict[str, Any]:
|
||||
props = bpy.context.scene.BIMWorkCalendarProperties
|
||||
props.work_calendar_attributes.clear()
|
||||
return bonsai.bim.helper.import_attributes2(work_calendar, props.work_calendar_attributes)
|
||||
return bonsai.bim.helper.import_attributes(work_calendar, props.work_calendar_attributes)
|
||||
|
||||
@classmethod
|
||||
def enable_editing_work_calendar(cls, work_calendar: ifcopenshell.entity_instance) -> None:
|
||||
@@ -582,7 +582,7 @@ class Sequence(bonsai.core.tool.Sequence):
|
||||
props = bpy.context.scene.BIMWorkCalendarProperties
|
||||
props.work_time_attributes.clear()
|
||||
|
||||
bonsai.bim.helper.import_attributes2(work_time, props.work_time_attributes)
|
||||
bonsai.bim.helper.import_attributes(work_time, props.work_time_attributes)
|
||||
|
||||
@classmethod
|
||||
def enable_editing_work_time(cls, work_time: ifcopenshell.entity_instance) -> None:
|
||||
@@ -713,7 +713,7 @@ class Sequence(bonsai.core.tool.Sequence):
|
||||
def load_rel_sequence_attributes(cls, rel_sequence: ifcopenshell.entity_instance) -> None:
|
||||
props = cls.get_work_schedule_props()
|
||||
props.sequence_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(rel_sequence, props.sequence_attributes)
|
||||
bonsai.bim.helper.import_attributes(rel_sequence, props.sequence_attributes)
|
||||
|
||||
@classmethod
|
||||
def enable_editing_rel_sequence_attributes(cls, rel_sequence: ifcopenshell.entity_instance) -> None:
|
||||
@@ -738,7 +738,7 @@ class Sequence(bonsai.core.tool.Sequence):
|
||||
return True
|
||||
|
||||
props.lag_time_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(lag_time, props.lag_time_attributes, callback)
|
||||
bonsai.bim.helper.import_attributes(lag_time, props.lag_time_attributes, callback)
|
||||
|
||||
@classmethod
|
||||
def enable_editing_sequence_lag_time(cls, rel_sequence: ifcopenshell.entity_instance) -> None:
|
||||
|
||||
@@ -560,7 +560,7 @@ class Style(bonsai.core.tool.Style):
|
||||
props = cls.get_style_props()
|
||||
attributes = props.attributes
|
||||
attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(style, attributes)
|
||||
bonsai.bim.helper.import_attributes(style, attributes)
|
||||
|
||||
@classmethod
|
||||
def has_blender_external_style(cls, style_elements: dict[str, ifcopenshell.entity_instance]) -> bool:
|
||||
|
||||
@@ -151,7 +151,7 @@ class System(bonsai.core.tool.System):
|
||||
def import_system_attributes(cls, system: ifcopenshell.entity_instance) -> None:
|
||||
props = cls.get_system_props()
|
||||
props.system_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(system, props.system_attributes)
|
||||
bonsai.bim.helper.import_attributes(system, props.system_attributes)
|
||||
|
||||
@classmethod
|
||||
def get_systems(cls) -> list[ifcopenshell.entity_instance]:
|
||||
|
||||
@@ -120,7 +120,7 @@ class Unit(bonsai.core.tool.Unit):
|
||||
return True
|
||||
|
||||
props.unit_attributes.clear()
|
||||
bonsai.bim.helper.import_attributes2(unit, props.unit_attributes, callback=callback)
|
||||
bonsai.bim.helper.import_attributes(unit, props.unit_attributes, callback=callback)
|
||||
|
||||
@classmethod
|
||||
def import_units(cls) -> None:
|
||||
|
||||
Reference in New Issue
Block a user