diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-23 00:53:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-23 00:53:30 +0400 |
commit | 263ea883922820464c4f993d0a54661b01f377ba (patch) | |
tree | b58ed1cf8970eedebcc8657285470a35b91402a9 /release/scripts | |
parent | 36e476ede6dae4cc21e1d9a05b7e9b93d52f70d1 (diff) |
fix/workaround [#34983] bpy.ops.mesh.primitive_torus_add() ignores rotation-parameter
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/modules/bpy_extras/object_utils.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/release/scripts/modules/bpy_extras/object_utils.py b/release/scripts/modules/bpy_extras/object_utils.py index d1ff6c0eec7..838d22c1262 100644 --- a/release/scripts/modules/bpy_extras/object_utils.py +++ b/release/scripts/modules/bpy_extras/object_utils.py @@ -68,7 +68,14 @@ def add_object_align_init(context, operator): if properties.is_property_set("view_align"): view_align = view_align_force = operator.view_align else: - properties.view_align = view_align + if properties.is_property_set("rotation"): + # ugh, 'view_align' callback resets + value = properties.rotation[:] + properties.view_align = view_align + properties.rotation = value + del value + else: + properties.view_align = view_align if operator and (properties.is_property_set("rotation") and not view_align_force): |