Fix not applying transforms in case if there's only parent or only constraints

This commit is contained in:
Andrej730
2024-11-21 16:11:54 +05:00
parent 8a31e8d149
commit 4891e4ffed
2 changed files with 2 additions and 2 deletions
@@ -204,7 +204,7 @@ class AssignClass(bpy.types.Operator, tool.Ifc.Operator):
if not tool.Blender.apply_transform_as_local(obj):
self.report(
{"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.",
)
continue
+1 -1
View File
@@ -1244,7 +1244,7 @@ class Blender(bonsai.core.tool.Blender):
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
matrix = obj.matrix_world.copy()