Fix for [#28425] when user prefs -> editing -> align to == "view" newly inserted...
authorThomas Dinges <blender@dingto.org>
Tue, 30 Aug 2011 14:41:23 +0000 (14:41 +0000)
committerThomas Dinges <blender@dingto.org>
Tue, 30 Aug 2011 14:41:23 +0000 (14:41 +0000)
Patch by Andrew Wiggin, thanks! :)

source/blender/editors/object/object_add.c

index 5212bf32834dccd68704fb7b63d81ec88f6d099d..fa529374bf783990ad929ec7b52d6d0a7146a823 100644 (file)
@@ -276,8 +276,10 @@ int ED_object_add_generic_get_opts(bContext *C, wmOperator *op, float *loc, floa
                RNA_boolean_set(op->ptr, "view_align", view_align);
        }
        
-       if (view_align)
+       if (view_align) {
                ED_object_rotation_from_view(C, rot);
+               RNA_float_set_array(op->ptr, "rotation", rot);
+       }
        else
                RNA_float_get_array(op->ptr, "rotation", rot);