Skip to content

Commit

Permalink
fix check_actors_trasform
Browse files Browse the repository at this point in the history
  • Loading branch information
marcomusy committed Feb 12, 2024
1 parent c98fbcb commit 55d6e79
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions vedo/file_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -1148,12 +1148,12 @@ def write(objct, fileoutput, binary=True):
# check if obj is a Mesh.actor and has a transform
M = objct.actor.GetMatrix()
if M and not M.IsIdentity():
obj = objct.apply_transform_from_actor()
obj = objct.dataset
vedo.logger.info(
f"object '{objct.name}' "
"was manually moved. Writing uses current position."
)
obj = objct.apply_transform_from_actor()
obj = objct.dataset
except:
pass

Expand Down
13 changes: 8 additions & 5 deletions vedo/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1311,11 +1311,14 @@ def check_actors_trasform(self, at=None):
except AttributeError:
continue
if M and not M.IsIdentity():
vedo.logger.info(
f"object '{a.retrieve_object().name}' "
"was manually moved. Updated to its current position."
)
a.retrieve_object().apply_transform_from_actor()
try:
a.retrieve_object().apply_transform_from_actor()
vedo.logger.info(
f"object '{a.retrieve_object().name}' "
"was manually moved. Updated to its current position."
)
except AttributeError:
pass
return self

def reset_camera(self, tight=None):
Expand Down
2 changes: 1 addition & 1 deletion vedo/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
_version = '2024.5.0+dev35'
_version = '2024.5.0+dev36'

0 comments on commit 55d6e79

Please sign in to comment.