Blender V2.61 - r43446
|
#include "MEM_guardedalloc.h"
#include <math.h>
#include <stdio.h>
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_kdtree.h"
#include "BLI_threads.h"
#include "BLI_utildefines.h"
#include "DNA_anim_types.h"
#include "DNA_constraint_types.h"
#include "DNA_dynamicpaint_types.h"
#include "DNA_group_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_types.h"
#include "DNA_scene_types.h"
#include "DNA_space_types.h"
#include "DNA_texture_types.h"
#include "BKE_animsys.h"
#include "BKE_bvhutils.h"
#include "BKE_blender.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_constraint.h"
#include "BKE_context.h"
#include "BKE_customdata.h"
#include "BKE_colortools.h"
#include "BKE_deform.h"
#include "BKE_depsgraph.h"
#include "BKE_DerivedMesh.h"
#include "BKE_dynamicpaint.h"
#include "BKE_effect.h"
#include "BKE_global.h"
#include "BKE_image.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
#include "BKE_scene.h"
#include "BKE_texture.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
#include "RE_render_ext.h"
#include "RE_shader_ext.h"
Go to the source code of this file.
#define ADJ_ON_MESH_EDGE (1<<0) |
Definition at line 198 of file dynamicpaint.c.
Referenced by dynamicPaint_doWaveStep(), and dynamicPaint_initAdjacencyData().
#define BRUSH_USES_VELOCITY (1<<0) |
Definition at line 96 of file dynamicpaint.c.
Referenced by surface_getBrushFlags(), and surface_needsVelocityData().
#define CANVAS_REL_SIZE 5.0f |
Definition at line 104 of file dynamicpaint.c.
Referenced by dynamicPaint_doEffectStep(), dynamicPaint_doWaveStep(), and dynamicPaint_prepareEffectStep().
#define EFF_MOVEMENT_PER_FRAME 0.05f |
Definition at line 101 of file dynamicpaint.c.
Referenced by dynamicPaint_doEffectStep(), and dynamicPaint_prepareEffectStep().
#define HIT_PROXIMITY 2 |
Definition at line 99 of file dynamicpaint.c.
Referenced by dynamicPaint_paintMesh().
#define HIT_VOLUME 1 |
Definition at line 98 of file dynamicpaint.c.
Referenced by dynamicPaint_paintMesh().
#define MAX_WETNESS 5.0f |
Definition at line 107 of file dynamicpaint.c.
Referenced by dynamicPaint_doEffectStep().
#define MIN_WETNESS 0.001f |
Definition at line 106 of file dynamicpaint.c.
Referenced by dynamicPaint_doEffectStep(), dynamicPaint_mixPaintColors(), and dynamicPaint_surfacePreStep().
#define UPDATE_EVERYTHING (UPDATE_PARENTS|UPDATE_MESH) |
Definition at line 94 of file dynamicpaint.c.
Referenced by dynamicPaint_brushMeshCalculateVelocity(), and dynamicPaint_doStep().
#define UPDATE_MESH (1<<1) |
Definition at line 93 of file dynamicpaint.c.
Referenced by subframe_updateObject().
#define UPDATE_PARENTS (1<<0) |
Definition at line 92 of file dynamicpaint.c.
Referenced by dynamicPaint_brushObjectCalculateVelocity(), and subframe_updateObject().
#define VALUE_DISSOLVE | ( | VALUE, | |
TIME, | |||
SCALE, | |||
LOG | |||
) | (VALUE) = (LOG) ? (VALUE) * (pow(MIN_WETNESS,1.0f/(1.2f*((float)(TIME))/(SCALE)))) : (VALUE) - 1.0f/(TIME)*(SCALE) |
Definition at line 109 of file dynamicpaint.c.
Referenced by dynamicPaint_surfacePreStep().
#define WAVE_TIME_FAC (1.0f/24.f) |
Definition at line 103 of file dynamicpaint.c.
Referenced by dynamicPaint_doWaveStep().
typedef struct BakeNeighPoint BakeNeighPoint |
typedef struct BrushMaterials BrushMaterials |
typedef struct EffVelPoint EffVelPoint |
typedef struct ImgSeqFormatData ImgSeqFormatData |
typedef struct PaintAdjData PaintAdjData |
typedef struct PaintBakeData PaintBakeData |
typedef struct PaintBakeNormal PaintBakeNormal |
typedef struct PaintUVPoint PaintUVPoint |
typedef struct VolumeGrid VolumeGrid |
static void blendColors | ( | float | t_color[3], |
float | t_alpha, | ||
float | s_color[3], | ||
float | s_alpha, | ||
float | result[4] | ||
) | [static] |
Definition at line 407 of file dynamicpaint.c.
References copy_v3_v3(), and i.
Referenced by dynamicPaint_mixPaintColors(), dynamicPaint_Modifier_apply(), dynamicPaint_outputSurfaceImage(), and dynamicPaint_surfacePreStep().
static void boundInsert | ( | Bounds3D * | b, |
float | point[3] | ||
) | [static] |
Definition at line 621 of file dynamicpaint.c.
References copy_v3_v3(), i, Bounds3D::max, Bounds3D::min, and Bounds3D::valid.
Referenced by dynamicPaint_generateBakeData(), dynamicPaint_paintMesh(), dynamicPaint_paintParticles(), and surfaceGenerateGrid().
static int boundIntersectPoint | ( | Bounds3D * | b, |
float | point[3], | ||
float | radius | ||
) | [static] |
Definition at line 611 of file dynamicpaint.c.
References i, Bounds3D::max, Bounds3D::min, and Bounds3D::valid.
Referenced by dynamicPaint_paintParticles().
Definition at line 591 of file dynamicpaint.c.
References i, Bounds3D::max, Bounds3D::min, and Bounds3D::valid.
Referenced by meshBrush_boundsIntersect().
Definition at line 601 of file dynamicpaint.c.
References i, Bounds3D::max, Bounds3D::min, and Bounds3D::valid.
Referenced by dynamicPaint_paintParticles(), and meshBrush_boundsIntersect().
static int brush_usesMaterial | ( | DynamicPaintBrushSettings * | brush, |
Scene * | scene | ||
) | [static] |
Definition at line 585 of file dynamicpaint.c.
References RenderData::engine, DynamicPaintBrushSettings::flags, MOD_DPAINT_USE_MATERIAL, and Scene::r.
Referenced by dynamicPaint_doStep(), dynamicPaint_paintMesh(), and dynamicPaint_paintSinglePoint().
void canvas_copyDerivedMesh | ( | DynamicPaintCanvasSettings * | canvas, |
DerivedMesh * | dm | ||
) |
Definition at line 1808 of file dynamicpaint.c.
References CDDM_copy(), DynamicPaintCanvasSettings::dm, and DerivedMesh::release.
Referenced by dynamicPaint_frameUpdate().
static void dynamicPaint_allocateSurfaceType | ( | DynamicPaintSurface * | surface | ) | [static] |
Definition at line 1182 of file dynamicpaint.c.
References DynamicPaintSurface::canvas, DynamicPaintSurface::data, MEM_callocN(), MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WAVE, MOD_DPAINT_SURFACE_T_WEIGHT, NULL, setError(), PaintSurfaceData::total_points, DynamicPaintSurface::type, and PaintSurfaceData::type_data.
Referenced by dynamicPaint_createUVSurface(), and dynamicPaint_resetSurface().
static void dynamicPaint_applySurfaceDisplace | ( | DynamicPaintSurface * | surface, |
DerivedMesh * | result | ||
) | [static] |
Definition at line 1538 of file dynamicpaint.c.
References MVert::co, DynamicPaintSurface::data, DynamicPaintSurface::disp_factor, DynamicPaintSurface::format, DerivedMesh::getVertArray, i, MOD_DPAINT_SURFACE_F_VERTEX, MOD_DPAINT_SURFACE_T_DISPLACE, normal_short_to_float_v3(), normalize_v3(), PaintSurfaceData::total_points, DynamicPaintSurface::type, PaintSurfaceData::type_data, and simple_enum_gen::val.
Referenced by dynamicPaint_calculateFrame(), and dynamicPaint_Modifier_apply().
static void dynamicPaint_brushMeshCalculateVelocity | ( | Scene * | scene, |
Object * | ob, | ||
DynamicPaintBrushSettings * | brush, | ||
Vec3f ** | brushVel, | ||
float | timescale | ||
) | [static] |
Definition at line 3034 of file dynamicpaint.c.
References BKE_curframe(), CDDM_copy(), RenderData::cfra, co, copy_m4_m4(), copy_v3_v3(), DynamicPaintBrushSettings::dm, DerivedMesh::getNumVerts, DerivedMesh::getVertArray, i, MEM_mallocN(), mul_m4_v3(), mul_v3_fl(), Object::obmat, Scene::r, DerivedMesh::release, sub_v3_v3v3(), RenderData::subframe, subframe_updateObject(), UPDATE_EVERYTHING, and Vec3f::v.
Referenced by dynamicPaint_paintMesh().
static void dynamicPaint_brushObjectCalculateVelocity | ( | Scene * | scene, |
Object * | ob, | ||
Vec3f * | brushVel, | ||
float | timescale | ||
) | [static] |
Definition at line 3098 of file dynamicpaint.c.
References BKE_curframe(), RenderData::cfra, copy_m4_m4(), mul_m4_v3(), mul_v3_fl(), Object::obmat, Scene::r, sub_v3_v3v3(), RenderData::subframe, subframe_updateObject(), UPDATE_PARENTS, and Vec3f::v.
Referenced by dynamicPaint_paintSinglePoint().
void dynamicPaint_cacheUpdateFrames | ( | DynamicPaintSurface * | surface | ) |
Definition at line 1800 of file dynamicpaint.c.
References DynamicPaintSurface::end_frame, PointCache::endframe, DynamicPaintSurface::pointcache, DynamicPaintSurface::start_frame, and PointCache::startframe.
int dynamicPaint_calculateFrame | ( | DynamicPaintSurface * | surface, |
Scene * | scene, | ||
Object * | cObject, | ||
int | frame | ||
) |
Definition at line 4939 of file dynamicpaint.c.
References DynamicPaintSurface::canvas, DynamicPaintCanvasSettings::dm, dynamicPaint_applySurfaceDisplace(), dynamicPaint_doStep(), dynamicPaint_generateBakeData(), DynamicPaintSurface::flags, MOD_DPAINT_DISP_INCREMENTAL, DynamicPaintSurface::start_frame, and DynamicPaintSurface::substeps.
Referenced by dynamicPaint_bakeImageSequence(), and dynamicPaint_frameUpdate().
static int dynamicPaint_checkSurfaceData | ( | DynamicPaintSurface * | surface | ) | [static] |
Definition at line 1525 of file dynamicpaint.c.
References DynamicPaintSurface::data, dynamicPaint_resetSurface(), dynamicPaint_surfaceNumOfPoints(), and PaintSurfaceData::total_points.
Referenced by dynamicPaint_frameUpdate().
void dynamicPaint_clearSurface | ( | DynamicPaintSurface * | surface | ) |
Definition at line 1474 of file dynamicpaint.c.
References PaintSurfaceData::bData, PaintBakeData::clear, DynamicPaintSurface::data, dynamicPaint_setInitialColor(), MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WAVE, PaintSurfaceData::total_points, DynamicPaintSurface::type, and PaintSurfaceData::type_data.
Referenced by BKE_ptcache_id_reset().
struct DynamicPaintSurface* dynamicPaint_createNewSurface | ( | DynamicPaintCanvasSettings * | canvas, |
Scene * | scene | ||
) | [read] |
Definition at line 969 of file dynamicpaint.c.
References BKE_add_effector_weights(), BKE_ptcache_add(), BLI_addtail(), DynamicPaintSurface::canvas, DynamicPaintSurface::color_dry_threshold, DynamicPaintSurface::color_spread_speed, 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_PREVIEW, MOD_DPAINT_SURFACE_F_VERTEX, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_USE_DRYING, modifier_path_init(), NULL, 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_speed, DynamicPaintSurface::wave_spring, and DynamicPaintSurface::wave_timescale.
Referenced by dynamicPaint_createType(), and surface_slot_add_exec().
int dynamicPaint_createType | ( | struct DynamicPaintModifierData * | pmd, |
int | type, | ||
struct Scene * | scene | ||
) |
Definition at line 1042 of file dynamicpaint.c.
References CBData::a, add_colorband(), DynamicPaintBrushSettings::alpha, DynamicPaintBrushSettings::b, CBData::b, DynamicPaintModifierData::brush, DynamicPaintSurface::canvas, DynamicPaintModifierData::canvas, DynamicPaintBrushSettings::collision, ColorBand::data, DynamicPaintCanvasSettings::dm, DynamicPaintBrushSettings::dm, dynamicPaint_createNewSurface(), dynamicPaint_freeBrush(), dynamicPaint_freeCanvas(), DynamicPaintBrushSettings::flags, DynamicPaintBrushSettings::g, CBData::g, DynamicPaintBrushSettings::mat, 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, DynamicPaintBrushSettings::pmd, DynamicPaintCanvasSettings::pmd, CBData::pos, DynamicPaintBrushSettings::proximity_falloff, DynamicPaintBrushSettings::psys, DynamicPaintBrushSettings::r, CBData::r, DynamicPaintBrushSettings::smudge_strength, ColorBand::tot, 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 | ( | DynamicPaintSurface * | surface | ) |
Definition at line 2102 of file dynamicpaint.c.
References PaintSurfaceData::adj_data, PaintPoint::alpha, barycentric_weights_v2(), ImgSeqFormatData::barycentricWeights, DynamicPaintSurface::canvas, CD_MTFACE, PaintPoint::color, copy_v2_v2(), CustomData_get_layer_named(), CustomData_validate_layer_name(), DynamicPaintSurface::data, DynamicPaintCanvasSettings::dm, dynamicPaint_allocateSurfaceType(), dynamicPaint_findNeighbourPixel(), dynamicPaint_freeSurfaceData(), dynamicPaint_initAdjacencyData(), dynamicPaint_setInitialColor(), error(), PaintUVPoint::face_index, DerivedMesh::faceData, DynamicPaintSurface::flags, DynamicPaintSurface::format, PaintSurfaceData::format_data, DerivedMesh::getFaceArray, DerivedMesh::getNumFaces, i, DynamicPaintSurface::image_resolution, max, Bounds2D::max, MAX_CUSTOMDATA_LAYER_NAME, MEM_callocN(), MEM_freeN(), MEM_mallocN(), min, Bounds2D::min, MOD_DPAINT_ANTIALIAS, MOD_DPAINT_SURFACE_F_IMAGESEQ, PaintAdjData::n_index, PaintAdjData::n_num, PaintAdjData::n_target, PaintUVPoint::neighbour_pixel, NULL, PaintUVPoint::pixel_index, PaintUVPoint::quad, setError(), sub_v2_v2v2(), PaintSurfaceData::total_points, PaintSurfaceData::type_data, MTFace::uv, ImgSeqFormatData::uv_p, DynamicPaintSurface::uvlayer_name, MFace::v1, PaintUVPoint::v1, PaintUVPoint::v2, PaintUVPoint::v3, MFace::v4, and simple_enum_gen::w.
Referenced by dynamicPaint_bakeImageSequence().
static void dynamicPaint_doEffectStep | ( | DynamicPaintSurface * | surface, |
float * | force, | ||
PaintPoint * | prevPoint, | ||
float | timescale, | ||
float | steps | ||
) | [static] |
Definition at line 4161 of file dynamicpaint.c.
References PaintSurfaceData::adj_data, PaintPoint::alpha, PaintSurfaceData::bData, PaintBakeData::bNeighs, CANVAS_REL_SIZE, CLAMP(), DynamicPaintSurface::color_spread_speed, DynamicPaintSurface::data, BakeNeighPoint::dist, PaintPoint::e_alpha, PaintPoint::e_color, EFF_MOVEMENT_PER_FRAME, DynamicPaintSurface::effect, getSurfaceDimension(), i, if(), MAX_WETNESS, MIN2, MIN3, MIN_WETNESS, mixColors(), MOD_DPAINT_EFFECT_DO_DRIP, MOD_DPAINT_EFFECT_DO_SHRINK, MOD_DPAINT_EFFECT_DO_SPREAD, PaintAdjData::n_index, PaintAdjData::n_num, PaintAdjData::n_target, DynamicPaintSurface::shrink_speed, DynamicPaintSurface::spread_speed, surface_determineForceTargetPoints(), PaintSurfaceData::total_points, PaintSurfaceData::type_data, and PaintPoint::wetness.
Referenced by dynamicPaint_doStep().
void dynamicPaint_doMaterialTex | ( | BrushMaterials * | bMats, |
float | color[3], | ||
float * | alpha, | ||
Object * | brushOb, | ||
const float | volume_co[3], | ||
const float | surface_co[3], | ||
int | faceIndex, | ||
short | isQuad, | ||
DerivedMesh * | orcoDm | ||
) |
Definition at line 2722 of file dynamicpaint.c.
References DerivedMesh::getFaceArray, give_totcolp(), BrushMaterials::mat, MFace::mat_nr, NULL, BrushMaterials::ob_mats, and RE_sample_material_color().
Referenced by dynamicPaint_paintMesh(), and dynamicPaint_paintSinglePoint().
static void dynamicPaint_doSmudge | ( | DynamicPaintSurface * | surface, |
DynamicPaintBrushSettings * | brush, | ||
float | timescale | ||
) | [static] |
Definition at line 4001 of file dynamicpaint.c.
References PaintSurfaceData::adj_data, PaintPoint::alpha, PaintBakeData::average_dist, PaintSurfaceData::bData, PaintBakeData::bNeighs, PaintBakeData::brush_velocity, CLAMP(), PaintPoint::color, DynamicPaintSurface::data, BakeNeighPoint::dist, PaintPoint::e_alpha, PaintPoint::e_color, i, mixColors(), PaintAdjData::n_target, DynamicPaintBrushSettings::smudge_strength, step(), surface_determineForceTargetPoints(), PaintSurfaceData::total_points, PaintSurfaceData::type_data, and PaintPoint::wetness.
Referenced by dynamicPaint_doStep().
static int dynamicPaint_doStep | ( | Scene * | scene, |
Object * | ob, | ||
DynamicPaintSurface * | surface, | ||
float | timescale, | ||
float | subframe | ||
) | [static] |
Definition at line 4778 of file dynamicpaint.c.
References PaintSurfaceData::adj_data, ParticleSettings::adt, ADT_RECALC_ANIM, Scene::base, PaintSurfaceData::bData, BKE_animsys_evaluate_animdata(), BKE_curframe(), PaintBakeData::bNeighs, DynamicPaintModifierData::brush, DynamicPaintSurface::brush_group, brush_usesMaterial(), PaintBakeData::brush_velocity, DynamicPaintSurface::canvas, RenderData::cfra, DynamicPaintBrushSettings::collision, DynamicPaintSurface::data, dynamicPaint_doEffectStep(), dynamicPaint_doSmudge(), dynamicPaint_doWaveStep(), dynamicPaint_freeBrushMaterials(), dynamicPaint_initAdjacencyData(), dynamicPaint_paintMesh(), dynamicPaint_paintParticles(), dynamicPaint_paintSinglePoint(), dynamicPaint_prepareEffectStep(), dynamicPaint_prepareNeighbourData(), dynamicPaint_surfacePreStep(), dynamicPaint_updateBrushMaterials(), DynamicPaintSurface::effect, eModifierMode_Realtime, eModifierMode_Render, eModifierType_DynamicPaint, ListBase::first, DynamicPaintBrushSettings::flags, Group::gobject, ParticleSettings::id, Object::loc, DynamicPaintBrushSettings::mat, MEM_callocN(), MEM_freeN(), MEM_mallocN(), MOD_DPAINT_COL_POINT, MOD_DPAINT_COL_PSYS, MOD_DPAINT_DO_SMUDGE, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WAVE, ModifierData::mode, modifiers_findByType(), GroupObject::next, Base::next, NULL, GroupObject::ob, Base::object, ParticleSystem::part, PART_EMITTER, DynamicPaintBrushSettings::psys, psys_check_enabled(), Scene::r, scene_setSubframe(), setError(), RenderData::subframe, subframe_updateObject(), PaintSurfaceData::total_points, ParticleSettings::type, DynamicPaintSurface::type, and UPDATE_EVERYTHING.
Referenced by dynamicPaint_calculateFrame().
void dynamicPaint_doWaveStep | ( | DynamicPaintSurface * | surface, |
float | timescale | ||
) |
Definition at line 4327 of file dynamicpaint.c.
References PaintSurfaceData::adj_data, ADJ_ON_MESH_EDGE, PaintSurfaceData::bData, PaintBakeData::bNeighs, PaintWavePoint::brush_isect, CANVAS_REL_SIZE, CLAMP(), DynamicPaintSurface::data, BakeNeighPoint::dist, DPAINT_WAVE_NONE, DynamicPaintSurface::flags, PaintAdjData::flags, PaintWavePoint::height, i, Bounds3D::max, MAX3(), MEM_freeN(), MEM_mallocN(), PaintBakeData::mesh_bounds, Bounds3D::min, MOD_DPAINT_WAVE_OPEN_BORDERS, PaintAdjData::n_index, PaintAdjData::n_num, PaintAdjData::n_target, pow(), PaintWavePoint::state, PaintSurfaceData::total_points, PaintAdjData::total_targets, PaintSurfaceData::type_data, PaintWavePoint::velocity, DynamicPaintSurface::wave_damping, DynamicPaintSurface::wave_speed, DynamicPaintSurface::wave_spring, WAVE_TIME_FAC, and DynamicPaintSurface::wave_timescale.
Referenced by dynamicPaint_doStep().
static int dynamicPaint_findNeighbourPixel | ( | PaintUVPoint * | tempPoints, |
DerivedMesh * | dm, | ||
const char * | uvname, | ||
int | w, | ||
int | h, | ||
int | px, | ||
int | py, | ||
int | n_index | ||
) | [static] |
Definition at line 1910 of file dynamicpaint.c.
References add_v2_v2(), CD_MTFACE, closest_to_line_v2(), copy_v2_v2(), CustomData_get_layer_named(), dist_to_line_segment_v2(), PaintUVPoint::face_index, DerivedMesh::faceData, DerivedMesh::getFaceArray, DerivedMesh::getNumFaces, i, mul_v2_fl(), PaintUVPoint::neighbour_pixel, neighX, neighY, NULL, PaintUVPoint::quad, sub_v2_v2v2(), MTFace::uv, MFace::v1, PaintUVPoint::v1, MFace::v2, PaintUVPoint::v2, MFace::v3, PaintUVPoint::v3, MFace::v4, and simple_enum_gen::w.
Referenced by dynamicPaint_createUVSurface().
static void dynamicPaint_frameUpdate | ( | DynamicPaintModifierData * | pmd, |
Scene * | scene, | ||
Object * | ob, | ||
DerivedMesh * | dm | ||
) | [static] |
Definition at line 1817 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_copyDerivedMesh(), RenderData::cfra, CLAMP(), DynamicPaintSurface::current_frame, 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, NULL, 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 void dynamicPaint_freeAdjData | ( | PaintSurfaceData * | data | ) | [static] |
Definition at line 846 of file dynamicpaint.c.
References PaintSurfaceData::adj_data, PaintAdjData::flags, MEM_freeN(), PaintAdjData::n_index, PaintAdjData::n_num, PaintAdjData::n_target, and NULL.
Referenced by dynamicPaint_freeSurfaceData(), and dynamicPaint_initAdjacencyData().
void dynamicPaint_freeBrush | ( | struct DynamicPaintModifierData * | pmd | ) |
Definition at line 827 of file dynamicpaint.c.
References DynamicPaintModifierData::brush, DynamicPaintBrushSettings::dm, MEM_freeN(), NULL, DynamicPaintBrushSettings::paint_ramp, DerivedMesh::release, and DynamicPaintBrushSettings::vel_ramp.
Referenced by dynamicPaint_createType(), dynamicPaint_Modifier_free(), and type_toggle_exec().
static void dynamicPaint_freeBrushMaterials | ( | BrushMaterials * | bMats | ) | [static] |
Definition at line 2704 of file dynamicpaint.c.
References i, BrushMaterials::mat, MEM_freeN(), BrushMaterials::ob_mats, RE_free_sample_material(), and BrushMaterials::tot.
Referenced by dynamicPaint_doStep().
void dynamicPaint_freeCanvas | ( | DynamicPaintModifierData * | pmd | ) |
Definition at line 929 of file dynamicpaint.c.
References DynamicPaintModifierData::canvas, DynamicPaintCanvasSettings::dm, dynamicPaint_freeSurface(), ListBase::first, MEM_freeN(), DynamicPaintSurface::next, NULL, DerivedMesh::release, and DynamicPaintCanvasSettings::surfaces.
Referenced by dynamicPaint_createType(), dynamicPaint_Modifier_free(), and type_toggle_exec().
void dynamicPaint_freeSurface | ( | DynamicPaintSurface * | surface | ) |
Definition at line 913 of file dynamicpaint.c.
References BKE_ptcache_free_list(), BLI_remlink(), DynamicPaintSurface::canvas, dynamicPaint_freeSurfaceData(), DynamicPaintSurface::effector_weights, MEM_freeN(), NULL, DynamicPaintSurface::pointcache, DynamicPaintSurface::ptcaches, and DynamicPaintCanvasSettings::surfaces.
Referenced by dynamicPaint_freeCanvas(), and surface_slot_remove_exec().
void dynamicPaint_freeSurfaceData | ( | DynamicPaintSurface * | surface | ) |
Definition at line 888 of file dynamicpaint.c.
References ImgSeqFormatData::barycentricWeights, data, DynamicPaintSurface::data, dynamicPaint_freeAdjData(), DynamicPaintSurface::format, PaintSurfaceData::format_data, free_bakeData(), if(), MEM_freeN(), MOD_DPAINT_SURFACE_F_IMAGESEQ, NULL, PaintSurfaceData::type_data, and ImgSeqFormatData::uv_p.
Referenced by dynamicPaint_createUVSurface(), dynamicPaint_freeSurface(), dynamicPaint_initBake(), and dynamicPaint_resetSurface().
static int dynamicPaint_generateBakeData | ( | DynamicPaintSurface * | surface, |
Scene * | scene, | ||
Object * | ob | ||
) | [static] |
Definition at line 4575 of file dynamicpaint.c.
References PaintSurfaceData::adj_data, ImgSeqFormatData::barycentricWeights, PaintSurfaceData::bData, PaintBakeData::bNormal, boundInsert(), DynamicPaintSurface::canvas, PaintBakeData::clear, co, copy_m4_m4(), copy_v3_v3(), DynamicPaintSurface::data, DynamicPaintCanvasSettings::dm, dynamicPaint_prepareNeighbourData(), dynamicPaint_surfaceHasMoved(), DynamicPaintSurface::flags, DynamicPaintSurface::format, PaintSurfaceData::format_data, DerivedMesh::getNumVerts, DerivedMesh::getVertArray, interp_v3_v3v3v3(), PaintBakeNormal::invNorm, len_v3(), madd_v3_v3fl(), MEM_callocN(), MEM_freeN(), MEM_mallocN(), PaintBakeData::mesh_bounds, MOD_DPAINT_ANTIALIAS, MOD_DPAINT_SURFACE_F_IMAGESEQ, MOD_DPAINT_SURFACE_F_VERTEX, MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_WAVE, mul_m4_v3(), mul_mat3_m4_v3(), mul_v3_fl(), mul_v3_v3(), PaintAdjData::n_index, PaintAdjData::n_num, PaintAdjData::n_target, negate_v3(), MVert::no, PaintBakeNormal::normal_scale, normal_short_to_float_v3(), normalize_v3(), Object::obmat, PaintBakeData::prev_obmat, PaintBakeData::prev_velocity, PaintBakeData::prev_verts, PaintBakeData::realCoord, PaintBakeData::s_num, PaintBakeData::s_pos, setError(), Object::size, sub_v3_v3v3(), surface_needsAccelerationData(), surface_needsVelocityData(), surface_totalSamples(), surfaceGenerateGrid(), PaintSurfaceData::total_points, DynamicPaintSurface::type, ImgSeqFormatData::uv_p, Vec3f::v, Bounds3D::valid, and PaintBakeData::velocity.
Referenced by dynamicPaint_calculateFrame().
static void dynamicPaint_initAdjacencyData | ( | DynamicPaintSurface * | surface, |
int | force_init | ||
) | [static] |
Definition at line 1221 of file dynamicpaint.c.
References PaintSurfaceData::adj_data, ADJ_ON_MESH_EDGE, DynamicPaintSurface::canvas, DynamicPaintSurface::data, DynamicPaintCanvasSettings::dm, dynamicPaint_freeAdjData(), PaintAdjData::flags, DynamicPaintSurface::format, DerivedMesh::getEdgeArray, DerivedMesh::getFaceArray, DerivedMesh::getNumEdges, DerivedMesh::getNumFaces, i, MEM_callocN(), MEM_freeN(), MOD_DPAINT_SURFACE_F_IMAGESEQ, MOD_DPAINT_SURFACE_F_VERTEX, PaintAdjData::n_index, PaintAdjData::n_num, PaintAdjData::n_target, setError(), surface_usesAdjData(), PaintSurfaceData::total_points, PaintAdjData::total_targets, MEdge::v1, MFace::v1, MEdge::v2, and MFace::v4.
Referenced by dynamicPaint_createUVSurface(), dynamicPaint_doStep(), and dynamicPaint_resetSurface().
static void dynamicPaint_mixPaintColors | ( | DynamicPaintSurface * | surface, |
int | index, | ||
int | paintFlags, | ||
float * | paintColor, | ||
float * | paintAlpha, | ||
float * | paintWetness, | ||
float * | timescale | ||
) | [static] |
Definition at line 2837 of file dynamicpaint.c.
References PaintPoint::alpha, blendColors(), CLAMP(), copy_v3_v3(), DynamicPaintSurface::data, DPAINT_PAINT_NEW, PaintPoint::e_alpha, PaintPoint::e_color, if(), MIN_WETNESS, mix(), MOD_DPAINT_ABS_ALPHA, MOD_DPAINT_ERASE, PaintPoint::state, PaintSurfaceData::type_data, and PaintPoint::wetness.
Referenced by dynamicPaint_updatePointData().
static void dynamicPaint_mixWaveHeight | ( | PaintWavePoint * | wPoint, |
DynamicPaintBrushSettings * | brush, | ||
float | isect_height | ||
) | [static] |
Definition at line 2899 of file dynamicpaint.c.
References 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, PaintWavePoint::velocity, DynamicPaintBrushSettings::wave_factor, and DynamicPaintBrushSettings::wave_type.
Referenced by dynamicPaint_updatePointData().
static struct DerivedMesh* dynamicPaint_Modifier_apply | ( | DynamicPaintModifierData * | pmd, |
Object * | ob, | ||
DerivedMesh * | dm | ||
) | [static, read] |
Definition at line 1566 of file dynamicpaint.c.
References MCol::a, Material::b, MCol::b, blendColors(), DynamicPaintModifierData::brush, DynamicPaintModifierData::canvas, CD_CALLOC, CD_MCOL, CD_MDEFORMVERT, CD_WEIGHT_MCOL, CDDM_calc_normals(), CDDM_copy(), co, MakeCursor::color, CustomData_add_layer(), CustomData_add_layer_named(), CustomData_get_layer_named(), DynamicPaintSurface::data, defgroup_name_index(), defvert_find_index(), defvert_verify_index(), DynamicPaintBrushSettings::dm, dynamicPaint_applySurfaceDisplace(), dynamicPaint_outputLayerExists(), DerivedMesh::faceData, ListBase::first, DynamicPaintCanvasSettings::flags, DynamicPaintSurface::flags, DynamicPaintSurface::format, FTOCHAR, Material::g, MCol::g, DerivedMesh::getFaceArray, DerivedMesh::getFaceDataArray, DerivedMesh::getNumFaces, DerivedMesh::getVertArray, DerivedMesh::getVertDataArray, give_current_material(), i, if(), interp_v3_v3v3(), madd_v3_v3fl(), MEM_callocN(), MEM_freeN(), MOD_DPAINT_ACTIVE, MOD_DPAINT_BAKING, MOD_DPAINT_PREVIEW, MOD_DPAINT_PREVIEW_READY, MOD_DPAINT_SURFACE_F_IMAGESEQ, MOD_DPAINT_SURFACE_F_VERTEX, MOD_DPAINT_SURFACE_PREV_PAINT, MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WAVE, MOD_DPAINT_SURFACE_T_WEIGHT, DynamicPaintSurface::next, normal_short_to_float_v3(), NULL, DynamicPaintSurface::output_name, DynamicPaintSurface::output_name2, DynamicPaintSurface::preview_id, MCol::r, Material::r, DerivedMesh::release, DynamicPaintCanvasSettings::surfaces, PaintSurfaceData::total_points, DynamicPaintSurface::type, PaintSurfaceData::type_data, MFace::v2, MFace::v4, DerivedMesh::vertData, MDeformWeight::weight, and weight_to_rgb().
Referenced by dynamicPaint_Modifier_do().
void dynamicPaint_Modifier_copy | ( | struct DynamicPaintModifierData * | pmd, |
struct DynamicPaintModifierData * | tpmd | ||
) |
Definition at line 1133 of file dynamicpaint.c.
References DynamicPaintBrushSettings::alpha, DynamicPaintBrushSettings::b, DynamicPaintModifierData::brush, DynamicPaintModifierData::canvas, DynamicPaintBrushSettings::collision, dynamicPaint_createType(), DynamicPaintBrushSettings::flags, DynamicPaintBrushSettings::g, DynamicPaintBrushSettings::mat, DynamicPaintBrushSettings::max_velocity, MOD_DYNAMICPAINT_TYPE_BRUSH, MOD_DYNAMICPAINT_TYPE_CANVAS, NULL, DynamicPaintBrushSettings::paint_distance, DynamicPaintBrushSettings::paint_ramp, DynamicPaintBrushSettings::particle_radius, DynamicPaintBrushSettings::particle_smooth, DynamicPaintBrushSettings::pmd, DynamicPaintCanvasSettings::pmd, DynamicPaintBrushSettings::proximity_falloff, DynamicPaintBrushSettings::psys, Material::r, DynamicPaintBrushSettings::r, DynamicPaintBrushSettings::ray_dir, DynamicPaintBrushSettings::smudge_strength, DynamicPaintModifierData::type, DynamicPaintBrushSettings::vel_ramp, DynamicPaintBrushSettings::wave_clamp, DynamicPaintBrushSettings::wave_factor, DynamicPaintBrushSettings::wave_type, and DynamicPaintBrushSettings::wetness.
Referenced by copyData().
struct DerivedMesh* dynamicPaint_Modifier_do | ( | DynamicPaintModifierData * | pmd, |
Scene * | scene, | ||
Object * | ob, | ||
DerivedMesh * | dm | ||
) | [read] |
Definition at line 1891 of file dynamicpaint.c.
References dynamicPaint_frameUpdate(), and dynamicPaint_Modifier_apply().
Referenced by applyModifier().
void dynamicPaint_Modifier_free | ( | struct DynamicPaintModifierData * | pmd | ) |
Definition at line 953 of file dynamicpaint.c.
References dynamicPaint_freeBrush(), and dynamicPaint_freeCanvas().
Referenced by freeData().
int dynamicPaint_outputLayerExists | ( | struct DynamicPaintSurface * | surface, |
Object * | ob, | ||
int | output | ||
) |
Definition at line 287 of file dynamicpaint.c.
References CD_MCOL, CustomData_get_named_layer_index(), Object::data, defgroup_name_index(), Mesh::fdata, DynamicPaintSurface::format, MOD_DPAINT_SURFACE_F_VERTEX, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WEIGHT, DynamicPaintSurface::name, DynamicPaintSurface::output_name, DynamicPaintSurface::output_name2, and DynamicPaintSurface::type.
Referenced by dynamicPaint_Modifier_apply(), and output_toggle_exec().
void dynamicPaint_outputSurfaceImage | ( | DynamicPaintSurface * | surface, |
char * | filename, | ||
short | output_layer | ||
) |
Definition at line 2558 of file dynamicpaint.c.
References PaintPoint::alpha, BKE_add_image_extension(), blendColors(), BLI_make_existing_file(), BLI_path_abs(), BLI_strncpy(), DynamicPaintSurface::canvas, CLAMP(), PaintPoint::color, DynamicPaintSurface::data, DynamicPaintSurface::depth_clamp, DynamicPaintSurface::disp_type, PaintPoint::e_alpha, PaintPoint::e_color, FILE_MAX, DynamicPaintSurface::flags, PaintSurfaceData::format_data, ImBuf::ftype, G, PaintWavePoint::height, IB_rectfloat, DynamicPaintSurface::image_fileformat, DynamicPaintSurface::image_resolution, IMB_allocImBuf(), IMB_freeImBuf(), IMB_saveiff(), MOD_DPAINT_DISP_DISPLACE, MOD_DPAINT_IMGFORMAT_OPENEXR, MOD_DPAINT_MULALPHA, MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WAVE, NULL, OPENEXR, OPENEXR_COMPRESS, PaintUVPoint::pixel_index, PNG, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_PNG, ImBuf::rect_float, setError(), PaintSurfaceData::total_points, DynamicPaintSurface::type, PaintSurfaceData::type_data, ImgSeqFormatData::uv_p, and PaintPoint::wetness.
Referenced by dynamicPaint_bakeImageSequence().
static int dynamicPaint_paintMesh | ( | DynamicPaintSurface * | surface, |
DynamicPaintBrushSettings * | brush, | ||
Object * | brushOb, | ||
BrushMaterials * | bMats, | ||
Scene * | scene, | ||
float | timescale | ||
) | [static] |
Definition at line 3135 of file dynamicpaint.c.
References add_v3_fl(), add_v3_v3(), DynamicPaintBrushSettings::b, PaintSurfaceData::bData, BLI_bvhtree_find_nearest(), BLI_bvhtree_ray_cast(), PaintBakeData::bNormal, boundInsert(), VolumeGrid::bounds, brush_usesMaterial(), PaintBakeData::brush_velocity, bvhtree_from_mesh_faces(), CDDM_copy(), CLAMP(), MVert::co, co, BVHTreeNearest::co, DynamicPaintBrushSettings::collision, copy_v3_v3(), DynamicPaintSurface::data, VolumeGrid::dim, BVHTreeNearest::dist, BVHTreeRayHit::dist, DynamicPaintBrushSettings::dm, do_colorband(), dot(), dynamicPaint_brushMeshCalculateVelocity(), dynamicPaint_doMaterialTex(), dynamicPaint_updatePointData(), DynamicPaintBrushSettings::flags, DynamicPaintSurface::format, free_bvhtree_from_mesh(), DynamicPaintBrushSettings::g, gaussianFactors, gaussianTotal, DerivedMesh::getFaceArray, DerivedMesh::getNumVerts, DerivedMesh::getVertArray, PaintBakeData::grid, VolumeGrid::grid_bounds, HIT_PROXIMITY, HIT_VOLUME, BVHTreeRayHit::index, BVHTreeNearest::index, interp_v3_v3v3v3(), interp_weights_face_v3(), PaintBakeNormal::invNorm, len_v3(), madd_v3_v3v3fl(), MEM_freeN(), mesh_faces_nearest_point_dp(), mesh_faces_spherecast_dp(), meshBrush_boundsIntersect(), MIN3, 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, mul_m4_v3(), mul_mat3_m4_v3(), mul_v3_fl(), negate_v3(), BVHTreeNearest::no, BVHTreeRayHit::no, PaintBakeNormal::normal_scale, normal_short_to_float_v3(), normal_tri_v3(), normalize_v3(), NULL, Object::obmat, DynamicPaintBrushSettings::paint_distance, DynamicPaintBrushSettings::paint_ramp, DynamicPaintBrushSettings::proximity_falloff, DynamicPaintBrushSettings::r, DynamicPaintSurface::radius_scale, DynamicPaintBrushSettings::ray_dir, PaintBakeData::realCoord, DerivedMesh::release, VolumeGrid::s_num, PaintBakeData::s_num, VolumeGrid::s_pos, PaintBakeData::s_pos, sqrtf, sub_v3_v3v3(), VolumeGrid::t_index, BVHTreeFromMesh::tree, DynamicPaintSurface::type, Vec3f::v, MFace::v1, MFace::v2, MFace::v3, MFace::v4, and PaintBakeData::velocity.
Referenced by dynamicPaint_doStep().
static int dynamicPaint_paintParticles | ( | DynamicPaintSurface * | surface, |
ParticleSystem * | psys, | ||
DynamicPaintBrushSettings * | brush, | ||
float | timescale | ||
) | [static] |
Definition at line 3532 of file dynamicpaint.c.
References ParticleData::alive, PaintSurfaceData::bData, BLI_begin_threaded_malloc(), BLI_end_threaded_malloc(), BLI_kdtree_balance(), BLI_kdtree_find_nearest(), BLI_kdtree_free(), BLI_kdtree_insert(), BLI_kdtree_new(), BLI_kdtree_range_search(), PaintBakeData::bNormal, boundInsert(), boundIntersectPoint(), VolumeGrid::bounds, boundsIntersectDist(), PaintBakeData::brush_velocity, ParticleKey::co, copy_v3_v3(), DynamicPaintSurface::data, VolumeGrid::dim, KDTreeNearest::dist, dynamicPaint_updatePointData(), ParticleSettings::flag, ParticleData::flag, DynamicPaintBrushSettings::flags, PaintBakeData::grid, VolumeGrid::grid_bounds, if(), KDTreeNearest::index, isnan(), len_v3(), 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_fl(), mul_v3_v3fl(), PaintBakeNormal::normal_scale, NULL, p, PARS_DEAD, PARS_NO_DISP, PARS_UNBORN, PARS_UNEXIST, ParticleSystem::part, PART_DIED, PART_UNBORN, DynamicPaintBrushSettings::particle_radius, DynamicPaintBrushSettings::particle_smooth, ParticleSystem::particles, DynamicPaintBrushSettings::r, DynamicPaintSurface::radius_scale, ParticleSettings::randsize, PaintBakeData::realCoord, VolumeGrid::s_num, VolumeGrid::s_pos, PaintBakeData::s_pos, ParticleData::size, ParticleSettings::size, smooth(), sqrtf, ParticleData::state, str, sub_v3_v3(), VolumeGrid::t_index, ParticleSettings::timetweak, ParticleSystem::totpart, DynamicPaintSurface::type, Vec3f::v, ParticleKey::vel, and PaintBakeData::velocity.
Referenced by dynamicPaint_doStep().
static int dynamicPaint_paintSinglePoint | ( | DynamicPaintSurface * | surface, |
float * | pointCoord, | ||
DynamicPaintBrushSettings * | brush, | ||
Object * | brushOb, | ||
BrushMaterials * | bMats, | ||
Scene * | scene, | ||
float | timescale | ||
) | [static] |
Definition at line 3774 of file dynamicpaint.c.
References DynamicPaintBrushSettings::b, PaintSurfaceData::bData, PaintBakeData::bNormal, brush_usesMaterial(), PaintBakeData::brush_velocity, CLAMP(), co, copy_v3_v3(), DynamicPaintSurface::data, distance(), DynamicPaintBrushSettings::dm, do_colorband(), dynamicPaint_brushObjectCalculateVelocity(), dynamicPaint_doMaterialTex(), dynamicPaint_updatePointData(), DynamicPaintBrushSettings::flags, DynamicPaintBrushSettings::g, DerivedMesh::getVertArray, if(), len_v3(), len_v3v3(), 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_m4_v3(), mul_v3_fl(), PaintBakeNormal::normal_scale, Object::obmat, DynamicPaintBrushSettings::paint_distance, DynamicPaintBrushSettings::paint_ramp, DynamicPaintBrushSettings::proximity_falloff, DynamicPaintBrushSettings::r, DynamicPaintSurface::radius_scale, PaintBakeData::realCoord, PaintBakeData::s_pos, sqrtf, sub_v3_v3v3(), PaintSurfaceData::total_points, DynamicPaintSurface::type, Vec3f::v, and PaintBakeData::velocity.
Referenced by dynamicPaint_doStep().
static int dynamicPaint_prepareEffectStep | ( | DynamicPaintSurface * | surface, |
Scene * | scene, | ||
Object * | ob, | ||
float ** | force, | ||
float | timescale | ||
) | [static] |
Definition at line 4069 of file dynamicpaint.c.
References PaintBakeData::average_dist, PaintSurfaceData::bData, CANVAS_REL_SIZE, CLAMP(), copy_v3_v3(), DynamicPaintSurface::data, DynamicPaintSurface::drip_acc, DynamicPaintSurface::drip_vel, EFF_MOVEMENT_PER_FRAME, DynamicPaintSurface::effect, DynamicPaintSurface::effector_weights, PhysicsSettings::flag, getSurfaceDimension(), EffectorWeights::global_gravity, PhysicsSettings::gravity, len_v3(), madd_v3_v3fl(), MAX3(), MEM_mallocN(), MOD_DPAINT_EFFECT_DO_DRIP, MOD_DPAINT_EFFECT_DO_SHRINK, MOD_DPAINT_EFFECT_DO_SPREAD, mul_v3_fl(), NULL, pd_point_from_loc(), pdDoEffectors(), pdEndEffectors(), pdInitEffectors(), PHYS_GLOBAL_GRAVITY, Scene::physics_settings, PaintBakeData::prev_velocity, PaintBakeData::realCoord, PaintBakeData::s_pos, DynamicPaintSurface::shrink_speed, DynamicPaintSurface::spread_speed, sub_v3_v3(), PaintSurfaceData::total_points, Vec3f::v, EffectedPoint::vel_to_sec, PaintBakeData::velocity, and EffectorWeights::weight.
Referenced by dynamicPaint_doStep().
static void dynamicPaint_prepareNeighbourData | ( | DynamicPaintSurface * | surface, |
int | force_init | ||
) | [static] |
Definition at line 3885 of file dynamicpaint.c.
References PaintSurfaceData::adj_data, PaintBakeData::average_dist, PaintSurfaceData::bData, PaintBakeData::bNeighs, DynamicPaintSurface::data, BakeNeighPoint::dist, i, len_v3(), MEM_freeN(), MEM_mallocN(), mul_v3_fl(), PaintAdjData::n_index, PaintAdjData::n_num, PaintAdjData::n_target, PaintBakeData::realCoord, PaintBakeData::s_pos, sub_v3_v3v3(), surface_usesAdjDistance(), PaintSurfaceData::total_points, PaintAdjData::total_targets, and Vec3f::v.
Referenced by dynamicPaint_doStep(), and dynamicPaint_generateBakeData().
void dynamicPaint_resetPreview | ( | DynamicPaintCanvasSettings * | canvas | ) |
Definition at line 260 of file dynamicpaint.c.
References dynamicPaint_surfaceHasColorPreview(), ListBase::first, DynamicPaintSurface::flags, MOD_DPAINT_PREVIEW, DynamicPaintSurface::next, and DynamicPaintCanvasSettings::surfaces.
Referenced by dynamicPaintSurface_updateType(), and surface_slot_remove_exec().
int dynamicPaint_resetSurface | ( | DynamicPaintSurface * | surface | ) |
Definition at line 1499 of file dynamicpaint.c.
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().
void dynamicPaint_setInitialColor | ( | DynamicPaintSurface * | surface | ) |
Definition at line 1326 of file dynamicpaint.c.
References PaintPoint::alpha, ImgSeqFormatData::barycentricWeights, DynamicPaintSurface::canvas, CD_MCOL, CD_MTFACE, MakeCursor::color, PaintPoint::color, copy_v2_v2(), copy_v3_v3(), CustomData_get_layer_named(), CustomData_validate_layer_name(), DynamicPaintSurface::data, DynamicPaintCanvasSettings::dm, PaintUVPoint::face_index, DynamicPaintSurface::flags, DynamicPaintSurface::format, PaintSurfaceData::format_data, g, i, if(), DynamicPaintSurface::init_color, DynamicPaintSurface::init_color_type, DynamicPaintSurface::init_layername, DynamicPaintSurface::init_texture, interp_v3_v3v3v3(), interp_v4_v4v4v4(), MAX_CUSTOMDATA_LAYER_NAME, MOD_DPAINT_ANTIALIAS, 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, multitex_ext_safe(), PaintUVPoint::quad, TexResult::tin, PaintSurfaceData::total_points, TexResult::tr, DynamicPaintSurface::type, PaintSurfaceData::type_data, MTFace::uv, ImgSeqFormatData::uv_p, Vec3f::v, MFace::v1, and MFace::v4.
Referenced by dynamicPaint_clearSurface(), dynamicPaint_createUVSurface(), and dynamicPaint_resetSurface().
static void dynamicPaint_setPreview | ( | DynamicPaintSurface * | t_surface | ) | [static] |
Definition at line 276 of file dynamicpaint.c.
References DynamicPaintSurface::canvas, ListBase::first, DynamicPaintSurface::flags, MOD_DPAINT_PREVIEW, DynamicPaintSurface::next, and DynamicPaintCanvasSettings::surfaces.
Referenced by dynamicPaintSurface_updateType().
int dynamicPaint_surfaceHasColorPreview | ( | DynamicPaintSurface * | surface | ) |
Definition at line 234 of file dynamicpaint.c.
References DynamicPaintSurface::format, MOD_DPAINT_SURFACE_F_IMAGESEQ, MOD_DPAINT_SURFACE_F_VERTEX, MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_WAVE, and DynamicPaintSurface::type.
Referenced by dynamicPaint_resetPreview(), dynamicPaintSurface_updateType(), and list_item_row().
static int dynamicPaint_surfaceHasMoved | ( | DynamicPaintSurface * | surface, |
Object * | ob | ||
) | [static] |
Definition at line 4521 of file dynamicpaint.c.
References PaintSurfaceData::bData, DynamicPaintSurface::canvas, MVert::co, DynamicPaintSurface::data, DynamicPaintCanvasSettings::dm, DerivedMesh::getNumVerts, DerivedMesh::getVertArray, i, Object::obmat, PaintBakeData::prev_obmat, and PaintBakeData::prev_verts.
Referenced by dynamicPaint_generateBakeData().
static int dynamicPaint_surfaceNumOfPoints | ( | DynamicPaintSurface * | surface | ) | [static] |
Definition at line 220 of file dynamicpaint.c.
References DynamicPaintSurface::canvas, DynamicPaintCanvasSettings::dm, DynamicPaintSurface::format, DerivedMesh::getNumVerts, MOD_DPAINT_SURFACE_F_PTEX, and MOD_DPAINT_SURFACE_F_VERTEX.
Referenced by dynamicPaint_checkSurfaceData(), and dynamicPaint_resetSurface().
static void dynamicPaint_surfacePreStep | ( | DynamicPaintSurface * | surface, |
float | timescale | ||
) | [static] |
Definition at line 4439 of file dynamicpaint.c.
References PaintPoint::alpha, blendColors(), CLAMP(), PaintPoint::color, DynamicPaintSurface::color_dry_threshold, copy_v3_v3(), DynamicPaintSurface::data, DynamicPaintSurface::diss_speed, DPAINT_PAINT_DRY, DPAINT_PAINT_WET, DynamicPaintSurface::dry_speed, PaintPoint::e_alpha, PaintPoint::e_color, 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, PaintSurfaceData::total_points, DynamicPaintSurface::type, PaintSurfaceData::type_data, VALUE_DISSOLVE, and PaintPoint::wetness.
Referenced by dynamicPaint_doStep().
static void dynamicPaint_updateBrushMaterials | ( | Object * | brushOb, |
Material * | ui_mat, | ||
Scene * | scene, | ||
BrushMaterials * | bMats | ||
) | [static] |
Definition at line 2678 of file dynamicpaint.c.
References copy_m4_m4(), give_current_material(), give_totcolp(), i, Object::imat, Object::imat_ren, invert_m4_m4(), Object::mat, BrushMaterials::mat, MEM_callocN(), NULL, BrushMaterials::ob_mats, Object::obmat, RE_init_sample_material(), BrushMaterials::tot, and Object::totcol.
Referenced by dynamicPaint_doStep().
static void dynamicPaint_updatePointData | ( | DynamicPaintSurface * | surface, |
unsigned int | index, | ||
DynamicPaintBrushSettings * | brush, | ||
float | paint[3], | ||
float | influence, | ||
float | depth, | ||
float | vel_factor, | ||
float | timescale | ||
) | [static] |
Definition at line 2935 of file dynamicpaint.c.
References DynamicPaintBrushSettings::alpha, PaintSurfaceData::bData, PaintBakeData::brush_velocity, CLAMP(), DynamicPaintSurface::data, DynamicPaintSurface::depth_clamp, do_colorband(), dynamicPaint_mixPaintColors(), dynamicPaint_mixWaveHeight(), DynamicPaintBrushSettings::flags, DynamicPaintSurface::flags, if(), DynamicPaintSurface::influence_scale, 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, DynamicPaintSurface::type, PaintSurfaceData::type_data, DynamicPaintBrushSettings::vel_ramp, DynamicPaintBrushSettings::wave_clamp, and DynamicPaintBrushSettings::wetness.
Referenced by dynamicPaint_paintMesh(), dynamicPaint_paintParticles(), and dynamicPaint_paintSinglePoint().
void dynamicPaintSurface_setUniqueName | ( | DynamicPaintSurface * | surface, |
const char * | basename | ||
) |
Definition at line 347 of file dynamicpaint.c.
References BLI_strncpy(), BLI_uniquename_cb(), DynamicPaintSurface::name, and surface_duplicateNameExists().
Referenced by dynamicPaint_createNewSurface().
void dynamicPaintSurface_updateType | ( | struct DynamicPaintSurface * | surface | ) |
Definition at line 356 of file dynamicpaint.c.
References DynamicPaintSurface::canvas, DynamicPaintSurface::depth_clamp, dynamicPaint_resetPreview(), dynamicPaint_setPreview(), dynamicPaint_surfaceHasColorPreview(), 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, surface_setUniqueOutputName(), and DynamicPaintSurface::type.
Referenced by dynamicPaint_createNewSurface().
static void free_bakeData | ( | PaintSurfaceData * | data | ) | [static] |
Definition at line 858 of file dynamicpaint.c.
References PaintSurfaceData::bData, PaintBakeData::bNeighs, PaintBakeData::bNormal, 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 void freeGrid | ( | PaintSurfaceData * | data | ) | [static] |
Definition at line 643 of file dynamicpaint.c.
References PaintSurfaceData::bData, VolumeGrid::bounds, PaintBakeData::grid, MEM_freeN(), NULL, VolumeGrid::s_num, VolumeGrid::s_pos, and VolumeGrid::t_index.
Referenced by free_bakeData(), and surfaceGenerateGrid().
struct DynamicPaintSurface* get_activeSurface | ( | DynamicPaintCanvasSettings * | canvas | ) | [read] |
Definition at line 246 of file dynamicpaint.c.
References DynamicPaintCanvasSettings::active_sur, ListBase::first, i, DynamicPaintSurface::next, NULL, and DynamicPaintCanvasSettings::surfaces.
Referenced by dynamicPaint_initBake(), and output_toggle_exec().
float getSurfaceDimension | ( | PaintSurfaceData * | sData | ) |
Definition at line 637 of file dynamicpaint.c.
References PaintSurfaceData::bData, Bounds3D::max, MAX3(), PaintBakeData::mesh_bounds, and Bounds3D::min.
Referenced by dynamicPaint_doEffectStep(), and dynamicPaint_prepareEffectStep().
static void mesh_faces_nearest_point_dp | ( | void * | userdata, |
int | index, | ||
const float * | co, | ||
BVHTreeNearest * | nearest | ||
) | [static] |
Definition at line 2789 of file dynamicpaint.c.
References MVert::co, BVHTreeNearest::co, copy_v3_v3(), data, BVHTreeNearest::dist, BVHTreeFromMesh::face, BVHTreeNearest::index, nearest_point_in_tri_surface(), BVHTreeNearest::no, NULL, MFace::v1, MFace::v2, MFace::v3, MFace::v4, and BVHTreeFromMesh::vert.
Referenced by dynamicPaint_paintMesh().
static void mesh_faces_spherecast_dp | ( | void * | userdata, |
int | index, | ||
const BVHTreeRay * | ray, | ||
BVHTreeRayHit * | hit | ||
) | [static] |
Definition at line 2751 of file dynamicpaint.c.
References bvhtree_ray_tri_intersection(), MVert::co, data, BVHTreeRayHit::dist, BVHTreeFromMesh::face, BVHTreeRayHit::index, BVHTreeRayHit::no, NULL, MFace::v1, MFace::v2, MFace::v3, MFace::v4, and BVHTreeFromMesh::vert.
Referenced by dynamicPaint_paintMesh().
static int meshBrush_boundsIntersect | ( | Bounds3D * | b1, |
Bounds3D * | b2, | ||
DynamicPaintBrushSettings * | brush, | ||
float | brush_radius | ||
) | [static] |
Definition at line 3024 of file dynamicpaint.c.
References boundsIntersect(), boundsIntersectDist(), DynamicPaintBrushSettings::collision, MOD_DPAINT_COL_DIST, MOD_DPAINT_COL_VOLDIST, and MOD_DPAINT_COL_VOLUME.
Referenced by dynamicPaint_paintMesh().
static float mixColors | ( | float | a_color[3], |
float | a_weight, | ||
float | b_color[3], | ||
float | b_weight, | ||
float | ratio | ||
) | [static] |
Definition at line 427 of file dynamicpaint.c.
References copy_v3_v3(), and interp_v3_v3v3().
Referenced by dynamicPaint_doEffectStep(), and dynamicPaint_doSmudge().
static void object_cacheIgnoreClear | ( | Object * | ob, |
int | state | ||
) | [static] |
Definition at line 454 of file dynamicpaint.c.
References BKE_ptcache_ids_from_object(), BLI_freelistN(), PTCacheID::cache, ListBase::first, PointCache::flag, PTCacheID::next, NULL, and PTCACHE_IGNORE_CLEAR.
Referenced by subframe_updateObject().
static void scene_setSubframe | ( | Scene * | scene, |
float | subframe | ||
) | [static] |
Definition at line 523 of file dynamicpaint.c.
References RenderData::cfra, Scene::r, and RenderData::subframe.
Referenced by dynamicPaint_doStep().
static int setError | ( | DynamicPaintCanvasSettings * | canvas, |
const char * | string | ||
) | [static] |
Definition at line 212 of file dynamicpaint.c.
References BLI_strncpy(), and DynamicPaintCanvasSettings::error.
Referenced by dynamicPaint_allocateSurfaceType(), dynamicPaint_createUVSurface(), dynamicPaint_doStep(), dynamicPaint_generateBakeData(), dynamicPaint_initAdjacencyData(), dynamicPaint_outputSurfaceImage(), and surfaceGenerateGrid().
Definition at line 472 of file dynamicpaint.c.
References Object::adt, Curve::adt, ADT_RECALC_ANIM, BKE_animsys_evaluate_animdata(), DynamicPaintModifierData::canvas, constraint_get_typeinfo(), Object::constraints, Object::data, eModifierType_DynamicPaint, ListBase::first, bConstraintTypeInfo::flush_constraint_targets, bConstraintTypeInfo::get_constraint_targets, Object::id, Curve::id, modifiers_findByType(), bConstraint::next, bConstraintTarget::next, NULL, OB_CURVE, OB_RECALC_ALL, object_cacheIgnoreClear(), object_handle_update(), Object::parent, Object::recalc, bConstraintTarget::tar, Object::track, Object::type, UPDATE_MESH, UPDATE_PARENTS, and where_is_object_time().
Referenced by dynamicPaint_brushMeshCalculateVelocity(), dynamicPaint_brushObjectCalculateVelocity(), and dynamicPaint_doStep().
void surface_determineForceTargetPoints | ( | PaintSurfaceData * | sData, |
int | index, | ||
float | force[3], | ||
float | closest_d[2], | ||
int | closest_id[2] | ||
) |
Definition at line 3934 of file dynamicpaint.c.
References acosf, PaintSurfaceData::adj_data, PaintSurfaceData::bData, PaintBakeData::bNeighs, CLAMP(), cross_v3_v3v3(), dot_v3v3(), fabs(), i, madd_v3_v3v3fl(), PaintAdjData::n_index, PaintAdjData::n_num, and normalize_v3().
Referenced by dynamicPaint_doEffectStep(), and dynamicPaint_doSmudge().
static int surface_duplicateNameExists | ( | void * | arg, |
const char * | name | ||
) | [static] |
Definition at line 336 of file dynamicpaint.c.
References DynamicPaintSurface::canvas, ListBase::first, DynamicPaintSurface::name, DynamicPaintSurface::next, and DynamicPaintCanvasSettings::surfaces.
Referenced by dynamicPaintSurface_setUniqueName().
static int surface_duplicateOutputExists | ( | void * | arg, |
const char * | name | ||
) | [static] |
Definition at line 310 of file dynamicpaint.c.
References DynamicPaintSurface::canvas, ListBase::first, DynamicPaintSurface::format, DynamicPaintSurface::next, DynamicPaintSurface::output_name, DynamicPaintSurface::output_name2, DynamicPaintCanvasSettings::surfaces, and DynamicPaintSurface::type.
Referenced by surface_setUniqueOutputName().
void surface_freeUnusedData | ( | DynamicPaintSurface * | surface | ) |
Definition at line 878 of file dynamicpaint.c.
References DynamicPaintSurface::data, PointCache::flag, DynamicPaintSurface::flags, free_bakeData(), MOD_DPAINT_ACTIVE, DynamicPaintSurface::pointcache, and PTCACHE_BAKED.
Referenced by dynamicPaint_frameUpdate().
static int surface_getBrushFlags | ( | DynamicPaintSurface * | surface, |
Scene * | scene | ||
) | [static] |
Definition at line 530 of file dynamicpaint.c.
References Scene::base, DynamicPaintModifierData::brush, DynamicPaintSurface::brush_group, BRUSH_USES_VELOCITY, eModifierMode_Realtime, eModifierMode_Render, eModifierType_DynamicPaint, ListBase::first, DynamicPaintSurface::flags, DynamicPaintBrushSettings::flags, Group::gobject, MOD_DPAINT_USES_VELOCITY, ModifierData::mode, modifiers_findByType(), GroupObject::next, Base::next, NULL, GroupObject::ob, and Base::object.
Referenced by surface_needsVelocityData().
static int surface_needsAccelerationData | ( | DynamicPaintSurface * | surface | ) | [static] |
Definition at line 4566 of file dynamicpaint.c.
References DynamicPaintSurface::effect, and MOD_DPAINT_EFFECT_DO_DRIP.
Referenced by dynamicPaint_generateBakeData().
static int surface_needsVelocityData | ( | DynamicPaintSurface * | surface, |
Scene * | scene | ||
) | [static] |
Definition at line 4555 of file dynamicpaint.c.
References BRUSH_USES_VELOCITY, DynamicPaintSurface::effect, MOD_DPAINT_EFFECT_DO_DRIP, and surface_getBrushFlags().
Referenced by dynamicPaint_generateBakeData().
static void surface_setUniqueOutputName | ( | DynamicPaintSurface * | surface, |
char * | basename, | ||
int | output | ||
) | [static] |
Definition at line 325 of file dynamicpaint.c.
References BLI_strncpy(), BLI_uniquename_cb(), DynamicPaintSurface::name, DynamicPaintSurface::output_name, DynamicPaintSurface::output_name2, and surface_duplicateOutputExists().
Referenced by dynamicPaintSurface_updateType().
static int surface_totalSamples | ( | DynamicPaintSurface * | surface | ) | [static] |
Definition at line 395 of file dynamicpaint.c.
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 int surface_usesAdjData | ( | DynamicPaintSurface * | surface | ) | [static] |
Definition at line 1211 of file dynamicpaint.c.
References DynamicPaintSurface::flags, DynamicPaintSurface::format, MOD_DPAINT_ANTIALIAS, MOD_DPAINT_SURFACE_F_VERTEX, and surface_usesAdjDistance().
Referenced by dynamicPaint_initAdjacencyData().
static int surface_usesAdjDistance | ( | DynamicPaintSurface * | surface | ) | [static] |
Definition at line 1204 of file dynamicpaint.c.
References DynamicPaintSurface::effect, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WAVE, and DynamicPaintSurface::type.
Referenced by dynamicPaint_prepareNeighbourData(), and surface_usesAdjData().
static void surfaceGenerateGrid | ( | struct DynamicPaintSurface * | surface | ) | [static] |
Definition at line 657 of file dynamicpaint.c.
References PaintSurfaceData::bData, boundInsert(), VolumeGrid::bounds, DynamicPaintSurface::canvas, CLAMP(), co, copy_v3_v3(), DynamicPaintSurface::data, VolumeGrid::dim, error(), freeGrid(), PaintBakeData::grid, VolumeGrid::grid_bounds, i, Bounds3D::max, MAX3(), MEM_callocN(), MEM_freeN(), MEM_reallocN(), Bounds3D::min, NULL, pow(), PaintBakeData::realCoord, VolumeGrid::s_num, VolumeGrid::s_pos, PaintBakeData::s_pos, setError(), sub_v3_v3v3(), VolumeGrid::t_index, PaintSurfaceData::total_points, Vec3f::v, and Bounds3D::valid.
Referenced by dynamicPaint_generateBakeData().
float gaussianFactors[5] [static] |
{ 0.996849f, 0.596145f, 0.596145f, 0.596145f, 0.524141f}
BEGIN GPL LICENSE BLOCK *****
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Contributor(s): Miika Hämäläinen
***** END GPL LICENSE BLOCK *****
Definition at line 80 of file dynamicpaint.c.
Referenced by dynamicPaint_paintMesh().
float gaussianTotal = 3.309425f [static] |
Definition at line 85 of file dynamicpaint.c.
Referenced by dynamicPaint_paintMesh().
int neighX[8] = {1,1,0,-1,-1,-1, 0, 1} [static] |
Definition at line 88 of file dynamicpaint.c.
Referenced by dynamicPaint_findNeighbourPixel().
int neighY[8] = {0,1,1, 1, 0,-1,-1,-1} [static] |
Definition at line 89 of file dynamicpaint.c.
Referenced by dynamicPaint_findNeighbourPixel().