Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include <math.h>
#include <stdio.h>
#include "BLI_blenlib.h"
#include "BLI_kdtree.h"
#include "BLI_math.h"
#include "BLI_string_utils.h"
#include "BLI_task.h"
#include "BLI_threads.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_collection_types.h"
#include "DNA_constraint_types.h"
#include "DNA_dynamicpaint_types.h"
#include "DNA_material_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.h"
#include "BKE_bvhutils.h"
#include "BKE_collection.h"
#include "BKE_collision.h"
#include "BKE_colorband.h"
#include "BKE_constraint.h"
#include "BKE_customdata.h"
#include "BKE_deform.h"
#include "BKE_dynamicpaint.h"
#include "BKE_effect.h"
#include "BKE_image.h"
#include "BKE_image_format.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_mesh.h"
#include "BKE_mesh_mapping.h"
#include "BKE_mesh_runtime.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
#include "BKE_scene.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "RE_texture.h"
#include "atomic_ops.h"
#include "CLG_log.h"
Go to the source code of this file.
Classes | |
struct | Bounds2D |
struct | Bounds3D |
struct | VolumeGrid |
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 5 |
#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 | |
typedef struct Bounds2D | Bounds2D |
typedef struct Bounds3D | Bounds3D |
typedef struct VolumeGrid | VolumeGrid |
typedef struct Vec3f | Vec3f |
typedef struct BakeAdjPoint | BakeAdjPoint |
typedef struct PaintBakeNormal | PaintBakeNormal |
typedef struct PaintBakeData | PaintBakeData |
typedef struct PaintUVPoint | PaintUVPoint |
typedef struct ImgSeqFormatData | ImgSeqFormatData |
typedef struct PaintAdjData | PaintAdjData |
typedef struct DynamicPaintSetInitColorData | DynamicPaintSetInitColorData |
typedef struct DynamicPaintModifierApplyData | DynamicPaintModifierApplyData |
typedef struct DynamicPaintBrushVelocityData | DynamicPaintBrushVelocityData |
typedef struct DynamicPaintPaintData | DynamicPaintPaintData |
typedef struct DynamicPaintEffectData | DynamicPaintEffectData |
typedef struct DynamicPaintDissolveDryData | DynamicPaintDissolveDryData |
typedef struct DynamicPaintGenerateBakeData | DynamicPaintGenerateBakeData |
Variables | |
static CLG_LogRef | LOG = {"bke.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} |
#define ADJ_BORDER_PIXEL (1 << 1) |
Definition at line 231 of file dynamicpaint.c.
#define ADJ_ON_MESH_EDGE (1 << 0) |
Definition at line 230 of file dynamicpaint.c.
#define BRUSH_USES_VELOCITY (1 << 0) |
Definition at line 101 of file dynamicpaint.c.
#define CANVAS_REL_SIZE 5.0f |
Definition at line 113 of file dynamicpaint.c.
#define EFF_MOVEMENT_PER_FRAME 0.05f |
Definition at line 110 of file dynamicpaint.c.
#define HIT_PROXIMITY 2 |
Definition at line 104 of file dynamicpaint.c.
#define HIT_VOLUME 1 |
Definition at line 103 of file dynamicpaint.c.
#define JITTER_SAMPLES |
Definition at line 2178 of file dynamicpaint.c.
#define MAX_WETNESS 5.0f |
Definition at line 116 of file dynamicpaint.c.
#define MIN_WETNESS 0.001f |
Definition at line 115 of file dynamicpaint.c.
#define NOT_FOUND -1 |
Definition at line 106 of file dynamicpaint.c.
#define ON_MESH_EDGE -2 |
Definition at line 107 of file dynamicpaint.c.
#define OUT_OF_TEXTURE -3 |
Definition at line 108 of file dynamicpaint.c.
#define SUBFRAME_RECURSION 5 |
Definition at line 99 of file dynamicpaint.c.
#define WAVE_TIME_FAC (1.0f / 24.0f) |
Definition at line 112 of file dynamicpaint.c.
typedef struct BakeAdjPoint BakeAdjPoint |
typedef struct DynamicPaintBrushVelocityData DynamicPaintBrushVelocityData |
typedef struct DynamicPaintCreateUVSurfaceData DynamicPaintCreateUVSurfaceData |
typedef struct DynamicPaintDissolveDryData DynamicPaintDissolveDryData |
typedef struct DynamicPaintEffectData DynamicPaintEffectData |
typedef struct DynamicPaintFindIslandBorderData DynamicPaintFindIslandBorderData |
typedef struct DynamicPaintGenerateBakeData DynamicPaintGenerateBakeData |
typedef struct DynamicPaintModifierApplyData DynamicPaintModifierApplyData |
typedef struct DynamicPaintPaintData DynamicPaintPaintData |
typedef struct DynamicPaintSetInitColorData DynamicPaintSetInitColorData |
typedef struct ImgSeqFormatData ImgSeqFormatData |
typedef struct PaintAdjData PaintAdjData |
typedef struct PaintBakeData PaintBakeData |
Temp surface data used to process a frame
typedef struct PaintBakeNormal PaintBakeNormal |
Surface data used while processing a frame
typedef struct PaintUVPoint PaintUVPoint |
UV Image sequence format point
typedef struct VolumeGrid VolumeGrid |
|
static |
Definition at line 455 of file dynamicpaint.c.
References copy_v3_v3(), 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 588 of file dynamicpaint.c.
References usdtokens::b(), copy_v3_v3(), minmax_v3v3_v3(), and point.
Referenced by dynamicPaint_generateBakeData(), dynamicPaint_paintMesh(), dynamicPaint_paintParticles(), grid_bound_insert_cb_ex(), grid_bound_insert_reduce(), and surfaceGenerateGrid().
Definition at line 574 of file dynamicpaint.c.
References usdtokens::b(), and point.
Referenced by dynamicPaint_paintParticles().
Definition at line 546 of file dynamicpaint.c.
References Bounds3D::max, Bounds3D::min, and Bounds3D::valid.
Referenced by meshBrush_boundsIntersect().
Definition at line 560 of file dynamicpaint.c.
References Bounds3D::max, Bounds3D::min, and Bounds3D::valid.
Referenced by dynamicPaint_paintParticles(), and meshBrush_boundsIntersect().
|
static |
Definition at line 2059 of file dynamicpaint.c.
References BKE_id_free(), BKE_mesh_copy_for_eval(), DynamicPaintRuntime::canvas_mesh, dynamicPaint_Modifier_runtime_ensure(), mesh, NULL, and DynamicPaintCanvasSettings::pmd.
Referenced by dynamicPaint_frameUpdate().
|
static |
Definition at line 2389 of file dynamicpaint.c.
References BLI_assert, dist_squared_to_line_segment_v2(), and point.
Referenced by dynamic_paint_find_island_border().
|
static |
Definition at line 1787 of file dynamicpaint.c.
References data, madd_v3_v3fl(), and surface.
Referenced by dynamicPaint_applySurfaceDisplace().
|
static |
Definition at line 1829 of file dynamicpaint.c.
References blendColors(), color, and data.
Referenced by dynamicPaint_Modifier_apply().
|
static |
Definition at line 1842 of file dynamicpaint.c.
References MLoopCol::a, MLoopCol::b, Freestyle::c, data, MLoopCol::g, MPoly::loopstart, r, MLoopCol::r, rgba_float_to_uchar(), surface, MPoly::totloop, unit_float_to_uchar_clamp(), and MLoop::v.
Referenced by dynamicPaint_Modifier_apply().
|
static |
Definition at line 1878 of file dynamicpaint.c.
References data, PaintWavePoint::height, and madd_v3_v3fl().
Referenced by dynamicPaint_Modifier_apply().
|
static |
Definition at line 5508 of file dynamicpaint.c.
References ADJ_BORDER_PIXEL, PaintSurfaceData::adj_data, BLI_assert, PaintAdjData::border, PaintPoint::color, data, PaintPoint::e_color, PaintAdjData::flags, madd_v3_v3fl(), blender::color::mix_color(), mul_v3_v3fl(), PaintAdjData::n_index, PaintAdjData::n_num, PaintAdjData::n_target, surface, PaintSurfaceData::type_data, and PaintPoint::wetness.
Referenced by dynamicPaint_doBorderStep().
|
static |
Definition at line 3723 of file dynamicpaint.c.
References copy_v3_v3(), data, float(), mul_m4_v3(), mul_v3_fl(), sub_v3_v3v3(), and v.
Referenced by dynamicPaint_brushMeshCalculateVelocity().
|
static |
Definition at line 2198 of file dynamicpaint.c.
References barycentric_weights_v2(), data, float(), isect_point_tri_v2(), JITTER_SAMPLES, Bounds2D::max, max, min, Bounds2D::min, MOD_DPAINT_ANTIALIAS, PaintUVPoint::neighbor_pixel, PaintUVPoint::pixel_index, point, sample, surface, MLoopTri::tri, PaintUVPoint::tri_index, MLoopUV::uv, v, MLoop::v, PaintUVPoint::v1, PaintUVPoint::v2, PaintUVPoint::v3, and w().
Referenced by dynamicPaint_createUVSurface().
|
static |
Definition at line 2293 of file dynamicpaint.c.
References atomic_add_and_fetch_uint32(), barycentric_weights_v2(), data, float(), JITTER_SAMPLES, MOD_DPAINT_ANTIALIAS, PaintUVPoint::neighbor_pixel, neighStraightX, neighStraightY, point, surface, MLoopTri::tri, PaintUVPoint::tri_index, MLoopUV::uv, v, MLoop::v, PaintUVPoint::v1, PaintUVPoint::v2, PaintUVPoint::v3, and w().
Referenced by dynamicPaint_createUVSurface().
|
static |
Definition at line 5290 of file dynamicpaint.c.
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, BakeAdjPoint::dist, PaintPoint::e_color, PaintAdjData::flags, MAX_WETNESS, min_ff(), mixColors(), PaintAdjData::n_target, ret, surface, surface_determineForceTargetPoints(), PaintSurfaceData::type_data, and PaintPoint::wetness.
Referenced by dynamicPaint_doEffectStep().
|
static |
Definition at line 5232 of file dynamicpaint.c.
References ADJ_BORDER_PIXEL, PaintSurfaceData::adj_data, PaintSurfaceData::bData, PaintBakeData::bNeighs, CLAMP_MIN, PaintPoint::color, data, BakeAdjPoint::dist, PaintPoint::e_color, PaintAdjData::flags, max_ff(), PaintAdjData::n_index, PaintAdjData::n_num, PaintAdjData::n_target, surface, PaintSurfaceData::type_data, and PaintPoint::wetness.
Referenced by dynamicPaint_doEffectStep().
|
static |
Processes active effect step.
Definition at line 5173 of file dynamicpaint.c.
References ADJ_BORDER_PIXEL, PaintSurfaceData::adj_data, PaintSurfaceData::bData, PaintBakeData::bNeighs, CLAMP, data, BakeAdjPoint::dist, PaintPoint::e_color, PaintAdjData::flags, min_ff(), min_fff(), MIN_WETNESS, mixColors(), PaintAdjData::n_index, PaintAdjData::n_num, PaintAdjData::n_target, surface, PaintSurfaceData::type_data, and PaintPoint::wetness.
Referenced by dynamicPaint_doEffectStep().
|
static |
Definition at line 2506 of file dynamicpaint.c.
References DynamicPaintFindIslandBorderData::best_index, DynamicPaintFindIslandBorderData::best_weight, CLAMP, closest_to_line_v2(), copy_v2_v2(), data, dist_squared_to_line_segment_v2(), dist_squared_to_looptri_uv_edges(), ELEM, equals_v2v2(), floorf, DynamicPaintFindIslandBorderData::h, line_point_side_v2(), madd_v2_v2v2fl(), map, PaintUVPoint::neighbor_pixel, NOT_FOUND, ON_MESH_EDGE, OUT_OF_TEXTURE, DynamicPaintFindIslandBorderData::px, DynamicPaintFindIslandBorderData::py, square_f(), sub_v2_v2v2(), threshold, MLoopTri::tri, PaintUVPoint::tri_index, v, DynamicPaintFindIslandBorderData::vert_to_looptri_map, w(), and DynamicPaintFindIslandBorderData::w.
Referenced by dynamic_paint_find_neighbor_pixel().
|
static |
Definition at line 2433 of file dynamicpaint.c.
References DynamicPaintFindIslandBorderData::best_index, data, dynamic_paint_find_island_border(), float(), PaintUVPoint::neighbor_pixel, neighX, neighY, NOT_FOUND, OUT_OF_TEXTURE, PaintUVPoint::tri_index, DynamicPaintFindIslandBorderData::vert_to_looptri_map, w(), x, and y.
Referenced by dynamicPaint_createUVSurface().
|
static |
Definition at line 5901 of file dynamicpaint.c.
References PaintSurfaceData::adj_data, ImgSeqFormatData::barycentricWeights, PaintSurfaceData::bData, PaintBakeData::bNormal, PaintBakeData::clear, copy_v3_v3(), data, ELEM, 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(), Object::obmat, PaintBakeData::realCoord, PaintBakeData::s_num, PaintBakeData::s_pos, Object::scale, sub_v3_v3v3(), surface, ImgSeqFormatData::uv_p, Vec3f::v, and PaintBakeData::velocity.
Referenced by dynamicPaint_generateBakeData().
|
static |
Definition at line 3204 of file dynamicpaint.c.
References CLAMP, copy_v3_fl(), data, MOD_DPAINT_DISP_DISPLACE, pos, ImBuf::rect_float, and surface.
Referenced by dynamicPaint_outputSurfaceImage().
|
static |
Definition at line 3182 of file dynamicpaint.c.
References blendColors(), data, MOD_DPAINT_MULALPHA, mul_v3_fl(), point, pos, ImBuf::rect_float, and surface.
Referenced by dynamicPaint_outputSurfaceImage().
|
static |
Definition at line 3230 of file dynamicpaint.c.
References CLAMP, copy_v3_fl(), data, PaintWavePoint::height, pos, ImBuf::rect_float, and surface.
Referenced by dynamicPaint_outputSurfaceImage().
|
static |
Definition at line 3254 of file dynamicpaint.c.
References copy_v3_fl(), data, point, pos, ImBuf::rect_float, and surface.
Referenced by dynamicPaint_outputSurfaceImage().
|
static |
Definition at line 3908 of file dynamicpaint.c.
References add_v3_fl(), DynamicPaintBrushSettings::b, 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, MVert::co, DynamicPaintBrushSettings::collision, copy_v3_v3(), data, BVHTreeRayHit::dist, BVHTreeNearest::dist_sq, blender::math::dot(), dot_v3v3(), dynamicPaint_updatePointData(), ELEM, DynamicPaintBrushSettings::flags, float(), DynamicPaintBrushSettings::g, gaussianFactors, gaussianTotal, PaintBakeData::grid, HIT_PROXIMITY, HIT_VOLUME, id, 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(), DynamicPaintBrushSettings::paint_ramp, DynamicPaintBrushSettings::proximity_falloff, DynamicPaintBrushSettings::r, DynamicPaintBrushSettings::ray_dir, PaintBakeData::realCoord, PaintBakeData::s_num, VolumeGrid::s_pos, PaintBakeData::s_pos, sqrtf, sub_v3_v3v3(), surface, VolumeGrid::t_index, BVHTreeFromMesh::tree, MLoopTri::tri, Vec3f::v, v, MLoop::v, v1, v2, and PaintBakeData::velocity.
Referenced by dynamicPaint_paintMesh().
|
static |
Definition at line 4364 of file dynamicpaint.c.
References PaintSurfaceData::bData, PaintBakeData::bNormal, PaintBakeData::brush_velocity, CLAMP_MIN, copy_v3_v3(), data, dynamicPaint_updatePointData(), ELEM, DynamicPaintBrushSettings::flags, PaintBakeData::grid, id, 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, DynamicPaintBrushSettings::particle_smooth, ParticleSystem::particles, DynamicPaintBrushSettings::r, PaintBakeData::realCoord, VolumeGrid::s_pos, PaintBakeData::s_pos, ParticleData::size, smooth(), sqrtf, ParticleData::state, str, sub_v3_v3(), surface, VolumeGrid::t_index, ParticleSettings::timetweak, tree, Vec3f::v, ParticleKey::vel, and PaintBakeData::velocity.
Referenced by dynamicPaint_paintParticles().
|
static |
Definition at line 4651 of file dynamicpaint.c.
References DynamicPaintBrushSettings::b, PaintSurfaceData::bData, BKE_colorband_evaluate(), PaintBakeData::bNormal, PaintBakeData::brush_velocity, CLAMP, copy_v3_v3(), data, blender::math::distance(), dynamicPaint_updatePointData(), ELEM, DynamicPaintBrushSettings::flags, DynamicPaintBrushSettings::g, 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, DynamicPaintBrushSettings::paint_ramp, DynamicPaintBrushSettings::proximity_falloff, DynamicPaintBrushSettings::r, PaintBakeData::realCoord, PaintBakeData::s_pos, sqrtf, sub_v3_v3v3(), surface, Vec3f::v, and PaintBakeData::velocity.
Referenced by dynamicPaint_paintSinglePoint().
|
static |
Definition at line 4793 of file dynamicpaint.c.
References PaintSurfaceData::adj_data, PaintSurfaceData::bData, PaintBakeData::bNeighs, BakeAdjPoint::dist, 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 5050 of file dynamicpaint.c.
References PaintSurfaceData::bData, BKE_effectors_apply(), copy_v3_v3(), data, PhysicsSettings::flag, PhysicsSettings::gravity, madd_v3_v3fl(), normalize_v3_v3(), NULL, pd_point_from_loc(), PHYS_GLOBAL_GRAVITY, Scene::physics_settings, PaintBakeData::prev_velocity, PaintBakeData::realCoord, PaintBakeData::s_pos, scene, sub_v3_v3(), surface, Vec3f::v, EffectedPoint::vel_to_sec, and PaintBakeData::velocity.
Referenced by dynamicPaint_prepareEffectStep().
|
static |
Definition at line 1514 of file dynamicpaint.c.
References PaintPoint::color, color, copy_v2_v2(), copy_v3_v3(), data, PaintSurfaceData::format_data, interp_v3_v3v3v3(), MOD_DPAINT_ANTIALIAS, multitex_ext_safe(), NULL, tex, TexResult::tin, TexResult::trgba, and PaintSurfaceData::type_data.
Referenced by dynamicPaint_setInitialColor().
|
static |
Definition at line 1479 of file dynamicpaint.c.
References data, blender::compositor::pool, tex, and PaintSurfaceData::type_data.
Referenced by dynamicPaint_setInitialColor().
|
static |
Definition at line 1553 of file dynamicpaint.c.
References color, copy_v4_v4(), data, PaintSurfaceData::format_data, interp_v4_v4v4v4(), MOD_DPAINT_ANTIALIAS, r, rgba_uchar_to_float(), PaintSurfaceData::type_data, and UNPACK3.
Referenced by dynamicPaint_setInitialColor().
|
static |
Definition at line 5754 of file dynamicpaint.c.
References ELEM, MOD_DPAINT_DISSOLVE, MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WEIGHT, MOD_DPAINT_USE_DRYING, and surface.
Referenced by dynamicPaint_doStep().
|
static |
Definition at line 5767 of file dynamicpaint.c.
References blendColors(), CLAMP, CLAMP_MIN, PaintPoint::color, copy_v4_v4(), data, DPAINT_PAINT_DRY, DPAINT_PAINT_WET, PaintPoint::e_color, ELEM, 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, point, PaintPoint::state, surface, PaintSurfaceData::type_data, value_dissolve(), and PaintPoint::wetness.
Referenced by dynamicPaint_doStep().
|
static |
Definition at line 5588 of file dynamicpaint.c.
References PaintSurfaceData::adj_data, ADJ_ON_MESH_EDGE, PaintSurfaceData::bData, PaintBakeData::bNeighs, PaintWavePoint::brush_isect, CLAMP_MIN, data, BakeAdjPoint::dist, DPAINT_WAVE_NONE, PaintAdjData::flags, PaintWavePoint::height, MOD_DPAINT_WAVE_OPEN_BORDERS, PaintAdjData::n_index, PaintAdjData::n_num, PaintAdjData::n_target, offset, PaintWavePoint::state, surface, PaintSurfaceData::type_data, and PaintWavePoint::velocity.
Referenced by dynamicPaint_doWaveStep().
|
static |
Definition at line 1312 of file dynamicpaint.c.
References MEM_callocN, MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WAVE, MOD_DPAINT_SURFACE_T_WEIGHT, N_, NULL, setError(), surface, PaintSurfaceData::total_points, and PaintSurfaceData::type_data.
Referenced by dynamicPaint_createUVSurface(), and dynamicPaint_resetSurface().
|
static |
Definition at line 1804 of file dynamicpaint.c.
References BKE_mesh_vertex_normals_ensure(), BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), data, dynamic_paint_apply_surface_displace_cb(), MOD_DPAINT_SURFACE_F_VERTEX, MOD_DPAINT_SURFACE_T_DISPLACE, result, surface, PaintSurfaceData::total_points, and TaskParallelSettings::use_threading.
Referenced by dynamicPaint_calculateFrame(), and dynamicPaint_Modifier_apply().
|
static |
Definition at line 283 of file dynamicpaint.c.
References DynamicPaintRuntime::brush_mesh, DynamicPaintModifierData::modifier, NULL, DynamicPaintBrushSettings::pmd, and ModifierData::runtime.
Referenced by dynamicPaint_brushMeshCalculateVelocity(), dynamicPaint_paintMesh(), and dynamicPaint_paintSinglePoint().
|
static |
Definition at line 3751 of file dynamicpaint.c.
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(), dynamicPaint_brush_mesh_get(), eModifierType_DynamicPaint, MEM_mallocN, Mesh::mvert, NULL, Object::obmat, Scene::r, scene, RenderData::subframe, SUBFRAME_RECURSION, Mesh::totvert, and TaskParallelSettings::use_threading.
Referenced by dynamicPaint_paintMesh().
|
static |
Definition at line 3834 of file dynamicpaint.c.
References BKE_object_modifier_update_subframe(), BKE_scene_ctime_get(), RenderData::cfra, copy_m4_m4(), depsgraph, eModifierType_DynamicPaint, mul_m4_v3(), mul_v3_fl(), Object::obmat, Scene::r, scene, sub_v3_v3v3(), RenderData::subframe, SUBFRAME_RECURSION, and Vec3f::v.
Referenced by dynamicPaint_paintSinglePoint().
void dynamicPaint_cacheUpdateFrames | ( | struct DynamicPaintSurface * | surface | ) |
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 6338 of file dynamicpaint.c.
References depsgraph, dynamicPaint_applySurfaceDisplace(), dynamicPaint_canvas_mesh_get(), dynamicPaint_doStep(), dynamicPaint_generateBakeData(), float(), MOD_DPAINT_DISP_INCREMENTAL, scene, usdtokens::st(), and surface.
Referenced by dynamicPaint_bakeImageSequence(), and dynamicPaint_frameUpdate().
|
static |
Definition at line 274 of file dynamicpaint.c.
References DynamicPaintRuntime::canvas_mesh, DynamicPaintModifierData::modifier, NULL, 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 1762 of file dynamicpaint.c.
References dynamicPaint_resetSurface(), dynamicPaint_surfaceNumOfPoints(), scene, and surface.
Referenced by dynamicPaint_frameUpdate().
void dynamicPaint_clearSurface | ( | const Scene * | scene, |
DynamicPaintSurface * | surface | ||
) |
Definition at line 1697 of file dynamicpaint.c.
References PaintSurfaceData::bData, PaintBakeData::clear, dynamicPaint_setInitialColor(), float(), MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WAVE, scene, surface, PaintSurfaceData::total_points, 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 1009 of file dynamicpaint.c.
References BKE_effector_add_weights(), BKE_modifier_path_init(), BKE_ptcache_add(), BLI_addtail(), BLT_I18NCONTEXT_ID_BRUSH, CTX_DATA_, dynamicPaintSurface_setUniqueName(), dynamicPaintSurface_updateType(), RenderData::efra, 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, NULL, PTCACHE_DISK_CACHE, Scene::r, scene, RenderData::sfra, surface, and DynamicPaintCanvasSettings::surfaces.
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 1086 of file dynamicpaint.c.
References CBData::a, DynamicPaintBrushSettings::alpha, DynamicPaintBrushSettings::b, CBData::b, BKE_colorband_add(), DynamicPaintModifierData::brush, DynamicPaintModifierData::canvas, DynamicPaintBrushSettings::collision, ColorBand::data, dynamicPaint_createNewSurface(), dynamicPaint_freeBrush(), dynamicPaint_freeCanvas(), DynamicPaintBrushSettings::flags, DynamicPaintBrushSettings::g, CBData::g, DynamicPaintBrushSettings::max_velocity, 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, NULL, DynamicPaintBrushSettings::paint_distance, DynamicPaintBrushSettings::paint_ramp, DynamicPaintBrushSettings::particle_radius, DynamicPaintBrushSettings::particle_smooth, DynamicPaintCanvasSettings::pmd, DynamicPaintBrushSettings::pmd, CBData::pos, DynamicPaintBrushSettings::proximity_falloff, DynamicPaintBrushSettings::psys, DynamicPaintBrushSettings::r, CBData::r, scene, DynamicPaintBrushSettings::smudge_strength, ColorBand::tot, type, DynamicPaintBrushSettings::vel_ramp, DynamicPaintBrushSettings::wave_clamp, DynamicPaintBrushSettings::wave_factor, DynamicPaintBrushSettings::wave_type, and DynamicPaintBrushSettings::wetness.
Referenced by dynamicPaint_Modifier_copy(), and type_toggle_exec().
int dynamicPaint_createUVSurface | ( | struct Scene * | scene, |
struct DynamicPaintSurface * | surface, | ||
float * | progress, | ||
short * | do_update | ||
) |
Image sequence baking.
Definition at line 2792 of file dynamicpaint.c.
References ADJ_BORDER_PIXEL, PaintSurfaceData::adj_data, ADJ_ON_MESH_EDGE, ImgSeqFormatData::barycentricWeights, BKE_mesh_runtime_looptri_ensure(), BKE_mesh_runtime_looptri_len(), BKE_mesh_vert_looptri_map_create(), BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), PaintAdjData::border, CD_MLOOPUV, CLOG_INFO, PaintPoint::color, copy_v2_v2(), CustomData_get_layer_named(), CustomData_has_layer(), CustomData_validate_layer_name(), 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(), PaintAdjData::flags, float(), PaintSurfaceData::format_data, Mesh::ldata, LOG, max, MAX_CUSTOMDATA_LAYER_NAME, MEM_callocN, MEM_freeN, MEM_mallocN, mesh, min, minmax_v2v2_v2(), Mesh::mloop, MOD_DPAINT_ANTIALIAS, MOD_DPAINT_SURFACE_F_IMAGESEQ, Mesh::mvert, N_, PaintAdjData::n_index, PaintAdjData::n_num, PaintAdjData::n_target, PaintUVPoint::neighbor_pixel, next, NULL, ON_MESH_EDGE, OUT_OF_TEXTURE, scene, setError(), surface, PaintAdjData::total_border, PaintSurfaceData::total_points, Mesh::totloop, Mesh::totvert, PaintSurfaceData::type_data, TaskParallelSettings::use_threading, ImgSeqFormatData::uv_p, and w().
Referenced by dynamicPaint_bakeImageSequence().
|
static |
Definition at line 5568 of file dynamicpaint.c.
References PaintSurfaceData::adj_data, BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), PaintAdjData::border, data, dynamic_paint_border_cb(), surface, PaintAdjData::total_border, and TaskParallelSettings::use_threading.
Referenced by dynamicPaint_doStep().
|
static |
Definition at line 5416 of file dynamicpaint.c.
References PaintSurfaceData::adj_data, BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), CANVAS_REL_SIZE, data, dynamic_paint_effect_drip_cb(), dynamic_paint_effect_shrink_cb(), dynamic_paint_effect_spread_cb(), EFF_MOVEMENT_PER_FRAME, getSurfaceDimension(), MEM_callocN, MEM_freeN, MOD_DPAINT_EFFECT_DO_DRIP, MOD_DPAINT_EFFECT_DO_SHRINK, MOD_DPAINT_EFFECT_DO_SPREAD, steps, surface, PaintSurfaceData::total_points, PaintSurfaceData::type_data, and TaskParallelSettings::use_threading.
Referenced by dynamicPaint_doStep().
|
static |
Definition at line 4943 of file dynamicpaint.c.
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, BakeAdjPoint::dist, double(), PaintPoint::e_color, PaintAdjData::flags, float(), mixColors(), PaintAdjData::n_target, DynamicPaintBrushSettings::smudge_strength, steps, surface, surface_determineForceTargetPoints(), PaintSurfaceData::total_points, PaintSurfaceData::type_data, and PaintPoint::wetness.
Referenced by dynamicPaint_doStep().
|
static |
Definition at line 6160 of file dynamicpaint.c.
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, PaintBakeData::brush_velocity, RenderData::cfra, DynamicPaintBrushSettings::collision, DAG_EVAL_RENDER, 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(), ELEM, eModifierMode_Realtime, eModifierMode_Render, eModifierType_DynamicPaint, DynamicPaintBrushSettings::flags, Object::loc, MEM_callocN, MEM_freeN, MEM_mallocN, 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_, NULL, ParticleSystem::part, 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, DynamicPaintBrushSettings::psys, psys_check_enabled(), Scene::r, ret, scene, scene_setSubframe(), setError(), steps, RenderData::subframe, SUBFRAME_RECURSION, surface, PaintSurfaceData::total_points, DynamicPaintModifierData::type, ParticleSettings::type, and TaskParallelSettings::use_threading.
Referenced by dynamicPaint_calculateFrame().
|
static |
Definition at line 5687 of file dynamicpaint.c.
References PaintSurfaceData::adj_data, PaintSurfaceData::bData, BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), PaintBakeData::bNeighs, CANVAS_REL_SIZE, ceil(), CLAMP, data, BakeAdjPoint::dist, double(), dynamic_paint_wave_step_cb(), getSurfaceDimension(), MEM_freeN, MEM_mallocN, PaintAdjData::n_index, PaintAdjData::n_num, pow(), steps, surface, PaintSurfaceData::total_points, PaintAdjData::total_targets, PaintSurfaceData::type_data, TaskParallelSettings::use_threading, and WAVE_TIME_FAC.
Referenced by dynamicPaint_doStep().
|
static |
Definition at line 2072 of file dynamicpaint.c.
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, depsgraph, dynamicPaint_calculateFrame(), dynamicPaint_checkSurfaceData(), PointCache::endframe, ListBase::first, PointCache::flag, DynamicPaintCanvasSettings::flags, mesh, MOD_DPAINT_ACTIVE, MOD_DPAINT_BAKING, MOD_DPAINT_DISP_INCREMENTAL, MOD_DPAINT_SURFACE_F_IMAGESEQ, MOD_DPAINT_SURFACE_T_DISPLACE, NULL, PTCACHE_BAKED, PTCACHE_REDO_NEEDED, PTCACHE_RESET_OUTDATED, Scene::r, scene, PointCache::startframe, surface, surface_freeUnusedData(), and DynamicPaintCanvasSettings::surfaces.
Referenced by dynamicPaint_Modifier_do().
|
static |
Definition at line 858 of file dynamicpaint.c.
References data, MEM_freeN, and NULL.
Referenced by dynamicPaint_freeSurfaceData(), and dynamicPaint_initAdjacencyData().
void dynamicPaint_freeBrush | ( | struct DynamicPaintModifierData * | pmd | ) |
Definition at line 843 of file dynamicpaint.c.
References DynamicPaintModifierData::brush, MEM_freeN, NULL, 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 979 of file dynamicpaint.c.
References DynamicPaintModifierData::canvas, dynamicPaint_freeSurface(), ListBase::first, MEM_freeN, NULL, surface, 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 964 of file dynamicpaint.c.
References BKE_ptcache_free_list(), BLI_remlink(), dynamicPaint_freeSurfaceData(), eModifierFlag_SharedCaches, ModifierData::flag, MEM_freeN, MEM_SAFE_FREE, DynamicPaintModifierData::modifier, NULL, and surface.
Referenced by dynamicPaint_freeCanvas(), and dynamicPaint_Modifier_copy().
void dynamicPaint_freeSurfaceData | ( | DynamicPaintSurface * | surface | ) |
Definition at line 932 of file dynamicpaint.c.
References ImgSeqFormatData::barycentricWeights, data, dynamicPaint_freeAdjData(), free_bakeData(), if(), MEM_freeN, MOD_DPAINT_SURFACE_F_IMAGESEQ, NULL, surface, and ImgSeqFormatData::uv_p.
Referenced by dpaint_bake_endjob(), dynamicPaint_createUVSurface(), dynamicPaint_freeSurface(), and dynamicPaint_resetSurface().
|
static |
Definition at line 6010 of file dynamicpaint.c.
References PaintSurfaceData::bData, BKE_mesh_vertex_normals_ensure(), BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), PaintBakeData::bNormal, boundInsert(), BRUSH_USES_VELOCITY, PaintBakeData::clear, copy_m4_m4(), copy_v3_v3(), data, depsgraph, dynamic_paint_generate_bake_data_cb(), dynamicPaint_canvas_mesh_get(), dynamicPaint_prepareAdjacencyData(), dynamicPaint_surfaceHasMoved(), MEM_callocN, MEM_freeN, MEM_mallocN, mesh, PaintBakeData::mesh_bounds, MOD_DPAINT_EFFECT_DO_DRIP, mul_m4_v3(), Mesh::mvert, N_, Object::obmat, PaintBakeData::prev_obmat, PaintBakeData::prev_velocity, PaintBakeData::prev_verts, PaintBakeData::realCoord, PaintBakeData::s_num, PaintBakeData::s_pos, setError(), surface, surface_getBrushFlags(), surface_totalSamples(), surfaceGenerateGrid(), PaintSurfaceData::total_points, Mesh::totvert, TaskParallelSettings::use_threading, Vec3f::v, v, Bounds3D::valid, and PaintBakeData::velocity.
Referenced by dynamicPaint_calculateFrame().
|
static |
Definition at line 1353 of file dynamicpaint.c.
References PaintSurfaceData::adj_data, ADJ_ON_MESH_EDGE, PaintAdjData::border, dynamicPaint_canvas_mesh_get(), dynamicPaint_freeAdjData(), PaintAdjData::flags, MPoly::loopstart, Mesh::medge, MEM_callocN, MEM_freeN, mesh, Mesh::mloop, MOD_DPAINT_SURFACE_F_IMAGESEQ, MOD_DPAINT_SURFACE_F_VERTEX, Mesh::mpoly, N_, PaintAdjData::n_index, PaintAdjData::n_num, PaintAdjData::n_target, NULL, setError(), surface, surface_usesAdjData(), PaintAdjData::total_border, PaintSurfaceData::total_points, PaintAdjData::total_targets, Mesh::totedge, MPoly::totloop, Mesh::totpoly, and MLoop::v.
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 3483 of file dynamicpaint.c.
References blendColors(), CLAMP, CLAMP_MAX, CLAMP_MIN, PaintPoint::color, copy_v3_v3(), DPAINT_PAINT_NEW, PaintPoint::e_color, max_ff(), MIN_WETNESS, mix, MOD_DPAINT_ABS_ALPHA, MOD_DPAINT_ERASE, PaintPoint::state, surface, and PaintPoint::wetness.
Referenced by dynamicPaint_updatePointData().
|
static |
Definition at line 3551 of file dynamicpaint.c.
References BLI_assert, PaintWavePoint::brush_isect, DPAINT_WAVE_ISECT_CHANGED, DPAINT_WAVE_OBSTACLE, DPAINT_WAVE_REFLECT_ONLY, PaintWavePoint::height, height, MOD_DPAINT_WAVEB_CHANGE, MOD_DPAINT_WAVEB_DEPTH, MOD_DPAINT_WAVEB_FORCE, MOD_DPAINT_WAVEB_REFLECT, PaintWavePoint::state, PaintWavePoint::velocity, DynamicPaintBrushSettings::wave_factor, and DynamicPaintBrushSettings::wave_type.
Referenced by dynamicPaint_updatePointData().
|
static |
Definition at line 1893 of file dynamicpaint.c.
References BKE_defvert_ensure_index(), BKE_defvert_find_index(), BKE_id_free(), BKE_mesh_copy_for_eval(), BKE_mesh_tag_coords_changed(), BKE_mesh_vertex_normals_ensure(), BKE_object_defgroup_name_index(), BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), DynamicPaintModifierData::brush, DynamicPaintRuntime::brush_mesh, DynamicPaintModifierData::canvas, CD_CALLOC, CD_MDEFORMVERT, CD_PROP_BYTE_COLOR, CustomData_add_layer(), CustomData_add_layer_named(), CustomData_get_layer(), CustomData_get_layer_named(), 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(), ListBase::first, DynamicPaintCanvasSettings::flags, float(), if(), MEM_callocN, MEM_freeN, mesh, 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, NULL, result, surface, DynamicPaintCanvasSettings::surfaces, PaintSurfaceData::total_points, DynamicPaintModifierData::type, PaintSurfaceData::type_data, TaskParallelSettings::use_threading, and MDeformWeight::weight.
Referenced by dynamicPaint_Modifier_do().
void dynamicPaint_Modifier_copy | ( | const struct DynamicPaintModifierData * | pmd, |
struct DynamicPaintModifierData * | tpmd, | ||
int | flag | ||
) |
Definition at line 1181 of file dynamicpaint.c.
References DynamicPaintCanvasSettings::active_sur, DynamicPaintBrushSettings::alpha, DynamicPaintBrushSettings::b, BKE_ptcache_free_list(), BLI_strncpy(), DynamicPaintModifierData::brush, DynamicPaintSurface::brush_group, DynamicPaintModifierData::canvas, DynamicPaintBrushSettings::collision, 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, ModifierData::flag, DynamicPaintSurface::flags, DynamicPaintBrushSettings::flags, DynamicPaintSurface::format, DynamicPaintBrushSettings::g, 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, DynamicPaintBrushSettings::max_velocity, MEM_dupallocN, MEM_freeN, MOD_DYNAMICPAINT_TYPE_BRUSH, MOD_DYNAMICPAINT_TYPE_CANVAS, DynamicPaintModifierData::modifier, DynamicPaintSurface::name, NULL, DynamicPaintSurface::output_name, DynamicPaintSurface::output_name2, DynamicPaintBrushSettings::paint_distance, DynamicPaintBrushSettings::paint_ramp, DynamicPaintBrushSettings::particle_radius, DynamicPaintBrushSettings::particle_smooth, DynamicPaintCanvasSettings::pmd, DynamicPaintBrushSettings::pmd, DynamicPaintSurface::pointcache, DynamicPaintBrushSettings::proximity_falloff, DynamicPaintBrushSettings::psys, DynamicPaintSurface::ptcaches, DynamicPaintBrushSettings::r, DynamicPaintSurface::radius_scale, DynamicPaintBrushSettings::ray_dir, DynamicPaintSurface::shrink_speed, DynamicPaintBrushSettings::smudge_strength, DynamicPaintSurface::spread_speed, DynamicPaintSurface::start_frame, DynamicPaintSurface::substeps, surface, DynamicPaintCanvasSettings::surfaces, DynamicPaintSurface::type, DynamicPaintModifierData::type, DynamicPaintSurface::uvlayer_name, DynamicPaintBrushSettings::vel_ramp, DynamicPaintBrushSettings::wave_clamp, DynamicPaintSurface::wave_damping, DynamicPaintBrushSettings::wave_factor, DynamicPaintSurface::wave_smoothness, DynamicPaintSurface::wave_speed, DynamicPaintSurface::wave_spring, DynamicPaintSurface::wave_timescale, DynamicPaintBrushSettings::wave_type, and DynamicPaintBrushSettings::wetness.
Referenced by copyData().
Mesh* dynamicPaint_Modifier_do | ( | struct DynamicPaintModifierData * | pmd, |
struct Depsgraph * | depsgraph, | ||
struct Scene * | scene, | ||
struct Object * | ob, | ||
struct Mesh * | me | ||
) |
Modifier call. Processes dynamic paint modifier step.
Definition at line 2160 of file dynamicpaint.c.
References depsgraph, dynamicPaint_frameUpdate(), dynamicPaint_Modifier_apply(), mesh, and scene.
Referenced by modifyMesh().
void dynamicPaint_Modifier_free | ( | struct DynamicPaintModifierData * | pmd | ) |
Free whole dynamic-paint modifier.
Definition at line 997 of file dynamicpaint.c.
References dynamicPaint_freeBrush(), dynamicPaint_freeCanvas(), dynamicPaint_Modifier_free_runtime(), DynamicPaintModifierData::modifier, NULL, and ModifierData::runtime.
Referenced by freeData().
void dynamicPaint_Modifier_free_runtime | ( | DynamicPaintRuntime * | runtime_data | ) |
Definition at line 252 of file dynamicpaint.c.
References BKE_id_free(), DynamicPaintRuntime::brush_mesh, DynamicPaintRuntime::canvas_mesh, MEM_freeN, and NULL.
Referenced by dynamicPaint_Modifier_free(), and freeRuntimeData().
|
static |
Definition at line 266 of file dynamicpaint.c.
References MEM_callocN, DynamicPaintModifierData::modifier, NULL, and ModifierData::runtime.
Referenced by canvas_copyMesh(), and dynamicPaint_Modifier_apply().
bool dynamicPaint_outputLayerExists | ( | struct DynamicPaintSurface * | surface, |
Object * | ob, | ||
int | output | ||
) |
Definition at line 322 of file dynamicpaint.c.
References BKE_object_defgroup_name_index(), CD_PROP_BYTE_COLOR, CustomData_get_named_layer_index(), Object::data, Mesh::ldata, MOD_DPAINT_SURFACE_F_VERTEX, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WEIGHT, output, and surface.
Referenced by dynamicPaint_Modifier_apply(), and output_toggle_exec().
void dynamicPaint_outputSurfaceImage | ( | DynamicPaintSurface * | surface, |
const char * | filepath, | ||
short | output_layer | ||
) |
Definition at line 3270 of file dynamicpaint.c.
References BKE_image_path_ensure_ext_from_imtype(), BKE_main_blendfile_path_from_global(), BLI_assert, BLI_make_existing_file(), BLI_parallel_range_settings_defaults(), BLI_path_abs(), BLI_strncpy(), BLI_task_parallel_range(), 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_rectfloat, IMB_allocImBuf(), IMB_freeImBuf(), IMB_FTYPE_OPENEXR, IMB_FTYPE_PNG, IMB_saveiff(), MOD_DPAINT_IMGFORMAT_OPENEXR, MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WAVE, N_, NULL, OPENEXR_COMPRESS, ImbFormatOptions::quality, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_PNG, setError(), surface, PaintSurfaceData::total_points, PaintSurfaceData::type_data, and TaskParallelSettings::use_threading.
Referenced by dynamicPaint_bakeImageSequence().
|
static |
Definition at line 4238 of file dynamicpaint.c.
References add_v3_v3(), PaintSurfaceData::bData, BKE_bvhtree_from_mesh_get(), BKE_id_free(), BKE_mesh_copy_for_eval(), BKE_mesh_runtime_looptri_ensure(), BKE_mesh_vertex_normals_ensure(), BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), boundInsert(), VolumeGrid::bounds, BVHTREE_FROM_LOOPTRI, MVert::co, DynamicPaintBrushSettings::collision, copy_v3_v3(), data, depsgraph, VolumeGrid::dim, dynamic_paint_paint_mesh_cell_point_cb_ex(), dynamicPaint_brush_mesh_get(), dynamicPaint_brushMeshCalculateVelocity(), DynamicPaintBrushSettings::flags, float(), free_bvhtree_from_mesh(), PaintBakeData::grid, VolumeGrid::grid_bounds, MEM_freeN, mesh, meshBrush_boundsIntersect(), Mesh::mloop, MOD_DPAINT_COL_VOLUME, MOD_DPAINT_PROX_PROJECT, MOD_DPAINT_USES_VELOCITY, mul_m4_v3(), mul_mat3_m4_v3(), mul_v3_fl(), Mesh::mvert, nor, normalize_v3(), NULL, Object::obmat, DynamicPaintBrushSettings::paint_distance, VolumeGrid::s_num, scene, surface, Mesh::totvert, UNLIKELY, and TaskParallelSettings::use_threading.
Referenced by dynamicPaint_doStep().
|
static |
Definition at line 4539 of file dynamicpaint.c.
References PaintSurfaceData::bData, BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), boundInsert(), boundIntersectPoint(), VolumeGrid::bounds, boundsIntersectDist(), CLOG_WARN, data, VolumeGrid::dim, dynamic_paint_paint_particle_cell_point_cb_ex(), ParticleSettings::flag, DynamicPaintBrushSettings::flags, PaintBakeData::grid, VolumeGrid::grid_bounds, libmv::isnan(), LOG, MOD_DPAINT_PART_RAD, PARS_DEAD, PARS_UNBORN, PARS_UNEXIST, ParticleSystem::part, PART_DIED, PART_UNBORN, DynamicPaintBrushSettings::particle_radius, DynamicPaintBrushSettings::particle_smooth, ParticleSystem::particles, DynamicPaintBrushSettings::psys, VolumeGrid::s_num, ParticleSettings::size, smooth(), surface, ParticleSystem::totpart, tree, and TaskParallelSettings::use_threading.
Referenced by dynamicPaint_doStep().
|
static |
Definition at line 4742 of file dynamicpaint.c.
References BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), data, depsgraph, dynamic_paint_paint_single_point_cb_ex(), dynamicPaint_brush_mesh_get(), dynamicPaint_brushObjectCalculateVelocity(), DynamicPaintBrushSettings::flags, MOD_DPAINT_USES_VELOCITY, Mesh::mvert, DynamicPaintBrushSettings::paint_distance, scene, surface, PaintSurfaceData::total_points, and TaskParallelSettings::use_threading.
Referenced by dynamicPaint_doStep().
|
static |
Definition at line 2685 of file dynamicpaint.c.
References PaintAdjData::n_index, PaintAdjData::n_num, and PaintAdjData::n_target.
Referenced by dynamicPaint_createUVSurface(), and dynamicPaint_symmetrizeAdjData().
|
static |
Definition at line 4818 of file dynamicpaint.c.
References PaintSurfaceData::adj_data, PaintBakeData::average_dist, PaintSurfaceData::bData, BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), PaintBakeData::bNeighs, BakeAdjPoint::dist, double(), dynamic_paint_prepare_adjacency_cb(), MEM_freeN, MEM_mallocN, PaintAdjData::n_index, PaintAdjData::n_num, surface, surface_usesAdjDistance(), PaintSurfaceData::total_points, PaintAdjData::total_targets, and TaskParallelSettings::use_threading.
Referenced by dynamicPaint_doStep(), and dynamicPaint_generateBakeData().
|
static |
Definition at line 5106 of file dynamicpaint.c.
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, depsgraph, double(), dynamic_paint_prepare_effect_cb(), EFF_MOVEMENT_PER_FRAME, getSurfaceDimension(), max_fff(), MEM_mallocN, MOD_DPAINT_EFFECT_DO_DRIP, MOD_DPAINT_EFFECT_DO_SHRINK, MOD_DPAINT_EFFECT_DO_SPREAD, NULL, scene, steps, surface, PaintSurfaceData::total_points, and TaskParallelSettings::use_threading.
Referenced by dynamicPaint_doStep().
bool dynamicPaint_resetSurface | ( | const Scene * | scene, |
DynamicPaintSurface * | surface | ||
) |
Definition at line 1726 of file dynamicpaint.c.
References dynamicPaint_allocateSurfaceType(), dynamicPaint_freeSurfaceData(), dynamicPaint_initAdjacencyData(), dynamicPaint_setInitialColor(), dynamicPaint_surfaceNumOfPoints(), MEM_callocN, MOD_DPAINT_SURFACE_F_IMAGESEQ, MOD_DPAINT_SURFACE_T_PAINT, scene, and surface.
Referenced by dynamicPaint_checkSurfaceData().
|
static |
Definition at line 1581 of file dynamicpaint.c.
References BKE_image_pool_free(), BKE_image_pool_new(), BKE_mesh_runtime_looptri_ensure(), BKE_mesh_runtime_looptri_len(), BKE_scene_check_color_management_enabled(), BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), CD_MLOOPUV, CD_PROP_BYTE_COLOR, col, color, copy_v4_v4(), CustomData_get_layer_named(), CustomData_validate_layer_name(), 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(), Mesh::ldata, MAX_CUSTOMDATA_LAYER_NAME, mesh, Mesh::mloop, 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, blender::compositor::pool, r, rgba_uchar_to_float(), scene, surface, tex, PaintSurfaceData::total_points, Mesh::totloop, PaintSurfaceData::type_data, TaskParallelSettings::use_threading, and v.
Referenced by dynamicPaint_clearSurface(), dynamicPaint_createUVSurface(), and dynamicPaint_resetSurface().
|
static |
Definition at line 5860 of file dynamicpaint.c.
References PaintSurfaceData::bData, MVert::co, dynamicPaint_canvas_mesh_get(), equals_m4m4(), equals_v3v3(), mesh, Mesh::mvert, Object::obmat, PaintBakeData::prev_obmat, PaintBakeData::prev_verts, surface, and Mesh::totvert.
Referenced by dynamicPaint_generateBakeData().
|
static |
Definition at line 304 of file dynamicpaint.c.
References dynamicPaint_canvas_mesh_get(), MOD_DPAINT_SURFACE_F_PTEX, MOD_DPAINT_SURFACE_F_VERTEX, surface, and Mesh::totvert.
Referenced by dynamicPaint_checkSurfaceData(), and dynamicPaint_resetSurface().
|
static |
Definition at line 2700 of file dynamicpaint.c.
References ADJ_BORDER_PIXEL, BLI_assert, dynamicPaint_pointHasNeighbor(), PaintAdjData::flags, MEM_callocN, MEM_freeN, PaintAdjData::n_index, PaintAdjData::n_num, PaintAdjData::n_target, and PaintAdjData::total_targets.
Referenced by dynamicPaint_createUVSurface().
|
static |
Definition at line 3601 of file dynamicpaint.c.
References DynamicPaintBrushSettings::alpha, PaintSurfaceData::bData, BKE_colorband_evaluate(), PaintBakeData::brush_velocity, CLAMP, CLAMP_MIN, copy_v3_v3(), dynamicPaint_mixPaintColors(), dynamicPaint_mixWaveHeight(), DynamicPaintBrushSettings::flags, if(), DynamicPaintBrushSettings::max_velocity, 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, surface, PaintSurfaceData::type_data, DynamicPaintBrushSettings::vel_ramp, DynamicPaintBrushSettings::wave_clamp, and DynamicPaintBrushSettings::wetness.
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 401 of file dynamicpaint.c.
References basename(), BLI_strncpy(), BLI_uniquename_cb(), surface, and surface_duplicateNameExists().
Referenced by dynamicPaint_createNewSurface().
void dynamicPaintSurface_updateType | ( | struct DynamicPaintSurface * | surface | ) |
Change surface data to defaults on new type.
Definition at line 409 of file dynamicpaint.c.
References BLI_strncpy(), 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, surface, and surface_setUniqueOutputName().
Referenced by dynamicPaint_createNewSurface().
|
static |
Definition at line 881 of file dynamicpaint.c.
References PaintBakeData::bNeighs, PaintBakeData::bNormal, data, freeGrid(), PaintBakeData::grid, MEM_freeN, NULL, PaintBakeData::prev_velocity, PaintBakeData::prev_verts, PaintBakeData::realCoord, PaintBakeData::s_num, PaintBakeData::s_pos, and PaintBakeData::velocity.
Referenced by dynamicPaint_freeSurfaceData(), and surface_freeUnusedData().
|
static |
Definition at line 606 of file dynamicpaint.c.
References VolumeGrid::bounds, data, PaintBakeData::grid, MEM_freeN, NULL, VolumeGrid::s_num, VolumeGrid::s_pos, and VolumeGrid::t_index.
Referenced by free_bakeData(), and surfaceGenerateGrid().
DynamicPaintSurface* get_activeSurface | ( | struct DynamicPaintCanvasSettings * | canvas | ) |
Get currently active surface (in user interface).
Definition at line 317 of file dynamicpaint.c.
References DynamicPaintCanvasSettings::active_sur, BLI_findlink(), and DynamicPaintCanvasSettings::surfaces.
Referenced by dynamicpaint_bake_exec(), and output_toggle_exec().
|
static |
Definition at line 600 of file dynamicpaint.c.
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 628 of file dynamicpaint.c.
References boundInsert(), PaintBakeData::realCoord, PaintBakeData::s_pos, and Vec3f::v.
Referenced by surfaceGenerateGrid().
|
static |
Definition at line 639 of file dynamicpaint.c.
References boundInsert(), Bounds3D::max, and Bounds3D::min.
Referenced by surfaceGenerateGrid().
|
static |
Definition at line 688 of file dynamicpaint.c.
References VolumeGrid::bounds, VolumeGrid::dim, PaintBakeData::dim, PaintBakeData::grid, VolumeGrid::grid_bounds, Bounds3D::max, Bounds3D::min, Bounds3D::valid, x, y, and z.
Referenced by surfaceGenerateGrid().
|
static |
Definition at line 650 of file dynamicpaint.c.
References CLAMP, VolumeGrid::dim, PaintBakeData::dim, floorf, PaintBakeData::grid, VolumeGrid::grid_bounds, Bounds3D::min, PaintBakeData::realCoord, PaintBakeData::s_pos, VolumeGrid::temp_t_index, and Vec3f::v.
Referenced by surfaceGenerateGrid().
|
static |
Definition at line 671 of file dynamicpaint.c.
References VolumeGrid::dim, and PaintBakeData::grid.
Referenced by surfaceGenerateGrid().
|
static |
Definition at line 3444 of file dynamicpaint.c.
References closest_on_tri_to_point_v3(), BVHTreeNearest::co, MVert::co, copy_v3_v3(), data, BVHTreeNearest::dist_sq, BVHTreeNearest::index, len_squared_v3v3(), BVHTreeNearest::no, MLoopTri::tri, and MLoop::v.
Referenced by dynamic_paint_paint_mesh_cell_point_cb_ex().
|
static |
Definition at line 3412 of file dynamicpaint.c.
References bvhtree_ray_tri_intersection(), MVert::co, data, BVHTreeRayHit::dist, BVHTreeRayHit::index, BVHTreeRayHit::no, MLoopTri::tri, and MLoop::v.
Referenced by dynamic_paint_paint_mesh_cell_point_cb_ex().
|
static |
Definition at line 3696 of file dynamicpaint.c.
References boundsIntersect(), boundsIntersectDist(), DynamicPaintBrushSettings::collision, ELEM, MOD_DPAINT_COL_DIST, MOD_DPAINT_COL_VOLDIST, and MOD_DPAINT_COL_VOLUME.
Referenced by dynamicPaint_paintMesh().
|
static |
Definition at line 479 of file dynamicpaint.c.
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 508 of file dynamicpaint.c.
References RenderData::cfra, Scene::r, scene, and RenderData::subframe.
Referenced by dynamicPaint_doStep().
|
static |
Definition at line 295 of file dynamicpaint.c.
References BLI_strncpy(), CLOG_STR_ERROR, DynamicPaintCanvasSettings::error, and LOG.
Referenced by dynamicPaint_allocateSurfaceType(), dynamicPaint_createUVSurface(), dynamicPaint_doStep(), dynamicPaint_generateBakeData(), dynamicPaint_initAdjacencyData(), dynamicPaint_outputSurfaceImage(), and surfaceGenerateGrid().
|
static |
Definition at line 4862 of file dynamicpaint.c.
References acosf, PaintSurfaceData::adj_data, PaintSurfaceData::bData, PaintBakeData::bNeighs, CLAMP, cross_v3_v3v3(), dot_v3v3(), fabsf, float(), 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().
Definition at line 388 of file dynamicpaint.c.
References DynamicPaintSurface::canvas, ListBase::first, STREQ, surface, and DynamicPaintCanvasSettings::surfaces.
Referenced by dynamicPaintSurface_setUniqueName().
Definition at line 349 of file dynamicpaint.c.
References BLI_path_cmp, DynamicPaintSurface::canvas, ListBase::first, DynamicPaintSurface::format, surface, DynamicPaintCanvasSettings::surfaces, and DynamicPaintSurface::type.
Referenced by surface_setUniqueOutputName().
|
static |
Definition at line 919 of file dynamicpaint.c.
References free_bakeData(), MOD_DPAINT_ACTIVE, PTCACHE_BAKED, and surface.
Referenced by dynamicPaint_frameUpdate().
|
static |
Definition at line 515 of file dynamicpaint.c.
References BKE_collision_objects_create(), BKE_collision_objects_free(), BKE_modifiers_findby_type(), DynamicPaintModifierData::brush, BRUSH_USES_VELOCITY, depsgraph, eModifierMode_Realtime, eModifierMode_Render, eModifierType_DynamicPaint, DynamicPaintBrushSettings::flags, MOD_DPAINT_USES_VELOCITY, ModifierData::mode, NULL, and surface.
Referenced by dynamicPaint_generateBakeData().
|
static |
Definition at line 366 of file dynamicpaint.c.
References basename(), BLI_strncpy(), BLI_uniquename_cb(), output, surface, and surface_duplicateOutputExists().
Referenced by dynamicPaintSurface_updateType().
|
static |
Definition at line 442 of file dynamicpaint.c.
References MOD_DPAINT_ANTIALIAS, MOD_DPAINT_SURFACE_F_IMAGESEQ, MOD_DPAINT_SURFACE_F_VERTEX, and surface.
Referenced by dynamicPaint_generateBakeData().
|
static |
Definition at line 1346 of file dynamicpaint.c.
References MOD_DPAINT_ANTIALIAS, MOD_DPAINT_SURFACE_F_VERTEX, surface, and surface_usesAdjDistance().
Referenced by dynamicPaint_initAdjacencyData().
|
static |
Definition at line 1340 of file dynamicpaint.c.
References MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WAVE, and surface.
Referenced by dynamicPaint_prepareAdjacencyData(), and surface_usesAdjData().
|
static |
Definition at line 711 of file dynamicpaint.c.
References PaintSurfaceData::bData, BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), boundInsert(), VolumeGrid::bounds, CLAMP, copy_v3_v3(), VolumeGrid::dim, PaintBakeData::dim, double(), error(), float(), blender::math::floor(), freeGrid(), TaskParallelSettings::func_reduce, PaintBakeData::grid, grid_bound_insert_cb_ex(), grid_bound_insert_reduce(), VolumeGrid::grid_bounds, grid_cell_bounds_cb(), grid_cell_points_cb_ex(), grid_cell_points_reduce(), Bounds3D::max, max_fff(), MEM_callocN, MEM_freeN, MEM_SAFE_FREE, Bounds3D::min, N_, NULL, pos, pow(), PaintBakeData::realCoord, VolumeGrid::s_num, VolumeGrid::s_pos, PaintBakeData::s_pos, setError(), sub_v3_v3v3(), surface, VolumeGrid::t_index, VolumeGrid::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 119 of file dynamicpaint.c.
References MIN_WETNESS, powf, and time.
Referenced by dynamic_paint_surface_pre_step_cb().
|
static |
Definition at line 81 of file dynamicpaint.c.
Referenced by dynamic_paint_paint_mesh_cell_point_cb_ex().
|
static |
Definition at line 88 of file dynamicpaint.c.
Referenced by dynamic_paint_paint_mesh_cell_point_cb_ex().
|
static |
Definition at line 78 of file dynamicpaint.c.
Referenced by dynamicPaint_createUVSurface(), dynamicPaint_paintParticles(), and setError().
|
static |
Definition at line 95 of file dynamicpaint.c.
Referenced by dynamic_paint_create_uv_surface_neighbor_cb().
|
static |
Definition at line 96 of file dynamicpaint.c.
Referenced by dynamic_paint_create_uv_surface_neighbor_cb().
|
static |
Definition at line 91 of file dynamicpaint.c.
Referenced by dynamic_paint_find_neighbor_pixel().
|
static |
Definition at line 92 of file dynamicpaint.c.
Referenced by dynamic_paint_find_neighbor_pixel().