Blender  V2.93
DNA_dynamicpaint_types.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
21 #pragma once
22 
23 #include "DNA_listBase.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 struct PaintSurfaceData;
30 
31 /* surface format */
32 enum {
36 };
37 
38 /* surface type */
39 enum {
44 };
45 
46 /* surface flags */
47 enum {
48  MOD_DPAINT_ACTIVE = 1 << 0, /* Is surface enabled */
49 
50  MOD_DPAINT_ANTIALIAS = 1 << 1, /* do antialiasing */
51  MOD_DPAINT_DISSOLVE = 1 << 2, /* do dissolve */
52  MOD_DPAINT_MULALPHA = 1 << 3, /* Multiply color by alpha when saving image */
53  MOD_DPAINT_DISSOLVE_LOG = 1 << 4, /* Use 1/x for surface dissolve */
54  MOD_DPAINT_DRY_LOG = 1 << 5, /* Use 1/x for drying paint */
55 
56  MOD_DPAINT_WAVE_OPEN_BORDERS = 1 << 7, /* passes waves through mesh edges */
57  MOD_DPAINT_DISP_INCREMENTAL = 1 << 8, /* builds displace on top of earlier values */
58  MOD_DPAINT_USE_DRYING = 1 << 9, /* use drying */
59 
60  MOD_DPAINT_OUT1 = 1 << 10, /* output primary surface */
61  MOD_DPAINT_OUT2 = 1 << 11, /* output secondary surface */
62 };
63 
64 /* image_fileformat */
65 enum {
68 };
69 
70 /* disp_format */
71 enum {
72  MOD_DPAINT_DISP_DISPLACE = 0, /* displacement output displace map */
73  MOD_DPAINT_DISP_DEPTH = 1, /* displacement output depth data */
74 };
75 
76 /* effect */
77 enum {
78  MOD_DPAINT_EFFECT_DO_SPREAD = 1 << 0, /* do spread effect */
79  MOD_DPAINT_EFFECT_DO_DRIP = 1 << 1, /* do drip effect */
80  MOD_DPAINT_EFFECT_DO_SHRINK = 1 << 2, /* do shrink effect */
81 };
82 
83 /* init_color_type */
84 enum {
89 };
90 
91 /* Is stored in ModifierData.runtime. */
92 #
93 #
94 typedef struct DynamicPaintRuntime {
95  struct Mesh *canvas_mesh;
96  struct Mesh *brush_mesh;
98 
99 typedef struct DynamicPaintSurface {
100 
105 
108 
109  /* cache */
111  struct ListBase ptcaches;
113 
114  /* surface */
115  char name[64];
116  short format, type;
119  short effect_ui;
121  int flags, effect;
122 
125 
126  /* initial color */
127  float init_color[4];
128  struct Tex *init_texture;
130  char init_layername[64];
131 
135 
138 
139  /* per surface brush settings */
141 
142  /* wave settings */
144  char _pad2[4];
145 
147  char uvlayer_name[64];
149  char image_output_path[1024];
151  char output_name[64]; /* some surfaces have 2 outputs. */
153  char output_name2[64];
154 
156 
157 /* canvas flags */
158 enum {
161 };
162 
163 /* Canvas settings */
167 
168  struct ListBase surfaces;
170  char _pad[4];
171 
173  char error[64];
174 
176 
177 /* flags */
178 enum {
181  // MOD_DPAINT_USE_MATERIAL = 1 << 1, /* DNA_DEPRECATED */
186 
195 
204 
207 };
208 
209 /* collision type */
210 enum {
211  MOD_DPAINT_COL_VOLUME = 0, /* paint with mesh volume */
212  MOD_DPAINT_COL_DIST = 1, /* paint using distance to mesh surface */
213  MOD_DPAINT_COL_VOLDIST = 2, /* use both volume and distance */
214  MOD_DPAINT_COL_PSYS = 3, /* use particle system */
215  MOD_DPAINT_COL_POINT = 4, /* use distance to object center point */
216 };
217 
218 /* proximity_falloff */
219 enum {
220  MOD_DPAINT_PRFALL_CONSTANT = 0, /* no-falloff */
221  MOD_DPAINT_PRFALL_SMOOTH = 1, /* smooth, linear falloff */
222  MOD_DPAINT_PRFALL_RAMP = 2, /* use color ramp */
223 };
224 
225 /* wave_brush_type */
226 enum {
227  MOD_DPAINT_WAVEB_DEPTH = 0, /* use intersection depth */
228  MOD_DPAINT_WAVEB_FORCE = 1, /* act as a force on intersection area */
229  MOD_DPAINT_WAVEB_REFLECT = 2, /* obstacle that reflects waves */
230  MOD_DPAINT_WAVEB_CHANGE = 3, /* use change of intersection depth from previous frame */
231 };
232 
233 /* brush ray_dir */
234 enum {
238 };
239 
240 /* Brush settings */
244 
252 
253  int flags;
255 
256  float r, g, b, alpha;
257  float wetness;
258 
261 
262  /* color ramps */
267 
269  short wave_type;
270  short ray_dir;
271  char _pad[2];
272 
276 
277 #ifdef __cplusplus
278 }
279 #endif
@ MOD_DPAINT_DISP_DEPTH
@ MOD_DPAINT_DISP_DISPLACE
@ MOD_DPAINT_INITIAL_NONE
@ MOD_DPAINT_INITIAL_VERTEXCOLOR
@ MOD_DPAINT_INITIAL_COLOR
@ MOD_DPAINT_INITIAL_TEXTURE
struct DynamicPaintCanvasSettings DynamicPaintCanvasSettings
struct DynamicPaintRuntime DynamicPaintRuntime
@ MOD_DPAINT_EFFECT_DO_DRIP
@ MOD_DPAINT_EFFECT_DO_SPREAD
@ MOD_DPAINT_EFFECT_DO_SHRINK
@ MOD_DPAINT_ACTIVE
@ MOD_DPAINT_OUT2
@ MOD_DPAINT_USE_DRYING
@ MOD_DPAINT_ANTIALIAS
@ MOD_DPAINT_WAVE_OPEN_BORDERS
@ MOD_DPAINT_DISP_INCREMENTAL
@ MOD_DPAINT_OUT1
@ MOD_DPAINT_DISSOLVE
@ MOD_DPAINT_MULALPHA
@ MOD_DPAINT_DISSOLVE_LOG
@ MOD_DPAINT_DRY_LOG
@ MOD_DPAINT_WAVEB_REFLECT
@ MOD_DPAINT_WAVEB_DEPTH
@ MOD_DPAINT_WAVEB_CHANGE
@ MOD_DPAINT_WAVEB_FORCE
@ MOD_DPAINT_BAKING
@ MOD_DPAINT_RAY_BRUSH_AVG
@ MOD_DPAINT_RAY_CANVAS
@ MOD_DPAINT_RAY_ZPLUS
@ MOD_DPAINT_SURFACE_T_WEIGHT
@ MOD_DPAINT_SURFACE_T_PAINT
@ MOD_DPAINT_SURFACE_T_DISPLACE
@ MOD_DPAINT_SURFACE_T_WAVE
@ MOD_DPAINT_IMGFORMAT_OPENEXR
@ MOD_DPAINT_IMGFORMAT_PNG
@ MOD_DPAINT_PRFALL_CONSTANT
@ MOD_DPAINT_PRFALL_SMOOTH
@ MOD_DPAINT_PRFALL_RAMP
@ MOD_DPAINT_COL_DIST
@ MOD_DPAINT_COL_VOLDIST
@ MOD_DPAINT_COL_POINT
@ MOD_DPAINT_COL_VOLUME
@ MOD_DPAINT_COL_PSYS
struct DynamicPaintBrushSettings DynamicPaintBrushSettings
@ MOD_DPAINT_SURFACE_F_PTEX
@ MOD_DPAINT_SURFACE_F_VERTEX
@ MOD_DPAINT_SURFACE_F_IMAGESEQ
@ MOD_DPAINT_PROX_PROJECT
@ MOD_DPAINT_ABS_ALPHA
@ MOD_DPAINT_RAMP_ALPHA
@ MOD_DPAINT_INVERSE_PROX
@ MOD_DPAINT_USES_VELOCITY
@ MOD_DPAINT_VELOCITY_ALPHA
@ MOD_DPAINT_VELOCITY_DEPTH
@ MOD_DPAINT_ERASE
@ MOD_DPAINT_VELOCITY_COLOR
@ MOD_DPAINT_DO_SMUDGE
@ MOD_DPAINT_PART_RAD
@ MOD_DPAINT_NEGATE_VOLUME
struct DynamicPaintSurface DynamicPaintSurface
These structs are the foundation for all linked lists in the library system.
struct DynamicPaintModifierData * pmd
struct ParticleSystem * psys
struct DynamicPaintModifierData * pmd
struct DynamicPaintSurface * prev
struct DynamicPaintCanvasSettings * canvas
struct PaintSurfaceData * data
struct Collection * brush_group
struct DynamicPaintSurface * next
struct EffectorWeights * effector_weights
struct PointCache * pointcache