fix/workaround [#34983] bpy.ops.mesh.primitive_torus_add() ignores rotation-parameter

This commit is contained in:
Campbell Barton 2013-04-22 20:53:30 +00:00
parent 36e476ede6
commit 263ea88392

View File

@ -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):