35 {0,
nullptr, 0,
nullptr,
nullptr},
40# include <fmt/format.h>
48static std::optional<std::string> rna_DynamicPaintCanvasSettings_path(
const PointerRNA *
ptr)
52 char name_esc[
sizeof(md->
name) * 2];
55 return fmt::format(
"modifiers[\"{}\"].canvas_settings", name_esc);
58static std::optional<std::string> rna_DynamicPaintBrushSettings_path(
const PointerRNA *
ptr)
62 char name_esc[
sizeof(md->
name) * 2];
65 return fmt::format(
"modifiers[\"{}\"].brush_settings", name_esc);
68static std::optional<std::string> rna_DynamicPaintSurface_path(
const PointerRNA *
ptr)
72 char name_esc[
sizeof(md->
name) * 2];
73 char name_esc_surface[
sizeof(surface->name) * 2];
76 BLI_str_escape(name_esc_surface, surface->name,
sizeof(name_esc_surface));
78 "modifiers[\"{}\"].canvas_settings.canvas_surfaces[\"{}\"]", name_esc, name_esc_surface);
90static void rna_DynamicPaintSurfaces_updateFrames(
Main * ,
100 rna_DynamicPaint_redoModifier(bmain, scene,
ptr);
107 surface->init_layername[0] =
'\0';
109 rna_DynamicPaint_redoModifier(bmain, scene,
ptr);
112static void rna_DynamicPaintSurface_uniqueName(
Main * ,
124 rna_DynamicPaintSurface_reset(bmain, scene,
ptr);
139 rna_DynamicPaintSurface_reset(bmain, scene,
ptr);
149 rna_DynamicPaintSurface_reset(bmain, scene,
ptr);
150 rna_DynamicPaint_reset_dependency(bmain, scene,
ptr);
159 for (; surface; surface = surface->next) {
160 if (
id == canvas->active_sur) {
173 iter, (
void *)canvas->surfaces,
sizeof(PaintSurface), canvas->totsur, 0, 0);
178static int rna_Surface_active_point_index_get(
PointerRNA *
ptr)
181 return canvas->active_sur;
184static void rna_Surface_active_point_index_set(
PointerRNA *
ptr,
int value)
187 canvas->active_sur = value;
191static void rna_Surface_active_point_range(
201static void rna_DynamicPaint_uvlayer_set(
PointerRNA *
ptr,
const char *value)
207 for (; surface; surface = surface->next) {
210 ptr, value, surface->uvlayer_name,
sizeof(surface->uvlayer_name));
218static bool rna_DynamicPaint_is_cache_user_get(
PointerRNA *
ptr)
246 tmp.
icon = ICON_TPAINT_HLT;
253 tmp.
name =
"Displace";
254 tmp.
icon = ICON_MOD_DISPLACE;
263 tmp.
icon = ICON_MOD_VERTEX_WEIGHT;
272 tmp.
icon = ICON_MOD_WAVE;
298 "rna_Surface_active_point_index_get",
299 "rna_Surface_active_point_index_set",
300 "rna_Surface_active_point_range");
322 {0,
nullptr, 0,
nullptr,
nullptr},
328 {0,
nullptr, 0,
nullptr,
nullptr},
337 {0,
nullptr, 0,
nullptr,
nullptr},
343 {1,
"SPREAD", 0,
"Spread",
""},
344 {2,
"DRIP", 0,
"Drip",
""},
345 {3,
"SHRINK", 0,
"Shrink",
""},
346 {0,
nullptr, 0,
nullptr,
nullptr},
355 {0,
nullptr, 0,
nullptr,
nullptr},
362 {0,
nullptr, 0,
nullptr,
nullptr},
401 prop,
"Brush Collection",
"Only use brush objects from this collection");
419 prop,
"Dissolve Time",
"Approximately in how many frames should dissolve happen");
429 prop,
"Dry Time",
"Approximately in how many frames should drying happen");
466 prop,
"Sub-Steps",
"Do extra frames between scene frames to ensure smooth motion");
474 " multisampling to smooth paint edges");
482 prop,
"Influence Scale",
"Adjust influence brush objects have on this surface");
490 prop,
"Radius Scale",
"Adjust radius of proximity brushes or particles for this surface");
503 "rna_DynamicPaintSurface_initialcolortype");
534 prop,
"Slow",
"Use logarithmic drying (makes high values to dry faster than low values)");
539 prop,
"Slow",
"Use logarithmic dissolve (makes high values to fade faster than low values)");
545 prop,
"Use Spread",
"Process spread effect (spread wet paint around surface)");
553 prop,
"Spread Speed",
"How fast spread effect moves on the canvas surface");
560 prop,
"Color Dry",
"The wetness level when colors start to shift to the background");
572 prop,
"Use Drip",
"Process drip effect (drip wet paint to gravity direction)");
586 prop,
"Shrink Speed",
"How fast shrink effect moves on the canvas surface");
613 prop,
"Premultiply Alpha",
"Multiply color by alpha (recommended for Blender input)");
638 func =
RNA_def_function(srna,
"output_exists",
"rna_DynamicPaint_is_output_exists");
642 parm =
RNA_def_int(func,
"index", 0, 0, 1,
"Index",
"", 0, 1);
655 "Maximum level of depth intersection in object space (use 0.0 to disable)");
664 prop,
"Displace Factor",
"Strength of displace when applied to the mesh");
682 prop,
"Incremental",
"New displace is added cumulatively on top of existing");
711 "Limit maximum steepness of wave slope between simulation points "
712 "(use higher values for smoother waves at expense of reduced detail)");
737 srna =
RNA_def_struct(brna,
"DynamicPaintCanvasSettings",
nullptr);
747 "rna_DynamicPaint_surfaces_begin",
748 "rna_iterator_listbase_next",
749 "rna_iterator_listbase_end",
750 "rna_iterator_listbase_get",
772 {0,
nullptr, 0,
nullptr,
nullptr},
779 {0,
nullptr, 0,
nullptr,
nullptr},
787 {0,
nullptr, 0,
nullptr,
nullptr},
794 {0,
nullptr, 0,
nullptr,
nullptr},
797 srna =
RNA_def_struct(brna,
"DynamicPaintBrushSettings",
nullptr);
821 prop,
"Absolute Alpha",
"Only increase alpha value if paint alpha is higher than existing");
830 "Paint wetness, visible in wetmap (some effects only affect wet paint)");
855 "Maximum level of surface intersection used to influence waves (use 0.0 to disable)");
860 prop,
"Do Smudge",
"Make this brush to smudge existing paint as it moves");
872 prop,
"Max Velocity",
"Velocity considered as maximum influence (Blender units per frame)");
877 prop,
"Multiply Alpha",
"Multiply brush influence by velocity color ramp alpha");
885 "Multiply brush intersection depth (displace, waves) by velocity ramp alpha");
908 prop,
"Proximity Distance",
"Maximum distance from brush to mesh surface to affect paint");
929 "Brush is projected to canvas from defined direction within brush proximity");
938 "Ray direction to use for projection (if brush object is located in that direction "
945 prop,
"Inner Proximity",
"Proximity falloff is applied inside the volume");
989 prop,
"Paint Color Ramp",
"Color ramp used to define proximity falloff");
996 prop,
"Velocity Color Ramp",
"Color ramp used to define brush velocity effect");
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 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)
@ MOD_DPAINT_WAVE_OPEN_BORDERS
@ MOD_DPAINT_DISP_INCREMENTAL
@ MOD_DPAINT_DISSOLVE_LOG
@ MOD_DPAINT_DISP_DISPLACE
@ MOD_DPAINT_RAY_BRUSH_AVG
@ 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_PROX_PROJECT
@ MOD_DPAINT_INVERSE_PROX
@ MOD_DPAINT_VELOCITY_ALPHA
@ MOD_DPAINT_VELOCITY_DEPTH
@ MOD_DPAINT_VELOCITY_COLOR
@ 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_SURFACE_F_VERTEX
@ MOD_DPAINT_SURFACE_F_IMAGESEQ
@ MOD_DPAINT_WAVEB_REFLECT
@ MOD_DPAINT_WAVEB_CHANGE
@ MOD_DYNAMICPAINT_TYPE_BRUSH
@ MOD_DYNAMICPAINT_TYPE_CANVAS
Object is a sort of wrapper for general info.
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
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)