From 96a7ed8a159fec97ab19a6d19ffe6201a4ee2b35 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 22 May 2018 14:00:44 +0200 Subject: Tool System: store operator properties in the tool This replaces last-used property use which wasn't reliable since properties were not considered 'set' - causing them to be ignored. --- source/blender/makesdna/DNA_workspace_types.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna/DNA_workspace_types.h') diff --git a/source/blender/makesdna/DNA_workspace_types.h b/source/blender/makesdna/DNA_workspace_types.h index 24fa0e06d90..ca9186e16bf 100644 --- a/source/blender/makesdna/DNA_workspace_types.h +++ b/source/blender/makesdna/DNA_workspace_types.h @@ -56,11 +56,13 @@ # # typedef struct bToolRef_Runtime { - /* One of these must be defined. */ int cursor; + + /* One of these 3 must be defined. */ char keymap[64]; char manipulator_group[64]; char data_block[64]; + /* index when a tool is a member of a group */ int index; } bToolRef_Runtime; @@ -82,6 +84,15 @@ typedef struct bToolRef { */ int mode; + /** + * Use for tool options, each group's name must match a tool name: + * + * {"Tool Name": {"SOME_OT_operator": {...}, ..}, ..} + * + * This is done since different tools may call the same operators with their own options. + */ + IDProperty *properties; + /** Variables needed to operate the tool. */ bToolRef_Runtime *runtime; } bToolRef; -- cgit v1.2.3