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:
Diffstat (limited to 'source/blender/blenkernel/BKE_brush.h')
-rw-r--r--source/blender/blenkernel/BKE_brush.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_brush.h b/source/blender/blenkernel/BKE_brush.h
index aca734ae709..1a341d0208b 100644
--- a/source/blender/blenkernel/BKE_brush.h
+++ b/source/blender/blenkernel/BKE_brush.h
@@ -126,6 +126,14 @@ void BKE_brush_scale_size(
float new_unprojected_radius,
float old_unprojected_radius);
+/* Accessors */
+#define BKE_brush_tool_get(brush, p) \
+ (CHECK_TYPE_ANY(brush, struct Brush *, const struct Brush *), \
+ *(const char *)POINTER_OFFSET(brush, (p)->runtime.tool_offset))
+#define BKE_brush_tool_set(brush, p, tool) { \
+ CHECK_TYPE_ANY(brush, struct Brush *); \
+ *(char *)POINTER_OFFSET(brush, (p)->runtime.tool_offset) = tool; } ((void)0)
+
/* debugging only */
void BKE_brush_debug_print_state(struct Brush *br);