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...
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
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")
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")
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):
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':
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'
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")
layout.separator()
layout.operator("uv.select_pinned")
- layout.operator("uv.select_linked")
+ layout.operator("uv.select_linked").extend = False
layout.separator()
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()
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):
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")
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()
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
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")
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
#}
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")
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
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):
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()
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()
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()
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()
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")
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()
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")
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()
/* 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",
}
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)
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;
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");
/* 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);
}