Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-01-03 04:26:36 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-01-03 04:34:55 +0300
commita8ce9a143abbb51eae28e5d0cae1fb310bd0c24c (patch)
treeb883f6e266a4e89693be856ee2fae0efd9f120d4 /source/blender/makesrna/intern/rna_workspace_api.c
parenta854840e76ae3e0724531524e8b1d7a4cd63ea1d (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.c4
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);