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>2018-04-29 15:30:09 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-04-29 15:30:09 +0300
commit6e76a35f07bb7e5c277347175804bb359b8f0477 (patch)
tree08b3ba9ddf39e7aadec5c838ecca9c2506e31756 /source/blender/windowmanager/intern/wm_operators.c
parentf4ba7667dc34edc3fbd1118f8f0dbe818a8e7d43 (diff)
Tool System: support data-blocks in tools
Needed so tools can set the active brush.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_operators.c')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 4c96afff9a1..67db38c13ed 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1828,6 +1828,7 @@ static int wm_operator_tool_set_exec(bContext *C, wmOperator *op)
tool_def.spacetype = sa->spacetype;
RNA_string_get(op->ptr, "keymap", tool_def.keymap);
RNA_string_get(op->ptr, "manipulator_group", tool_def.manipulator_group);
+ RNA_string_get(op->ptr, "data_block", tool_def.data_block);
WM_toolsystem_set(C, &tool_def);
@@ -1849,6 +1850,7 @@ static void WM_OT_tool_set(wmOperatorType *ot)
RNA_def_string(ot->srna, "keymap", NULL, KMAP_MAX_NAME, "Key Map", "");
RNA_def_string(ot->srna, "manipulator_group", NULL, MAX_NAME, "Manipulator Group", "");
+ RNA_def_string(ot->srna, "data_block", NULL, MAX_NAME, "Data Block", "");
RNA_def_int(ot->srna, "index", 0, INT_MIN, INT_MAX, "Index", "", INT_MIN, INT_MAX);
}
#endif /* USE_WORKSPACE_TOOL */