mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-29 11:46:33 +00:00
Fix not applying transforms in case if there's only parent or only constraints
This commit is contained in:
@@ -204,7 +204,7 @@ class AssignClass(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
if not tool.Blender.apply_transform_as_local(obj):
|
if not tool.Blender.apply_transform_as_local(obj):
|
||||||
self.report(
|
self.report(
|
||||||
{"ERROR"},
|
{"ERROR"},
|
||||||
f"Object '{obj.name}' has parent/constraints with a shear transform that cannot be applied safely as a local transform. "
|
f"Object '{obj.name}' has parent/constraints with a shear transform that cannot be applied safely as a local transform.\n"
|
||||||
"Please apply parent/constraints manually and try again.",
|
"Please apply parent/constraints manually and try again.",
|
||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
|
|||||||
@@ -1244,7 +1244,7 @@ class Blender(bonsai.core.tool.Blender):
|
|||||||
if transform wasn't applied it's not possible due to a shear.
|
if transform wasn't applied it's not possible due to a shear.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if not obj.parent or not obj.constraints:
|
if not obj.parent and not obj.constraints:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
matrix = obj.matrix_world.copy()
|
matrix = obj.matrix_world.copy()
|
||||||
|
|||||||
Reference in New Issue
Block a user