forked from bartvdbraak/blender
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...
This commit is contained in:
parent
945ea40887
commit
43fab448f3
@ -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
|
||||
|
||||
|
||||
|
@ -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):
|
||||
|
@ -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':
|
||||
|
@ -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")
|
||||
|
@ -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()
|
||||
|
||||
|
@ -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()
|
||||
|
@ -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")
|
||||
|
@ -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")
|
||||
|
@ -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
|
||||
|
||||
|
@ -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()
|
||||
|
||||
|
@ -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");
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user