This repository has been archived on 2025-09-28. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
blender_no_rotation/__init__.py

15 lines
415 B
Python
Raw Normal View History

2025-03-02 13:35:34 +01:00
import bpy
from mathutils import Euler
def update_rotations(*args):
for ok, o in bpy.data.objects.items():
o.rotation_euler = Euler((0, 0, 0))
def register():
for h in list(bpy.app.handlers.depsgraph_update_pre):
if h.__name__ == "update_rotations":
bpy.app.handlers.depsgraph_update_pre.remove(h)
bpy.app.handlers.depsgraph_update_pre.append(update_rotations)
register()