Add project files
This commit is contained in:
parent
6ea2265007
commit
2e760a0919
2 changed files with 28 additions and 0 deletions
14
__init__.py
Normal file
14
__init__.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
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()
|
14
blender_manifest.toml
Normal file
14
blender_manifest.toml
Normal file
|
@ -0,0 +1,14 @@
|
|||
schema_version = "1.0.0"
|
||||
|
||||
id = "no_rotation"
|
||||
version = "0.0.1"
|
||||
name = "Disable Object Rotation"
|
||||
tagline = "This extension enforces a (0, 0, 0) euler rotation on all objects"
|
||||
maintainer = "ChaoticByte <contact@chaoticbyte.net>"
|
||||
type = "add-on"
|
||||
|
||||
blender_version_min = "4.2.0"
|
||||
|
||||
license = [
|
||||
"SPDX:GPL-3.0-or-later",
|
||||
]
|
Reference in a new issue