mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 11:52:44 +00:00
Fix bug where style colours were not auto synchronised.
This commit is contained in:
@@ -36,7 +36,9 @@ class Geometry(blenderbim.core.tool.Geometry):
|
||||
|
||||
@classmethod
|
||||
def clear_cache(cls, element):
|
||||
IfcStore.get_cache().remove(element.GlobalId)
|
||||
cache = IfcStore.get_cache()
|
||||
if cache:
|
||||
cache.remove(element.GlobalId)
|
||||
|
||||
@classmethod
|
||||
def clear_modifiers(cls, obj):
|
||||
@@ -224,7 +226,7 @@ class Geometry(blenderbim.core.tool.Geometry):
|
||||
def replace_object_with_empty(cls, obj):
|
||||
element = tool.Ifc.get_entity(obj)
|
||||
name = obj.name
|
||||
tool.Ifc.unlink(obj)
|
||||
tool.Ifc.unlink(obj=obj, element=element)
|
||||
obj.name = ifcopenshell.guid.new()
|
||||
new_obj = bpy.data.objects.new(name, None)
|
||||
if element:
|
||||
|
||||
@@ -108,11 +108,3 @@ class Style(blenderbim.core.tool.Style):
|
||||
def import_surface_attributes(cls, style, obj):
|
||||
obj.BIMStyleProperties.attributes.clear()
|
||||
blenderbim.bim.helper.import_attributes2(style, obj.BIMStyleProperties.attributes)
|
||||
|
||||
@classmethod
|
||||
def link(cls, style, obj):
|
||||
obj.BIMMaterialProperties.ifc_style_id = style.id()
|
||||
|
||||
@classmethod
|
||||
def unlink(self, obj):
|
||||
obj.BIMMaterialProperties.ifc_style_id = 0
|
||||
|
||||
Reference in New Issue
Block a user