mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
Fix bug loading wrong external style #5576
By mistake it was always using currently edited external style, even if external style was not edited anymore and even if it was different style currently edited.
This commit is contained in:
@@ -379,8 +379,13 @@ class ActivateExternalStyle(bpy.types.Operator):
|
||||
else:
|
||||
material = bpy.data.materials[self.material_name]
|
||||
|
||||
style = tool.Ifc.get_entity(material)
|
||||
if not style:
|
||||
self.report({"INFO"}, "Material '{self.material_name}' is not an IFC style.")
|
||||
return {"CANCELLED"}
|
||||
|
||||
props = context.scene.BIMStylesProperties
|
||||
if props.is_editing:
|
||||
if props.is_editing_style == style.id() and props.is_editing_class == "IfcExternallyDefinedSurfaceStyle":
|
||||
location = props.external_style_attributes["Location"].string_value
|
||||
identification = props.external_style_attributes["Identification"].string_value
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user