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-11-07 00:42:15 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-07 00:43:56 +0300
commitfb932bb52a65c147689f5940aa0f347066ba0547 (patch)
tree700b721559370d073ca83324400bc2415f91b797 /source/blender/makesrna/intern/rna_sculpt_paint.c
parent150864dfb95c7b39dfd491805156599609ab3e2a (diff)
Cleanup: use BKE_brush_tool_get/set macros
Also add API call WM_toolsystem_ref_sync_from_context (was in rna_workspace_api.c)
Diffstat (limited to 'source/blender/makesrna/intern/rna_sculpt_paint.c')
-rw-r--r--source/blender/makesrna/intern/rna_sculpt_paint.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index a97c971e2d3..841a5be1aff 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -44,6 +44,7 @@
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_paint.h"
+#include "BKE_brush.h"
#include "ED_image.h"
@@ -280,9 +281,7 @@ static bool rna_Brush_mode_poll(PointerRNA *ptr, PointerRNA value)
if (brush->ob_mode & ob_mode) {
if (paint->brush) {
- const char *tool_a = (const char *)POINTER_OFFSET(paint->brush, tool_offset);
- const char *tool_b = (const char *)POINTER_OFFSET(brush, tool_offset);
- if (*tool_a == *tool_b) {
+ if (BKE_brush_tool_get(paint->brush, paint) == BKE_brush_tool_get(brush, paint)) {
return true;
}
}