From 6ffcddc10afa07b073ce01c25884e23fc2b661df Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 7 Dec 2019 03:45:50 +1100 Subject: Tool System: experimental fallback tool support Implement T66304 as an experimental option, available under the preferences "Experimental" section. - When enabled most tools in the 3D view have a gizmo. - Dragging outside the gizmo uses the 'fallback' tool. - The fallback tool can be changed or disabled in the tool options or from a pie menu (Alt-W). --- source/blender/makesrna/intern/rna_scene.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source/blender/makesrna/intern/rna_scene.c') diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index cca82abc9da..708dfb6c736 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -2867,6 +2867,17 @@ static void rna_def_tool_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Lock Object Modes", "Restrict select to the current mode"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + static const EnumPropertyItem workspace_tool_items[] = { + {SCE_WORKSPACE_TOOL_DEFAULT, "DEFAULT", 0, "Active Tool", ""}, + {SCE_WORKSPACE_TOOL_FALLBACK, "FALLBACK", 0, "Select", ""}, + {0, NULL, 0, NULL, NULL}, + }; + + prop = RNA_def_property(srna, "workspace_tool_type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "workspace_tool_type"); + RNA_def_property_enum_items(prop, workspace_tool_items); + RNA_def_property_ui_text(prop, "Drag", "Action when dragging in the viewport"); + /* Transform */ prop = RNA_def_property(srna, "use_proportional_edit", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "proportional_edit", PROP_EDIT_USE); -- cgit v1.2.3