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-05 08:18:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-05 08:18:43 +0300
commit1b928c2d9a4b4b4a57046176912e0ae6d77f9a1d (patch)
treec19777cbf0b7108f7440a62eea228355488d29b9 /source/blender/makesdna/DNA_scene_types.h
parent56917bcf731c6d3568d920a6ccbec524c25aaea1 (diff)
Paint: add tool offset & mode to runtime data
It was getting too impractical to call BKE_paint_brush_tool_info which needed to lookup the scene pointers. Now each store tool offset and brush mode in 'Paint.runtime'
Diffstat (limited to 'source/blender/makesdna/DNA_scene_types.h')
-rw-r--r--source/blender/makesdna/DNA_scene_types.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 795a48532ce..d235cef1109 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -797,6 +797,13 @@ typedef struct TimeMarker {
#define PAINT_MAX_INPUT_SAMPLES 64
+typedef struct Paint_Runtime {
+ /* Avoid having to compare with scene pointer everywhere. */
+ unsigned int tool_offset;
+ unsigned short ob_mode;
+ char _pad[2];
+} Paint_Runtime;
+
/* We might want to store other things here. */
typedef struct PaintToolSlot {
struct Brush *brush;
@@ -831,6 +838,8 @@ typedef struct Paint {
float tile_offset[3];
int pad2;
+
+ struct Paint_Runtime runtime;
} Paint;
/* ------------------------------------------- */