Blender V5.3
DNA_dynamicpaint_types.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "DNA_listBase.h"
12
13#include "BLI_enum_flags.hh"
14
15namespace blender {
16
17/* surface type */
24
25/* surface flags */
27 MOD_DPAINT_ACTIVE = 1 << 0, /* Is surface enabled */
28
29 MOD_DPAINT_ANTIALIAS = 1 << 1, /* do anti-aliasing. */
30 MOD_DPAINT_DISSOLVE = 1 << 2, /* do dissolve */
31 MOD_DPAINT_MULALPHA = 1 << 3, /* Multiply color by alpha when saving image */
32 MOD_DPAINT_DISSOLVE_LOG = 1 << 4, /* Use 1/x for surface dissolve */
33 MOD_DPAINT_DRY_LOG = 1 << 5, /* Use 1/x for drying paint */
34
35 MOD_DPAINT_WAVE_OPEN_BORDERS = 1 << 7, /* passes waves through mesh edges */
36 MOD_DPAINT_DISP_INCREMENTAL = 1 << 8, /* builds displace on top of earlier values */
37 MOD_DPAINT_USE_DRYING = 1 << 9, /* use drying */
38
39 MOD_DPAINT_OUT1 = 1 << 10, /* output primary surface */
40 MOD_DPAINT_OUT2 = 1 << 11, /* output secondary surface */
41};
43
44/* image_fileformat */
49
50/* disp_type */
52 MOD_DPAINT_DISP_DISPLACE = 0, /* displacement output displace map */
53 MOD_DPAINT_DISP_DEPTH = 1, /* displacement output depth data */
54};
55
56/* effect */
58 MOD_DPAINT_EFFECT_DO_SPREAD = 1 << 0, /* do spread effect */
59 MOD_DPAINT_EFFECT_DO_DRIP = 1 << 1, /* do drip effect */
60 MOD_DPAINT_EFFECT_DO_SHRINK = 1 << 2, /* do shrink effect */
61};
63
64/* init_color_type */
71
72/* canvas flags */
76};
78
79/* flags */
111
112/* collision type */
114 MOD_DPAINT_COL_VOLUME = 0, /* paint with mesh volume */
115 MOD_DPAINT_COL_DIST = 1, /* paint using distance to mesh surface */
116 MOD_DPAINT_COL_VOLDIST = 2, /* use both volume and distance */
117 MOD_DPAINT_COL_PSYS = 3, /* use particle system */
118 MOD_DPAINT_COL_POINT = 4, /* use distance to object center point */
119};
120
121/* proximity_falloff */
123 MOD_DPAINT_PRFALL_CONSTANT = 0, /* no-falloff */
124 MOD_DPAINT_PRFALL_SMOOTH = 1, /* smooth, linear falloff */
125 MOD_DPAINT_PRFALL_RAMP = 2, /* use color ramp */
126};
127
128/* wave_brush_type */
130 MOD_DPAINT_WAVEB_DEPTH = 0, /* use intersection depth */
131 MOD_DPAINT_WAVEB_FORCE = 1, /* act as a force on intersection area */
132 MOD_DPAINT_WAVEB_REFLECT = 2, /* obstacle that reflects waves */
133 MOD_DPAINT_WAVEB_CHANGE = 3, /* use change of intersection depth from previous frame */
134};
135
136/* brush ray_dir */
142
143struct PaintSurfaceData;
144
145/* surface format */
151
153
154 struct DynamicPaintSurface *next = nullptr, *prev = nullptr;
157 struct PaintSurfaceData *data = nullptr;
158
159 struct Collection *brush_group = nullptr;
161
162 /* cache */
163 struct PointCache *pointcache = nullptr;
164 ListBaseT<PointCache> ptcaches = {nullptr, nullptr};
166
167 /* surface */
168 char name[64] = "";
174 short effect_ui = 0;
178
180 int start_frame = 0, end_frame = 0;
181
182 /* initial color */
183 float init_color[4] = {};
184 struct Tex *init_texture = nullptr;
185 char init_layername[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68] = "";
186
187 int dry_speed = 0, diss_speed = 0;
189 float depth_clamp = 0, disp_factor = 0;
190
192 float drip_vel = 0, drip_acc = 0;
193
194 /* per surface brush settings */
196
197 /* wave settings */
199 char _pad2[4] = {};
200
201 char uvlayer_name[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68] = "";
202 char image_output_path[/*FILE_MAX*/ 1024] = "";
203 char output_name[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68] = "";
204 char output_name2[/*MAX_CUSTOMDATA_LAYER_NAME*/ 68] = "";
205};
206
207/* Canvas settings */
210 struct DynamicPaintModifierData *pmd = nullptr;
211
212 ListBaseT<DynamicPaintSurface> surfaces = {nullptr, nullptr};
213 short active_sur = 0;
215 char _pad[4] = {};
216
218 char error[64] = "";
219};
220
221/* Brush settings */
257
258} // namespace blender
#define ENUM_OPERATORS(_enum_type)
These structs are the foundation for all linked lists in the library system.
BMesh Iterators.
struct DynamicPaintModifierData * pmd
eDynamicPaint_ProximityFalloff proximity_falloff
ListBaseT< DynamicPaintSurface > surfaces
struct DynamicPaintModifierData * pmd
struct DynamicPaintCanvasSettings * canvas
eDynamicPaint_EffectFlags effect
eDynamicPaint_SurfaceFormat format
struct DynamicPaintSurface * prev
eDynamicPaint_ImageFormat image_fileformat
struct EffectorWeights * effector_weights
eDynamicPaint_SurfaceFlags flags
eDynamicPaint_InitColorType init_color_type
struct DynamicPaintSurface * next