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/windowmanager/intern/wm_toolsystem.c | |
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/windowmanager/intern/wm_toolsystem.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_toolsystem.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_toolsystem.c b/source/blender/windowmanager/intern/wm_toolsystem.c index 1c8bea19952..75bcee562a0 100644 --- a/source/blender/windowmanager/intern/wm_toolsystem.c +++ b/source/blender/windowmanager/intern/wm_toolsystem.c @@ -728,11 +728,11 @@ static void toolsystem_refresh_screen_from_active_tool( } } -bToolRef *WM_toolsystem_ref_set_by_name( +bToolRef *WM_toolsystem_ref_set_by_id( bContext *C, WorkSpace *workspace, const bToolKey *tkey, const char *name, bool cycle) { - wmOperatorType *ot = WM_operatortype_find("WM_OT_tool_set_by_name", false); + wmOperatorType *ot = WM_operatortype_find("WM_OT_tool_set_by_id", false); /* On startup, Python operatores are not yet loaded. */ if (ot == NULL) { return NULL; @@ -775,7 +775,7 @@ static void toolsystem_reinit_with_toolref( .space_type = tref->space_type, .mode = tref->mode, }; - WM_toolsystem_ref_set_by_name(C, workspace, &tkey, tref->idname, false); + WM_toolsystem_ref_set_by_id(C, workspace, &tkey, tref->idname, false); } static const char *toolsystem_default_tool(const bToolKey *tkey) |