diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-10-06 16:51:33 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-10-06 16:51:33 +0400 |
commit | 839cc868720f3e9054c9bd12b4823881c82babb7 (patch) | |
tree | 6059085cab06ffd775e6b57aa74b1a8b5e2d42e4 /source/blender | |
parent | 38221fa8e6184da76ec6c86e619f79d1749f218e (diff) |
Fix #28805: Add mesh, align to view, un check align to view. not updating.
Re-set rotation property when "Lock to View" property changes.
This makes proper updates without breaking behavior.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/object/object_add.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 0292977f816..5d8781e0a6d 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -175,12 +175,18 @@ float ED_object_new_primitive_matrix(bContext *C, Object *obedit, float *loc, fl /********************* Add Object Operator ********************/ +void view_align_update(struct Main *UNUSED(main), struct Scene *UNUSED(scene), struct PointerRNA *ptr) +{ + RNA_struct_idprops_unset(ptr, "rotation"); +} + void ED_object_add_generic_props(wmOperatorType *ot, int do_editmode) { PropertyRNA *prop; /* note: this property gets hidden for add-camera operator */ - RNA_def_boolean(ot->srna, "view_align", 0, "Align to View", "Align the new object to the view"); + prop= RNA_def_boolean(ot->srna, "view_align", 0, "Align to View", "Align the new object to the view"); + RNA_def_property_update_runtime(prop, view_align_update); if(do_editmode) { prop= RNA_def_boolean(ot->srna, "enter_editmode", 0, "Enter Editmode", "Enter editmode when adding this object"); |