Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bpy
- obj = bpy.context.object
- rot = obj.rotation_euler
- print("store object rotation", rot)
- #evaluates correct
- bpy.ops.object.transform_apply(location=False, rotation=True, scale=False)
- print("rot after rotation-apply", rot)
- #problem: rot has changed to (0, 0, 0)
- #problem: rotation cant be set back.
- obj.rotation_euler = (rot)
- print("gameobject_final_rotation: ", obj.rotation_euler)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement