|
Blender V5.0
|
#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 |
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) |
| #define ADJ_BORDER_PIXEL (1 << 1) |
Definition at line 251 of file dynamicpaint.cc.
Referenced by dynamic_paint_border_cb(), dynamic_paint_effect_drip_cb(), dynamic_paint_effect_shrink_cb(), dynamic_paint_effect_spread_cb(), dynamicPaint_createUVSurface(), dynamicPaint_doSmudge(), and dynamicPaint_symmetrizeAdjData().
| #define ADJ_ON_MESH_EDGE (1 << 0) |
Definition at line 250 of file dynamicpaint.cc.
Referenced by dynamic_paint_wave_step_cb(), dynamicPaint_createUVSurface(), and dynamicPaint_initAdjacencyData().
| #define BRUSH_USES_VELOCITY (1 << 0) |
Definition at line 108 of file dynamicpaint.cc.
Referenced by dynamicPaint_generateBakeData(), and surface_getBrushFlags().
| #define CANVAS_REL_SIZE 5.0f |
Definition at line 120 of file dynamicpaint.cc.
Referenced by dynamicPaint_doEffectStep(), dynamicPaint_doWaveStep(), and dynamicPaint_prepareEffectStep().
| #define EFF_MOVEMENT_PER_FRAME 0.05f |
Definition at line 117 of file dynamicpaint.cc.
Referenced by dynamicPaint_doEffectStep(), and dynamicPaint_prepareEffectStep().
| #define HIT_PROXIMITY 2 |
Definition at line 111 of file dynamicpaint.cc.
Referenced by dynamic_paint_paint_mesh_cell_point_cb_ex().
| #define HIT_VOLUME 1 |
Definition at line 110 of file dynamicpaint.cc.
Referenced by dynamic_paint_paint_mesh_cell_point_cb_ex().
| #define JITTER_SAMPLES |
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().
| #define MAX_WETNESS 5.0f |
Definition at line 123 of file dynamicpaint.cc.
Referenced by dynamic_paint_effect_drip_cb().
| #define MIN_WETNESS 0.001f |
Definition at line 122 of file dynamicpaint.cc.
Referenced by dynamic_paint_effect_spread_cb(), dynamic_paint_surface_pre_step_cb(), dynamicPaint_mixPaintColors(), and value_dissolve().
| #define NOT_FOUND -1 |
Definition at line 113 of file dynamicpaint.cc.
Referenced by dynamic_paint_find_island_border(), and dynamic_paint_find_neighbor_pixel().
| #define ON_MESH_EDGE -2 |
Definition at line 114 of file dynamicpaint.cc.
Referenced by dynamic_paint_find_island_border(), and dynamicPaint_createUVSurface().
| #define OUT_OF_TEXTURE -3 |
Definition at line 115 of file dynamicpaint.cc.
Referenced by dynamic_paint_find_island_border(), dynamic_paint_find_neighbor_pixel(), and dynamicPaint_createUVSurface().
| #define SUBFRAME_RECURSION OBJECT_MODIFIER_UPDATE_SUBFRAME_RECURSION_DEFAULT |
Definition at line 106 of file dynamicpaint.cc.
Referenced by dynamicPaint_brushMeshCalculateVelocity(), dynamicPaint_brushObjectCalculateVelocity(), and dynamicPaint_doStep().
| #define WAVE_TIME_FAC (1.0f / 24.0f) |
Definition at line 119 of file dynamicpaint.cc.
Referenced by dynamicPaint_doWaveStep().
| using blender::int3 |
Definition at line 602 of file BLI_math_vector_types.hh.
|
static |
Definition at line 488 of file dynamicpaint.cc.
References copy_v3_v3(), i, and result.
Referenced by dynamic_paint_apply_surface_vpaint_blend_cb(), dynamic_paint_output_surface_image_paint_cb(), dynamic_paint_surface_pre_step_cb(), and dynamicPaint_mixPaintColors().
Definition at line 621 of file dynamicpaint.cc.
References b, copy_v3_v3(), and minmax_v3v3_v3().
Referenced by dynamicPaint_generateBakeData(), dynamicPaint_paintMesh(), dynamicPaint_paintParticles(), grid_bound_insert_cb_ex(), grid_bound_insert_reduce(), and surfaceGenerateGrid().
Definition at line 607 of file dynamicpaint.cc.
Referenced by dynamicPaint_paintParticles().
Definition at line 579 of file dynamicpaint.cc.
References i, Bounds3D::max, Bounds3D::min, and Bounds3D::valid.
Referenced by meshBrush_boundsIntersect().
Definition at line 593 of file dynamicpaint.cc.
References i, Bounds3D::max, Bounds3D::min, and Bounds3D::valid.
Referenced by dynamicPaint_paintParticles(), and meshBrush_boundsIntersect().
|
static |
Definition at line 2089 of file dynamicpaint.cc.
References BKE_id_free(), BKE_mesh_copy_for_eval(), DynamicPaintRuntime::canvas_mesh, dynamicPaint_Modifier_runtime_ensure(), and DynamicPaintCanvasSettings::pmd.
Referenced by dynamicPaint_frameUpdate().
|
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().
|
static |
Definition at line 1817 of file dynamicpaint.cc.
References data, DynamicPaintSurface::data, DynamicPaintSurface::disp_factor, i, madd_v3_v3fl(), and PaintSurfaceData::type_data.
Referenced by dynamicPaint_applySurfaceDisplace().
|
static |
Definition at line 1856 of file dynamicpaint.cc.
References blendColors(), data, float, and i.
Referenced by dynamicPaint_Modifier_apply().
|
static |
Definition at line 1871 of file dynamicpaint.cc.
References data, DynamicPaintSurface::data, float, blender::MutableSpan< T >::is_empty(), rgba_float_to_uchar(), PaintSurfaceData::type_data, and unit_float_to_uchar_clamp().
Referenced by dynamicPaint_Modifier_apply().
|
static |
Definition at line 1906 of file dynamicpaint.cc.
References data, PaintWavePoint::height, i, and madd_v3_v3fl().
Referenced by dynamicPaint_Modifier_apply().
|
static |
Definition at line 5589 of file dynamicpaint.cc.
References ADJ_BORDER_PIXEL, PaintSurfaceData::adj_data, BLI_assert, PaintAdjData::border, PaintPoint::color, data, DynamicPaintSurface::data, PaintPoint::e_color, PaintAdjData::flags, i, madd_v3_v3fl(), mul_v3_v3fl(), PaintAdjData::n_index, PaintAdjData::n_num, PaintAdjData::n_target, PaintSurfaceData::type_data, and PaintPoint::wetness.
Referenced by dynamicPaint_doBorderStep().
|
static |
Definition at line 3771 of file dynamicpaint.cc.
References copy_v3_v3(), data, float, i, mul_m4_v3(), mul_v3_fl(), sub_v3_v3v3(), and v.
Referenced by dynamicPaint_brushMeshCalculateVelocity().
|
static |
Definition at line 2232 of file dynamicpaint.cc.
References barycentric_weights_v2(), data, DynamicPaintSurface::flags, float, i, DynamicPaintSurface::image_resolution, blender::Span< T >::index_range(), isect_point_tri_v2(), JITTER_SAMPLES, max, min, MOD_DPAINT_ANTIALIAS, PaintUVPoint::neighbor_pixel, PaintUVPoint::pixel_index, sample, PaintUVPoint::tri_index, v, PaintUVPoint::v1, PaintUVPoint::v2, PaintUVPoint::v3, and w().
Referenced by dynamicPaint_createUVSurface().
|
static |
Definition at line 2329 of file dynamicpaint.cc.
References atomic_add_and_fetch_uint32(), barycentric_weights_v2(), data, DynamicPaintSurface::flags, float, i, DynamicPaintSurface::image_resolution, JITTER_SAMPLES, MOD_DPAINT_ANTIALIAS, PaintUVPoint::neighbor_pixel, neighStraightX, neighStraightY, PaintUVPoint::tri_index, v, PaintUVPoint::v1, PaintUVPoint::v2, PaintUVPoint::v3, and w().
Referenced by dynamicPaint_createUVSurface().
|
static |
Definition at line 5369 of file dynamicpaint.cc.
References ADJ_BORDER_PIXEL, PaintSurfaceData::adj_data, atomic_fetch_and_and_uint8(), atomic_fetch_and_or_uint8(), PaintSurfaceData::bData, BLI_assert, PaintBakeData::bNeighs, CLAMP, CLAMP_MAX, data, DynamicPaintSurface::data, BakeAdjPoint::dist, PaintPoint::e_color, PaintAdjData::flags, i, MAX_WETNESS, min_ff(), mixColors(), PaintAdjData::n_target, ret, surface_determineForceTargetPoints(), PaintSurfaceData::type_data, and PaintPoint::wetness.
Referenced by dynamicPaint_doEffectStep().
|
static |
Definition at line 5311 of file dynamicpaint.cc.
References ADJ_BORDER_PIXEL, PaintSurfaceData::adj_data, PaintSurfaceData::bData, PaintBakeData::bNeighs, CLAMP_MIN, PaintPoint::color, data, DynamicPaintSurface::data, BakeAdjPoint::dist, PaintPoint::e_color, PaintAdjData::flags, i, max_ff(), PaintAdjData::n_index, PaintAdjData::n_num, PaintAdjData::n_target, PaintSurfaceData::type_data, and PaintPoint::wetness.
Referenced by dynamicPaint_doEffectStep().
|
static |
Processes active effect step.
Definition at line 5252 of file dynamicpaint.cc.
References ADJ_BORDER_PIXEL, PaintSurfaceData::adj_data, PaintSurfaceData::bData, PaintBakeData::bNeighs, CLAMP, DynamicPaintSurface::color_spread_speed, data, DynamicPaintSurface::data, BakeAdjPoint::dist, PaintPoint::e_color, PaintAdjData::flags, i, min_ff(), min_fff(), MIN_WETNESS, mixColors(), PaintAdjData::n_index, PaintAdjData::n_num, PaintAdjData::n_target, PaintSurfaceData::type_data, and PaintPoint::wetness.
Referenced by dynamicPaint_doEffectStep().
|
static |
Definition at line 2541 of file dynamicpaint.cc.
References DynamicPaintFindIslandBorderData::best_index, DynamicPaintFindIslandBorderData::best_weight, CLAMP, closest_to_line_v2(), copy_v2_v2(), data, dist_squared_to_corner_tris_uv_edges(), dist_squared_to_line_segment_v2(), dynamic_paint_find_island_border(), ELEM, equals_v2v2(), floorf, DynamicPaintFindIslandBorderData::h, i, line_point_side_v2(), madd_v2_v2v2fl(), PaintUVPoint::neighbor_pixel, NOT_FOUND, ON_MESH_EDGE, OUT_OF_TEXTURE, DynamicPaintFindIslandBorderData::px, DynamicPaintFindIslandBorderData::py, square_f(), sub_v2_v2v2(), PaintUVPoint::tri_index, DynamicPaintFindIslandBorderData::vert_to_tri_map, DynamicPaintFindIslandBorderData::w, and w().
Referenced by dynamic_paint_find_island_border(), and dynamic_paint_find_neighbor_pixel().
|
static |
Definition at line 2469 of file dynamicpaint.cc.
References DynamicPaintFindIslandBorderData::best_index, DynamicPaintFindIslandBorderData::best_weight, data, dynamic_paint_find_island_border(), float, DynamicPaintFindIslandBorderData::h, PaintUVPoint::neighbor_pixel, neighX, neighY, NOT_FOUND, OUT_OF_TEXTURE, DynamicPaintFindIslandBorderData::px, DynamicPaintFindIslandBorderData::py, PaintUVPoint::tri_index, DynamicPaintFindIslandBorderData::vert_to_tri_map, DynamicPaintFindIslandBorderData::w, w(), x, and y.
Referenced by dynamicPaint_createUVSurface().
|
static |
Definition at line 5984 of file dynamicpaint.cc.
References PaintSurfaceData::adj_data, ImgSeqFormatData::barycentricWeights, PaintSurfaceData::bData, PaintBakeData::bNormal, PaintBakeData::clear, copy_v3_v3(), data, DynamicPaintSurface::data, ELEM, DynamicPaintSurface::flags, DynamicPaintSurface::format, PaintSurfaceData::format_data, interp_v3_v3v3v3(), PaintBakeNormal::invNorm, len_v3(), madd_v3_v3fl(), MOD_DPAINT_ANTIALIAS, MOD_DPAINT_SURFACE_F_IMAGESEQ, MOD_DPAINT_SURFACE_F_VERTEX, MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_WAVE, mul_mat3_m4_v3(), mul_v3_fl(), mul_v3_v3v3(), PaintAdjData::n_index, PaintAdjData::n_num, PaintAdjData::n_target, negate_v3_v3(), PaintBakeNormal::normal_scale, normalize_v3(), PaintBakeData::realCoord, PaintBakeData::s_num, PaintBakeData::s_pos, Object::scale, sub_v3_v3v3(), DynamicPaintSurface::type, ImgSeqFormatData::uv_p, Vec3f::v, PaintUVPoint::v1, PaintUVPoint::v2, PaintUVPoint::v3, and PaintBakeData::velocity.
Referenced by dynamicPaint_generateBakeData().
|
static |
Definition at line 3246 of file dynamicpaint.cc.
References CLAMP, copy_v3_fl(), data, DynamicPaintSurface::data, ImBufFloatBuffer::data, DynamicPaintSurface::depth_clamp, DynamicPaintSurface::disp_type, ImBuf::float_buffer, PaintSurfaceData::format_data, MOD_DPAINT_DISP_DISPLACE, pos, and PaintSurfaceData::type_data.
Referenced by dynamicPaint_outputSurfaceImage().
|
static |
Definition at line 3219 of file dynamicpaint.cc.
References blendColors(), PaintPoint::color, data, DynamicPaintSurface::data, ImBufFloatBuffer::data, PaintPoint::e_color, DynamicPaintSurface::flags, ImBuf::float_buffer, PaintSurfaceData::format_data, MOD_DPAINT_MULALPHA, mul_v3_fl(), pos, and PaintSurfaceData::type_data.
Referenced by dynamicPaint_outputSurfaceImage().
|
static |
Definition at line 3273 of file dynamicpaint.cc.
References CLAMP, copy_v3_fl(), data, DynamicPaintSurface::data, ImBufFloatBuffer::data, DynamicPaintSurface::depth_clamp, ImBuf::float_buffer, PaintSurfaceData::format_data, PaintWavePoint::height, pos, and PaintSurfaceData::type_data.
Referenced by dynamicPaint_outputSurfaceImage().
|
static |
Definition at line 3299 of file dynamicpaint.cc.
References copy_v3_fl(), data, DynamicPaintSurface::data, ImBufFloatBuffer::data, ImBuf::float_buffer, PaintSurfaceData::format_data, pos, PaintSurfaceData::type_data, and PaintPoint::wetness.
Referenced by dynamicPaint_outputSurfaceImage().
|
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().
|
static |
Definition at line 4437 of file dynamicpaint.cc.
References PaintSurfaceData::bData, PaintBakeData::bNormal, PaintBakeData::brush_velocity, CLAMP_MIN, copy_v3_v3(), data, DynamicPaintSurface::data, dynamicPaint_updatePointData(), ELEM, PaintBakeData::grid, max_ff(), MEM_freeN(), MOD_DPAINT_DO_SMUDGE, MOD_DPAINT_PART_RAD, MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WAVE, MOD_DPAINT_USES_VELOCITY, mul_v3_v3fl(), PaintBakeNormal::normal_scale, normalize_v3(), ParticleSystem::part, ParticleSystem::particles, DynamicPaintSurface::radius_scale, PaintBakeData::realCoord, DynamicPaintVolumeGrid::s_pos, PaintBakeData::s_pos, ParticleData::size, sqrtf, ParticleData::state, str, sub_v3_v3(), DynamicPaintVolumeGrid::t_index, ParticleSettings::timetweak, tree, DynamicPaintSurface::type, Vec3f::v, ParticleKey::vel, and PaintBakeData::velocity.
Referenced by dynamicPaint_paintParticles().
|
static |
Definition at line 4725 of file dynamicpaint.cc.
References PaintSurfaceData::bData, BKE_colorband_evaluate(), PaintBakeData::bNormal, PaintBakeData::brush_velocity, CLAMP, copy_v3_v3(), data, DynamicPaintSurface::data, distance(), dynamicPaint_updatePointData(), ELEM, len_v3(), len_v3v3(), max_ff(), MOD_DPAINT_DO_SMUDGE, MOD_DPAINT_PRFALL_RAMP, MOD_DPAINT_PRFALL_SMOOTH, MOD_DPAINT_RAMP_ALPHA, MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WAVE, MOD_DPAINT_USES_VELOCITY, mul_v3_v3fl(), PaintBakeNormal::normal_scale, PaintBakeData::realCoord, PaintBakeData::s_pos, sqrtf, sub_v3_v3v3(), DynamicPaintSurface::type, Vec3f::v, and PaintBakeData::velocity.
Referenced by dynamicPaint_paintSinglePoint().
|
static |
Definition at line 4871 of file dynamicpaint.cc.
References PaintSurfaceData::adj_data, PaintSurfaceData::bData, PaintBakeData::bNeighs, BakeAdjPoint::dist, i, PaintAdjData::n_index, PaintAdjData::n_num, PaintAdjData::n_target, normalize_v3(), PaintBakeData::realCoord, PaintBakeData::s_pos, sub_v3_v3v3(), and Vec3f::v.
Referenced by dynamicPaint_prepareAdjacencyData().
|
static |
Definition at line 5128 of file dynamicpaint.cc.
References PaintSurfaceData::bData, BKE_effectors_apply(), copy_v3_v3(), data, DynamicPaintSurface::data, DynamicPaintSurface::drip_acc, DynamicPaintSurface::drip_vel, DynamicPaintSurface::effector_weights, PhysicsSettings::flag, EffectorWeights::global_gravity, PhysicsSettings::gravity, madd_v3_v3fl(), normalize_v3_v3(), pd_point_from_loc(), PHYS_GLOBAL_GRAVITY, Scene::physics_settings, PaintBakeData::prev_velocity, PaintBakeData::realCoord, PaintBakeData::s_pos, sub_v3_v3(), Vec3f::v, EffectedPoint::vel_to_sec, PaintBakeData::velocity, and EffectorWeights::weight.
Referenced by dynamicPaint_prepareEffectStep().
|
static |
Definition at line 1546 of file dynamicpaint.cc.
References ImgSeqFormatData::barycentricWeights, PaintPoint::color, copy_v2_v2(), copy_v3_v3(), data, PaintSurfaceData::format_data, i, interp_v3_v3v3v3(), MOD_DPAINT_ANTIALIAS, multitex_ext_safe(), TexResult::tin, TexResult::trgba, PaintUVPoint::tri_index, PaintSurfaceData::type_data, ImgSeqFormatData::uv_p, and Vec3f::v.
Referenced by dynamicPaint_setInitialColor().
|
static |
Definition at line 1512 of file dynamicpaint.cc.
References PaintPoint::color, copy_v3_v3(), data, i, multitex_ext_safe(), TexResult::tin, TexResult::trgba, and PaintSurfaceData::type_data.
Referenced by dynamicPaint_setInitialColor().
|
static |
Definition at line 1584 of file dynamicpaint.cc.
References ImgSeqFormatData::barycentricWeights, copy_v4_v4(), data, PaintSurfaceData::format_data, i, interp_v4_v4v4v4(), MOD_DPAINT_ANTIALIAS, rgba_uchar_to_float(), PaintUVPoint::tri_index, PaintSurfaceData::type_data, UNPACK3, ImgSeqFormatData::uv_p, and Vec3f::v.
Referenced by dynamicPaint_setInitialColor().
|
static |
Definition at line 5835 of file dynamicpaint.cc.
References ELEM, DynamicPaintSurface::flags, MOD_DPAINT_DISSOLVE, MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WEIGHT, MOD_DPAINT_USE_DRYING, and DynamicPaintSurface::type.
Referenced by dynamicPaint_doStep().
|
static |
Definition at line 5848 of file dynamicpaint.cc.
References blendColors(), CLAMP, CLAMP_MIN, PaintPoint::color, DynamicPaintSurface::color_dry_threshold, copy_v4_v4(), data, DynamicPaintSurface::data, DynamicPaintSurface::diss_speed, DPAINT_PAINT_DRY, DPAINT_PAINT_WET, DynamicPaintSurface::dry_speed, PaintPoint::e_color, ELEM, DynamicPaintSurface::flags, i, MIN_WETNESS, MOD_DPAINT_DISSOLVE, MOD_DPAINT_DISSOLVE_LOG, MOD_DPAINT_DRY_LOG, MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WEIGHT, MOD_DPAINT_USE_DRYING, PaintPoint::state, DynamicPaintSurface::type, PaintSurfaceData::type_data, value_dissolve(), and PaintPoint::wetness.
Referenced by dynamicPaint_doStep().
|
static |
Definition at line 5668 of file dynamicpaint.cc.
References PaintSurfaceData::adj_data, ADJ_ON_MESH_EDGE, PaintSurfaceData::bData, PaintBakeData::bNeighs, PaintWavePoint::brush_isect, CLAMP_MIN, data, DynamicPaintSurface::data, BakeAdjPoint::dist, DPAINT_WAVE_NONE, DynamicPaintSurface::flags, PaintAdjData::flags, PaintWavePoint::height, i, MOD_DPAINT_WAVE_OPEN_BORDERS, PaintAdjData::n_index, PaintAdjData::n_num, PaintAdjData::n_target, PaintWavePoint::state, PaintSurfaceData::type_data, PaintWavePoint::velocity, and DynamicPaintSurface::wave_spring.
Referenced by dynamicPaint_doWaveStep().
|
static |
Definition at line 1347 of file dynamicpaint.cc.
References DynamicPaintSurface::canvas, DynamicPaintSurface::data, MEM_calloc_arrayN(), MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WAVE, MOD_DPAINT_SURFACE_T_WEIGHT, N_, setError(), PaintSurfaceData::total_points, DynamicPaintSurface::type, and PaintSurfaceData::type_data.
Referenced by dynamicPaint_createUVSurface(), and dynamicPaint_resetSurface().
|
static |
Apply displacing vertex surface to the evaluated-mesh.
Definition at line 1833 of file dynamicpaint.cc.
References BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), data, DynamicPaintSurface::data, dynamic_paint_apply_surface_displace_cb(), DynamicPaintSurface::format, MOD_DPAINT_SURFACE_F_VERTEX, MOD_DPAINT_SURFACE_T_DISPLACE, result, PaintSurfaceData::total_points, DynamicPaintSurface::type, and TaskParallelSettings::use_threading.
Referenced by dynamicPaint_calculateFrame(), and dynamicPaint_Modifier_apply().
|
static |
Definition at line 3800 of file dynamicpaint.cc.
References BKE_id_free(), BKE_mesh_copy_for_eval(), BKE_object_modifier_update_subframe(), BKE_scene_ctime_get(), BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), RenderData::cfra, copy_m4_m4(), data, depsgraph, dynamic_paint_brush_velocity_compute_cb(), eModifierType_DynamicPaint, float, lock, MEM_malloc_arrayN(), Scene::r, RenderData::subframe, SUBFRAME_RECURSION, TaskParallelSettings::use_threading, and Mesh::verts_num.
Referenced by dynamicPaint_paintMesh().
|
static |
Definition at line 3899 of file dynamicpaint.cc.
References BKE_object_modifier_update_subframe(), BKE_scene_ctime_get(), RenderData::cfra, copy_m4_m4(), depsgraph, eModifierType_DynamicPaint, mul_m4_v3(), mul_v3_fl(), Scene::r, sub_v3_v3v3(), RenderData::subframe, SUBFRAME_RECURSION, and Vec3f::v.
Referenced by dynamicPaint_paintSinglePoint().
| void dynamicPaint_cacheUpdateFrames | ( | struct DynamicPaintSurface * | surface | ) |
Update cache frame range.
Definition at line 2081 of file dynamicpaint.cc.
References DynamicPaintSurface::end_frame, PointCache::endframe, DynamicPaintSurface::pointcache, DynamicPaintSurface::start_frame, and PointCache::startframe.
| int dynamicPaint_calculateFrame | ( | struct DynamicPaintSurface * | surface, |
| struct Depsgraph * | depsgraph, | ||
| struct Scene * | scene, | ||
| struct Object * | cObject, | ||
| int | frame ) |
Calculate a single frame and included sub-frames for surface.
Definition at line 6421 of file dynamicpaint.cc.
References DynamicPaintSurface::canvas, depsgraph, dynamicPaint_applySurfaceDisplace(), dynamicPaint_canvas_mesh_get(), dynamicPaint_doStep(), dynamicPaint_generateBakeData(), DynamicPaintSurface::flags, float, MOD_DPAINT_DISP_INCREMENTAL, DynamicPaintSurface::start_frame, and DynamicPaintSurface::substeps.
Referenced by dynamicPaint_bakeImageSequence(), and dynamicPaint_frameUpdate().
|
static |
Definition at line 297 of file dynamicpaint.cc.
References DynamicPaintRuntime::canvas_mesh, DynamicPaintModifierData::modifier, DynamicPaintCanvasSettings::pmd, and ModifierData::runtime.
Referenced by dynamicPaint_calculateFrame(), dynamicPaint_createUVSurface(), dynamicPaint_generateBakeData(), dynamicPaint_initAdjacencyData(), dynamicPaint_setInitialColor(), dynamicPaint_surfaceHasMoved(), and dynamicPaint_surfaceNumOfPoints().
|
static |
Definition at line 1792 of file dynamicpaint.cc.
References DynamicPaintSurface::data, dynamicPaint_resetSurface(), dynamicPaint_surfaceNumOfPoints(), and PaintSurfaceData::total_points.
Referenced by dynamicPaint_frameUpdate().
| void dynamicPaint_clearSurface | ( | const Scene * | scene, |
| DynamicPaintSurface * | surface ) |
Definition at line 1727 of file dynamicpaint.cc.
References PaintSurfaceData::bData, PaintBakeData::clear, DynamicPaintSurface::data, dynamicPaint_setInitialColor(), float, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WAVE, PaintSurfaceData::total_points, DynamicPaintSurface::type, and PaintSurfaceData::type_data.
| 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().
| bool dynamicPaint_createType | ( | struct DynamicPaintModifierData * | pmd, |
| int | type, | ||
| struct Scene * | scene ) |
Initialize modifier data.
Definition at line 1121 of file dynamicpaint.cc.
References CBData::a, CBData::b, BKE_colorband_add(), DynamicPaintModifierData::brush, DynamicPaintModifierData::canvas, dynamicPaint_createNewSurface(), dynamicPaint_freeBrush(), dynamicPaint_freeCanvas(), CBData::g, MEM_callocN(), MOD_DPAINT_ABS_ALPHA, MOD_DPAINT_COL_VOLUME, MOD_DPAINT_PRFALL_SMOOTH, MOD_DPAINT_RAMP_ALPHA, MOD_DPAINT_WAVEB_CHANGE, MOD_DYNAMICPAINT_TYPE_BRUSH, MOD_DYNAMICPAINT_TYPE_CANVAS, DynamicPaintBrushSettings::paint_ramp, DynamicPaintCanvasSettings::pmd, CBData::pos, CBData::r, and ColorBand::tot.
Referenced by dynamicPaint_Modifier_copy(), and type_toggle_exec().
| 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().
|
static |
Definition at line 5649 of file dynamicpaint.cc.
References PaintSurfaceData::adj_data, BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), PaintAdjData::border, data, DynamicPaintSurface::data, dynamic_paint_border_cb(), PaintAdjData::total_border, and TaskParallelSettings::use_threading.
Referenced by dynamicPaint_doStep().
|
static |
Definition at line 5497 of file dynamicpaint.cc.
References PaintSurfaceData::adj_data, BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), CANVAS_REL_SIZE, data, DynamicPaintSurface::data, dynamic_paint_effect_drip_cb(), dynamic_paint_effect_shrink_cb(), dynamic_paint_effect_spread_cb(), EFF_MOVEMENT_PER_FRAME, DynamicPaintSurface::effect, getSurfaceDimension(), MEM_calloc_arrayN(), MEM_freeN(), MOD_DPAINT_EFFECT_DO_DRIP, MOD_DPAINT_EFFECT_DO_SHRINK, MOD_DPAINT_EFFECT_DO_SPREAD, DynamicPaintSurface::shrink_speed, DynamicPaintSurface::spread_speed, PaintSurfaceData::total_points, PaintSurfaceData::type_data, and TaskParallelSettings::use_threading.
Referenced by dynamicPaint_doStep().
|
static |
Definition at line 5021 of file dynamicpaint.cc.
References ADJ_BORDER_PIXEL, PaintSurfaceData::adj_data, PaintBakeData::average_dist, PaintSurfaceData::bData, PaintBakeData::bNeighs, PaintBakeData::brush_velocity, ceil, CLAMP, CLAMP_MAX, CLAMP_MIN, PaintPoint::color, DynamicPaintSurface::data, BakeAdjPoint::dist, PaintPoint::e_color, PaintAdjData::flags, float, i, mixColors(), PaintAdjData::n_target, step, surface_determineForceTargetPoints(), PaintSurfaceData::total_points, PaintSurfaceData::type_data, and PaintPoint::wetness.
Referenced by dynamicPaint_doStep().
|
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().
|
static |
Definition at line 5767 of file dynamicpaint.cc.
References PaintSurfaceData::adj_data, PaintSurfaceData::bData, BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), PaintBakeData::bNeighs, CANVAS_REL_SIZE, ceil, CLAMP, data, DynamicPaintSurface::data, BakeAdjPoint::dist, dynamic_paint_wave_step_cb(), getSurfaceDimension(), i, MEM_freeN(), MEM_malloc_arrayN(), PaintAdjData::n_index, PaintAdjData::n_num, pow, PaintSurfaceData::total_points, PaintAdjData::total_targets, PaintSurfaceData::type_data, TaskParallelSettings::use_threading, DynamicPaintSurface::wave_damping, DynamicPaintSurface::wave_smoothness, DynamicPaintSurface::wave_speed, WAVE_TIME_FAC, and DynamicPaintSurface::wave_timescale.
Referenced by dynamicPaint_doStep().
|
static |
Definition at line 2102 of file dynamicpaint.cc.
References BKE_ptcache_id_from_dynamicpaint(), BKE_ptcache_id_reset(), BKE_ptcache_id_time(), BKE_ptcache_read(), BKE_ptcache_validate(), BKE_ptcache_write(), PTCacheID::cache, DynamicPaintModifierData::canvas, canvas_copyMesh(), RenderData::cfra, CLAMP, DynamicPaintSurface::current_frame, DynamicPaintSurface::data, depsgraph, dynamicPaint_calculateFrame(), dynamicPaint_checkSurfaceData(), DynamicPaintSurface::end_frame, PointCache::endframe, ListBase::first, PointCache::flag, DynamicPaintCanvasSettings::flags, DynamicPaintSurface::flags, DynamicPaintSurface::format, MOD_DPAINT_ACTIVE, MOD_DPAINT_BAKING, MOD_DPAINT_DISP_INCREMENTAL, MOD_DPAINT_SURFACE_F_IMAGESEQ, MOD_DPAINT_SURFACE_T_DISPLACE, DynamicPaintSurface::next, DynamicPaintSurface::pointcache, PTCACHE_BAKED, PTCACHE_REDO_NEEDED, PTCACHE_RESET_OUTDATED, Scene::r, DynamicPaintSurface::start_frame, PointCache::startframe, surface_freeUnusedData(), DynamicPaintCanvasSettings::surfaces, and DynamicPaintSurface::type.
Referenced by dynamicPaint_Modifier_do().
|
static |
Definition at line 892 of file dynamicpaint.cc.
References data, and MEM_freeN().
Referenced by dynamicPaint_freeSurfaceData(), and dynamicPaint_initAdjacencyData().
| void dynamicPaint_freeBrush | ( | DynamicPaintModifierData * | pmd | ) |
Definition at line 877 of file dynamicpaint.cc.
References DynamicPaintModifierData::brush, MEM_freeN(), DynamicPaintBrushSettings::paint_ramp, and DynamicPaintBrushSettings::vel_ramp.
Referenced by dynamicPaint_createType(), dynamicPaint_Modifier_free(), and type_toggle_exec().
| void dynamicPaint_freeCanvas | ( | struct DynamicPaintModifierData * | pmd | ) |
Free canvas data.
Definition at line 1014 of file dynamicpaint.cc.
References DynamicPaintModifierData::canvas, dynamicPaint_freeSurface(), ListBase::first, MEM_freeN(), DynamicPaintSurface::next, and DynamicPaintCanvasSettings::surfaces.
Referenced by dynamicPaint_createType(), dynamicPaint_Modifier_free(), and type_toggle_exec().
| void dynamicPaint_freeSurface | ( | const DynamicPaintModifierData * | pmd, |
| DynamicPaintSurface * | surface ) |
Definition at line 999 of file dynamicpaint.cc.
References BKE_ptcache_free_list(), BLI_remlink(), DynamicPaintSurface::canvas, dynamicPaint_freeSurfaceData(), DynamicPaintSurface::effector_weights, eModifierFlag_SharedCaches, ModifierData::flag, MEM_freeN(), MEM_SAFE_FREE, DynamicPaintModifierData::modifier, DynamicPaintSurface::pointcache, DynamicPaintSurface::ptcaches, and DynamicPaintCanvasSettings::surfaces.
Referenced by dynamicPaint_freeCanvas(), and dynamicPaint_Modifier_copy().
| void dynamicPaint_freeSurfaceData | ( | DynamicPaintSurface * | surface | ) |
Definition at line 967 of file dynamicpaint.cc.
References ImgSeqFormatData::barycentricWeights, data, DynamicPaintSurface::data, dynamicPaint_freeAdjData(), DynamicPaintSurface::format, free_bakeData(), MEM_freeN(), MOD_DPAINT_SURFACE_F_IMAGESEQ, and ImgSeqFormatData::uv_p.
Referenced by dpaint_bake_endjob(), dynamicPaint_createUVSurface(), dynamicPaint_freeSurface(), and dynamicPaint_resetSurface().
|
static |
Definition at line 6094 of file dynamicpaint.cc.
References PaintSurfaceData::bData, BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), PaintBakeData::bNormal, boundInsert(), BRUSH_USES_VELOCITY, DynamicPaintSurface::canvas, PaintBakeData::clear, copy_m4_m4(), copy_v3_v3(), blender::Span< T >::data(), data, DynamicPaintSurface::data, depsgraph, dynamic_paint_generate_bake_data_cb(), dynamicPaint_canvas_mesh_get(), dynamicPaint_prepareAdjacencyData(), dynamicPaint_surfaceHasMoved(), DynamicPaintSurface::effect, MEM_calloc_arrayN(), MEM_callocN(), MEM_freeN(), MEM_malloc_arrayN(), PaintBakeData::mesh_bounds, MOD_DPAINT_EFFECT_DO_DRIP, mul_m4_v3(), N_, PaintBakeData::prev_obmat, PaintBakeData::prev_positions, PaintBakeData::prev_velocity, PaintBakeData::realCoord, PaintBakeData::s_num, PaintBakeData::s_pos, setError(), surface_getBrushFlags(), surface_totalSamples(), surfaceGenerateGrid(), PaintSurfaceData::total_points, TaskParallelSettings::use_threading, v, Vec3f::v, Bounds3D::valid, and PaintBakeData::velocity.
Referenced by dynamicPaint_calculateFrame().
|
static |
Definition at line 1388 of file dynamicpaint.cc.
References PaintSurfaceData::adj_data, ADJ_ON_MESH_EDGE, PaintAdjData::border, DynamicPaintSurface::canvas, DynamicPaintSurface::data, dynamicPaint_canvas_mesh_get(), dynamicPaint_freeAdjData(), faces, PaintAdjData::flags, DynamicPaintSurface::format, i, MEM_calloc_arrayN(), MEM_callocN(), MEM_freeN(), MOD_DPAINT_SURFACE_F_IMAGESEQ, MOD_DPAINT_SURFACE_F_VERTEX, N_, PaintAdjData::n_index, PaintAdjData::n_num, PaintAdjData::n_target, setError(), blender::Span< T >::slice(), surface_usesAdjData(), PaintAdjData::total_border, PaintSurfaceData::total_points, and PaintAdjData::total_targets.
Referenced by dynamicPaint_createUVSurface(), dynamicPaint_doStep(), and dynamicPaint_resetSurface().
|
static |
Mix color values to canvas point.
| surface | Canvas surface |
| index | Surface point index |
| paintFlags | paint object flags |
| paintColor,paintAlpha,paintWetness | To be mixed paint values |
| timescale | Value 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().
|
static |
Definition at line 3598 of file dynamicpaint.cc.
References BLI_assert, PaintWavePoint::brush_isect, DPAINT_WAVE_ISECT_CHANGED, DPAINT_WAVE_OBSTACLE, DPAINT_WAVE_REFLECT_ONLY, PaintWavePoint::height, MOD_DPAINT_WAVEB_CHANGE, MOD_DPAINT_WAVEB_DEPTH, MOD_DPAINT_WAVEB_FORCE, MOD_DPAINT_WAVEB_REFLECT, PaintWavePoint::state, and PaintWavePoint::velocity.
Referenced by dynamicPaint_updatePointData().
|
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().
| 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.
| 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().
| void dynamicPaint_Modifier_free | ( | struct DynamicPaintModifierData * | pmd | ) |
Free whole dynamic-paint modifier.
Definition at line 1032 of file dynamicpaint.cc.
References dynamicPaint_freeBrush(), dynamicPaint_freeCanvas(), dynamicPaint_Modifier_free_runtime(), DynamicPaintModifierData::modifier, and ModifierData::runtime.
Referenced by free_data().
| void dynamicPaint_Modifier_free_runtime | ( | DynamicPaintRuntime * | runtime_data | ) |
Definition at line 272 of file dynamicpaint.cc.
References BKE_id_free(), DynamicPaintRuntime::brush_mesh, DynamicPaintRuntime::brush_mutex, DynamicPaintRuntime::canvas_mesh, and lock.
Referenced by dynamicPaint_Modifier_free(), and free_runtime_data().
|
static |
Definition at line 289 of file dynamicpaint.cc.
References DynamicPaintModifierData::modifier, and ModifierData::runtime.
Referenced by canvas_copyMesh(), and dynamicPaint_Modifier_apply().
| bool dynamicPaint_outputLayerExists | ( | DynamicPaintSurface * | surface, |
| Object * | ob, | ||
| int | output ) |
Definition at line 336 of file dynamicpaint.cc.
References BKE_object_defgroup_name_index(), blender::bke::ColorByte, blender::bke::Corner, Object::data, DynamicPaintSurface::format, blender::bke::AttributeAccessor::lookup_meta_data(), MOD_DPAINT_SURFACE_F_VERTEX, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WEIGHT, name, output, DynamicPaintSurface::output_name, DynamicPaintSurface::output_name2, and DynamicPaintSurface::type.
Referenced by dynamicPaint_Modifier_apply(), and output_toggle_exec().
| void dynamicPaint_outputSurfaceImage | ( | DynamicPaintSurface * | surface, |
| const char * | filepath, | ||
| short | output_layer ) |
Definition at line 3317 of file dynamicpaint.cc.
References BKE_image_path_ext_from_imtype_ensure(), BKE_main_blendfile_path_from_global(), BLI_assert, BLI_file_ensure_parent_dir_exists(), BLI_parallel_range_settings_defaults(), BLI_path_abs(), BLI_task_parallel_range(), DynamicPaintSurface::canvas, data, DynamicPaintSurface::data, dynamic_paint_output_surface_image_displace_cb(), dynamic_paint_output_surface_image_paint_cb(), dynamic_paint_output_surface_image_wave_cb(), dynamic_paint_output_surface_image_wetmap_cb(), FILE_MAX, ImbFormatOptions::flag, ImBuf::foptions, ImBuf::ftype, IB_float_data, DynamicPaintSurface::image_fileformat, DynamicPaintSurface::image_resolution, IMB_allocImBuf(), IMB_freeImBuf(), IMB_FTYPE_OPENEXR, IMB_FTYPE_PNG, IMB_save_image(), MOD_DPAINT_IMGFORMAT_OPENEXR, MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WAVE, N_, ImbFormatOptions::quality, R_IMF_EXR_CODEC_ZIP, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_PNG, setError(), STRNCPY(), PaintSurfaceData::total_points, DynamicPaintSurface::type, PaintSurfaceData::type_data, and TaskParallelSettings::use_threading.
Referenced by dynamicPaint_bakeImageSequence().
|
static |
Definition at line 4308 of file dynamicpaint.cc.
References add_v3_v3(), PaintSurfaceData::bData, BKE_id_free(), BKE_mesh_copy_for_eval(), BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), boundInsert(), DynamicPaintVolumeGrid::bounds, copy_v3_v3(), data, DynamicPaintSurface::data, depsgraph, DynamicPaintVolumeGrid::dim, dynamic_paint_paint_mesh_cell_point_cb_ex(), dynamicPaint_brushMeshCalculateVelocity(), PaintBakeData::grid, DynamicPaintVolumeGrid::grid_bounds, lock, MEM_freeN(), meshBrush_boundsIntersect(), MOD_DPAINT_COL_VOLUME, MOD_DPAINT_PROX_PROJECT, MOD_DPAINT_USES_VELOCITY, mul_m4_v3(), mul_mat3_m4_v3(), mul_v3_fl(), nor, normalize_v3(), DynamicPaintSurface::radius_scale, DynamicPaintVolumeGrid::s_num, blender::bke::BVHTreeFromMesh::tree, UNLIKELY, and TaskParallelSettings::use_threading.
Referenced by dynamicPaint_doStep().
|
static |
Definition at line 4612 of file dynamicpaint.cc.
References PaintSurfaceData::bData, BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), boundInsert(), boundIntersectPoint(), DynamicPaintVolumeGrid::bounds, boundsIntersectDist(), CLOG_WARN, data, DynamicPaintSurface::data, DynamicPaintVolumeGrid::dim, dynamic_paint_paint_particle_cell_point_cb_ex(), ParticleSettings::flag, PaintBakeData::grid, DynamicPaintVolumeGrid::grid_bounds, isnan, LOG, MOD_DPAINT_PART_RAD, PARS_DEAD, PARS_UNBORN, PARS_UNEXIST, ParticleSystem::part, PART_DIED, PART_UNBORN, ParticleSystem::particles, DynamicPaintSurface::radius_scale, DynamicPaintVolumeGrid::s_num, ParticleSettings::size, ParticleSystem::totpart, tree, and TaskParallelSettings::use_threading.
Referenced by dynamicPaint_doStep().
|
static |
Definition at line 4819 of file dynamicpaint.cc.
References BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), data, DynamicPaintSurface::data, depsgraph, dynamic_paint_paint_single_point_cb_ex(), dynamicPaint_brushObjectCalculateVelocity(), lock, MOD_DPAINT_USES_VELOCITY, DynamicPaintSurface::radius_scale, PaintSurfaceData::total_points, and TaskParallelSettings::use_threading.
Referenced by dynamicPaint_doStep().
|
static |
Definition at line 2721 of file dynamicpaint.cc.
References i.
Referenced by dynamicPaint_createUVSurface(), and dynamicPaint_symmetrizeAdjData().
|
static |
Definition at line 4896 of file dynamicpaint.cc.
References PaintSurfaceData::adj_data, PaintBakeData::average_dist, PaintSurfaceData::bData, BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), PaintBakeData::bNeighs, DynamicPaintSurface::data, BakeAdjPoint::dist, dynamic_paint_prepare_adjacency_cb(), i, MEM_freeN(), MEM_malloc_arrayN(), PaintAdjData::n_index, PaintAdjData::n_num, surface_usesAdjDistance(), PaintSurfaceData::total_points, PaintAdjData::total_targets, and TaskParallelSettings::use_threading.
Referenced by dynamicPaint_doStep(), and dynamicPaint_generateBakeData().
|
static |
Definition at line 5185 of file dynamicpaint.cc.
References PaintBakeData::average_dist, PaintSurfaceData::bData, BKE_effectors_create(), BKE_effectors_free(), BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), CANVAS_REL_SIZE, ceilf, CLAMP, data, DynamicPaintSurface::data, depsgraph, dynamic_paint_prepare_effect_cb(), EFF_MOVEMENT_PER_FRAME, DynamicPaintSurface::effect, DynamicPaintSurface::effector_weights, getSurfaceDimension(), max_fff(), MEM_malloc_arrayN(), MOD_DPAINT_EFFECT_DO_DRIP, MOD_DPAINT_EFFECT_DO_SHRINK, MOD_DPAINT_EFFECT_DO_SPREAD, DynamicPaintSurface::shrink_speed, DynamicPaintSurface::spread_speed, PaintSurfaceData::total_points, and TaskParallelSettings::use_threading.
Referenced by dynamicPaint_doStep().
| bool dynamicPaint_resetSurface | ( | const Scene * | scene, |
| DynamicPaintSurface * | surface ) |
Definition at line 1756 of file dynamicpaint.cc.
References DynamicPaintSurface::data, dynamicPaint_allocateSurfaceType(), dynamicPaint_freeSurfaceData(), dynamicPaint_initAdjacencyData(), dynamicPaint_setInitialColor(), dynamicPaint_surfaceNumOfPoints(), DynamicPaintSurface::format, MEM_callocN(), MOD_DPAINT_SURFACE_F_IMAGESEQ, MOD_DPAINT_SURFACE_T_PAINT, PaintSurfaceData::total_points, and DynamicPaintSurface::type.
Referenced by dynamicPaint_checkSurfaceData().
|
static |
Definition at line 1612 of file dynamicpaint.cc.
References BKE_image_pool_free(), BKE_image_pool_new(), BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), DynamicPaintSurface::canvas, CD_PROP_FLOAT2, col, copy_v4_v4(), blender::bke::Corner, CustomData_validate_layer_name(), data, DynamicPaintSurface::data, dynamic_paint_set_init_color_tex_to_imseq_cb(), dynamic_paint_set_init_color_tex_to_vcol_cb(), dynamic_paint_set_init_color_vcol_to_imseq_cb(), dynamicPaint_canvas_mesh_get(), DynamicPaintSurface::format, i, blender::Span< T >::index_range(), DynamicPaintSurface::init_color, DynamicPaintSurface::init_color_type, DynamicPaintSurface::init_layername, DynamicPaintSurface::init_texture, blender::Span< T >::is_empty(), blender::bke::AttributeAccessor::lookup(), MAX_CUSTOMDATA_LAYER_NAME, MOD_DPAINT_INITIAL_COLOR, MOD_DPAINT_INITIAL_NONE, MOD_DPAINT_INITIAL_TEXTURE, MOD_DPAINT_INITIAL_VERTEXCOLOR, MOD_DPAINT_SURFACE_F_IMAGESEQ, MOD_DPAINT_SURFACE_F_VERTEX, MOD_DPAINT_SURFACE_T_PAINT, rgba_uchar_to_float(), blender::Span< T >::size(), PaintSurfaceData::total_points, DynamicPaintSurface::type, PaintSurfaceData::type_data, and TaskParallelSettings::use_threading.
Referenced by dynamicPaint_clearSurface(), dynamicPaint_createUVSurface(), and dynamicPaint_resetSurface().
|
static |
Definition at line 5943 of file dynamicpaint.cc.
References PaintSurfaceData::bData, DynamicPaintSurface::canvas, DynamicPaintSurface::data, dynamicPaint_canvas_mesh_get(), equals_m4m4(), equals_v3v3(), i, PaintBakeData::prev_obmat, and PaintBakeData::prev_positions.
Referenced by dynamicPaint_generateBakeData().
|
static |
Definition at line 318 of file dynamicpaint.cc.
References DynamicPaintSurface::canvas, dynamicPaint_canvas_mesh_get(), DynamicPaintSurface::format, MOD_DPAINT_SURFACE_F_PTEX, MOD_DPAINT_SURFACE_F_VERTEX, and Mesh::verts_num.
Referenced by dynamicPaint_checkSurfaceData(), and dynamicPaint_resetSurface().
|
static |
Definition at line 2736 of file dynamicpaint.cc.
References ADJ_BORDER_PIXEL, BLI_assert, dynamicPaint_pointHasNeighbor(), i, MEM_calloc_arrayN(), MEM_freeN(), and num.
Referenced by dynamicPaint_createUVSurface().
|
static |
Definition at line 3648 of file dynamicpaint.cc.
References PaintSurfaceData::bData, BKE_colorband_evaluate(), PaintBakeData::brush_velocity, CLAMP, CLAMP_MIN, copy_v3_v3(), DynamicPaintSurface::data, DynamicPaintSurface::depth_clamp, dynamicPaint_mixPaintColors(), dynamicPaint_mixWaveHeight(), DynamicPaintSurface::flags, DynamicPaintSurface::influence_scale, MOD_DPAINT_DISP_INCREMENTAL, MOD_DPAINT_ERASE, MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WAVE, MOD_DPAINT_SURFACE_T_WEIGHT, MOD_DPAINT_VELOCITY_ALPHA, MOD_DPAINT_VELOCITY_COLOR, MOD_DPAINT_VELOCITY_DEPTH, DynamicPaintSurface::type, and PaintSurfaceData::type_data.
Referenced by dynamic_paint_paint_mesh_cell_point_cb_ex(), dynamic_paint_paint_particle_cell_point_cb_ex(), and dynamic_paint_paint_single_point_cb_ex().
| void dynamicPaintSurface_setUniqueName | ( | DynamicPaintSurface * | surface, |
| const char * | basename ) |
Definition at line 418 of file dynamicpaint.cc.
References BLI_uniquename_cb(), DynamicPaintSurface::name, name, STRNCPY_UTF8, and surface_duplicateNameExists().
Referenced by dynamicPaint_createNewSurface().
| void dynamicPaintSurface_updateType | ( | struct DynamicPaintSurface * | surface | ) |
Change surface data to defaults on new type.
Definition at line 432 of file dynamicpaint.cc.
References DynamicPaintSurface::depth_clamp, DynamicPaintSurface::flags, DynamicPaintSurface::format, MOD_DPAINT_ANTIALIAS, MOD_DPAINT_SURFACE_F_IMAGESEQ, MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WAVE, MOD_DPAINT_SURFACE_T_WEIGHT, DynamicPaintSurface::output_name, DynamicPaintSurface::output_name2, SNPRINTF, STREQ, surface_setUniqueOutputName(), and DynamicPaintSurface::type.
Referenced by dynamicPaint_createNewSurface().
|
static |
Definition at line 915 of file dynamicpaint.cc.
References PaintBakeData::bNeighs, PaintBakeData::bNormal, data, freeGrid(), PaintBakeData::grid, MEM_freeN(), PaintBakeData::prev_positions, PaintBakeData::prev_velocity, PaintBakeData::realCoord, PaintBakeData::s_num, PaintBakeData::s_pos, and PaintBakeData::velocity.
Referenced by dynamicPaint_freeSurfaceData(), and surface_freeUnusedData().
|
static |
Definition at line 639 of file dynamicpaint.cc.
References DynamicPaintVolumeGrid::bounds, data, PaintBakeData::grid, MEM_freeN(), DynamicPaintVolumeGrid::s_num, DynamicPaintVolumeGrid::s_pos, and DynamicPaintVolumeGrid::t_index.
Referenced by free_bakeData(), and surfaceGenerateGrid().
| 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().
|
static |
Definition at line 633 of file dynamicpaint.cc.
References PaintSurfaceData::bData, Bounds3D::max, max_fff(), PaintBakeData::mesh_bounds, and Bounds3D::min.
Referenced by dynamicPaint_doEffectStep(), dynamicPaint_doWaveStep(), and dynamicPaint_prepareEffectStep().
|
static |
Definition at line 661 of file dynamicpaint.cc.
References boundInsert(), i, PaintBakeData::realCoord, PaintBakeData::s_pos, and Vec3f::v.
Referenced by surfaceGenerateGrid().
|
static |
Definition at line 672 of file dynamicpaint.cc.
References boundInsert(), Bounds3D::max, and Bounds3D::min.
Referenced by surfaceGenerateGrid().
|
static |
Definition at line 721 of file dynamicpaint.cc.
References DynamicPaintVolumeGrid::bounds, DynamicPaintVolumeGrid::dim, PaintBakeData::dim, PaintBakeData::grid, DynamicPaintVolumeGrid::grid_bounds, Bounds3D::max, Bounds3D::min, Bounds3D::valid, x, y, and z().
Referenced by surfaceGenerateGrid().
|
static |
Definition at line 683 of file dynamicpaint.cc.
References CLAMP, DynamicPaintVolumeGrid::dim, PaintBakeData::dim, floorf, PaintBakeData::grid, DynamicPaintVolumeGrid::grid_bounds, i, Bounds3D::min, PaintBakeData::realCoord, PaintBakeData::s_pos, DynamicPaintVolumeGrid::temp_t_index, and Vec3f::v.
Referenced by surfaceGenerateGrid().
|
static |
Definition at line 704 of file dynamicpaint.cc.
References DynamicPaintVolumeGrid::dim, PaintBakeData::grid, and i.
Referenced by surfaceGenerateGrid().
|
static |
Definition at line 3491 of file dynamicpaint.cc.
References closest_on_tri_to_point_v3(), BVHTreeNearest::co, copy_v3_v3(), data, BVHTreeNearest::dist_sq, BVHTreeNearest::index, len_squared_v3v3(), and BVHTreeNearest::no.
Referenced by dynamic_paint_paint_mesh_cell_point_cb_ex().
|
static |
Definition at line 3459 of file dynamicpaint.cc.
References blender::bke::bvhtree_ray_tri_intersection(), data, BVHTreeRayHit::dist, BVHTreeRayHit::index, and BVHTreeRayHit::no.
Referenced by dynamic_paint_paint_mesh_cell_point_cb_ex().
|
static |
Definition at line 3744 of file dynamicpaint.cc.
References boundsIntersect(), boundsIntersectDist(), ELEM, MOD_DPAINT_COL_DIST, MOD_DPAINT_COL_VOLDIST, and MOD_DPAINT_COL_VOLUME.
Referenced by dynamicPaint_paintMesh().
|
static |
Definition at line 512 of file dynamicpaint.cc.
References copy_v3_v3(), and interp_v3_v3v3().
Referenced by dynamic_paint_effect_drip_cb(), dynamic_paint_effect_spread_cb(), and dynamicPaint_doSmudge().
Definition at line 541 of file dynamicpaint.cc.
References RenderData::cfra, Scene::r, and RenderData::subframe.
Referenced by dynamicPaint_doStep().
|
static |
Definition at line 309 of file dynamicpaint.cc.
References CLOG_STR_ERROR, DynamicPaintCanvasSettings::error, LOG, and STRNCPY().
Referenced by dynamicPaint_allocateSurfaceType(), dynamicPaint_createUVSurface(), dynamicPaint_doStep(), dynamicPaint_generateBakeData(), dynamicPaint_initAdjacencyData(), dynamicPaint_outputSurfaceImage(), and surfaceGenerateGrid().
|
static |
Definition at line 4940 of file dynamicpaint.cc.
References acosf, PaintSurfaceData::adj_data, PaintSurfaceData::bData, PaintBakeData::bNeighs, CLAMP, cross_v3_v3v3(), dot_v3v3(), fabsf, float, i, M_PI_2, madd_v3_v3v3fl(), mul_v2_fl(), PaintAdjData::n_index, PaintAdjData::n_num, and normalize_v3().
Referenced by dynamic_paint_effect_drip_cb(), and dynamicPaint_doSmudge().
|
static |
Definition at line 404 of file dynamicpaint.cc.
References DynamicPaintSurface::canvas, ListBase::first, DynamicPaintSurface::name, name, DynamicPaintSurface::next, STREQ, and DynamicPaintCanvasSettings::surfaces.
Referenced by dynamicPaintSurface_setUniqueName().
|
static |
Definition at line 367 of file dynamicpaint.cc.
References BLI_path_cmp, DynamicPaintSurface::canvas, ListBase::first, DynamicPaintSurface::format, name, DynamicPaintSurface::next, DynamicPaintSurface::output_name, DynamicPaintSurface::output_name2, DynamicPaintCanvasSettings::surfaces, and DynamicPaintSurface::type.
Referenced by surface_setUniqueOutputName().
|
static |
Definition at line 953 of file dynamicpaint.cc.
References DynamicPaintSurface::data, PointCache::flag, DynamicPaintSurface::flags, free_bakeData(), MOD_DPAINT_ACTIVE, DynamicPaintSurface::pointcache, and PTCACHE_BAKED.
Referenced by dynamicPaint_frameUpdate().
|
static |
Definition at line 548 of file dynamicpaint.cc.
References BKE_collision_objects_create(), BKE_collision_objects_free(), BKE_modifiers_findby_type(), DynamicPaintModifierData::brush, DynamicPaintSurface::brush_group, BRUSH_USES_VELOCITY, depsgraph, eModifierMode_Realtime, eModifierMode_Render, eModifierType_DynamicPaint, i, MOD_DPAINT_USES_VELOCITY, and ModifierData::mode.
Referenced by dynamicPaint_generateBakeData().
|
static |
Definition at line 387 of file dynamicpaint.cc.
References BLI_uniquename_cb(), name, output, DynamicPaintSurface::output_name, DynamicPaintSurface::output_name2, STRNCPY(), and surface_duplicateOutputExists().
Referenced by dynamicPaintSurface_updateType().
|
static |
Definition at line 474 of file dynamicpaint.cc.
References PaintSurfaceData::adj_data, DynamicPaintSurface::data, DynamicPaintSurface::flags, DynamicPaintSurface::format, MOD_DPAINT_ANTIALIAS, MOD_DPAINT_SURFACE_F_IMAGESEQ, MOD_DPAINT_SURFACE_F_VERTEX, PaintSurfaceData::total_points, and PaintAdjData::total_targets.
Referenced by dynamicPaint_generateBakeData().
|
static |
Definition at line 1381 of file dynamicpaint.cc.
References DynamicPaintSurface::flags, DynamicPaintSurface::format, MOD_DPAINT_ANTIALIAS, MOD_DPAINT_SURFACE_F_VERTEX, and surface_usesAdjDistance().
Referenced by dynamicPaint_initAdjacencyData().
|
static |
Definition at line 1375 of file dynamicpaint.cc.
References DynamicPaintSurface::effect, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WAVE, and DynamicPaintSurface::type.
Referenced by dynamicPaint_prepareAdjacencyData(), and surface_usesAdjData().
|
static |
Definition at line 744 of file dynamicpaint.cc.
References PaintSurfaceData::bData, BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), boundInsert(), DynamicPaintVolumeGrid::bounds, DynamicPaintSurface::canvas, CLAMP, copy_v3_v3(), DynamicPaintSurface::data, DynamicPaintVolumeGrid::dim, PaintBakeData::dim, error(), float, floor, freeGrid(), TaskParallelSettings::func_reduce, PaintBakeData::grid, grid_bound_insert_cb_ex(), grid_bound_insert_reduce(), DynamicPaintVolumeGrid::grid_bounds, grid_cell_bounds_cb(), grid_cell_points_cb_ex(), grid_cell_points_reduce(), i, Bounds3D::max, max_fff(), MEM_calloc_arrayN(), MEM_callocN(), MEM_freeN(), MEM_SAFE_FREE, Bounds3D::min, N_, pos, pow, PaintBakeData::realCoord, DynamicPaintVolumeGrid::s_num, DynamicPaintVolumeGrid::s_pos, PaintBakeData::s_pos, setError(), sub_v3_v3v3(), DynamicPaintVolumeGrid::t_index, DynamicPaintVolumeGrid::temp_t_index, PaintSurfaceData::total_points, TaskParallelSettings::use_threading, TaskParallelSettings::userdata_chunk, TaskParallelSettings::userdata_chunk_size, and Vec3f::v.
Referenced by dynamicPaint_generateBakeData().
| 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().
|
static |
Definition at line 88 of file dynamicpaint.cc.
Referenced by dynamic_paint_paint_mesh_cell_point_cb_ex().
|
static |
Definition at line 95 of file dynamicpaint.cc.
Referenced by dynamic_paint_paint_mesh_cell_point_cb_ex().
|
static |
Definition at line 85 of file dynamicpaint.cc.
|
static |
Definition at line 102 of file dynamicpaint.cc.
Referenced by dynamic_paint_create_uv_surface_neighbor_cb().
|
static |
Definition at line 103 of file dynamicpaint.cc.
Referenced by dynamic_paint_create_uv_surface_neighbor_cb().
|
static |
Definition at line 98 of file dynamicpaint.cc.
Referenced by dynamic_paint_find_neighbor_pixel().
|
static |
Definition at line 99 of file dynamicpaint.cc.
Referenced by dynamic_paint_find_neighbor_pixel().