Blender V5.0
dynamicpaint.cc File Reference
#include "MEM_guardedalloc.h"
#include <algorithm>
#include <cmath>
#include <cstdio>
#include "BLI_fileops.h"
#include "BLI_kdtree.h"
#include "BLI_listbase.h"
#include "BLI_math_color.h"
#include "BLI_math_geom.h"
#include "BLI_math_matrix.h"
#include "BLI_math_vector.h"
#include "BLI_mutex.hh"
#include "BLI_path_utils.hh"
#include "BLI_string.h"
#include "BLI_string_utf8.h"
#include "BLI_string_utils.hh"
#include "BLI_task.h"
#include "BLI_threads.h"
#include "BLI_utildefines.h"
#include "BLT_translation.hh"
#include "DNA_dynamicpaint_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_force_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_texture_types.h"
#include "BKE_armature.hh"
#include "BKE_bvhutils.hh"
#include "BKE_collision.h"
#include "BKE_colorband.hh"
#include "BKE_constraint.h"
#include "BKE_customdata.hh"
#include "BKE_deform.hh"
#include "BKE_dynamicpaint.h"
#include "BKE_effect.h"
#include "BKE_image.hh"
#include "BKE_image_format.hh"
#include "BKE_lib_id.hh"
#include "BKE_main.hh"
#include "BKE_material.hh"
#include "BKE_mesh.hh"
#include "BKE_mesh_mapping.hh"
#include "BKE_mesh_runtime.hh"
#include "BKE_modifier.hh"
#include "BKE_object.hh"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
#include "BKE_scene.hh"
#include "DEG_depsgraph.hh"
#include "DEG_depsgraph_query.hh"
#include "IMB_imbuf.hh"
#include "IMB_imbuf_types.hh"
#include "RE_texture.h"
#include "atomic_ops.h"
#include "CLG_log.h"

Go to the source code of this file.

Classes

struct  DynamicPaintRuntime
struct  Bounds2D
struct  Bounds3D
struct  DynamicPaintVolumeGrid
struct  Vec3f
struct  BakeAdjPoint
struct  PaintBakeNormal
struct  PaintBakeData
struct  PaintUVPoint
struct  ImgSeqFormatData
struct  PaintAdjData
struct  DynamicPaintSetInitColorData
struct  DynamicPaintModifierApplyData
struct  DynamicPaintCreateUVSurfaceData
struct  DynamicPaintFindIslandBorderData
struct  DynamicPaintOutputSurfaceImageData
struct  DynamicPaintBrushVelocityData
struct  DynamicPaintPaintData
struct  DynamicPaintEffectData
struct  DynamicPaintDissolveDryData
struct  DynamicPaintGenerateBakeData

Macros

#define SUBFRAME_RECURSION   OBJECT_MODIFIER_UPDATE_SUBFRAME_RECURSION_DEFAULT
#define BRUSH_USES_VELOCITY   (1 << 0)
#define HIT_VOLUME   1
#define HIT_PROXIMITY   2
#define NOT_FOUND   -1
#define ON_MESH_EDGE   -2
#define OUT_OF_TEXTURE   -3
#define EFF_MOVEMENT_PER_FRAME   0.05f
#define WAVE_TIME_FAC   (1.0f / 24.0f)
#define CANVAS_REL_SIZE   5.0f
#define MIN_WETNESS   0.001f
#define MAX_WETNESS   5.0f
#define ADJ_ON_MESH_EDGE   (1 << 0)
#define ADJ_BORDER_PIXEL   (1 << 1)

Typedefs

using int3

Functions

BLI_INLINE void value_dissolve (float *r_value, const float time, const float scale, const bool is_log)
void dynamicPaint_Modifier_free_runtime (DynamicPaintRuntime *runtime_data)
static DynamicPaintRuntimedynamicPaint_Modifier_runtime_ensure (DynamicPaintModifierData *pmd)
static MeshdynamicPaint_canvas_mesh_get (DynamicPaintCanvasSettings *canvas)
static bool setError (DynamicPaintCanvasSettings *canvas, const char *string)
static int dynamicPaint_surfaceNumOfPoints (DynamicPaintSurface *surface)
DynamicPaintSurfaceget_activeSurface (DynamicPaintCanvasSettings *canvas)
bool dynamicPaint_outputLayerExists (DynamicPaintSurface *surface, Object *ob, int output)
static bool surface_duplicateOutputExists (DynamicPaintSurface *t_surface, const blender::StringRefNull name)
static void surface_setUniqueOutputName (DynamicPaintSurface *surface, char *basename, int output)
static bool surface_duplicateNameExists (DynamicPaintSurface *t_surface, const blender::StringRefNull name)
void dynamicPaintSurface_setUniqueName (DynamicPaintSurface *surface, const char *basename)
void dynamicPaintSurface_updateType (DynamicPaintSurface *surface)
static int surface_totalSamples (DynamicPaintSurface *surface)
static void blendColors (const float t_color[3], const float t_alpha, const float s_color[3], const float s_alpha, float result[4])
static float mixColors (float a_color[3], float a_weight, const float b_color[3], float b_weight, float ratio)
static void scene_setSubframe (Scene *scene, float subframe)
static int surface_getBrushFlags (DynamicPaintSurface *surface, Depsgraph *depsgraph)
static bool boundsIntersect (Bounds3D *b1, Bounds3D *b2)
static bool boundsIntersectDist (Bounds3D *b1, Bounds3D *b2, const float dist)
static bool boundIntersectPoint (Bounds3D *b, const float point[3], const float radius)
static void boundInsert (Bounds3D *b, const float point[3])
static float getSurfaceDimension (PaintSurfaceData *sData)
static void freeGrid (PaintSurfaceData *data)
static void grid_bound_insert_cb_ex (void *__restrict userdata, const int i, const TaskParallelTLS *__restrict tls)
static void grid_bound_insert_reduce (const void *__restrict, void *__restrict chunk_join, void *__restrict chunk)
static void grid_cell_points_cb_ex (void *__restrict userdata, const int i, const TaskParallelTLS *__restrict tls)
static void grid_cell_points_reduce (const void *__restrict userdata, void *__restrict chunk_join, void *__restrict chunk)
static void grid_cell_bounds_cb (void *__restrict userdata, const int x, const TaskParallelTLS *__restrict)
static void surfaceGenerateGrid (DynamicPaintSurface *surface)
void dynamicPaint_freeBrush (DynamicPaintModifierData *pmd)
static void dynamicPaint_freeAdjData (PaintSurfaceData *data)
static void free_bakeData (PaintSurfaceData *data)
static void surface_freeUnusedData (DynamicPaintSurface *surface)
void dynamicPaint_freeSurfaceData (DynamicPaintSurface *surface)
void dynamicPaint_freeSurface (const DynamicPaintModifierData *pmd, DynamicPaintSurface *surface)
void dynamicPaint_freeCanvas (DynamicPaintModifierData *pmd)
void dynamicPaint_Modifier_free (DynamicPaintModifierData *pmd)
DynamicPaintSurfacedynamicPaint_createNewSurface (DynamicPaintCanvasSettings *canvas, Scene *scene)
bool dynamicPaint_createType (DynamicPaintModifierData *pmd, int type, Scene *scene)
void dynamicPaint_Modifier_copy (const DynamicPaintModifierData *pmd, DynamicPaintModifierData *tpmd, int flag)
static void dynamicPaint_allocateSurfaceType (DynamicPaintSurface *surface)
static bool surface_usesAdjDistance (DynamicPaintSurface *surface)
static bool surface_usesAdjData (DynamicPaintSurface *surface)
static void dynamicPaint_initAdjacencyData (DynamicPaintSurface *surface, const bool force_init)
static void dynamic_paint_set_init_color_tex_to_vcol_cb (void *__restrict userdata, const int i, const TaskParallelTLS *__restrict)
static void dynamic_paint_set_init_color_tex_to_imseq_cb (void *__restrict userdata, const int i, const TaskParallelTLS *__restrict)
static void dynamic_paint_set_init_color_vcol_to_imseq_cb (void *__restrict userdata, const int i, const TaskParallelTLS *__restrict)
static void dynamicPaint_setInitialColor (const Scene *, DynamicPaintSurface *surface)
void dynamicPaint_clearSurface (const Scene *scene, DynamicPaintSurface *surface)
bool dynamicPaint_resetSurface (const Scene *scene, DynamicPaintSurface *surface)
static bool dynamicPaint_checkSurfaceData (const Scene *scene, DynamicPaintSurface *surface)
static void dynamic_paint_apply_surface_displace_cb (void *__restrict userdata, const int i, const TaskParallelTLS *__restrict)
static void dynamicPaint_applySurfaceDisplace (DynamicPaintSurface *surface, Mesh *result)
static void dynamic_paint_apply_surface_vpaint_blend_cb (void *__restrict userdata, const int i, const TaskParallelTLS *__restrict)
static void dynamic_paint_apply_surface_vpaint_cb (void *__restrict userdata, const int p_index, const TaskParallelTLS *__restrict)
static void dynamic_paint_apply_surface_wave_cb (void *__restrict userdata, const int i, const TaskParallelTLS *__restrict)
static MeshdynamicPaint_Modifier_apply (DynamicPaintModifierData *pmd, Object *ob, Mesh *mesh)
void dynamicPaint_cacheUpdateFrames (DynamicPaintSurface *surface)
static void canvas_copyMesh (DynamicPaintCanvasSettings *canvas, Mesh *mesh)
static void dynamicPaint_frameUpdate (DynamicPaintModifierData *pmd, Depsgraph *depsgraph, Scene *scene, Object *ob, Mesh *mesh)
MeshdynamicPaint_Modifier_do (DynamicPaintModifierData *pmd, Depsgraph *depsgraph, Scene *scene, Object *ob, Mesh *mesh)
static void mesh_tris_spherecast_dp (void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit)
static void mesh_tris_nearest_point_dp (void *userdata, int index, const float co[3], BVHTreeNearest *nearest)
static void dynamicPaint_mixPaintColors (const DynamicPaintSurface *surface, const int index, const int paintFlags, const float paintColor[3], const float paintAlpha, const float paintWetness, const float timescale)
static void dynamicPaint_mixWaveHeight (PaintWavePoint *wPoint, const DynamicPaintBrushSettings *brush, float isect_height)
static void dynamicPaint_updatePointData (const DynamicPaintSurface *surface, const int index, const DynamicPaintBrushSettings *brush, float paint[3], float influence, float depth, float vel_factor, const float timescale)
static bool meshBrush_boundsIntersect (Bounds3D *b1, Bounds3D *b2, DynamicPaintBrushSettings *brush, float brush_radius)
static void dynamic_paint_brush_velocity_compute_cb (void *__restrict userdata, const int i, const TaskParallelTLS *__restrict)
static void dynamicPaint_brushMeshCalculateVelocity (Depsgraph *depsgraph, Scene *scene, Object *ob, DynamicPaintBrushSettings *brush, Vec3f **brushVel, float timescale)
static void dynamicPaint_brushObjectCalculateVelocity (Depsgraph *depsgraph, Scene *scene, Object *ob, Vec3f *brushVel, float timescale)
static void dynamic_paint_paint_mesh_cell_point_cb_ex (void *__restrict userdata, const int id, const TaskParallelTLS *__restrict)
static bool dynamicPaint_paintMesh (Depsgraph *depsgraph, DynamicPaintSurface *surface, DynamicPaintBrushSettings *brush, Object *brushOb, Scene *scene, float timescale)
static void dynamic_paint_paint_particle_cell_point_cb_ex (void *__restrict userdata, const int id, const TaskParallelTLS *__restrict)
static bool dynamicPaint_paintParticles (DynamicPaintSurface *surface, ParticleSystem *psys, DynamicPaintBrushSettings *brush, float timescale)
static void dynamic_paint_paint_single_point_cb_ex (void *__restrict userdata, const int index, const TaskParallelTLS *__restrict)
static bool dynamicPaint_paintSinglePoint (Depsgraph *depsgraph, DynamicPaintSurface *surface, float *pointCoord, DynamicPaintBrushSettings *brush, Object *brushOb, Scene *scene, float timescale)
static void dynamic_paint_prepare_adjacency_cb (void *__restrict userdata, const int index, const TaskParallelTLS *__restrict)
static void dynamicPaint_prepareAdjacencyData (DynamicPaintSurface *surface, const bool force_init)
static void surface_determineForceTargetPoints (const PaintSurfaceData *sData, const int index, const float force[3], float closest_d[2], int closest_id[2])
static void dynamicPaint_doSmudge (DynamicPaintSurface *surface, DynamicPaintBrushSettings *brush, float timescale)
static void dynamic_paint_prepare_effect_cb (void *__restrict userdata, const int index, const TaskParallelTLS *__restrict)
static int dynamicPaint_prepareEffectStep (Depsgraph *depsgraph, DynamicPaintSurface *surface, Scene *scene, Object *ob, float **force, float timescale)
static void dynamic_paint_effect_spread_cb (void *__restrict userdata, const int index, const TaskParallelTLS *__restrict)
static void dynamic_paint_effect_shrink_cb (void *__restrict userdata, const int index, const TaskParallelTLS *__restrict)
static void dynamic_paint_effect_drip_cb (void *__restrict userdata, const int index, const TaskParallelTLS *__restrict)
static void dynamicPaint_doEffectStep (DynamicPaintSurface *surface, float *force, PaintPoint *prevPoint, float timescale, float steps)
static void dynamic_paint_border_cb (void *__restrict userdata, const int b_index, const TaskParallelTLS *__restrict)
static void dynamicPaint_doBorderStep (DynamicPaintSurface *surface)
static void dynamic_paint_wave_step_cb (void *__restrict userdata, const int index, const TaskParallelTLS *__restrict)
static void dynamicPaint_doWaveStep (DynamicPaintSurface *surface, float timescale)
static bool dynamic_paint_surface_needs_dry_dissolve (DynamicPaintSurface *surface)
static void dynamic_paint_surface_pre_step_cb (void *__restrict userdata, const int index, const TaskParallelTLS *__restrict)
static bool dynamicPaint_surfaceHasMoved (DynamicPaintSurface *surface, Object *ob)
static void dynamic_paint_generate_bake_data_cb (void *__restrict userdata, const int index, const TaskParallelTLS *__restrict)
static bool dynamicPaint_generateBakeData (DynamicPaintSurface *surface, Depsgraph *depsgraph, Object *ob)
static int dynamicPaint_doStep (Depsgraph *depsgraph, Scene *scene, Object *ob, DynamicPaintSurface *surface, float timescale, float subframe)
int dynamicPaint_calculateFrame (DynamicPaintSurface *surface, Depsgraph *depsgraph, Scene *scene, Object *cObject, int frame)

Variables

static CLG_LogRef LOG = {"object.dynamicpaint"}
static const float gaussianFactors [5]
static const float gaussianTotal = 3.309425f
static int neighX [8] = {1, 1, 0, -1, -1, -1, 0, 1}
static int neighY [8] = {0, 1, 1, 1, 0, -1, -1, -1}
static int neighStraightX [8] = {1, 0, -1, 0, 1, -1, -1, 1}
static int neighStraightY [8] = {0, 1, 0, -1, 1, 1, -1, -1}

Image Sequence / UV Image Surface Calls

#define JITTER_SAMPLES
static void dynamic_paint_create_uv_surface_direct_cb (void *__restrict userdata, const int ty, const TaskParallelTLS *__restrict)
static void dynamic_paint_create_uv_surface_neighbor_cb (void *__restrict userdata, const int ty, const TaskParallelTLS *__restrict)
static float dist_squared_to_corner_tris_uv_edges (const blender::Span< int3 > corner_tris, const blender::Span< blender::float2 > uv_map, int tri_index, const float point[2])
static void dynamic_paint_find_island_border (const DynamicPaintCreateUVSurfaceData *data, DynamicPaintFindIslandBorderData *bdata, int tri_index, const float pixel[2], int in_edge, int depth)
static int dynamic_paint_find_neighbor_pixel (const DynamicPaintCreateUVSurfaceData *data, const MeshElemMap *vert_to_tri_map, const int w, const int h, const int px, const int py, const int n_index)
static bool dynamicPaint_pointHasNeighbor (PaintAdjData *ed, int index, int neighbor)
static bool dynamicPaint_symmetrizeAdjData (PaintAdjData *ed, int active_points)
int dynamicPaint_createUVSurface (Scene *scene, DynamicPaintSurface *surface, float *progress, bool *do_update)
static void dynamic_paint_output_surface_image_paint_cb (void *__restrict userdata, const int index, const TaskParallelTLS *__restrict)
static void dynamic_paint_output_surface_image_displace_cb (void *__restrict userdata, const int index, const TaskParallelTLS *__restrict)
static void dynamic_paint_output_surface_image_wave_cb (void *__restrict userdata, const int index, const TaskParallelTLS *__restrict)
static void dynamic_paint_output_surface_image_wetmap_cb (void *__restrict userdata, const int index, const TaskParallelTLS *__restrict)
void dynamicPaint_outputSurfaceImage (DynamicPaintSurface *surface, const char *filepath, short output_layer)

Macro Definition Documentation

◆ ADJ_BORDER_PIXEL

◆ ADJ_ON_MESH_EDGE

#define ADJ_ON_MESH_EDGE   (1 << 0)

◆ BRUSH_USES_VELOCITY

#define BRUSH_USES_VELOCITY   (1 << 0)

Definition at line 108 of file dynamicpaint.cc.

Referenced by dynamicPaint_generateBakeData(), and surface_getBrushFlags().

◆ CANVAS_REL_SIZE

#define CANVAS_REL_SIZE   5.0f

◆ EFF_MOVEMENT_PER_FRAME

#define EFF_MOVEMENT_PER_FRAME   0.05f

Definition at line 117 of file dynamicpaint.cc.

Referenced by dynamicPaint_doEffectStep(), and dynamicPaint_prepareEffectStep().

◆ HIT_PROXIMITY

#define HIT_PROXIMITY   2

Definition at line 111 of file dynamicpaint.cc.

Referenced by dynamic_paint_paint_mesh_cell_point_cb_ex().

◆ HIT_VOLUME

#define HIT_VOLUME   1

Definition at line 110 of file dynamicpaint.cc.

Referenced by dynamic_paint_paint_mesh_cell_point_cb_ex().

◆ JITTER_SAMPLES

#define JITTER_SAMPLES
Value:
{ \
0.0f, \
0.0f, \
-0.2f, \
-0.4f, \
0.2f, \
0.4f, \
0.4f, \
-0.2f, \
-0.4f, \
0.3f, \
}

Definition at line 2204 of file dynamicpaint.cc.

Referenced by dynamic_paint_create_uv_surface_direct_cb(), and dynamic_paint_create_uv_surface_neighbor_cb().

◆ MAX_WETNESS

#define MAX_WETNESS   5.0f

Definition at line 123 of file dynamicpaint.cc.

Referenced by dynamic_paint_effect_drip_cb().

◆ MIN_WETNESS

#define MIN_WETNESS   0.001f

◆ NOT_FOUND

#define NOT_FOUND   -1

◆ ON_MESH_EDGE

#define ON_MESH_EDGE   -2

◆ OUT_OF_TEXTURE

#define OUT_OF_TEXTURE   -3

◆ SUBFRAME_RECURSION

◆ WAVE_TIME_FAC

#define WAVE_TIME_FAC   (1.0f / 24.0f)

Definition at line 119 of file dynamicpaint.cc.

Referenced by dynamicPaint_doWaveStep().

Typedef Documentation

◆ int3

Definition at line 602 of file BLI_math_vector_types.hh.

Function Documentation

◆ blendColors()

void blendColors ( const float t_color[3],
const float t_alpha,
const float s_color[3],
const float s_alpha,
float result[4] )
static

◆ boundInsert()

◆ boundIntersectPoint()

bool boundIntersectPoint ( Bounds3D * b,
const float point[3],
const float radius )
static

Definition at line 607 of file dynamicpaint.cc.

References b, and i.

Referenced by dynamicPaint_paintParticles().

◆ boundsIntersect()

bool boundsIntersect ( Bounds3D * b1,
Bounds3D * b2 )
static

Definition at line 579 of file dynamicpaint.cc.

References i, Bounds3D::max, Bounds3D::min, and Bounds3D::valid.

Referenced by meshBrush_boundsIntersect().

◆ boundsIntersectDist()

bool boundsIntersectDist ( Bounds3D * b1,
Bounds3D * b2,
const float dist )
static

◆ canvas_copyMesh()

◆ dist_squared_to_corner_tris_uv_edges()

float dist_squared_to_corner_tris_uv_edges ( const blender::Span< int3 > corner_tris,
const blender::Span< blender::float2 > uv_map,
int tri_index,
const float point[2] )
static

Definition at line 2427 of file dynamicpaint.cc.

References BLI_assert, dist_squared_to_line_segment_v2(), FLT_MAX, and i.

Referenced by dynamic_paint_find_island_border().

◆ dynamic_paint_apply_surface_displace_cb()

void dynamic_paint_apply_surface_displace_cb ( void *__restrict userdata,
const int i,
const TaskParallelTLS * __restrict )
static

◆ dynamic_paint_apply_surface_vpaint_blend_cb()

void dynamic_paint_apply_surface_vpaint_blend_cb ( void *__restrict userdata,
const int i,
const TaskParallelTLS * __restrict )
static

Definition at line 1856 of file dynamicpaint.cc.

References blendColors(), data, float, and i.

Referenced by dynamicPaint_Modifier_apply().

◆ dynamic_paint_apply_surface_vpaint_cb()

void dynamic_paint_apply_surface_vpaint_cb ( void *__restrict userdata,
const int p_index,
const TaskParallelTLS * __restrict )
static

◆ dynamic_paint_apply_surface_wave_cb()

void dynamic_paint_apply_surface_wave_cb ( void *__restrict userdata,
const int i,
const TaskParallelTLS * __restrict )
static

Definition at line 1906 of file dynamicpaint.cc.

References data, PaintWavePoint::height, i, and madd_v3_v3fl().

Referenced by dynamicPaint_Modifier_apply().

◆ dynamic_paint_border_cb()

◆ dynamic_paint_brush_velocity_compute_cb()

void dynamic_paint_brush_velocity_compute_cb ( void *__restrict userdata,
const int i,
const TaskParallelTLS * __restrict )
static

◆ dynamic_paint_create_uv_surface_direct_cb()

◆ dynamic_paint_create_uv_surface_neighbor_cb()

◆ dynamic_paint_effect_drip_cb()

◆ dynamic_paint_effect_shrink_cb()

◆ dynamic_paint_effect_spread_cb()

◆ dynamic_paint_find_island_border()

◆ dynamic_paint_find_neighbor_pixel()

◆ dynamic_paint_generate_bake_data_cb()

◆ dynamic_paint_output_surface_image_displace_cb()

void dynamic_paint_output_surface_image_displace_cb ( void *__restrict userdata,
const int index,
const TaskParallelTLS * __restrict )
static

◆ dynamic_paint_output_surface_image_paint_cb()

void dynamic_paint_output_surface_image_paint_cb ( void *__restrict userdata,
const int index,
const TaskParallelTLS * __restrict )
static

◆ dynamic_paint_output_surface_image_wave_cb()

void dynamic_paint_output_surface_image_wave_cb ( void *__restrict userdata,
const int index,
const TaskParallelTLS * __restrict )
static

◆ dynamic_paint_output_surface_image_wetmap_cb()

void dynamic_paint_output_surface_image_wetmap_cb ( void *__restrict userdata,
const int index,
const TaskParallelTLS * __restrict )
static

◆ dynamic_paint_paint_mesh_cell_point_cb_ex()

void dynamic_paint_paint_mesh_cell_point_cb_ex ( void *__restrict userdata,
const int id,
const TaskParallelTLS * __restrict )
static

Definition at line 3973 of file dynamicpaint.cc.

References add_v3_fl(), PaintSurfaceData::bData, BKE_colorband_evaluate(), BLI_bvhtree_find_nearest(), BLI_bvhtree_ray_cast(), PaintBakeData::bNormal, PaintBakeData::brush_velocity, BVH_RAYCAST_DIST_MAX, CLAMP, BVHTreeNearest::co, copy_v3_v3(), data, DynamicPaintSurface::data, BVHTreeRayHit::dist, BVHTreeNearest::dist_sq, dot(), dot_v3v3(), dynamicPaint_updatePointData(), ELEM, float, DynamicPaintSurface::format, gaussianFactors, gaussianTotal, PaintBakeData::grid, HIT_PROXIMITY, HIT_VOLUME, BVHTreeNearest::index, BVHTreeRayHit::index, interp_v3_v3v3v3(), interp_weights_tri_v3(), PaintBakeNormal::invNorm, madd_v3_v3v3fl(), mesh_tris_nearest_point_dp(), mesh_tris_spherecast_dp(), MOD_DPAINT_COL_DIST, MOD_DPAINT_COL_VOLDIST, MOD_DPAINT_COL_VOLUME, MOD_DPAINT_DO_SMUDGE, MOD_DPAINT_INVERSE_PROX, MOD_DPAINT_NEGATE_VOLUME, MOD_DPAINT_PRFALL_CONSTANT, MOD_DPAINT_PRFALL_RAMP, MOD_DPAINT_PROX_PROJECT, MOD_DPAINT_RAMP_ALPHA, MOD_DPAINT_RAY_BRUSH_AVG, MOD_DPAINT_RAY_CANVAS, MOD_DPAINT_SURFACE_F_IMAGESEQ, MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WAVE, MOD_DPAINT_USES_VELOCITY, negate_v3(), BVHTreeRayHit::no, PaintBakeNormal::normal_scale, normal_tri_v3(), normalize_v3(), PaintBakeData::realCoord, PaintBakeData::s_num, DynamicPaintVolumeGrid::s_pos, PaintBakeData::s_pos, sqrtf, sub_v3_v3v3(), DynamicPaintVolumeGrid::t_index, blender::bke::BVHTreeFromMesh::tree, DynamicPaintSurface::type, v, Vec3f::v, v2, and PaintBakeData::velocity.

Referenced by dynamicPaint_paintMesh().

◆ dynamic_paint_paint_particle_cell_point_cb_ex()

◆ dynamic_paint_paint_single_point_cb_ex()

◆ dynamic_paint_prepare_adjacency_cb()

void dynamic_paint_prepare_adjacency_cb ( void *__restrict userdata,
const int index,
const TaskParallelTLS * __restrict )
static

◆ dynamic_paint_prepare_effect_cb()

◆ dynamic_paint_set_init_color_tex_to_imseq_cb()

◆ dynamic_paint_set_init_color_tex_to_vcol_cb()

void dynamic_paint_set_init_color_tex_to_vcol_cb ( void *__restrict userdata,
const int i,
const TaskParallelTLS * __restrict )
static

◆ dynamic_paint_set_init_color_vcol_to_imseq_cb()

void dynamic_paint_set_init_color_vcol_to_imseq_cb ( void *__restrict userdata,
const int i,
const TaskParallelTLS * __restrict )
static

◆ dynamic_paint_surface_needs_dry_dissolve()

◆ dynamic_paint_surface_pre_step_cb()

◆ dynamic_paint_wave_step_cb()

◆ dynamicPaint_allocateSurfaceType()

◆ dynamicPaint_applySurfaceDisplace()

◆ dynamicPaint_brushMeshCalculateVelocity()

◆ dynamicPaint_brushObjectCalculateVelocity()

void dynamicPaint_brushObjectCalculateVelocity ( Depsgraph * depsgraph,
Scene * scene,
Object * ob,
Vec3f * brushVel,
float timescale )
static

◆ dynamicPaint_cacheUpdateFrames()

void dynamicPaint_cacheUpdateFrames ( struct DynamicPaintSurface * surface)

◆ dynamicPaint_calculateFrame()

int dynamicPaint_calculateFrame ( struct DynamicPaintSurface * surface,
struct Depsgraph * depsgraph,
struct Scene * scene,
struct Object * cObject,
int frame )

◆ dynamicPaint_canvas_mesh_get()

◆ dynamicPaint_checkSurfaceData()

bool dynamicPaint_checkSurfaceData ( const Scene * scene,
DynamicPaintSurface * surface )
static

◆ dynamicPaint_clearSurface()

◆ dynamicPaint_createNewSurface()

DynamicPaintSurface * dynamicPaint_createNewSurface ( struct DynamicPaintCanvasSettings * canvas,
struct Scene * scene )

Creates a new surface and adds it to the list If scene is null, frame range of 1-250 is used A pointer to this surface is returned.

Definition at line 1044 of file dynamicpaint.cc.

References BKE_effector_add_weights(), BKE_modifier_path_init(), BKE_ptcache_add(), BLI_addtail(), BLT_I18NCONTEXT_ID_BRUSH, DynamicPaintSurface::canvas, DynamicPaintSurface::color_dry_threshold, DynamicPaintSurface::color_spread_speed, CTX_DATA_, DynamicPaintSurface::depth_clamp, DynamicPaintSurface::disp_factor, DynamicPaintSurface::disp_type, DynamicPaintSurface::diss_speed, DynamicPaintSurface::dry_speed, dynamicPaintSurface_setUniqueName(), dynamicPaintSurface_updateType(), DynamicPaintSurface::effect, DynamicPaintSurface::effect_ui, DynamicPaintSurface::effector_weights, RenderData::efra, DynamicPaintSurface::end_frame, PointCache::flag, DynamicPaintSurface::flags, DynamicPaintSurface::format, DynamicPaintSurface::image_fileformat, DynamicPaintSurface::image_output_path, DynamicPaintSurface::image_resolution, DynamicPaintSurface::influence_scale, DynamicPaintSurface::init_color, MEM_callocN(), MOD_DPAINT_ACTIVE, MOD_DPAINT_ANTIALIAS, MOD_DPAINT_DISP_DISPLACE, MOD_DPAINT_DISSOLVE_LOG, MOD_DPAINT_DRY_LOG, MOD_DPAINT_IMGFORMAT_PNG, MOD_DPAINT_MULALPHA, MOD_DPAINT_OUT1, MOD_DPAINT_SURFACE_F_VERTEX, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_USE_DRYING, DynamicPaintSurface::pointcache, PTCACHE_DISK_CACHE, DynamicPaintSurface::ptcaches, Scene::r, DynamicPaintSurface::radius_scale, RenderData::sfra, DynamicPaintSurface::shrink_speed, DynamicPaintSurface::spread_speed, DynamicPaintSurface::start_frame, PointCache::step, DynamicPaintSurface::substeps, DynamicPaintCanvasSettings::surfaces, DynamicPaintSurface::type, DynamicPaintSurface::wave_damping, DynamicPaintSurface::wave_smoothness, DynamicPaintSurface::wave_speed, DynamicPaintSurface::wave_spring, and DynamicPaintSurface::wave_timescale.

Referenced by dynamicPaint_createType(), dynamicPaint_Modifier_copy(), and surface_slot_add_exec().

◆ dynamicPaint_createType()

◆ dynamicPaint_createUVSurface()

int dynamicPaint_createUVSurface ( struct Scene * scene,
struct DynamicPaintSurface * surface,
float * progress,
bool * do_update )

Image sequence baking.

Definition at line 2828 of file dynamicpaint.cc.

References ADJ_BORDER_PIXEL, PaintSurfaceData::adj_data, ADJ_ON_MESH_EDGE, ImgSeqFormatData::barycentricWeights, BKE_mesh_vert_corner_tri_map_create(), BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), DynamicPaintSurface::canvas, CD_PROP_FLOAT2, CLOG_DEBUG, PaintPoint::color, copy_v2_v2(), blender::bke::Corner, CustomData_has_layer(), CustomData_validate_layer_name(), blender::Span< T >::data(), data, DynamicPaintSurface::data, dynamic_paint_create_uv_surface_direct_cb(), dynamic_paint_create_uv_surface_neighbor_cb(), dynamic_paint_find_neighbor_pixel(), dynamicPaint_allocateSurfaceType(), dynamicPaint_canvas_mesh_get(), dynamicPaint_freeSurfaceData(), dynamicPaint_initAdjacencyData(), dynamicPaint_pointHasNeighbor(), dynamicPaint_setInitialColor(), dynamicPaint_symmetrizeAdjData(), ELEM, error(), DynamicPaintSurface::flags, float, DynamicPaintSurface::format, PaintSurfaceData::format_data, i, DynamicPaintSurface::image_resolution, blender::Span< T >::index_range(), blender::Span< T >::is_empty(), LOG, blender::bke::AttributeAccessor::lookup(), max, MAX_CUSTOMDATA_LAYER_NAME, MEM_calloc_arrayN(), MEM_callocN(), MEM_freeN(), MEM_malloc_arrayN(), min, minmax_v2v2_v2(), MOD_DPAINT_ANTIALIAS, MOD_DPAINT_SURFACE_F_IMAGESEQ, N_, PaintUVPoint::neighbor_pixel, next, ON_MESH_EDGE, OUT_OF_TEXTURE, setError(), blender::Span< T >::size(), PaintSurfaceData::total_points, PaintUVPoint::tri_index, PaintSurfaceData::type_data, TaskParallelSettings::use_threading, ImgSeqFormatData::uv_p, DynamicPaintSurface::uvlayer_name, and w().

Referenced by dynamicPaint_bakeImageSequence().

◆ dynamicPaint_doBorderStep()

◆ dynamicPaint_doEffectStep()

◆ dynamicPaint_doSmudge()

◆ dynamicPaint_doStep()

int dynamicPaint_doStep ( Depsgraph * depsgraph,
Scene * scene,
Object * ob,
DynamicPaintSurface * surface,
float timescale,
float subframe )
static

Definition at line 6242 of file dynamicpaint.cc.

References PaintSurfaceData::adj_data, PaintSurfaceData::bData, BKE_collision_objects_create(), BKE_collision_objects_free(), BKE_modifiers_findby_type(), BKE_object_modifier_update_subframe(), BKE_scene_ctime_get(), BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), PaintBakeData::bNeighs, DynamicPaintModifierData::brush, DynamicPaintSurface::brush_group, PaintBakeData::brush_velocity, DynamicPaintSurface::canvas, RenderData::cfra, DAG_EVAL_RENDER, data, DynamicPaintSurface::data, DEG_get_mode(), depsgraph, dynamic_paint_surface_needs_dry_dissolve(), dynamic_paint_surface_pre_step_cb(), dynamicPaint_doBorderStep(), dynamicPaint_doEffectStep(), dynamicPaint_doSmudge(), dynamicPaint_doWaveStep(), dynamicPaint_initAdjacencyData(), dynamicPaint_paintMesh(), dynamicPaint_paintParticles(), dynamicPaint_paintSinglePoint(), dynamicPaint_prepareAdjacencyData(), dynamicPaint_prepareEffectStep(), DynamicPaintSurface::effect, ELEM, eModifierMode_Realtime, eModifierMode_Render, eModifierType_DynamicPaint, i, Object::loc, MEM_calloc_arrayN(), MEM_freeN(), MEM_malloc_arrayN(), MOD_DPAINT_COL_POINT, MOD_DPAINT_DO_SMUDGE, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WAVE, MOD_DYNAMICPAINT_TYPE_BRUSH, ModifierData::mode, N_, PART_EMITTER, PART_FLUID, PART_FLUID_BUBBLE, PART_FLUID_FLIP, PART_FLUID_FOAM, PART_FLUID_FOAMBUBBLE, PART_FLUID_SPRAY, PART_FLUID_SPRAYBUBBLE, PART_FLUID_SPRAYFOAM, PART_FLUID_SPRAYFOAMBUBBLE, PART_FLUID_TRACER, psys_check_enabled(), Scene::r, ret, scene_setSubframe(), setError(), RenderData::subframe, SUBFRAME_RECURSION, PaintSurfaceData::total_points, DynamicPaintModifierData::type, DynamicPaintSurface::type, and TaskParallelSettings::use_threading.

Referenced by dynamicPaint_calculateFrame().

◆ dynamicPaint_doWaveStep()

◆ dynamicPaint_frameUpdate()

◆ dynamicPaint_freeAdjData()

void dynamicPaint_freeAdjData ( PaintSurfaceData * data)
static

Definition at line 892 of file dynamicpaint.cc.

References data, and MEM_freeN().

Referenced by dynamicPaint_freeSurfaceData(), and dynamicPaint_initAdjacencyData().

◆ dynamicPaint_freeBrush()

◆ dynamicPaint_freeCanvas()

◆ dynamicPaint_freeSurface()

◆ dynamicPaint_freeSurfaceData()

◆ dynamicPaint_generateBakeData()

◆ dynamicPaint_initAdjacencyData()

◆ dynamicPaint_mixPaintColors()

void dynamicPaint_mixPaintColors ( const DynamicPaintSurface * surface,
const int index,
const int paintFlags,
const float paintColor[3],
const float paintAlpha,
const float paintWetness,
const float timescale )
static

Mix color values to canvas point.

Parameters
surfaceCanvas surface
indexSurface point index
paintFlagspaint object flags
paintColor,paintAlpha,paintWetnessTo be mixed paint values
timescaleValue used to adjust time dependent operations when using substeps

Definition at line 3530 of file dynamicpaint.cc.

References blendColors(), CLAMP, CLAMP_MAX, CLAMP_MIN, PaintPoint::color, copy_v3_v3(), DynamicPaintSurface::data, DPAINT_PAINT_NEW, PaintPoint::e_color, max_ff(), MIN_WETNESS, mix, MOD_DPAINT_ABS_ALPHA, MOD_DPAINT_ERASE, PaintPoint::state, PaintSurfaceData::type_data, and PaintPoint::wetness.

Referenced by dynamicPaint_updatePointData().

◆ dynamicPaint_mixWaveHeight()

◆ dynamicPaint_Modifier_apply()

Mesh * dynamicPaint_Modifier_apply ( DynamicPaintModifierData * pmd,
Object * ob,
Mesh * mesh )
static

Apply canvas data to the object evaluated-mesh.

Definition at line 1921 of file dynamicpaint.cc.

References BKE_defvert_ensure_index(), BKE_defvert_find_index(), BKE_id_free(), BKE_mesh_copy_for_eval(), BKE_object_defgroup_name_index(), BLI_assert, BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), DynamicPaintModifierData::brush, DynamicPaintRuntime::brush_mesh, DynamicPaintRuntime::brush_mutex, DynamicPaintModifierData::canvas, blender::bke::Corner, data, DynamicPaintSurface::data, dynamic_paint_apply_surface_vpaint_blend_cb(), dynamic_paint_apply_surface_vpaint_cb(), dynamic_paint_apply_surface_wave_cb(), dynamicPaint_applySurfaceDisplace(), dynamicPaint_Modifier_runtime_ensure(), dynamicPaint_outputLayerExists(), faces, blender::bke::SpanAttributeWriter< T >::finish(), ListBase::first, DynamicPaintCanvasSettings::flags, DynamicPaintSurface::flags, float, DynamicPaintSurface::format, i, lock, blender::bke::MutableAttributeAccessor::lookup_for_write_span(), blender::bke::AttributeAccessor::lookup_meta_data(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), MEM_calloc_arrayN(), MEM_freeN(), MOD_DPAINT_ACTIVE, MOD_DPAINT_BAKING, MOD_DPAINT_SURFACE_F_IMAGESEQ, MOD_DPAINT_SURFACE_F_VERTEX, MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WAVE, MOD_DPAINT_SURFACE_T_WEIGHT, MOD_DYNAMICPAINT_TYPE_BRUSH, MOD_DYNAMICPAINT_TYPE_CANVAS, DynamicPaintSurface::next, DynamicPaintSurface::output_name, DynamicPaintSurface::output_name2, result, blender::bke::SpanAttributeWriter< T >::span, DynamicPaintCanvasSettings::surfaces, PaintSurfaceData::total_points, DynamicPaintModifierData::type, DynamicPaintSurface::type, PaintSurfaceData::type_data, TaskParallelSettings::use_threading, and MDeformWeight::weight.

Referenced by dynamicPaint_Modifier_do().

◆ dynamicPaint_Modifier_copy()

void dynamicPaint_Modifier_copy ( const DynamicPaintModifierData * pmd,
DynamicPaintModifierData * tpmd,
int flag )

Definition at line 1215 of file dynamicpaint.cc.

References DynamicPaintCanvasSettings::active_sur, BKE_ptcache_free_list(), DynamicPaintModifierData::brush, DynamicPaintSurface::brush_group, DynamicPaintModifierData::canvas, DynamicPaintSurface::color_dry_threshold, DynamicPaintSurface::color_spread_speed, copy_v4_v4(), DynamicPaintSurface::depth_clamp, DynamicPaintSurface::disp_factor, DynamicPaintSurface::disp_type, DynamicPaintSurface::diss_speed, DynamicPaintSurface::drip_acc, DynamicPaintSurface::drip_vel, DynamicPaintSurface::dry_speed, dynamicPaint_createNewSurface(), dynamicPaint_createType(), dynamicPaint_freeSurface(), DynamicPaintSurface::effect, DynamicPaintSurface::effect_ui, DynamicPaintSurface::effector_weights, eModifierFlag_SharedCaches, DynamicPaintSurface::end_frame, ListBase::first, flag, ModifierData::flag, DynamicPaintSurface::flags, DynamicPaintSurface::format, DynamicPaintSurface::image_fileformat, DynamicPaintSurface::image_output_path, DynamicPaintSurface::image_resolution, DynamicPaintSurface::influence_scale, DynamicPaintSurface::init_color, DynamicPaintSurface::init_color_type, DynamicPaintSurface::init_layername, DynamicPaintSurface::init_texture, LIB_ID_COPY_SET_COPIED_ON_WRITE, MEM_dupallocN(), MEM_freeN(), MOD_DYNAMICPAINT_TYPE_BRUSH, MOD_DYNAMICPAINT_TYPE_CANVAS, DynamicPaintModifierData::modifier, DynamicPaintSurface::name, DynamicPaintSurface::next, DynamicPaintSurface::output_name, DynamicPaintSurface::output_name2, DynamicPaintBrushSettings::pmd, DynamicPaintCanvasSettings::pmd, DynamicPaintSurface::pointcache, DynamicPaintSurface::ptcaches, DynamicPaintSurface::radius_scale, DynamicPaintSurface::shrink_speed, DynamicPaintSurface::spread_speed, DynamicPaintSurface::start_frame, STRNCPY(), DynamicPaintSurface::substeps, DynamicPaintCanvasSettings::surfaces, DynamicPaintModifierData::type, DynamicPaintSurface::type, DynamicPaintSurface::uvlayer_name, DynamicPaintSurface::wave_damping, DynamicPaintSurface::wave_smoothness, DynamicPaintSurface::wave_speed, DynamicPaintSurface::wave_spring, and DynamicPaintSurface::wave_timescale.

◆ dynamicPaint_Modifier_do()

Mesh * dynamicPaint_Modifier_do ( struct DynamicPaintModifierData * pmd,
struct Depsgraph * depsgraph,
struct Scene * scene,
struct Object * ob,
struct Mesh * mesh )

Modifier call. Processes dynamic paint modifier step.

Definition at line 2189 of file dynamicpaint.cc.

References depsgraph, dynamicPaint_frameUpdate(), and dynamicPaint_Modifier_apply().

Referenced by modify_mesh().

◆ dynamicPaint_Modifier_free()

void dynamicPaint_Modifier_free ( struct DynamicPaintModifierData * pmd)

◆ dynamicPaint_Modifier_free_runtime()

void dynamicPaint_Modifier_free_runtime ( DynamicPaintRuntime * runtime_data)

◆ dynamicPaint_Modifier_runtime_ensure()

DynamicPaintRuntime * dynamicPaint_Modifier_runtime_ensure ( DynamicPaintModifierData * pmd)
static

◆ dynamicPaint_outputLayerExists()

◆ dynamicPaint_outputSurfaceImage()

◆ dynamicPaint_paintMesh()

◆ dynamicPaint_paintParticles()

◆ dynamicPaint_paintSinglePoint()

◆ dynamicPaint_pointHasNeighbor()

bool dynamicPaint_pointHasNeighbor ( PaintAdjData * ed,
int index,
int neighbor )
static

Definition at line 2721 of file dynamicpaint.cc.

References i.

Referenced by dynamicPaint_createUVSurface(), and dynamicPaint_symmetrizeAdjData().

◆ dynamicPaint_prepareAdjacencyData()

◆ dynamicPaint_prepareEffectStep()

◆ dynamicPaint_resetSurface()

◆ dynamicPaint_setInitialColor()

◆ dynamicPaint_surfaceHasMoved()

◆ dynamicPaint_surfaceNumOfPoints()

◆ dynamicPaint_symmetrizeAdjData()

bool dynamicPaint_symmetrizeAdjData ( PaintAdjData * ed,
int active_points )
static

◆ dynamicPaint_updatePointData()

◆ dynamicPaintSurface_setUniqueName()

void dynamicPaintSurface_setUniqueName ( DynamicPaintSurface * surface,
const char * basename )

◆ dynamicPaintSurface_updateType()

◆ free_bakeData()

◆ freeGrid()

◆ get_activeSurface()

DynamicPaintSurface * get_activeSurface ( struct DynamicPaintCanvasSettings * canvas)

Get currently active surface (in user interface).

Definition at line 331 of file dynamicpaint.cc.

References DynamicPaintCanvasSettings::active_sur, BLI_findlink(), and DynamicPaintCanvasSettings::surfaces.

Referenced by dynamicpaint_bake_exec(), and output_toggle_exec().

◆ getSurfaceDimension()

◆ grid_bound_insert_cb_ex()

void grid_bound_insert_cb_ex ( void *__restrict userdata,
const int i,
const TaskParallelTLS *__restrict tls )
static

Definition at line 661 of file dynamicpaint.cc.

References boundInsert(), i, PaintBakeData::realCoord, PaintBakeData::s_pos, and Vec3f::v.

Referenced by surfaceGenerateGrid().

◆ grid_bound_insert_reduce()

void grid_bound_insert_reduce ( const void * __restrict,
void *__restrict chunk_join,
void *__restrict chunk )
static

Definition at line 672 of file dynamicpaint.cc.

References boundInsert(), Bounds3D::max, and Bounds3D::min.

Referenced by surfaceGenerateGrid().

◆ grid_cell_bounds_cb()

void grid_cell_bounds_cb ( void *__restrict userdata,
const int x,
const TaskParallelTLS * __restrict )
static

◆ grid_cell_points_cb_ex()

void grid_cell_points_cb_ex ( void *__restrict userdata,
const int i,
const TaskParallelTLS *__restrict tls )
static

◆ grid_cell_points_reduce()

void grid_cell_points_reduce ( const void *__restrict userdata,
void *__restrict chunk_join,
void *__restrict chunk )
static

Definition at line 704 of file dynamicpaint.cc.

References DynamicPaintVolumeGrid::dim, PaintBakeData::grid, and i.

Referenced by surfaceGenerateGrid().

◆ mesh_tris_nearest_point_dp()

void mesh_tris_nearest_point_dp ( void * userdata,
int index,
const float co[3],
BVHTreeNearest * nearest )
static

◆ mesh_tris_spherecast_dp()

void mesh_tris_spherecast_dp ( void * userdata,
int index,
const BVHTreeRay * ray,
BVHTreeRayHit * hit )
static

◆ meshBrush_boundsIntersect()

bool meshBrush_boundsIntersect ( Bounds3D * b1,
Bounds3D * b2,
DynamicPaintBrushSettings * brush,
float brush_radius )
static

◆ mixColors()

float mixColors ( float a_color[3],
float a_weight,
const float b_color[3],
float b_weight,
float ratio )
static

◆ scene_setSubframe()

void scene_setSubframe ( Scene * scene,
float subframe )
static

Definition at line 541 of file dynamicpaint.cc.

References RenderData::cfra, Scene::r, and RenderData::subframe.

Referenced by dynamicPaint_doStep().

◆ setError()

◆ surface_determineForceTargetPoints()

void surface_determineForceTargetPoints ( const PaintSurfaceData * sData,
const int index,
const float force[3],
float closest_d[2],
int closest_id[2] )
static

◆ surface_duplicateNameExists()

◆ surface_duplicateOutputExists()

◆ surface_freeUnusedData()

◆ surface_getBrushFlags()

◆ surface_setUniqueOutputName()

void surface_setUniqueOutputName ( DynamicPaintSurface * surface,
char * basename,
int output )
static

◆ surface_totalSamples()

◆ surface_usesAdjData()

◆ surface_usesAdjDistance()

◆ surfaceGenerateGrid()

◆ value_dissolve()

BLI_INLINE void value_dissolve ( float * r_value,
const float time,
const float scale,
const bool is_log )

Definition at line 137 of file dynamicpaint.cc.

References BLI_INLINE, MIN_WETNESS, and powf.

Referenced by dynamic_paint_surface_pre_step_cb().

Variable Documentation

◆ gaussianFactors

const float gaussianFactors[5]
static
Initial value:
= {
0.996849f,
0.596145f,
0.596145f,
0.596145f,
0.524141f,
}

Definition at line 88 of file dynamicpaint.cc.

Referenced by dynamic_paint_paint_mesh_cell_point_cb_ex().

◆ gaussianTotal

const float gaussianTotal = 3.309425f
static

Definition at line 95 of file dynamicpaint.cc.

Referenced by dynamic_paint_paint_mesh_cell_point_cb_ex().

◆ LOG

CLG_LogRef LOG = {"object.dynamicpaint"}
static

Definition at line 85 of file dynamicpaint.cc.

◆ neighStraightX

int neighStraightX[8] = {1, 0, -1, 0, 1, -1, -1, 1}
static

Definition at line 102 of file dynamicpaint.cc.

Referenced by dynamic_paint_create_uv_surface_neighbor_cb().

◆ neighStraightY

int neighStraightY[8] = {0, 1, 0, -1, 1, 1, -1, -1}
static

Definition at line 103 of file dynamicpaint.cc.

Referenced by dynamic_paint_create_uv_surface_neighbor_cb().

◆ neighX

int neighX[8] = {1, 1, 0, -1, -1, -1, 0, 1}
static

Definition at line 98 of file dynamicpaint.cc.

Referenced by dynamic_paint_find_neighbor_pixel().

◆ neighY

int neighY[8] = {0, 1, 1, 1, 0, -1, -1, -1}
static

Definition at line 99 of file dynamicpaint.cc.

Referenced by dynamic_paint_find_neighbor_pixel().