Fix bug where an added default material was not linked and auto synced.

This commit is contained in:
Dion Moult
2021-11-10 18:01:10 +11:00
parent a7b3b5261f
commit 28e5af853d
11 changed files with 55 additions and 42 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ class Geometry(blenderbim.core.tool.Geometry):
@classmethod
def clear_scale(cls, obj):
if (obj.scale - Vector((1., 1.,1.))).length > 1e-4:
if (obj.scale - Vector((1.0, 1.0, 1.0))).length > 1e-4:
if obj.data.users == 1:
context_override = {}
context_override["object"] = context_override["active_object"] = obj
@@ -27,11 +27,3 @@ class Material(blenderbim.core.tool.Material):
@classmethod
def add_default_material_object(cls):
return bpy.data.materials.new("Default")
@classmethod
def link(cls, material, obj):
obj.BIMObjectProperties.ifc_definition_id = material.id()
@classmethod
def unlink(self, obj):
obj.BIMObjectProperties.ifc_definition_id = 0