diff options
Diffstat (limited to 'source/blender/makesdna/DNA_scene_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index fb1ba15a099..9cc4d5ed55b 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -930,6 +930,19 @@ typedef struct ImagePaintSettings { } ImagePaintSettings; /* ------------------------------------------- */ +/* Paint mode settings */ + +typedef struct PaintModeSettings { + /** Source to select canvas from to paint on (ePaintCanvasSource) */ + char canvas_source; + char _pad[7]; + + /** Selected image when canvas_source=PAINT_CANVAS_SOURCE_IMAGE. */ + Image *canvas_image; + +} PaintModeSettings; + +/* ------------------------------------------- */ /* Particle Edit */ /** Settings for a Particle Editing Brush. */ @@ -1462,6 +1475,9 @@ typedef struct ToolSettings { /* Image Paint (8 bytes aligned please!) */ struct ImagePaintSettings imapaint; + /** Settings for paint mode. */ + struct PaintModeSettings paint_mode; + /* Particle Editing */ struct ParticleEditSettings particle; @@ -2278,11 +2294,21 @@ typedef enum eSculptFlags { SCULPT_HIDE_FACE_SETS = (1 << 17), } eSculptFlags; +/** PaintModeSettings.mode */ +typedef enum ePaintCanvasSource { + /** Paint on the active node of the active material slot. */ + PAINT_CANVAS_SOURCE_MATERIAL = 0, + /** Paint on a selected image. */ + PAINT_CANVAS_SOURCE_IMAGE = 1, + /** Paint on the active color attribute (vertex color) layer. */ + PAINT_CANVAS_SOURCE_COLOR_ATTRIBUTE = 2, +} ePaintCanvasSource; + /** #ImagePaintSettings.mode */ -typedef enum eImagePaintMode { - IMAGEPAINT_MODE_MATERIAL = 0, /* detect texture paint slots from the material */ - IMAGEPAINT_MODE_IMAGE = 1, /* select texture paint image directly */ -} eImagePaintMode; +/* Defines to let old texture painting use the new enum. */ +/* TODO(jbakker): rename usages. */ +#define IMAGEPAINT_MODE_MATERIAL PAINT_CANVAS_SOURCE_MATERIAL +#define IMAGEPAINT_MODE_IMAGE PAINT_CANVAS_SOURCE_IMAGE /** #ImagePaintSettings.interp */ enum { |