Skip to content

Commit fb86732

Browse files
committed
Fix dfki-ric#338 (2)
1 parent 56d46c7 commit fb86732

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

phobos/io/representation.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -1104,17 +1104,19 @@ def apply_scale(self):
11041104
elif BPY_AVAILABLE and isinstance(self.mesh_object, bpy.types.Mesh):
11051105
from ..blender.utils import blender as bUtils
11061106
objname = "tmp_export_" + self.unique_name
1107-
tmpobject = bUtils.createPrimitive(objname, 'box', self.scale)
1107+
tmpobject = bUtils.createPrimitive(objname, 'box', (1,1,1))
1108+
tmpobject.scale = self.scale
11081109
# copy the mesh here
1109-
tmpobject.data = self.mesh_object
1110+
tmpobject.data = self.mesh_object.copy()
11101111
bpy.ops.object.select_all(action='DESELECT')
11111112
tmpobject.select_set(True)
11121113
bpy.ops.object.transform_apply(scale=True)
11131114
bpy.ops.object.select_all(action='DESELECT')
11141115
tmpobject.select_set(True)
1116+
self.mesh_object = tmpobject.data
11151117
bpy.ops.object.delete()
11161118
else:
1117-
raise NotImplentedError()
1119+
raise NotImplementedError()
11181120

11191121
self._operations.append("apply_scale")
11201122
self.history.append(f"apply_scale {self.scale}")

0 commit comments

Comments
 (0)