From 0dc761d1008a7cfef30acdceeb64b405c2001944 Mon Sep 17 00:00:00 2001 From: tomle Date: Wed, 14 Aug 2024 12:41:55 +0200 Subject: [PATCH] Make sure object rotation is set in XYZ-Euler coordinates --- blenderproc/python/types/EntityUtility.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/blenderproc/python/types/EntityUtility.py b/blenderproc/python/types/EntityUtility.py index 5e4c71d9f..f5e183d5e 100644 --- a/blenderproc/python/types/EntityUtility.py +++ b/blenderproc/python/types/EntityUtility.py @@ -41,6 +41,8 @@ def set_rotation_euler(self, rotation_euler: Union[list, Euler, np.ndarray], fra :param frame: The frame number which the value should be set to. If None is given, the current frame number is used. """ + #Make sure object rotation is set in XYZ-Euler coordinates + self.blender_obj.rotation_mode = "XYZ" self.blender_obj.rotation_euler = rotation_euler Utility.insert_keyframe(self.blender_obj, "rotation_euler", frame)