Blender V2.61 - r43446
|
Go to the source code of this file.
#define DPAINT_PAINT_DRY 0 |
Definition at line 81 of file BKE_dynamicpaint.h.
Referenced by dynamicPaint_surfacePreStep().
#define DPAINT_PAINT_NEW 2 |
Definition at line 83 of file BKE_dynamicpaint.h.
Referenced by dynamicPaint_mixPaintColors().
#define DPAINT_PAINT_NONE -1 |
Definition at line 80 of file BKE_dynamicpaint.h.
#define DPAINT_PAINT_WET 1 |
Definition at line 82 of file BKE_dynamicpaint.h.
Referenced by dynamicPaint_surfacePreStep().
#define DPAINT_WAVE_ISECT_CHANGED -1 |
Definition at line 86 of file BKE_dynamicpaint.h.
Referenced by dynamicPaint_mixWaveHeight().
#define DPAINT_WAVE_NONE 0 |
Definition at line 87 of file BKE_dynamicpaint.h.
Referenced by dynamicPaint_doWaveStep().
#define DPAINT_WAVE_OBSTACLE 1 |
Definition at line 88 of file BKE_dynamicpaint.h.
Referenced by dynamicPaint_mixWaveHeight().
#define DPAINT_WAVE_REFLECT_ONLY 2 |
Definition at line 89 of file BKE_dynamicpaint.h.
Referenced by dynamicPaint_mixWaveHeight().
typedef struct PaintPoint PaintPoint |
typedef struct PaintSurfaceData PaintSurfaceData |
typedef struct PaintWavePoint PaintWavePoint |
void dynamicPaint_cacheUpdateFrames | ( | struct 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 | ( | struct DynamicPaintSurface * | surface, |
struct Scene * | scene, | ||
struct 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().
void dynamicPaint_clearSurface | ( | struct 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 | ( | struct DynamicPaintCanvasSettings * | canvas, |
struct 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 | ( | struct 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().
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().
void dynamicPaint_freeCanvas | ( | struct 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 | ( | struct 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 | ( | struct 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().
void dynamicPaint_Modifier_copy | ( | struct DynamicPaintModifierData * | pmd, |
struct DynamicPaintModifierData * | tsmd | ||
) |
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 | ( | struct DynamicPaintModifierData * | pmd, |
struct Scene * | scene, | ||
struct Object * | ob, | ||
struct 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, |
struct 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 | ( | struct 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().
void dynamicPaint_resetPreview | ( | struct 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 | ( | struct 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().
int dynamicPaint_surfaceHasColorPreview | ( | struct 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().
void dynamicPaintSurface_setUniqueName | ( | struct 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().
struct DynamicPaintSurface* get_activeSurface | ( | struct 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().