diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-01-03 04:26:36 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-01-03 04:34:55 +0300 |
commit | a8ce9a143abbb51eae28e5d0cae1fb310bd0c24c (patch) | |
tree | b883f6e266a4e89693be856ee2fae0efd9f120d4 /source/blender/makesrna/intern/rna_workspace_api.c | |
parent | a854840e76ae3e0724531524e8b1d7a4cd63ea1d (diff) |
Tool System: store the fallback tool for re-use
The fallback tool was run-time only data,
now it's stored in the blend file.
Diffstat (limited to 'source/blender/makesrna/intern/rna_workspace_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_workspace_api.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_workspace_api.c b/source/blender/makesrna/intern/rna_workspace_api.c index 5cc55bfad8a..4fb6677199f 100644 --- a/source/blender/makesrna/intern/rna_workspace_api.c +++ b/source/blender/makesrna/intern/rna_workspace_api.c @@ -63,7 +63,9 @@ static void rna_WorkSpaceTool_setup(ID *id, STRNCPY(tref_rt.op, op_idname); tref_rt.index = index; - STRNCPY(tref_rt.idname_fallback, idname_fallback); + /* While it's logical to assign both these values from setup, + * it's useful to stored this in DNA for re-use, exceptional case: write to the 'tref'. */ + STRNCPY(tref->idname_fallback, idname_fallback); STRNCPY(tref_rt.keymap_fallback, keymap_fallback); WM_toolsystem_ref_set_from_runtime(C, (WorkSpace *)id, tref, &tref_rt, idname); |