diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-15 04:45:41 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-15 06:53:08 +0300 |
commit | 3400fe3ecee99cb6a74455943f2755e6f22ef047 (patch) | |
tree | d38e6d65b73f32d4b7685f2010e3f70df45994a0 /source/blender/makesrna | |
parent | 388ff003e28bb8077d3dbd300e7e1f6beccea263 (diff) |
Tool System: split UI label from tool identifiers
Prepare for exposing tool registration to the Python API.
- Generated tools can use their own prefix so naming collisions
won't happen between hard coded & generated tools.
- Add-on authors can use the add-on name as a prefix.
Currently the names match, renaming will happen next.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_workspace.c | 5 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_workspace_api.c | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_workspace.c b/source/blender/makesrna/intern/rna_workspace.c index 3ae3f435ffb..ab0af6c0a91 100644 --- a/source/blender/makesrna/intern/rna_workspace.c +++ b/source/blender/makesrna/intern/rna_workspace.c @@ -234,9 +234,8 @@ static void rna_def_workspace_tool(BlenderRNA *brna) RNA_def_struct_clear_flag(srna, STRUCT_UNDO); RNA_def_struct_ui_text(srna, "Work Space Tool", ""); - prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); - RNA_def_property_string_sdna(prop, NULL, "idname"); - RNA_def_property_ui_text(prop, "Name", ""); + prop = RNA_def_property(srna, "idname", PROP_STRING, PROP_NONE); + RNA_def_property_ui_text(prop, "Identifier", ""); RNA_def_struct_name_property(srna, prop); prop = RNA_def_property(srna, "index", PROP_INT, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_workspace_api.c b/source/blender/makesrna/intern/rna_workspace_api.c index 3f1a30a5075..f82b1ecda60 100644 --- a/source/blender/makesrna/intern/rna_workspace_api.c +++ b/source/blender/makesrna/intern/rna_workspace_api.c @@ -133,7 +133,7 @@ void RNA_api_workspace_tool(StructRNA *srna) RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_CONTEXT); RNA_def_function_ui_description(func, "Set the tool settings"); - parm = RNA_def_string(func, "name", NULL, KMAP_MAX_NAME, "Name", ""); + parm = RNA_def_string(func, "idname", NULL, MAX_NAME, "Identifier", ""); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); /* 'bToolRef_Runtime' */ |