From a8ce9a143abbb51eae28e5d0cae1fb310bd0c24c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 3 Jan 2020 12:26:36 +1100 Subject: 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. --- source/blender/makesrna/intern/rna_workspace_api.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/makesrna/intern/rna_workspace_api.c') 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); -- cgit v1.2.3