Followup for previous commit: fix mismatches between menu entry and shortcut properties.
authorBastien Montagne <montagne29@wanadoo.fr>
Thu, 29 Jan 2015 16:34:05 +0000 (17:34 +0100)
committerBastien Montagne <montagne29@wanadoo.fr>
Thu, 29 Jan 2015 16:34:05 +0000 (17:34 +0100)
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...

12 files changed:
release/scripts/startup/bl_ui/properties_mask_common.py
release/scripts/startup/bl_ui/space_clip.py
release/scripts/startup/bl_ui/space_dopesheet.py
release/scripts/startup/bl_ui/space_graph.py
release/scripts/startup/bl_ui/space_image.py
release/scripts/startup/bl_ui/space_info.py
release/scripts/startup/bl_ui/space_nla.py
release/scripts/startup/bl_ui/space_node.py
release/scripts/startup/bl_ui/space_sequencer.py
release/scripts/startup/bl_ui/space_view3d.py
source/blender/editors/object/object_relations.c
source/blender/editors/space_view3d/view3d_edit.c

index a455677abb4bbde21c49d2919f8033b8708226f6..95afdf66d3768f9c61c3e667525a90d9bbb0bd53 100644 (file)
@@ -344,7 +344,7 @@ class MASK_MT_visibility(Menu):
         layout = self.layout
 
         layout.operator("mask.hide_view_clear", text="Show Hidden")
-        layout.operator("mask.hide_view_set", text="Hide Selected")
+        layout.operator("mask.hide_view_set", text="Hide Selected").unselected = False
         layout.operator("mask.hide_view_set", text="Hide Unselected").unselected = True
 
 
index e7c95bf1155fcb7e750f755eed67acd1903b2776..727bd774a684341dd7bda591e5d90f923a9896ae 100644 (file)
@@ -1215,14 +1215,17 @@ class CLIP_MT_track(Menu):
         layout.operator("clip.solve_camera")
 
         layout.separator()
-        layout.operator("clip.clear_track_path",
-                        text="Clear After").action = 'REMAINED'
+        props = layout.operator("clip.clear_track_path", text="Clear After")
+        props.clear_active = False
+        props.action = 'REMAINED'
 
-        layout.operator("clip.clear_track_path",
-                        text="Clear Before").action = 'UPTO'
+        props = layout.operator("clip.clear_track_path", text="Clear Before")
+        props.clear_active = False
+        props.action = 'UPTO'
 
-        layout.operator("clip.clear_track_path",
-                        text="Clear Track Path").action = 'ALL'
+        props = layout.operator("clip.clear_track_path", text="Clear Track Path")
+        props.clear_active = False
+        props.action = 'ALL'
 
         layout.separator()
         layout.operator("clip.join_tracks")
@@ -1235,16 +1238,21 @@ class CLIP_MT_track(Menu):
         layout.operator("clip.paste_tracks")
 
         layout.separator()
-        layout.operator("clip.track_markers",
-                        text="Track Frame Backwards").backwards = True
+        props = layout.operator("clip.track_markers", text="Track Frame Backwards")
+        props.backwards = True
+        props.sequence = False
 
         props = layout.operator("clip.track_markers", text="Track Backwards")
         props.backwards = True
         props.sequence = True
 
-        layout.operator("clip.track_markers",
-                        text="Track Forwards").sequence = True
-        layout.operator("clip.track_markers", text="Track Frame Forwards")
+        props = layout.operator("clip.track_markers", text="Track Forwards")
+        props.backwards = False
+        props.sequence = True
+
+        props = layout.operator("clip.track_markers", text="Track Frame Forwards")
+        props.backwards = False
+        props.sequence = False
 
         layout.separator()
         layout.operator("clip.delete_track")
@@ -1286,10 +1294,8 @@ class CLIP_MT_track_visibility(Menu):
         layout = self.layout
 
         layout.operator("clip.hide_tracks_clear", text="Show Hidden")
-        layout.operator("clip.hide_tracks", text="Hide Selected")
-
-        layout.operator("clip.hide_tracks",
-                        text="Hide Unselected").unselected = True
+        layout.operator("clip.hide_tracks", text="Hide Selected").unselected = False
+        layout.operator("clip.hide_tracks", text="Hide Unselected").unselected = True
 
 
 class CLIP_MT_track_transform(Menu):
index caf1e73c5f695a562c18e73f0b97063ca0d5ec3b..e52d180c1cb84554f0fab45e1fedfc78498e4421 100644 (file)
@@ -215,8 +215,12 @@ class DOPESHEET_MT_select(Menu):
         layout.operator("action.select_column", text="Between Selected Markers").mode = 'MARKERS_BETWEEN'
 
         layout.separator()
-        layout.operator("action.select_leftright", text="Before Current Frame").mode = 'LEFT'
-        layout.operator("action.select_leftright", text="After Current Frame").mode = 'RIGHT'
+        props = layout.operator("action.select_leftright", text="Before Current Frame")
+        props.extend = False
+        props.mode = 'LEFT'
+        props = layout.operator("action.select_leftright", text="After Current Frame")
+        props.extend = False
+        props.mode = 'RIGHT'
 
         # FIXME: grease pencil mode isn't supported for these yet, so skip for that mode only
         if context.space_data.mode != 'GPENCIL':
index 6b784033bfbbe3e3b2a8c1b49892b957eb8678ed..d3e1a866e431c6522da4b1f7d1b391502770fd28 100644 (file)
@@ -134,9 +134,15 @@ class GRAPH_MT_select(Menu):
         layout.operator("graph.select_all_toggle", text="Invert Selection").invert = True
 
         layout.separator()
-        layout.operator("graph.select_border")
-        layout.operator("graph.select_border", text="Border Axis Range").axis_range = True
-        layout.operator("graph.select_border", text="Border (Include Handles)").include_handles = True
+        props = layout.operator("graph.select_border")
+        props.axis_range = False
+        props.include_handles = False
+        props = layout.operator("graph.select_border", text="Border Axis Range")
+        props.axis_range = True
+        props.include_handles = False
+        props = layout.operator("graph.select_border", text="Border (Include Handles)")
+        props.axis_range = False
+        props.include_handles = True
 
         layout.separator()
         layout.operator("graph.select_column", text="Columns on Selected Keys").mode = 'KEYS'
@@ -146,8 +152,12 @@ class GRAPH_MT_select(Menu):
         layout.operator("graph.select_column", text="Between Selected Markers").mode = 'MARKERS_BETWEEN'
 
         layout.separator()
-        layout.operator("graph.select_leftright", text="Before Current Frame").mode = 'LEFT'
-        layout.operator("graph.select_leftright", text="After Current Frame").mode = 'RIGHT'
+        props = layout.operator("graph.select_leftright", text="Before Current Frame")
+        props.extend = False
+        props.mode = 'LEFT'
+        props = layout.operator("graph.select_leftright", text="After Current Frame")
+        props.extend = False
+        props.mode = 'RIGHT'
 
         layout.separator()
         layout.operator("graph.select_more")
index 44be2780c75e480eefddf109506a5d4a9a479d08..a75e0916c09ac3366efcd7ae60545507394d6feb 100644 (file)
@@ -136,7 +136,7 @@ class IMAGE_MT_select(Menu):
         layout.separator()
 
         layout.operator("uv.select_pinned")
-        layout.operator("uv.select_linked")
+        layout.operator("uv.select_linked").extend = False
 
         layout.separator()
 
index b642b61fcdc23b6d5feda8b67cf0356fb8bd03c9..927967c8bc64944a028cee3c43db2458eb0e971c 100644 (file)
@@ -275,8 +275,8 @@ class INFO_MT_window(Menu):
 
         layout.separator()
 
-        layout.operator("screen.screenshot").full = True
-        layout.operator("screen.screencast").full = True
+        layout.operator("screen.screenshot")
+        layout.operator("screen.screencast")
 
         if sys.platform[:3] == "win":
             layout.separator()
index b748e904f3177262186c1debf65b836f8834c777..ae432c44bf6761c9e4c333c32904a9cf63d6416f 100644 (file)
@@ -108,8 +108,12 @@ class NLA_MT_select(Menu):
         layout.operator("nla.select_border", text="Border Axis Range").axis_range = True
 
         layout.separator()
-        layout.operator("nla.select_leftright", text="Before Current Frame").mode = 'LEFT'
-        layout.operator("nla.select_leftright", text="After Current Frame").mode = 'RIGHT'
+        props = layout.operator("nla.select_leftright", text="Before Current Frame")
+        props.extend = False
+        props.mode = 'LEFT'
+        props = layout.operator("nla.select_leftright", text="After Current Frame")
+        props.extend = False
+        props.mode = 'RIGHT'
 
 
 class NLA_MT_marker(Menu):
@@ -135,7 +139,7 @@ class NLA_MT_edit(Menu):
         layout.operator_menu_enum("nla.snap", "type", text="Snap")
 
         layout.separator()
-        layout.operator("nla.duplicate", text="Duplicate")
+        layout.operator("nla.duplicate", text="Duplicate").linked = False
         layout.operator("nla.duplicate", text="Linked Duplicate").linked = True
         layout.operator("nla.split")
         layout.operator("nla.delete")
index a7e8a23bea2d38bb62c5f8c189dd00579fd6e24a..8b87f3fed503e466aa8dc617490ed323722a1552 100644 (file)
@@ -196,7 +196,7 @@ class NODE_MT_select(Menu):
     def draw(self, context):
         layout = self.layout
 
-        layout.operator("node.select_border")
+        layout.operator("node.select_border").tweak = False
         layout.operator("node.select_circle")
 
         layout.separator()
@@ -207,7 +207,7 @@ class NODE_MT_select(Menu):
 
         layout.separator()
 
-        layout.operator("node.select_grouped")
+        layout.operator("node.select_grouped").extend = False
         layout.operator("node.select_same_type_step").prev = True
         layout.operator("node.select_same_type_step").prev = False
 
@@ -239,14 +239,14 @@ class NODE_MT_node(Menu):
 
         layout.separator()
 
-        layout.operator("node.link_make")
+        layout.operator("node.link_make").replace = False
         layout.operator("node.link_make", text="Make and Replace Links").replace = True
         layout.operator("node.links_cut")
         layout.operator("node.links_detach")
 
         layout.separator()
 
-        layout.operator("node.group_edit")
+        layout.operator("node.group_edit").exit = False
         layout.operator("node.group_ungroup")
         layout.operator("node.group_make")
         layout.operator("node.group_insert")
index a7d8208485d1d973deb1ef11d795386e4b81d9dd..bcf3db572735ef45d1202fc20c9e90fcaf61ad1f 100644 (file)
@@ -348,7 +348,7 @@ class SEQUENCER_MT_strip(Menu):
 
         layout.operator("transform.transform", text="Grab/Move").mode = 'TRANSLATION'
         layout.operator("transform.transform", text="Grab/Extend from frame").mode = 'TIME_EXTEND'
-        layout.operator("sequencer.gap_remove")
+        layout.operator("sequencer.gap_remove").all = False
         layout.operator("sequencer.gap_insert")
 
         #  uiItemO(layout, NULL, 0, "sequencer.strip_snap"); // TODO - add this operator
@@ -404,7 +404,7 @@ class SEQUENCER_MT_strip(Menu):
         #}
 
         layout.separator()
-        layout.operator("sequencer.reload", text="Reload Strips").adjust_length = False
+        layout.operator("sequencer.reload", text="Reload Strips")
         layout.operator("sequencer.reload", text="Reload Strips and Adjust Length").adjust_length = True
         layout.operator("sequencer.reassign_inputs")
         layout.operator("sequencer.swap_inputs")
@@ -413,7 +413,7 @@ class SEQUENCER_MT_strip(Menu):
         layout.operator("sequencer.lock")
         layout.operator("sequencer.unlock")
         layout.operator("sequencer.mute").unselected = False
-        layout.operator("sequencer.unmute")
+        layout.operator("sequencer.unmute").unselected = False
 
         layout.operator("sequencer.mute", text="Mute Deselected Strips").unselected = True
 
index c0099a6895e92c9612208482dd045ed5d43407cc..661c38a6a38d26bdbd5bbec3114035f999fdd34d 100644 (file)
@@ -113,8 +113,8 @@ class VIEW3D_HT_header(Header):
         if obj and mode == 'POSE':
             row = layout.row(align=True)
             row.operator("pose.copy", text="", icon='COPYDOWN')
-            row.operator("pose.paste", text="", icon='PASTEDOWN')
-            row.operator("pose.paste", text="", icon='PASTEFLIPDOWN').flipped = 1
+            row.operator("pose.paste", text="", icon='PASTEDOWN').flipped = False
+            row.operator("pose.paste", text="", icon='PASTEFLIPDOWN').flipped = True
 
 
 class VIEW3D_MT_editor_menus(Menu):
@@ -414,7 +414,7 @@ class VIEW3D_MT_view(Menu):
 
         layout.operator("view3d.clip_border", text="Clipping Border...")
         layout.operator("view3d.zoom_border", text="Zoom Border...")
-        layout.operator("view3d.render_border", text="Render Border...")
+        layout.operator("view3d.render_border", text="Render Border...").camera_only = False
 
         layout.separator()
 
@@ -423,8 +423,8 @@ class VIEW3D_MT_view(Menu):
         layout.separator()
 
         layout.operator("view3d.localview", text="View Global/Local")
-        layout.operator("view3d.view_selected")
-        layout.operator("view3d.view_all")
+        layout.operator("view3d.view_selected").use_all_regions = False
+        layout.operator("view3d.view_all").center = False
 
         layout.separator()
 
@@ -578,8 +578,13 @@ class VIEW3D_MT_select_pose(Menu):
 
         layout.separator()
 
-        layout.operator("pose.select_hierarchy", text="Parent").direction = 'PARENT'
-        layout.operator("pose.select_hierarchy", text="Child").direction = 'CHILD'
+        props = layout.operator("pose.select_hierarchy", text="Parent")
+        props.extend = False
+        props.direction = 'PARENT'
+
+        props = layout.operator("pose.select_hierarchy", text="Child")
+        props.extend = False
+        props.direction = 'CHILD'
 
         layout.separator()
 
@@ -847,8 +852,13 @@ class VIEW3D_MT_select_edit_armature(Menu):
 
         layout.separator()
 
-        layout.operator("armature.select_hierarchy", text="Parent").direction = 'PARENT'
-        layout.operator("armature.select_hierarchy", text="Child").direction = 'CHILD'
+        props = layout.operator("armature.select_hierarchy", text="Parent")
+        props.extend = False
+        props.direction = 'PARENT'
+
+        props = layout.operator("armature.select_hierarchy", text="Child")
+        props.extend = False
+        props.direction = 'CHILD'
 
         layout.separator()
 
@@ -1070,7 +1080,7 @@ class VIEW3D_MT_object(Menu):
 
         layout.operator("object.duplicate_move")
         layout.operator("object.duplicate_move_linked")
-        layout.operator("object.delete", text="Delete...")
+        layout.operator("object.delete", text="Delete...").use_global = False
         layout.operator("object.proxy_make", text="Make Proxy...")
         layout.menu("VIEW3D_MT_make_links", text="Make Links...")
         layout.operator("object.make_dupli_face")
@@ -1802,7 +1812,7 @@ class VIEW3D_MT_pose(Menu):
         layout.separator()
 
         layout.operator("pose.copy")
-        layout.operator("pose.paste")
+        layout.operator("pose.paste").flipped = False
         layout.operator("pose.paste", text="Paste X-Flipped Pose").flipped = True
 
         layout.separator()
@@ -2320,7 +2330,8 @@ class VIEW3D_MT_edit_mesh_faces(Menu):
             layout.separator()
 
         layout.operator("mesh.poke")
-        layout.operator("mesh.quads_convert_to_tris")
+        props = layout.operator("mesh.quads_convert_to_tris")
+        props.quad_method = props.ngon_method = 'BEAUTY'
         layout.operator("mesh.tris_convert_to_quads")
         layout.operator("mesh.face_split_by_edges")
 
@@ -2329,7 +2340,7 @@ class VIEW3D_MT_edit_mesh_faces(Menu):
         layout.operator("mesh.faces_shade_smooth")
         layout.operator("mesh.faces_shade_flat")
 
-        layout.operator("mesh.normals_make_consistent", text="Recalculate Normals")
+        layout.operator("mesh.normals_make_consistent", text="Recalculate Normals").inside = False
 
         layout.separator()
 
index 67b5c8061cdd5e054f3393fbb505addff193d41e..430994aed605ba1144196830cd12d025c986348a 100644 (file)
@@ -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");
index aab307babe8b1a755c72291886cb3e475f446b78..4b1d99b61657c9b7936b56c70645bea459fd29c9 100644 (file)
@@ -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);
 }