Skip to content

Commit

Permalink
Fix dfki-ric#338 (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlpenAalAlex committed Dec 11, 2023
1 parent 56d46c7 commit fb86732
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions phobos/io/representation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1104,17 +1104,19 @@ def apply_scale(self):
elif BPY_AVAILABLE and isinstance(self.mesh_object, bpy.types.Mesh):
from ..blender.utils import blender as bUtils
objname = "tmp_export_" + self.unique_name
tmpobject = bUtils.createPrimitive(objname, 'box', self.scale)
tmpobject = bUtils.createPrimitive(objname, 'box', (1,1,1))
tmpobject.scale = self.scale
# copy the mesh here
tmpobject.data = self.mesh_object
tmpobject.data = self.mesh_object.copy()
bpy.ops.object.select_all(action='DESELECT')
tmpobject.select_set(True)
bpy.ops.object.transform_apply(scale=True)
bpy.ops.object.select_all(action='DESELECT')
tmpobject.select_set(True)
self.mesh_object = tmpobject.data
bpy.ops.object.delete()
else:
raise NotImplentedError()
raise NotImplementedError()

self._operations.append("apply_scale")
self.history.append(f"apply_scale {self.scale}")
Expand Down

0 comments on commit fb86732

Please sign in to comment.