forked from bartvdbraak/blender
UI: move object-mode lock out of the 3D header
Avoid obscure options here. Move to the edit menu, although this may be temporary.
This commit is contained in:
parent
65b3c7b72c
commit
2d2db18f0b
@ -499,6 +499,12 @@ class INFO_MT_edit(Menu):
|
|||||||
|
|
||||||
layout.separator()
|
layout.separator()
|
||||||
|
|
||||||
|
# Should move elsewhere (impacts outliner & 3D view).
|
||||||
|
tool_settings = context.tool_settings
|
||||||
|
layout.prop(tool_settings, "lock_object_mode")
|
||||||
|
|
||||||
|
layout.separator()
|
||||||
|
|
||||||
layout.operator("screen.userpref_show", text="User Preferences...", icon='PREFERENCES')
|
layout.operator("screen.userpref_show", text="User Preferences...", icon='PREFERENCES')
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,9 +46,7 @@ class VIEW3D_HT_header(Header):
|
|||||||
mode = 'OBJECT' if obj is None else obj.mode
|
mode = 'OBJECT' if obj is None else obj.mode
|
||||||
|
|
||||||
act_mode_item = bpy.types.Object.bl_rna.properties["mode"].enum_items[mode]
|
act_mode_item = bpy.types.Object.bl_rna.properties["mode"].enum_items[mode]
|
||||||
row = layout.row(align=True)
|
layout.operator_menu_enum("object.mode_set", "mode", text=act_mode_item.name, icon=act_mode_item.icon)
|
||||||
row.operator_menu_enum("object.mode_set", "mode", text=act_mode_item.name, icon=act_mode_item.icon)
|
|
||||||
row.prop(tool_settings, "lock_object_mode", text="")
|
|
||||||
del act_mode_item
|
del act_mode_item
|
||||||
|
|
||||||
layout.template_header_3D_mode()
|
layout.template_header_3D_mode()
|
||||||
@ -801,6 +799,8 @@ class VIEW3D_MT_select_pose(Menu):
|
|||||||
layout.operator_menu_enum("pose.select_grouped", "type", text="Grouped")
|
layout.operator_menu_enum("pose.select_grouped", "type", text="Grouped")
|
||||||
layout.operator("object.select_pattern", text="Select Pattern...")
|
layout.operator("object.select_pattern", text="Select Pattern...")
|
||||||
|
|
||||||
|
layout.operator("object.select_pattern", text="Select Pattern...")
|
||||||
|
|
||||||
|
|
||||||
class VIEW3D_MT_select_particle(Menu):
|
class VIEW3D_MT_select_particle(Menu):
|
||||||
bl_label = "Select"
|
bl_label = "Select"
|
||||||
|
@ -2531,8 +2531,7 @@ static void rna_def_tool_settings(BlenderRNA *brna)
|
|||||||
|
|
||||||
prop = RNA_def_property(srna, "lock_object_mode", PROP_BOOLEAN, PROP_NONE);
|
prop = RNA_def_property(srna, "lock_object_mode", PROP_BOOLEAN, PROP_NONE);
|
||||||
RNA_def_property_boolean_sdna(prop, NULL, "object_flag", SCE_OBJECT_MODE_LOCK);
|
RNA_def_property_boolean_sdna(prop, NULL, "object_flag", SCE_OBJECT_MODE_LOCK);
|
||||||
RNA_def_property_ui_text(prop, "Lock Object Mode", "");
|
RNA_def_property_ui_text(prop, "Lock Object Modes", "Restrict select to the current mode");
|
||||||
RNA_def_property_ui_icon(prop, ICON_LOCKVIEW_OFF, 1);
|
|
||||||
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
|
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
|
||||||
|
|
||||||
/* Transform */
|
/* Transform */
|
||||||
|
Loading…
Reference in New Issue
Block a user