diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-01-29 19:34:05 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-01-29 19:34:05 +0300 |
commit | 43fab448f31b910409f03e1d9c1a2d74135a2b16 (patch) | |
tree | bf711c2fd0e596a384409fcfa9b7b856a4cc6f19 /source | |
parent | 945ea40887bafff14ad40644b8a86af28bc1ae5c (diff) |
Followup for previous commit: fix mismatches between menu entry and shortcut properties.
For now, did most of the changes in menu entries (i.e. py space UI scripts).
Note we do not get 100% same results as previously, but current situation is
globally better than previous one, though the whole system to retrieve shortcuts
remains a bit weak...
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/object/object_relations.c | 12 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 3 |
2 files changed, 7 insertions, 8 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 67b5c8061cd..430994aed60 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -973,7 +973,7 @@ void OBJECT_OT_parent_set(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - RNA_def_enum(ot->srna, "type", prop_make_parent_types, 0, "Type", ""); + ot->prop = RNA_def_enum(ot->srna, "type", prop_make_parent_types, 0, "Type", ""); RNA_def_boolean(ot->srna, "xmirror", false, "X Mirror", "Apply weights symmetrically along X axis, for Envelope/Automatic vertex groups creation"); RNA_def_boolean(ot->srna, "keep_transform", false, "Keep Transform", @@ -2344,10 +2344,8 @@ void OBJECT_OT_make_local(wmOperatorType *ot) } enum { - /* Be careful with those values, they are used as bitflags in some cases, in others as bool... - * See single_object_users, single_obdata_users, single_object_action_users, etc.< */ - MAKE_SINGLE_USER_ALL = 0, - MAKE_SINGLE_USER_SELECTED = SELECT, + MAKE_SINGLE_USER_ALL = 1, + MAKE_SINGLE_USER_SELECTED = 2, }; static int make_single_user_exec(bContext *C, wmOperator *op) @@ -2355,7 +2353,7 @@ static int make_single_user_exec(bContext *C, wmOperator *op) Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); View3D *v3d = CTX_wm_view3d(C); /* ok if this is NULL */ - const int flag = RNA_enum_get(op->ptr, "type"); + const int flag = (RNA_enum_get(op->ptr, "type") == MAKE_SINGLE_USER_SELECTED) ? SELECT : 0; const bool copy_groups = false; bool update_deps = false; @@ -2421,7 +2419,7 @@ void OBJECT_OT_make_single_user(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - ot->prop = RNA_def_enum(ot->srna, "type", type_items, SELECT, "Type", ""); + ot->prop = RNA_def_enum(ot->srna, "type", type_items, MAKE_SINGLE_USER_SELECTED, "Type", ""); RNA_def_boolean(ot->srna, "object", 0, "Object", "Make single user objects"); RNA_def_boolean(ot->srna, "obdata", 0, "Object Data", "Make single user object data"); diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index aab307babe8..4b1d99b6165 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -3373,7 +3373,8 @@ void VIEW3D_OT_render_border(wmOperatorType *ot) /* rna */ WM_operator_properties_border(ot); - prop = RNA_def_boolean(ot->srna, "camera_only", 0, "Camera Only", "Set render border for camera view and final render only"); + prop = RNA_def_boolean(ot->srna, "camera_only", false, "Camera Only", + "Set render border for camera view and final render only"); RNA_def_property_flag(prop, PROP_HIDDEN); } |