Blender V4.3
rna_dynamicpaint.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#include <climits>
10#include <cstdlib>
11
12#include "BKE_dynamicpaint.h"
13#include "BKE_modifier.hh"
14
16
17#include "BLT_translation.hh"
18
20#include "DNA_modifier_types.h"
22#include "DNA_object_types.h"
23#include "DNA_scene_types.h"
24
25#include "RNA_define.hh"
26#include "RNA_enum_types.hh"
27
28#include "rna_internal.hh"
29
30#include "WM_types.hh"
31
33 {MOD_DYNAMICPAINT_TYPE_CANVAS, "CANVAS", 0, "Canvas", ""},
34 {MOD_DYNAMICPAINT_TYPE_BRUSH, "BRUSH", 0, "Brush", ""},
35 {0, nullptr, 0, nullptr, nullptr},
36};
37
38#ifdef RNA_RUNTIME
39
40# include <fmt/format.h>
41
42# include "BKE_context.hh"
43# include "BKE_particle.h"
44
45# include "DEG_depsgraph.hh"
46# include "DEG_depsgraph_build.hh"
47
48static std::optional<std::string> rna_DynamicPaintCanvasSettings_path(const PointerRNA *ptr)
49{
51 const ModifierData *md = (ModifierData *)settings->pmd;
52 char name_esc[sizeof(md->name) * 2];
53
54 BLI_str_escape(name_esc, md->name, sizeof(name_esc));
55 return fmt::format("modifiers[\"{}\"].canvas_settings", name_esc);
56}
57
58static std::optional<std::string> rna_DynamicPaintBrushSettings_path(const PointerRNA *ptr)
59{
61 const ModifierData *md = (ModifierData *)settings->pmd;
62 char name_esc[sizeof(md->name) * 2];
63
64 BLI_str_escape(name_esc, md->name, sizeof(name_esc));
65 return fmt::format("modifiers[\"{}\"].brush_settings", name_esc);
66}
67
68static std::optional<std::string> rna_DynamicPaintSurface_path(const PointerRNA *ptr)
69{
71 const ModifierData *md = (ModifierData *)surface->canvas->pmd;
72 char name_esc[sizeof(md->name) * 2];
73 char name_esc_surface[sizeof(surface->name) * 2];
74
75 BLI_str_escape(name_esc, md->name, sizeof(name_esc));
76 BLI_str_escape(name_esc_surface, surface->name, sizeof(name_esc_surface));
77 return fmt::format(
78 "modifiers[\"{}\"].canvas_settings.canvas_surfaces[\"{}\"]", name_esc, name_esc_surface);
79}
80
81/*
82 * Surfaces
83 */
84
85static void rna_DynamicPaint_redoModifier(Main * /*bmain*/, Scene * /*scene*/, PointerRNA *ptr)
86{
88}
89
90static void rna_DynamicPaintSurfaces_updateFrames(Main * /*bmain*/,
91 Scene * /*scene*/,
93{
95}
96
97static void rna_DynamicPaintSurface_reset(Main *bmain, Scene *scene, PointerRNA *ptr)
98{
100 rna_DynamicPaint_redoModifier(bmain, scene, ptr);
101}
102
103static void rna_DynamicPaintSurface_initialcolortype(Main *bmain, Scene *scene, PointerRNA *ptr)
104{
106
107 surface->init_layername[0] = '\0';
108 dynamicPaint_clearSurface(scene, surface);
109 rna_DynamicPaint_redoModifier(bmain, scene, ptr);
110}
111
112static void rna_DynamicPaintSurface_uniqueName(Main * /*bmain*/,
113 Scene * /*scene*/,
115{
117 ((DynamicPaintSurface *)ptr->data)->name);
118}
119
120static void rna_DynamicPaintSurface_changeType(Main *bmain, Scene *scene, PointerRNA *ptr)
121{
124 rna_DynamicPaintSurface_reset(bmain, scene, ptr);
125}
126
127static void rna_DynamicPaintSurfaces_changeFormat(Main *bmain, Scene *scene, PointerRNA *ptr)
128{
130
131 /* Only #MOD_DPAINT_SURFACE_F_VERTEX supports #MOD_DPAINT_SURFACE_T_WEIGHT. */
132 if (surface->format == MOD_DPAINT_SURFACE_F_IMAGESEQ &&
133 surface->type == MOD_DPAINT_SURFACE_T_WEIGHT)
134 {
135 surface->type = MOD_DPAINT_SURFACE_T_PAINT;
136 }
137
139 rna_DynamicPaintSurface_reset(bmain, scene, ptr);
140}
141
142static void rna_DynamicPaint_reset_dependency(Main *bmain, Scene * /*scene*/, PointerRNA * /*ptr*/)
143{
145}
146
147static void rna_DynamicPaintSurface_reset_dependency(Main *bmain, Scene *scene, PointerRNA *ptr)
148{
149 rna_DynamicPaintSurface_reset(bmain, scene, ptr);
150 rna_DynamicPaint_reset_dependency(bmain, scene, ptr);
151}
152
153static PointerRNA rna_PaintSurface_active_get(PointerRNA *ptr)
154{
156 DynamicPaintSurface *surface = static_cast<DynamicPaintSurface *>(canvas->surfaces.first);
157 int id = 0;
158
159 for (; surface; surface = surface->next) {
160 if (id == canvas->active_sur) {
161 return rna_pointer_inherit_refine(ptr, &RNA_DynamicPaintSurface, surface);
162 }
163 id++;
164 }
165 return rna_pointer_inherit_refine(ptr, &RNA_DynamicPaintSurface, nullptr);
166}
167
168static void rna_DynamicPaint_surfaces_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
169{
171# if 0
173 iter, (void *)canvas->surfaces, sizeof(PaintSurface), canvas->totsur, 0, 0);
174# endif
175 rna_iterator_listbase_begin(iter, &canvas->surfaces, nullptr);
176}
177
178static int rna_Surface_active_point_index_get(PointerRNA *ptr)
179{
181 return canvas->active_sur;
182}
183
184static void rna_Surface_active_point_index_set(PointerRNA *ptr, int value)
185{
187 canvas->active_sur = value;
188 return;
189}
190
191static void rna_Surface_active_point_range(
192 PointerRNA *ptr, int *min, int *max, int * /*softmin*/, int * /*softmax*/)
193{
195
196 *min = 0;
197 *max = BLI_listbase_count(&canvas->surfaces) - 1;
198}
199
200/* uvlayer */
201static void rna_DynamicPaint_uvlayer_set(PointerRNA *ptr, const char *value)
202{
204 DynamicPaintSurface *surface = static_cast<DynamicPaintSurface *>(canvas->surfaces.first);
205 int id = 0;
206
207 for (; surface; surface = surface->next) {
208 if (id == canvas->active_sur) {
210 ptr, value, surface->uvlayer_name, sizeof(surface->uvlayer_name));
211 return;
212 }
213 id++;
214 }
215}
216
217/* is point cache used */
218static bool rna_DynamicPaint_is_cache_user_get(PointerRNA *ptr)
219{
221
222 return (surface->format != MOD_DPAINT_SURFACE_F_IMAGESEQ) ? 1 : 0;
223}
224
225/* Does output layer exist. */
226static bool rna_DynamicPaint_is_output_exists(DynamicPaintSurface *surface, Object *ob, int index)
227{
228 return dynamicPaint_outputLayerExists(surface, ob, index);
229}
230
231static const EnumPropertyItem *rna_DynamicPaint_surface_type_itemf(bContext * /*C*/,
233 PropertyRNA * /*prop*/,
234 bool *r_free)
235{
237
238 EnumPropertyItem *item = nullptr;
239 EnumPropertyItem tmp = {0, "", 0, "", ""};
240 int totitem = 0;
241
242 /* Paint type - available for all formats */
244 tmp.identifier = "PAINT";
245 tmp.name = "Paint";
246 tmp.icon = ICON_TPAINT_HLT;
247 RNA_enum_item_add(&item, &totitem, &tmp);
248
249 /* Displace */
252 tmp.identifier = "DISPLACE";
253 tmp.name = "Displace";
254 tmp.icon = ICON_MOD_DISPLACE;
255 RNA_enum_item_add(&item, &totitem, &tmp);
256 }
257
258 /* Weight */
259 if (surface->format == MOD_DPAINT_SURFACE_F_VERTEX) {
261 tmp.identifier = "WEIGHT";
262 tmp.name = "Weight";
263 tmp.icon = ICON_MOD_VERTEX_WEIGHT;
264 RNA_enum_item_add(&item, &totitem, &tmp);
265 }
266
267 /* Height waves */
268 {
270 tmp.identifier = "WAVE";
271 tmp.name = "Waves";
272 tmp.icon = ICON_MOD_WAVE;
273 RNA_enum_item_add(&item, &totitem, &tmp);
274 }
275
276 RNA_enum_item_end(&item, &totitem);
277 *r_free = true;
278
279 return item;
280}
281
282#else
283
284/* canvas.canvas_surfaces */
286{
287 StructRNA *srna;
288 PropertyRNA *prop;
289
290 RNA_def_property_srna(cprop, "DynamicPaintSurfaces");
291 srna = RNA_def_struct(brna, "DynamicPaintSurfaces", nullptr);
292 RNA_def_struct_sdna(srna, "DynamicPaintCanvasSettings");
293 RNA_def_struct_ui_text(srna, "Canvas Surfaces", "Collection of Dynamic Paint Canvas surfaces");
294
295 prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
298 "rna_Surface_active_point_index_get",
299 "rna_Surface_active_point_index_set",
300 "rna_Surface_active_point_range");
301 RNA_def_property_ui_text(prop, "Active Point Cache Index", "");
302
303 prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
304 RNA_def_property_struct_type(prop, "DynamicPaintSurface");
305 RNA_def_property_pointer_funcs(prop, "rna_PaintSurface_active_get", nullptr, nullptr, nullptr);
306 RNA_def_property_ui_text(prop, "Active Surface", "Active Dynamic Paint surface being displayed");
307 RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, nullptr);
308}
309
311{
312 StructRNA *srna;
313 PropertyRNA *prop;
314 PropertyRNA *parm;
315 FunctionRNA *func;
316
317 /* Surface format */
318 static const EnumPropertyItem prop_dynamicpaint_surface_format[] = {
319 // {MOD_DPAINT_SURFACE_F_PTEX, "PTEX", ICON_TEXTURE_SHADED, "Ptex", ""},
320 {MOD_DPAINT_SURFACE_F_VERTEX, "VERTEX", ICON_OUTLINER_DATA_MESH, "Vertex", ""},
321 {MOD_DPAINT_SURFACE_F_IMAGESEQ, "IMAGE", ICON_FILE_IMAGE, "Image Sequence", ""},
322 {0, nullptr, 0, nullptr, nullptr},
323 };
324
325 /* Surface type - generated dynamically based on surface format */
326 static const EnumPropertyItem prop_dynamicpaint_surface_type[] = {
327 {MOD_DPAINT_SURFACE_T_PAINT, "PAINT", 0, "Paint", ""},
328 {0, nullptr, 0, nullptr, nullptr},
329 };
330
331 /* Initial color setting */
332 static const EnumPropertyItem prop_dynamicpaint_init_color_type[] = {
333 {MOD_DPAINT_INITIAL_NONE, "NONE", 0, "None", ""},
334 {MOD_DPAINT_INITIAL_COLOR, "COLOR", ICON_COLOR, "Color", ""},
335 {MOD_DPAINT_INITIAL_TEXTURE, "TEXTURE", ICON_TEXTURE, "UV Texture", ""},
336 {MOD_DPAINT_INITIAL_VERTEXCOLOR, "VERTEX_COLOR", ICON_GROUP_VCOL, "Vertex Color", ""},
337 {0, nullptr, 0, nullptr, nullptr},
338 };
339
340 /* Effect type
341 * Only used by UI to view per effect settings. */
342 static const EnumPropertyItem prop_dynamicpaint_effecttype[] = {
343 {1, "SPREAD", 0, "Spread", ""},
344 {2, "DRIP", 0, "Drip", ""},
345 {3, "SHRINK", 0, "Shrink", ""},
346 {0, nullptr, 0, nullptr, nullptr},
347 };
348
349 /* Displace-map file format. */
350 static const EnumPropertyItem prop_dynamicpaint_image_fileformat[] = {
351 {MOD_DPAINT_IMGFORMAT_PNG, "PNG", 0, "PNG", ""},
352# ifdef WITH_OPENEXR
353 {MOD_DPAINT_IMGFORMAT_OPENEXR, "OPENEXR", 0, "OpenEXR", ""},
354# endif
355 {0, nullptr, 0, nullptr, nullptr},
356 };
357
358 /* Displace-map type. */
359 static const EnumPropertyItem prop_dynamicpaint_displace_type[] = {
360 {MOD_DPAINT_DISP_DISPLACE, "DISPLACE", 0, "Displacement", ""},
361 {MOD_DPAINT_DISP_DEPTH, "DEPTH", 0, "Depth", ""},
362 {0, nullptr, 0, nullptr, nullptr},
363 };
364
365 /* Surface */
366 srna = RNA_def_struct(brna, "DynamicPaintSurface", nullptr);
367 RNA_def_struct_sdna(srna, "DynamicPaintSurface");
368 RNA_def_struct_ui_text(srna, "Paint Surface", "A canvas surface layer");
369 RNA_def_struct_path_func(srna, "rna_DynamicPaintSurface_path");
370
371 prop = RNA_def_property(srna, "surface_format", PROP_ENUM, PROP_NONE);
373 RNA_def_property_enum_sdna(prop, nullptr, "format");
374 RNA_def_property_enum_items(prop, prop_dynamicpaint_surface_format);
375 RNA_def_property_ui_text(prop, "Format", "Surface Format");
376 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaintSurfaces_changeFormat");
377
378 prop = RNA_def_property(srna, "surface_type", PROP_ENUM, PROP_NONE);
380 RNA_def_property_enum_sdna(prop, nullptr, "type");
381 RNA_def_property_enum_items(prop, prop_dynamicpaint_surface_type);
382 RNA_def_property_enum_funcs(prop, nullptr, nullptr, "rna_DynamicPaint_surface_type_itemf");
383 RNA_def_property_ui_text(prop, "Surface Type", "Surface Type");
384 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaintSurface_changeType");
385
386 prop = RNA_def_property(srna, "is_active", PROP_BOOLEAN, PROP_NONE);
387 RNA_def_property_boolean_sdna(prop, nullptr, "flags", MOD_DPAINT_ACTIVE);
388 RNA_def_property_ui_text(prop, "Is Active", "Toggle whether surface is processed or ignored");
389 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
390
391 prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
392 RNA_def_property_ui_text(prop, "Name", "Surface name");
393 RNA_def_property_update(prop, NC_OBJECT, "rna_DynamicPaintSurface_uniqueName");
395
396 prop = RNA_def_property(srna, "brush_collection", PROP_POINTER, PROP_NONE);
397 RNA_def_property_struct_type(prop, "Collection");
398 RNA_def_property_pointer_sdna(prop, nullptr, "brush_group");
401 prop, "Brush Collection", "Only use brush objects from this collection");
403 prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaintSurface_reset_dependency");
404
405 /*
406 * Paint, wet and displace
407 */
408
409 prop = RNA_def_property(srna, "use_dissolve", PROP_BOOLEAN, PROP_NONE);
410 RNA_def_property_boolean_sdna(prop, nullptr, "flags", MOD_DPAINT_DISSOLVE);
411 RNA_def_property_ui_text(prop, "Dissolve", "Enable to make surface changes disappear over time");
413
414 prop = RNA_def_property(srna, "dissolve_speed", PROP_INT, PROP_TIME);
415 RNA_def_property_int_sdna(prop, nullptr, "diss_speed");
416 RNA_def_property_range(prop, 1.0, 10000.0);
417 RNA_def_property_ui_range(prop, 1.0, 10000.0, 5, -1);
419 prop, "Dissolve Time", "Approximately in how many frames should dissolve happen");
420
421 prop = RNA_def_property(srna, "use_drying", PROP_BOOLEAN, PROP_NONE);
423 RNA_def_property_ui_text(prop, "Dry", "Enable to make surface wetness dry over time");
424
425 prop = RNA_def_property(srna, "dry_speed", PROP_INT, PROP_TIME);
426 RNA_def_property_range(prop, 1.0, 10000.0);
427 RNA_def_property_ui_range(prop, 1.0, 10000.0, 5, -1);
429 prop, "Dry Time", "Approximately in how many frames should drying happen");
430
431 /*
432 * Simulation settings
433 */
434 prop = RNA_def_property(srna, "image_resolution", PROP_INT, PROP_NONE);
436 RNA_def_property_range(prop, 16.0, 4096.0);
437 RNA_def_property_ui_range(prop, 16.0, 4096.0, 1, -1);
438 RNA_def_property_ui_text(prop, "Resolution", "Output image resolution");
439
440 prop = RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
441 RNA_def_property_string_sdna(prop, nullptr, "uvlayer_name");
442 RNA_def_property_ui_text(prop, "UV Map", "UV map name");
443 RNA_def_property_string_funcs(prop, nullptr, nullptr, "rna_DynamicPaint_uvlayer_set");
444
445 prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_NONE);
446 RNA_def_property_int_sdna(prop, nullptr, "start_frame");
449 RNA_def_property_ui_range(prop, 1.0, 9999, 1, -1);
450 RNA_def_property_ui_text(prop, "Start Frame", "Simulation start frame");
451 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaintSurfaces_updateFrames");
452
453 prop = RNA_def_property(srna, "frame_end", PROP_INT, PROP_NONE);
454 RNA_def_property_int_sdna(prop, nullptr, "end_frame");
457 RNA_def_property_ui_range(prop, 1.0, 9999.0, 1, -1);
458 RNA_def_property_ui_text(prop, "End Frame", "Simulation end frame");
459 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaintSurfaces_updateFrames");
460
461 prop = RNA_def_property(srna, "frame_substeps", PROP_INT, PROP_NONE);
462 RNA_def_property_int_sdna(prop, nullptr, "substeps");
463 RNA_def_property_range(prop, 0.0, 20.0);
464 RNA_def_property_ui_range(prop, 0.0, 10, 1, -1);
466 prop, "Sub-Steps", "Do extra frames between scene frames to ensure smooth motion");
467
468 prop = RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE);
472 "Anti-Aliasing",
474 " multisampling to smooth paint edges");
475 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaintSurface_reset");
476
477 prop = RNA_def_property(srna, "brush_influence_scale", PROP_FLOAT, PROP_FACTOR);
478 RNA_def_property_float_sdna(prop, nullptr, "influence_scale");
479 RNA_def_property_range(prop, 0.0, 1.0);
480 RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2);
482 prop, "Influence Scale", "Adjust influence brush objects have on this surface");
483 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
484
485 prop = RNA_def_property(srna, "brush_radius_scale", PROP_FLOAT, PROP_FACTOR);
486 RNA_def_property_float_sdna(prop, nullptr, "radius_scale");
487 RNA_def_property_range(prop, 0.0, 10.0);
488 RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2);
490 prop, "Radius Scale", "Adjust radius of proximity brushes or particles for this surface");
491 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
492
493 /*
494 * Initial Color
495 */
496
497 prop = RNA_def_property(srna, "init_color_type", PROP_ENUM, PROP_NONE);
499 RNA_def_property_enum_items(prop, prop_dynamicpaint_init_color_type);
500 RNA_def_property_ui_text(prop, "Initial Color", "");
503 "rna_DynamicPaintSurface_initialcolortype");
504
505 prop = RNA_def_property(srna, "init_color", PROP_FLOAT, PROP_COLOR_GAMMA);
507 RNA_def_property_array(prop, 4);
508 RNA_def_property_ui_text(prop, "Color", "Initial color of the surface");
510 prop, NC_MATERIAL | ND_SHADING_DRAW | ND_MODIFIER, "rna_DynamicPaintSurface_reset");
511
512 prop = RNA_def_property(srna, "init_texture", PROP_POINTER, PROP_NONE);
514 RNA_def_property_ui_text(prop, "Texture", "");
516 prop, NC_MATERIAL | ND_SHADING_DRAW | ND_MODIFIER, "rna_DynamicPaintSurface_reset");
517
518 prop = RNA_def_property(srna, "init_layername", PROP_STRING, PROP_NONE);
519 RNA_def_property_ui_text(prop, "Data Layer", "");
521 prop, NC_MATERIAL | ND_SHADING_DRAW | ND_MODIFIER, "rna_DynamicPaintSurface_reset");
522
523 /*
524 * Effect Settings
525 */
526 prop = RNA_def_property(srna, "effect_ui", PROP_ENUM, PROP_NONE);
528 RNA_def_property_enum_items(prop, prop_dynamicpaint_effecttype);
529 RNA_def_property_ui_text(prop, "Effect Type", "");
530
531 prop = RNA_def_property(srna, "use_dry_log", PROP_BOOLEAN, PROP_NONE);
532 RNA_def_property_boolean_sdna(prop, nullptr, "flags", MOD_DPAINT_DRY_LOG);
534 prop, "Slow", "Use logarithmic drying (makes high values to dry faster than low values)");
535
536 prop = RNA_def_property(srna, "use_dissolve_log", PROP_BOOLEAN, PROP_NONE);
539 prop, "Slow", "Use logarithmic dissolve (makes high values to fade faster than low values)");
540
541 prop = RNA_def_property(srna, "use_spread", PROP_BOOLEAN, PROP_NONE);
545 prop, "Use Spread", "Process spread effect (spread wet paint around surface)");
546 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaintSurface_reset");
547
548 prop = RNA_def_property(srna, "spread_speed", PROP_FLOAT, PROP_NONE);
549 RNA_def_property_float_sdna(prop, nullptr, "spread_speed");
550 RNA_def_property_range(prop, 0.001, 10.0);
551 RNA_def_property_ui_range(prop, 0.01, 5.0, 1, 2);
553 prop, "Spread Speed", "How fast spread effect moves on the canvas surface");
554
555 prop = RNA_def_property(srna, "color_dry_threshold", PROP_FLOAT, PROP_FACTOR);
556 RNA_def_property_float_sdna(prop, nullptr, "color_dry_threshold");
557 RNA_def_property_range(prop, 0.0, 1.0);
558 RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2);
560 prop, "Color Dry", "The wetness level when colors start to shift to the background");
561
562 prop = RNA_def_property(srna, "color_spread_speed", PROP_FLOAT, PROP_NONE);
563 RNA_def_property_float_sdna(prop, nullptr, "color_spread_speed");
564 RNA_def_property_range(prop, 0.0, 2.0);
565 RNA_def_property_ui_range(prop, 0.0, 2.0, 1, 2);
566 RNA_def_property_ui_text(prop, "Color Spread", "How fast colors get mixed within wet paint");
567
568 prop = RNA_def_property(srna, "use_drip", PROP_BOOLEAN, PROP_NONE);
572 prop, "Use Drip", "Process drip effect (drip wet paint to gravity direction)");
573 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaintSurface_reset");
574
575 prop = RNA_def_property(srna, "use_shrink", PROP_BOOLEAN, PROP_NONE);
578 RNA_def_property_ui_text(prop, "Use Shrink", "Process shrink effect (shrink paint areas)");
579 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaintSurface_reset");
580
581 prop = RNA_def_property(srna, "shrink_speed", PROP_FLOAT, PROP_NONE);
582 RNA_def_property_float_sdna(prop, nullptr, "shrink_speed");
583 RNA_def_property_range(prop, 0.001, 10.0);
584 RNA_def_property_ui_range(prop, 0.01, 5.0, 1, 2);
586 prop, "Shrink Speed", "How fast shrink effect moves on the canvas surface");
587
588 prop = RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE);
589 RNA_def_property_struct_type(prop, "EffectorWeights");
592 RNA_def_property_ui_text(prop, "Effector Weights", "");
593
594 prop = RNA_def_property(srna, "drip_velocity", PROP_FLOAT, PROP_NONE);
595 RNA_def_property_float_sdna(prop, nullptr, "drip_vel");
596 RNA_def_property_range(prop, -200.0f, 200.0f);
597 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
598 RNA_def_property_ui_text(prop, "Velocity", "How much surface velocity affects dripping");
599
600 prop = RNA_def_property(srna, "drip_acceleration", PROP_FLOAT, PROP_NONE);
601 RNA_def_property_float_sdna(prop, nullptr, "drip_acc");
602 RNA_def_property_range(prop, -200.0f, 200.0f);
603 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
604 RNA_def_property_ui_text(prop, "Acceleration", "How much surface acceleration affects dripping");
605
606 /*
607 * Output settings
608 */
609 prop = RNA_def_property(srna, "use_premultiply", PROP_BOOLEAN, PROP_NONE);
611 RNA_def_property_boolean_sdna(prop, nullptr, "flags", MOD_DPAINT_MULALPHA);
613 prop, "Premultiply Alpha", "Multiply color by alpha (recommended for Blender input)");
614
615 prop = RNA_def_property(srna, "image_output_path", PROP_STRING, PROP_DIRPATH);
616 RNA_def_property_string_sdna(prop, nullptr, "image_output_path");
617 RNA_def_property_ui_text(prop, "Output Path", "Directory to save the textures");
618
619 /* output for primary surface data */
620 prop = RNA_def_property(srna, "output_name_a", PROP_STRING, PROP_NONE);
621 RNA_def_property_string_sdna(prop, nullptr, "output_name");
622 RNA_def_property_ui_text(prop, "Output Name", "Name used to save output from this surface");
623
624 prop = RNA_def_property(srna, "use_output_a", PROP_BOOLEAN, PROP_NONE);
625 RNA_def_property_boolean_sdna(prop, nullptr, "flags", MOD_DPAINT_OUT1);
626 RNA_def_property_ui_text(prop, "Use Output", "Save this output layer");
627
628 /* Output for secondary surface data. */
629 prop = RNA_def_property(srna, "output_name_b", PROP_STRING, PROP_NONE);
630 RNA_def_property_string_sdna(prop, nullptr, "output_name2");
631 RNA_def_property_ui_text(prop, "Output Name", "Name used to save output from this surface");
632
633 prop = RNA_def_property(srna, "use_output_b", PROP_BOOLEAN, PROP_NONE);
634 RNA_def_property_boolean_sdna(prop, nullptr, "flags", MOD_DPAINT_OUT2);
635 RNA_def_property_ui_text(prop, "Use Output", "Save this output layer");
636
637 /* to check if output name exists */
638 func = RNA_def_function(srna, "output_exists", "rna_DynamicPaint_is_output_exists");
639 RNA_def_function_ui_description(func, "Checks if surface output layer of given name exists");
640 parm = RNA_def_pointer(func, "object", "Object", "", "");
642 parm = RNA_def_int(func, "index", 0, 0, 1, "Index", "", 0, 1);
644 /* return type */
645 parm = RNA_def_boolean(func, "exists", false, "", "");
646 RNA_def_function_return(func, parm);
647
648 prop = RNA_def_property(srna, "depth_clamp", PROP_FLOAT, PROP_NONE);
650 RNA_def_property_range(prop, 0.00, 50.0);
651 RNA_def_property_ui_range(prop, 0.00, 5.0, 1, 2);
653 prop,
654 "Max Displace",
655 "Maximum level of depth intersection in object space (use 0.0 to disable)");
656 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
657
658 prop = RNA_def_property(srna, "displace_factor", PROP_FLOAT, PROP_NONE);
659 RNA_def_property_float_sdna(prop, nullptr, "disp_factor");
661 RNA_def_property_range(prop, -50.0, 50.0);
662 RNA_def_property_ui_range(prop, -5.0, 5.0, 1, 2);
664 prop, "Displace Factor", "Strength of displace when applied to the mesh");
665 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
666
667 prop = RNA_def_property(srna, "image_fileformat", PROP_ENUM, PROP_NONE);
669 RNA_def_property_enum_items(prop, prop_dynamicpaint_image_fileformat);
670 RNA_def_property_ui_text(prop, "File Format", "");
671
672 prop = RNA_def_property(srna, "displace_type", PROP_ENUM, PROP_NONE);
673 RNA_def_property_enum_sdna(prop, nullptr, "disp_type");
675 RNA_def_property_enum_items(prop, prop_dynamicpaint_displace_type);
676 RNA_def_property_ui_text(prop, "Data Type", "");
677
678 prop = RNA_def_property(srna, "use_incremental_displace", PROP_BOOLEAN, PROP_NONE);
682 prop, "Incremental", "New displace is added cumulatively on top of existing");
683 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaintSurface_reset");
684
685 /* wave simulator settings */
686 prop = RNA_def_property(srna, "wave_damping", PROP_FLOAT, PROP_NONE);
687 RNA_def_property_range(prop, 0.0, 1.0);
688 RNA_def_property_ui_range(prop, 0.01, 1.0, 1, 2);
689 RNA_def_property_ui_text(prop, "Damping", "Wave damping factor");
690
691 prop = RNA_def_property(srna, "wave_speed", PROP_FLOAT, PROP_NONE);
692 RNA_def_property_range(prop, 0.01, 5.0);
693 RNA_def_property_ui_range(prop, 0.20, 4.0, 1, 2);
694 RNA_def_property_ui_text(prop, "Speed", "Wave propagation speed");
695
696 prop = RNA_def_property(srna, "wave_timescale", PROP_FLOAT, PROP_NONE);
697 RNA_def_property_range(prop, 0.01, 3.0);
698 RNA_def_property_ui_range(prop, 0.01, 1.5, 1, 2);
699 RNA_def_property_ui_text(prop, "Timescale", "Wave time scaling factor");
700
701 prop = RNA_def_property(srna, "wave_spring", PROP_FLOAT, PROP_NONE);
702 RNA_def_property_range(prop, 0.0, 1.0);
703 RNA_def_property_ui_range(prop, 0.01, 1.0, 1, 2);
704 RNA_def_property_ui_text(prop, "Spring", "Spring force that pulls water level back to zero");
705
706 prop = RNA_def_property(srna, "wave_smoothness", PROP_FLOAT, PROP_NONE);
707 RNA_def_property_range(prop, 0.0, 10.0);
708 RNA_def_property_ui_range(prop, 0.1, 5.0, 1, 2);
710 "Smoothness",
711 "Limit maximum steepness of wave slope between simulation points "
712 "(use higher values for smoother waves at expense of reduced detail)");
713
714 prop = RNA_def_property(srna, "use_wave_open_border", PROP_BOOLEAN, PROP_NONE);
716 RNA_def_property_ui_text(prop, "Open Borders", "Pass waves through mesh edges");
717
718 /* cache */
719 prop = RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
721 RNA_def_property_pointer_sdna(prop, nullptr, "pointcache");
722 RNA_def_property_struct_type(prop, "PointCache");
723 RNA_def_property_ui_text(prop, "Point Cache", "");
724
725 /* is cache used */
726 prop = RNA_def_property(srna, "is_cache_user", PROP_BOOLEAN, PROP_NONE);
727 RNA_def_property_boolean_funcs(prop, "rna_DynamicPaint_is_cache_user_get", nullptr);
728 RNA_def_property_ui_text(prop, "Use Cache", "");
730}
731
733{
734 StructRNA *srna;
735 PropertyRNA *prop;
736
737 srna = RNA_def_struct(brna, "DynamicPaintCanvasSettings", nullptr);
738 RNA_def_struct_ui_text(srna, "Canvas Settings", "Dynamic Paint canvas settings");
739 RNA_def_struct_sdna(srna, "DynamicPaintCanvasSettings");
740 RNA_def_struct_path_func(srna, "rna_DynamicPaintCanvasSettings_path");
741
742 /*
743 * Surface Slots
744 */
745 prop = RNA_def_property(srna, "canvas_surfaces", PROP_COLLECTION, PROP_NONE);
747 "rna_DynamicPaint_surfaces_begin",
748 "rna_iterator_listbase_next",
749 "rna_iterator_listbase_end",
750 "rna_iterator_listbase_get",
751 nullptr,
752 nullptr,
753 nullptr,
754 nullptr);
755 RNA_def_property_struct_type(prop, "DynamicPaintSurface");
756 RNA_def_property_ui_text(prop, "Paint Surface List", "Paint surface list");
757 rna_def_canvas_surfaces(brna, prop);
758}
759
761{
762 StructRNA *srna;
763 PropertyRNA *prop;
764
765 /* paint collision type */
766 static const EnumPropertyItem prop_dynamicpaint_collisiontype[] = {
767 {MOD_DPAINT_COL_PSYS, "PARTICLE_SYSTEM", ICON_PARTICLES, "Particle System", ""},
768 {MOD_DPAINT_COL_POINT, "POINT", ICON_EMPTY_AXIS, "Object Center", ""},
769 {MOD_DPAINT_COL_DIST, "DISTANCE", ICON_DRIVER_DISTANCE, "Proximity", ""},
770 {MOD_DPAINT_COL_VOLDIST, "VOLUME_DISTANCE", ICON_META_CUBE, "Mesh Volume + Proximity", ""},
771 {MOD_DPAINT_COL_VOLUME, "VOLUME", ICON_MESH_CUBE, "Mesh Volume", ""},
772 {0, nullptr, 0, nullptr, nullptr},
773 };
774
775 static const EnumPropertyItem prop_dynamicpaint_prox_falloff[] = {
776 {MOD_DPAINT_PRFALL_SMOOTH, "SMOOTH", ICON_SPHERECURVE, "Smooth", ""},
777 {MOD_DPAINT_PRFALL_CONSTANT, "CONSTANT", ICON_NOCURVE, "Constant", ""},
778 {MOD_DPAINT_PRFALL_RAMP, "RAMP", ICON_COLOR, "Color Ramp", ""},
779 {0, nullptr, 0, nullptr, nullptr},
780 };
781
782 static const EnumPropertyItem prop_dynamicpaint_brush_wave_type[] = {
783 {MOD_DPAINT_WAVEB_CHANGE, "CHANGE", 0, "Depth Change", ""},
784 {MOD_DPAINT_WAVEB_DEPTH, "DEPTH", 0, "Obstacle", ""},
785 {MOD_DPAINT_WAVEB_FORCE, "FORCE", 0, "Force", ""},
786 {MOD_DPAINT_WAVEB_REFLECT, "REFLECT", 0, "Reflect Only", ""},
787 {0, nullptr, 0, nullptr, nullptr},
788 };
789
790 static const EnumPropertyItem prop_dynamicpaint_brush_ray_dir[] = {
791 {MOD_DPAINT_RAY_CANVAS, "CANVAS", 0, "Canvas Normal", ""},
792 {MOD_DPAINT_RAY_BRUSH_AVG, "BRUSH", 0, "Brush Normal", ""},
793 {MOD_DPAINT_RAY_ZPLUS, "Z_AXIS", 0, "Z-Axis", ""},
794 {0, nullptr, 0, nullptr, nullptr},
795 };
796
797 srna = RNA_def_struct(brna, "DynamicPaintBrushSettings", nullptr);
798 RNA_def_struct_ui_text(srna, "Brush Settings", "Brush settings");
799 RNA_def_struct_sdna(srna, "DynamicPaintBrushSettings");
800 RNA_def_struct_path_func(srna, "rna_DynamicPaintBrushSettings_path");
801
802 /*
803 * Paint
804 */
805 prop = RNA_def_property(srna, "paint_color", PROP_FLOAT, PROP_COLOR_GAMMA);
806 RNA_def_property_float_sdna(prop, nullptr, "r");
807 RNA_def_property_array(prop, 3);
808 RNA_def_property_ui_text(prop, "Paint Color", "Color of the paint");
809 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
810
811 prop = RNA_def_property(srna, "paint_alpha", PROP_FLOAT, PROP_NONE);
812 RNA_def_property_float_sdna(prop, nullptr, "alpha");
813 RNA_def_property_range(prop, 0.0, 1.0);
814 RNA_def_property_ui_range(prop, 0.0, 1.0, 5, 2);
815 RNA_def_property_ui_text(prop, "Paint Alpha", "Paint alpha");
816 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
817
818 prop = RNA_def_property(srna, "use_absolute_alpha", PROP_BOOLEAN, PROP_NONE);
821 prop, "Absolute Alpha", "Only increase alpha value if paint alpha is higher than existing");
822
823 prop = RNA_def_property(srna, "paint_wetness", PROP_FLOAT, PROP_NONE);
824 RNA_def_property_float_sdna(prop, nullptr, "wetness");
825 RNA_def_property_range(prop, 0.0, 1.0);
826 RNA_def_property_ui_range(prop, 0.0, 1.0, 5, 2);
828 prop,
829 "Paint Wetness",
830 "Paint wetness, visible in wetmap (some effects only affect wet paint)");
831 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
832
833 prop = RNA_def_property(srna, "use_paint_erase", PROP_BOOLEAN, PROP_NONE);
834 RNA_def_property_boolean_sdna(prop, nullptr, "flags", MOD_DPAINT_ERASE);
835 RNA_def_property_ui_text(prop, "Erase Paint", "Erase / remove paint instead of adding it");
836 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
837
838 prop = RNA_def_property(srna, "wave_type", PROP_ENUM, PROP_NONE);
840 RNA_def_property_enum_items(prop, prop_dynamicpaint_brush_wave_type);
841 RNA_def_property_ui_text(prop, "Wave Type", "");
843
844 prop = RNA_def_property(srna, "wave_factor", PROP_FLOAT, PROP_NONE);
845 RNA_def_property_range(prop, -2.0, 2.0);
846 RNA_def_property_ui_range(prop, -1.0, 1.0, 5, 2);
847 RNA_def_property_ui_text(prop, "Factor", "Multiplier for wave influence of this brush");
848
849 prop = RNA_def_property(srna, "wave_clamp", PROP_FLOAT, PROP_NONE);
850 RNA_def_property_range(prop, 0.00, 50.0);
851 RNA_def_property_ui_range(prop, 0.00, 5.0, 1, 2);
853 prop,
854 "Clamp Waves",
855 "Maximum level of surface intersection used to influence waves (use 0.0 to disable)");
856
857 prop = RNA_def_property(srna, "use_smudge", PROP_BOOLEAN, PROP_NONE);
860 prop, "Do Smudge", "Make this brush to smudge existing paint as it moves");
861
862 prop = RNA_def_property(srna, "smudge_strength", PROP_FLOAT, PROP_NONE);
863 RNA_def_property_range(prop, 0.0, 1.0);
864 RNA_def_property_ui_range(prop, 0.0, 1.0, 5, 2);
865 RNA_def_property_ui_text(prop, "Smudge Strength", "Smudge effect strength");
866
867 prop = RNA_def_property(srna, "velocity_max", PROP_FLOAT, PROP_NONE);
868 RNA_def_property_float_sdna(prop, nullptr, "max_velocity");
869 RNA_def_property_range(prop, 0.0001, 10.0);
870 RNA_def_property_ui_range(prop, 0.1, 2.0, 5, 2);
872 prop, "Max Velocity", "Velocity considered as maximum influence (Blender units per frame)");
873
874 prop = RNA_def_property(srna, "use_velocity_alpha", PROP_BOOLEAN, PROP_NONE);
877 prop, "Multiply Alpha", "Multiply brush influence by velocity color ramp alpha");
878 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
879
880 prop = RNA_def_property(srna, "use_velocity_depth", PROP_BOOLEAN, PROP_NONE);
883 prop,
884 "Multiply Depth",
885 "Multiply brush intersection depth (displace, waves) by velocity ramp alpha");
886 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
887
888 prop = RNA_def_property(srna, "use_velocity_color", PROP_BOOLEAN, PROP_NONE);
890 RNA_def_property_ui_text(prop, "Replace Color", "Replace brush color by velocity color ramp");
891 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
892
893 /*
894 * Paint Area / Collision
895 */
896 prop = RNA_def_property(srna, "paint_source", PROP_ENUM, PROP_NONE);
898 RNA_def_property_enum_sdna(prop, nullptr, "collision");
899 RNA_def_property_enum_items(prop, prop_dynamicpaint_collisiontype);
900 RNA_def_property_ui_text(prop, "Paint Source", "");
901 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
902
903 prop = RNA_def_property(srna, "paint_distance", PROP_FLOAT, PROP_NONE);
904 RNA_def_property_float_sdna(prop, nullptr, "paint_distance");
905 RNA_def_property_range(prop, 0.0, 500.0);
906 RNA_def_property_ui_range(prop, 0.0, 500.0, 10, 3);
908 prop, "Proximity Distance", "Maximum distance from brush to mesh surface to affect paint");
909 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
910
911 prop = RNA_def_property(srna, "use_proximity_ramp_alpha", PROP_BOOLEAN, PROP_NONE);
913 RNA_def_property_ui_text(prop, "Only Use Alpha", "Only read color ramp alpha");
914 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
915
916 prop = RNA_def_property(srna, "proximity_falloff", PROP_ENUM, PROP_NONE);
918 RNA_def_property_enum_sdna(prop, nullptr, "proximity_falloff");
919 RNA_def_property_enum_items(prop, prop_dynamicpaint_prox_falloff);
920 RNA_def_property_ui_text(prop, "Falloff", "Proximity falloff type");
922 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
923
924 prop = RNA_def_property(srna, "use_proximity_project", PROP_BOOLEAN, PROP_NONE);
927 prop,
928 "Project",
929 "Brush is projected to canvas from defined direction within brush proximity");
930 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
931
932 prop = RNA_def_property(srna, "ray_direction", PROP_ENUM, PROP_NONE);
933 RNA_def_property_enum_sdna(prop, nullptr, "ray_dir");
934 RNA_def_property_enum_items(prop, prop_dynamicpaint_brush_ray_dir);
936 prop,
937 "Ray Direction",
938 "Ray direction to use for projection (if brush object is located in that direction "
939 "it's painted)");
940 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
941
942 prop = RNA_def_property(srna, "invert_proximity", PROP_BOOLEAN, PROP_NONE);
945 prop, "Inner Proximity", "Proximity falloff is applied inside the volume");
946 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
947
948 prop = RNA_def_property(srna, "use_negative_volume", PROP_BOOLEAN, PROP_NONE);
950 RNA_def_property_ui_text(prop, "Negate Volume", "Negate influence inside the volume");
951 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
952
953 /*
954 * Particle
955 */
956 prop = RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE);
957 RNA_def_property_pointer_sdna(prop, nullptr, "psys");
958 RNA_def_property_struct_type(prop, "ParticleSystem");
960 RNA_def_property_ui_text(prop, "Particle Systems", "The particle system to paint with");
961 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_reset_dependency");
962
963 prop = RNA_def_property(srna, "use_particle_radius", PROP_BOOLEAN, PROP_NONE);
964 RNA_def_property_boolean_sdna(prop, nullptr, "flags", MOD_DPAINT_PART_RAD);
965 RNA_def_property_ui_text(prop, "Use Particle Radius", "Use radius from particle settings");
966 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
967
968 prop = RNA_def_property(srna, "solid_radius", PROP_FLOAT, PROP_NONE);
969 RNA_def_property_float_sdna(prop, nullptr, "particle_radius");
970 RNA_def_property_range(prop, 0.01, 10.0);
971 RNA_def_property_ui_range(prop, 0.01, 2.0, 5, 3);
972 RNA_def_property_ui_text(prop, "Solid Radius", "Radius that will be painted solid");
973 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
974
975 prop = RNA_def_property(srna, "smooth_radius", PROP_FLOAT, PROP_NONE);
976 RNA_def_property_float_sdna(prop, nullptr, "particle_smooth");
977 RNA_def_property_range(prop, 0.0, 10.0);
978 RNA_def_property_ui_range(prop, 0.0, 1.0, 5, -1);
979 RNA_def_property_ui_text(prop, "Smooth Radius", "Smooth falloff added after solid radius");
980 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
981
982 /*
983 * Color ramps
984 */
985 prop = RNA_def_property(srna, "paint_ramp", PROP_POINTER, PROP_NONE);
986 RNA_def_property_pointer_sdna(prop, nullptr, "paint_ramp");
987 RNA_def_property_struct_type(prop, "ColorRamp");
989 prop, "Paint Color Ramp", "Color ramp used to define proximity falloff");
990 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
991
992 prop = RNA_def_property(srna, "velocity_ramp", PROP_POINTER, PROP_NONE);
993 RNA_def_property_pointer_sdna(prop, nullptr, "vel_ramp");
994 RNA_def_property_struct_type(prop, "ColorRamp");
996 prop, "Velocity Color Ramp", "Color ramp used to define brush velocity effect");
997 RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
998}
999
1006
1007#endif
bool dynamicPaint_outputLayerExists(struct DynamicPaintSurface *surface, struct Object *ob, int output)
void dynamicPaintSurface_updateType(struct DynamicPaintSurface *surface)
void dynamicPaintSurface_setUniqueName(struct DynamicPaintSurface *surface, const char *basename)
bool dynamicPaint_resetSurface(const struct Scene *scene, struct DynamicPaintSurface *surface)
void dynamicPaint_clearSurface(const struct Scene *scene, struct DynamicPaintSurface *surface)
void dynamicPaint_cacheUpdateFrames(struct DynamicPaintSurface *surface)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
#define BLI_STR_UTF8_MULTIPLICATION_SIGN
#define ELEM(...)
#define BLT_I18NCONTEXT_ID_BRUSH
#define BLT_I18NCONTEXT_ID_SIMULATION
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_relations_tag_update(Main *bmain)
@ ID_RECALC_GEOMETRY
Definition DNA_ID.h:1041
@ 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_DISP_DEPTH
@ MOD_DPAINT_DISP_DISPLACE
@ MOD_DPAINT_RAY_BRUSH_AVG
@ MOD_DPAINT_RAY_CANVAS
@ MOD_DPAINT_RAY_ZPLUS
@ MOD_DPAINT_INITIAL_NONE
@ MOD_DPAINT_INITIAL_VERTEXCOLOR
@ MOD_DPAINT_INITIAL_COLOR
@ MOD_DPAINT_INITIAL_TEXTURE
@ MOD_DPAINT_IMGFORMAT_OPENEXR
@ MOD_DPAINT_IMGFORMAT_PNG
@ MOD_DPAINT_PRFALL_CONSTANT
@ MOD_DPAINT_PRFALL_SMOOTH
@ MOD_DPAINT_PRFALL_RAMP
@ MOD_DPAINT_PROX_PROJECT
@ MOD_DPAINT_ABS_ALPHA
@ MOD_DPAINT_RAMP_ALPHA
@ MOD_DPAINT_INVERSE_PROX
@ MOD_DPAINT_VELOCITY_ALPHA
@ MOD_DPAINT_VELOCITY_DEPTH
@ MOD_DPAINT_VELOCITY_COLOR
@ MOD_DPAINT_DO_SMUDGE
@ MOD_DPAINT_PART_RAD
@ MOD_DPAINT_NEGATE_VOLUME
@ MOD_DPAINT_SURFACE_T_WEIGHT
@ MOD_DPAINT_SURFACE_T_PAINT
@ MOD_DPAINT_SURFACE_T_DISPLACE
@ MOD_DPAINT_SURFACE_T_WAVE
@ MOD_DPAINT_EFFECT_DO_DRIP
@ MOD_DPAINT_EFFECT_DO_SPREAD
@ MOD_DPAINT_EFFECT_DO_SHRINK
@ MOD_DPAINT_COL_DIST
@ MOD_DPAINT_COL_VOLDIST
@ MOD_DPAINT_COL_POINT
@ MOD_DPAINT_COL_VOLUME
@ MOD_DPAINT_COL_PSYS
@ MOD_DPAINT_SURFACE_F_VERTEX
@ MOD_DPAINT_SURFACE_F_IMAGESEQ
@ MOD_DPAINT_WAVEB_REFLECT
@ MOD_DPAINT_WAVEB_DEPTH
@ MOD_DPAINT_WAVEB_CHANGE
@ MOD_DPAINT_WAVEB_FORCE
@ MOD_DYNAMICPAINT_TYPE_BRUSH
@ MOD_DYNAMICPAINT_TYPE_CANVAS
Object is a sort of wrapper for general info.
#define MAXFRAMEF
@ PARM_REQUIRED
Definition RNA_types.hh:397
@ PROP_FLOAT
Definition RNA_types.hh:67
@ PROP_BOOLEAN
Definition RNA_types.hh:65
@ PROP_ENUM
Definition RNA_types.hh:69
@ PROP_INT
Definition RNA_types.hh:66
@ PROP_STRING
Definition RNA_types.hh:68
@ PROP_POINTER
Definition RNA_types.hh:70
@ PROP_COLLECTION
Definition RNA_types.hh:71
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
Definition RNA_types.hh:355
PropertyFlag
Definition RNA_types.hh:201
@ PROP_ANIMATABLE
Definition RNA_types.hh:220
@ PROP_EDITABLE
Definition RNA_types.hh:207
@ PROP_NEVER_NULL
Definition RNA_types.hh:266
@ PROP_TIME
Definition RNA_types.hh:156
@ PROP_NONE
Definition RNA_types.hh:136
@ PROP_DIRPATH
Definition RNA_types.hh:140
@ PROP_FACTOR
Definition RNA_types.hh:154
@ PROP_COLOR_GAMMA
Definition RNA_types.hh:175
@ PROP_UNSIGNED
Definition RNA_types.hh:152
#define ND_DRAW
Definition WM_types.hh:428
#define ND_MODIFIER
Definition WM_types.hh:429
#define NC_MATERIAL
Definition WM_types.hh:347
#define NC_OBJECT
Definition WM_types.hh:346
#define ND_SHADING_DRAW
Definition WM_types.hh:445
void rna_iterator_listbase_begin(CollectionPropertyIterator *iter, ListBase *lb, IteratorSkipFunc skip)
void rna_iterator_array_begin(CollectionPropertyIterator *iter, void *ptr, int itemsize, int length, bool free_ptr, IteratorSkipFunc skip)
PointerRNA rna_pointer_inherit_refine(const PointerRNA *ptr, StructRNA *type, void *data)
void RNA_def_struct_name_property(StructRNA *srna, PropertyRNA *prop)
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring, const char *assignint)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
void RNA_def_property_array(PropertyRNA *prop, int length)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
void RNA_def_property_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
static void rna_def_canvas_surfaces(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_dynamic_paint(BlenderRNA *brna)
static void rna_def_canvas_surface(BlenderRNA *brna)
static void rna_def_dynamic_paint_brush_settings(BlenderRNA *brna)
static void rna_def_dynamic_paint_canvas_settings(BlenderRNA *brna)
const EnumPropertyItem rna_enum_prop_dynamicpaint_type_items[]
void rna_object_uvlayer_name_set(PointerRNA *ptr, const char *value, char *result, int result_maxncpy)
#define min(a, b)
Definition sort.c:32
const char * identifier
Definition RNA_types.hh:506
const char * name
Definition RNA_types.hh:510
void * first
ID * owner_id
Definition RNA_types.hh:40
void * data
Definition RNA_types.hh:42
PointerRNA * ptr
Definition wm_files.cc:4126