mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 13:36:25 +00:00
Fix bug where an added default material was not linked and auto synced.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user