|
Blender V4.5
|
#include <algorithm>#include <cmath>#include <cstdlib>#include <cstring>#include <optional>#include "MEM_guardedalloc.h"#include "DNA_defaults.h"#include "DNA_cloth_types.h"#include "DNA_collection_types.h"#include "DNA_curve_types.h"#include "DNA_dynamicpaint_types.h"#include "DNA_fluid_types.h"#include "DNA_key_types.h"#include "DNA_material_types.h"#include "DNA_mesh_types.h"#include "DNA_meshdata_types.h"#include "DNA_object_force_types.h"#include "DNA_particle_types.h"#include "DNA_scene_types.h"#include "DNA_texture_types.h"#include "BLI_kdopbvh.hh"#include "BLI_kdtree.h"#include "BLI_linklist.h"#include "BLI_listbase.h"#include "BLI_math_base_safe.h"#include "BLI_math_geom.h"#include "BLI_math_matrix.h"#include "BLI_math_rotation.h"#include "BLI_math_vector.h"#include "BLI_rand.h"#include "BLI_string.h"#include "BLI_task.h"#include "BLI_threads.h"#include "BLI_utildefines.h"#include "BLT_translation.hh"#include "BKE_anim_path.h"#include "BKE_boids.h"#include "BKE_cloth.hh"#include "BKE_collection.hh"#include "BKE_colortools.hh"#include "BKE_customdata.hh"#include "BKE_deform.hh"#include "BKE_displist.h"#include "BKE_effect.h"#include "BKE_idtype.hh"#include "BKE_key.hh"#include "BKE_lattice.hh"#include "BKE_layer.hh"#include "BKE_lib_id.hh"#include "BKE_lib_query.hh"#include "BKE_material.hh"#include "BKE_mesh.hh"#include "BKE_mesh_legacy_convert.hh"#include "BKE_modifier.hh"#include "BKE_object.hh"#include "BKE_particle.h"#include "BKE_pointcache.h"#include "BKE_scene.hh"#include "BKE_texture.h"#include "DEG_depsgraph.hh"#include "DEG_depsgraph_build.hh"#include "DEG_depsgraph_query.hh"#include "RE_texture.h"#include "BLO_read_write.hh"#include "particle_private.h"Go to the source code of this file.
Classes | |
| struct | ParticleInterpolationData |
| struct | CacheEditrPathsIterData |
Macros | |
| #define | DNA_DEPRECATED_ALLOW |
| #define | PATH_CACHE_BUF_SIZE 1024 |
| #define | SET_PARTICLE_TEXTURE(type, pvalue, texfac) |
| #define | CLAMP_PARTICLE_TEXTURE_POS(type, pvalue) |
| #define | CLAMP_WARP_PARTICLE_TEXTURE_POS(type, pvalue) |
| #define | CLAMP_PARTICLE_TEXTURE_POSNEG(type, pvalue) |
Typedefs | |
| using | float3 |
Functions | |
| static void | fluid_free_settings (SPHFluidSettings *fluid) |
| static void | particle_settings_init (ID *id) |
| static void | particle_settings_copy_data (Main *, std::optional< Library * >, ID *id_dst, const ID *id_src, const int) |
| static void | particle_settings_free_data (ID *id) |
| static void | particle_settings_foreach_id (ID *id, LibraryForeachIDData *data) |
| static void | write_boid_state (BlendWriter *writer, BoidState *state) |
| static void | particle_settings_blend_write (BlendWriter *writer, ID *id, const void *id_address) |
| void | BKE_particle_partdeflect_blend_read_data (BlendDataReader *, PartDeflect *) |
| static size_t | boid_rule_struct_size (const eBoidRuleType type) |
| static void | particle_settings_blend_read_data (BlendDataReader *reader, ID *id) |
| static void | particle_settings_blend_read_after_liblink (BlendLibReader *, ID *id) |
| void | BKE_particle_init_rng () |
| static void | get_child_modifier_parameters (ParticleSettings *part, ParticleThreadContext *ctx, ChildParticle *cpa, short cpa_from, int cpa_num, float *cpa_fuv, float *orco, ParticleTexture *ptex) |
| static void | get_cpa_texture (Mesh *mesh, ParticleSystem *psys, ParticleSettings *part, ParticleData *par, int child_index, int face_index, const float fw[4], float *orco, ParticleTexture *ptex, int event, float cfra) |
| int | count_particles (ParticleSystem *psys) |
| int | count_particles_mod (ParticleSystem *psys, int totgr, int cur) |
| static ParticleCacheKey * | pcache_key_segment_endpoint_safe (ParticleCacheKey *key) |
| static ParticleCacheKey ** | psys_alloc_path_cache_buffers (ListBase *bufs, int tot, int totkeys) |
| static void | psys_free_path_cache_buffers (ParticleCacheKey **cache, ListBase *bufs) |
| ParticleSystem * | psys_get_current (Object *ob) |
| short | psys_get_current_num (Object *ob) |
| void | psys_set_current_num (Object *ob, int index) |
| void | psys_sim_data_init (ParticleSimulationData *sim) |
| void | psys_sim_data_free (ParticleSimulationData *sim) |
| void | psys_disable_all (Object *ob) |
| void | psys_enable_all (Object *ob) |
| ParticleSystem * | psys_orig_get (ParticleSystem *psys) |
| ParticleSystem * | psys_eval_get (Depsgraph *depsgraph, Object *object, ParticleSystem *psys) |
| static PTCacheEdit * | psys_orig_edit_get (ParticleSystem *psys) |
| bool | psys_in_edit_mode (Depsgraph *depsgraph, const ParticleSystem *psys) |
| bool | psys_check_enabled (Object *ob, ParticleSystem *psys, const bool use_render_params) |
| bool | psys_check_edited (ParticleSystem *psys) |
| void | psys_find_group_weights (ParticleSettings *part) |
| void | psys_check_group_weights (ParticleSettings *part) |
| int | psys_uses_gravity (ParticleSimulationData *sim) |
| void | free_hair (Object *object, ParticleSystem *psys, int dynamics) |
| void | free_keyed_keys (ParticleSystem *psys) |
| static void | free_child_path_cache (ParticleSystem *psys) |
| void | psys_free_path_cache (ParticleSystem *psys, PTCacheEdit *edit) |
| void | psys_free_children (ParticleSystem *psys) |
| void | psys_free_particles (ParticleSystem *psys) |
| void | psys_free_pdd (ParticleSystem *psys) |
| void | psys_free (Object *ob, ParticleSystem *psys) |
| void | psys_copy_particles (ParticleSystem *psys_dst, ParticleSystem *psys_src) |
| static float | interpolate_particle_value (float v1, float v2, float v3, float v4, const float w[4], int four) |
| void | psys_interpolate_particle (short type, ParticleKey keys[4], float dt, ParticleKey *result, bool velocity) |
| static void | get_pointcache_keys_for_time (Object *, PointCache *cache, PTCacheMem **cur, int index, float t, ParticleKey *key1, ParticleKey *key2) |
| static int | get_pointcache_times_for_particle (PointCache *cache, int index, float *r_start, float *r_dietime) |
| float | psys_get_dietime_from_cache (PointCache *cache, int index) |
| static void | init_particle_interpolation (Object *ob, ParticleSystem *psys, ParticleData *pa, ParticleInterpolationData *pind) |
| static void | edit_to_particle (ParticleKey *key, PTCacheEditKey *ekey) |
| static void | hair_to_particle (ParticleKey *key, HairKey *hkey) |
| static void | mvert_to_particle (ParticleKey *key, float3 *position, HairKey *hkey) |
| static void | do_particle_interpolation (ParticleSystem *psys, int p, ParticleData *pa, float t, ParticleInterpolationData *pind, ParticleKey *result) |
| static void | interpolate_pathcache (ParticleCacheKey *first, float t, ParticleCacheKey *result) |
| void | psys_interpolate_face (Mesh *mesh, const float(*vert_positions)[3], const float(*vert_normals)[3], const MFace *mface, MTFace *tface, const float(*orcodata)[3], float w[4], float vec[3], float nor[3], float utan[3], float vtan[3], float orco[3]) |
| void | psys_interpolate_uvs (const MTFace *tface, int quad, const float w[4], float uvco[2]) |
| void | psys_interpolate_mcol (const MCol *mcol, int quad, const float w[4], MCol *mc) |
| static float | psys_interpolate_value_from_verts (Mesh *mesh, short from, int index, const float fw[4], const float *values) |
| static void | psys_w_to_origspace (const float w[4], float uv[2]) |
| static void | psys_origspace_to_w (OrigSpaceFace *osface, int quad, const float w[4], float neww[4]) |
| int | psys_particle_dm_face_lookup (Mesh *mesh_final, Mesh *mesh_original, int findex_orig, const float fw[4], LinkNode **poly_nodes) |
| static int | psys_map_index_on_dm (Mesh *mesh, int from, int index, int index_dmcache, const float fw[4], float, int *mapindex, float mapfw[4]) |
| void | psys_particle_on_dm (Mesh *mesh_final, int from, int index, int index_dmcache, const float fw[4], float foffset, float vec[3], float nor[3], float utan[3], float vtan[3], float orco[3]) |
| float | psys_particle_value_from_verts (Mesh *mesh, short from, ParticleData *pa, float *values) |
| ParticleSystemModifierData * | psys_get_modifier (Object *ob, ParticleSystem *psys) |
| static void | psys_particle_on_shape (int, int, float *, float vec[3], float nor[3], float utan[3], float vtan[3], float orco[3]) |
| void | psys_emitter_customdata_mask (ParticleSystem *psys, CustomData_MeshMasks *r_cddata_masks) |
| void | psys_particle_on_emitter (ParticleSystemModifierData *psmd, int from, int index, int index_dmcache, float fuv[4], float foffset, float vec[3], float nor[3], float utan[3], float vtan[3], float orco[3]) |
| void | precalc_guides (ParticleSimulationData *sim, ListBase *effectors) |
| bool | do_guides (Depsgraph *depsgraph, ParticleSettings *part, ListBase *effectors, ParticleKey *state, int index, float time) |
| static void | do_path_effectors (ParticleSimulationData *sim, int i, ParticleCacheKey *ca, int k, int steps, float *, float effector, float, float, float *length, float *vec) |
| static void | offset_child (ChildParticle *cpa, ParticleKey *par, float *par_rot, ParticleKey *child, float flat, float radius) |
| float * | psys_cache_vgroup (Mesh *mesh, ParticleSystem *psys, int vgroup) |
| void | psys_find_parents (ParticleSimulationData *sim, const bool use_render_params) |
| static bool | psys_thread_context_init_path (ParticleThreadContext *ctx, ParticleSimulationData *sim, Scene *scene, float cfra, const bool editupdate, const bool use_render_params) |
| static void | psys_task_init_path (ParticleTask *task, ParticleSimulationData *sim) |
| static void | psys_thread_create_path (ParticleTask *task, ChildParticle *cpa, ParticleCacheKey *child_keys, int i) |
| static void | exec_child_path_cache (TaskPool *__restrict, void *taskdata) |
| void | psys_cache_child_paths (ParticleSimulationData *sim, float cfra, const bool editupdate, const bool use_render_params) |
| static void | cache_key_incremental_rotation (ParticleCacheKey *key0, ParticleCacheKey *key1, ParticleCacheKey *key2, float *prev_tangent, int i) |
| void | psys_cache_paths (ParticleSimulationData *sim, float cfra, const bool use_render_params) |
| static void | psys_cache_edit_paths_iter (void *__restrict iter_data_v, const int iter, const TaskParallelTLS *__restrict) |
| void | psys_cache_edit_paths (Depsgraph *depsgraph, Scene *scene, Object *ob, PTCacheEdit *edit, float cfra, const bool use_render_params) |
| void | copy_particle_key (ParticleKey *to, ParticleKey *from, int time) |
| void | psys_get_from_key (ParticleKey *key, float loc[3], float vel[3], float rot[4], float *time) |
| static void | triatomat (float *v1, float *v2, float *v3, const float(*uv)[2], float mat[4][4]) |
| static void | psys_face_mat (Object *ob, Mesh *mesh, ParticleData *pa, float mat[4][4], int orco) |
| void | psys_mat_hair_to_object (Object *, Mesh *mesh, short from, ParticleData *pa, float hairmat[4][4]) |
| void | psys_mat_hair_to_orco (Object *ob, Mesh *mesh, short from, ParticleData *pa, float hairmat[4][4]) |
| void | psys_vec_rot_to_face (Mesh *mesh, ParticleData *pa, float vec[3]) |
| void | psys_mat_hair_to_global (Object *ob, Mesh *mesh, short from, ParticleData *pa, float hairmat[4][4]) |
| static ModifierData * | object_add_or_copy_particle_system (Main *bmain, const Scene *scene, Object *ob, const char *name, const ParticleSystem *psys_orig) |
| ModifierData * | object_add_particle_system (Main *bmain, const Scene *scene, Object *ob, const char *name) |
| ModifierData * | object_copy_particle_system (Main *bmain, const Scene *scene, Object *ob, const ParticleSystem *psys_orig) |
| void | object_remove_particle_system (Main *bmain, Scene *, Object *ob, ParticleSystem *psys) |
| ParticleSettings * | BKE_particlesettings_add (Main *bmain, const char *name) |
| void | BKE_particlesettings_clump_curve_init (ParticleSettings *part) |
| void | BKE_particlesettings_rough_curve_init (ParticleSettings *part) |
| void | BKE_particlesettings_twist_curve_init (ParticleSettings *part) |
| static int | get_particle_uv (Mesh *mesh, ParticleData *pa, int index, const float fuv[4], const char *name, float *texco, bool from_vert) |
| void | psys_get_texture (ParticleSimulationData *sim, ParticleData *pa, ParticleTexture *ptex, int event, float cfra) |
| float | psys_get_timestep (ParticleSimulationData *sim) |
| float | psys_get_child_time (ParticleSystem *psys, ChildParticle *cpa, float cfra, float *birthtime, float *dietime) |
| float | psys_get_child_size (ParticleSystem *psys, ChildParticle *cpa, float, float *) |
| void | psys_get_particle_on_path (ParticleSimulationData *sim, int p, ParticleKey *state, const bool vel) |
| bool | psys_get_particle_state (ParticleSimulationData *sim, int p, ParticleKey *state, const bool always) |
| void | psys_get_dupli_texture (ParticleSystem *psys, ParticleSettings *part, ParticleSystemModifierData *psmd, ParticleData *pa, ChildParticle *cpa, float uv[2], float orco[3]) |
| void | psys_get_dupli_path_transform (ParticleSimulationData *sim, ParticleData *pa, ChildParticle *cpa, ParticleCacheKey *cache, float mat[4][4], float *scale) |
| void | psys_apply_hair_lattice (Depsgraph *depsgraph, Scene *scene, Object *ob, ParticleSystem *psys) |
| void | BKE_particle_batch_cache_dirty_tag (ParticleSystem *psys, int mode) |
| void | BKE_particle_batch_cache_free (ParticleSystem *psys) |
| void | BKE_particle_system_blend_write (BlendWriter *writer, ListBase *particles) |
| void | BKE_particle_system_blend_read_data (BlendDataReader *reader, ListBase *particles) |
| void | BKE_particle_system_blend_read_after_liblink (BlendLibReader *, Object *ob, ID *, ListBase *particles) |
Variables | |
| IDTypeInfo | IDType_ID_PA |
| uint | PSYS_FRAND_SEED_OFFSET [PSYS_FRAND_COUNT] |
| uint | PSYS_FRAND_SEED_MULTIPLIER [PSYS_FRAND_COUNT] |
| float | PSYS_FRAND_BASE [PSYS_FRAND_COUNT] |
| void(*) | BKE_particle_batch_cache_dirty_tag_cb (ParticleSystem *psys, int mode) = nullptr |
| void(*) | BKE_particle_batch_cache_free_cb (ParticleSystem *psys) = nullptr |
| #define CLAMP_PARTICLE_TEXTURE_POS | ( | type, | |
| pvalue ) |
Definition at line 4246 of file particle.cc.
Referenced by get_cpa_texture(), and psys_get_texture().
| #define CLAMP_PARTICLE_TEXTURE_POSNEG | ( | type, | |
| pvalue ) |
Definition at line 4261 of file particle.cc.
Referenced by psys_get_texture().
| #define CLAMP_WARP_PARTICLE_TEXTURE_POS | ( | type, | |
| pvalue ) |
Definition at line 4252 of file particle.cc.
Referenced by get_cpa_texture(), and psys_get_texture().
| #define DNA_DEPRECATED_ALLOW |
Definition at line 10 of file particle.cc.
| #define PATH_CACHE_BUF_SIZE 1024 |
Definition at line 520 of file particle.cc.
Referenced by psys_alloc_path_cache_buffers().
| #define SET_PARTICLE_TEXTURE | ( | type, | |
| pvalue, | |||
| texfac ) |
Definition at line 4240 of file particle.cc.
Referenced by get_cpa_texture(), and psys_get_texture().
| using blender::float3 |
Definition at line 619 of file BLI_math_vector_types.hh.
| void BKE_particle_batch_cache_dirty_tag | ( | ParticleSystem * | psys, |
| int | mode ) |
Definition at line 5319 of file particle.cc.
References ParticleSystem::batch_cache, BKE_particle_batch_cache_dirty_tag(), and BKE_particle_batch_cache_dirty_tag_cb.
Referenced by BKE_object_eval_eval_base_flags(), BKE_particle_batch_cache_dirty_tag(), brush_edit_apply(), clear_edited_exec(), delete_exec(), blender::ed::transform::flushTransParticles(), mirror_exec(), particle_system_update(), particle_undosys_step_decode(), and shape_cut_exec().
| void BKE_particle_batch_cache_free | ( | ParticleSystem * | psys | ) |
Definition at line 5325 of file particle.cc.
References ParticleSystem::batch_cache, BKE_particle_batch_cache_free(), and BKE_particle_batch_cache_free_cb.
Referenced by BKE_particle_batch_cache_free(), and psys_free().
| void BKE_particle_init_rng | ( | void | ) |
Definition at line 450 of file particle.cc.
References BKE_particle_init_rng(), BLI_rng_free(), BLI_rng_get_float(), BLI_rng_get_int(), BLI_rng_new_srandom(), i, PSYS_FRAND_BASE, PSYS_FRAND_COUNT, PSYS_FRAND_SEED_MULTIPLIER, and PSYS_FRAND_SEED_OFFSET.
Referenced by BKE_particle_init_rng(), and main().
| void BKE_particle_partdeflect_blend_read_data | ( | BlendDataReader * | reader, |
| PartDeflect * | pd ) |
Definition at line 318 of file particle.cc.
References BKE_particle_partdeflect_blend_read_data().
Referenced by BKE_particle_partdeflect_blend_read_data(), object_blend_read_data(), and particle_settings_blend_read_data().
| void BKE_particle_system_blend_read_after_liblink | ( | BlendLibReader * | reader, |
| Object * | ob, | ||
| ID * | id, | ||
| ListBase * | particles ) |
Definition at line 5465 of file particle.cc.
References BKE_modifier_free(), BKE_modifier_remove_from_list(), BKE_particle_system_blend_read_after_liblink(), BLI_remlink(), ParticleSystem::clmd, ModifierData::error, ListBase::first, ListBase::last, LISTBASE_FOREACH_MUTABLE, MEM_freeN(), ClothModifierData::modifier, ParticleSystem::part, ClothModifierData::point_cache, ParticleSystem::pointcache, psys_get_modifier(), and ClothModifierData::ptcaches.
Referenced by BKE_particle_system_blend_read_after_liblink(), and object_blend_read_after_liblink().
| void BKE_particle_system_blend_read_data | ( | BlendDataReader * | reader, |
| ListBase * | particles ) |
Definition at line 5377 of file particle.cc.
References ParticleSystem::batch_cache, BKE_particle_system_blend_read_data(), BKE_ptcache_blend_read_data(), BLI_listbase_clear(), BLO_read_struct, BLO_read_struct_array, BLO_read_struct_list, ParticleData::boid, ParticleSystem::bvhtree, ParticleSystem::child, ParticleSystem::childcache, ParticleSystem::childcachebufs, ParticleSystem::clmd, ClothModifierData::clothObject, ClothModifierData::coll_parms, ParticleSystem::edit, ClothSimSettings::effector_weights, ParticleSystem::effectors, ParticleSystem::flag, ParticleSystem::fluid_springs, ParticleSystem::free_edit, BoidParticle::ground, ParticleData::hair, ParticleSystem::hair_in_mesh, ParticleSystem::hair_out_mesh, ClothModifierData::hairdata, ParticleData::keys, LISTBASE_FOREACH, ParticleSystem::orig_psys, ParticleSystem::particles, ParticleSystem::pathcache, ParticleSystem::pathcachebufs, ParticleSystem::pdd, ClothModifierData::point_cache, ParticleSystem::pointcache, ClothSimSettings::presets, PSYS_KEYED, ParticleSystem::ptcaches, ClothModifierData::sim_parms, ClothModifierData::solver_result, ParticleSystem::targets, ParticleSystem::tot_fluidsprings, ParticleSystem::totchild, ParticleData::totkey, ParticleSystem::totpart, and ParticleSystem::tree.
Referenced by BKE_particle_system_blend_read_data(), and object_blend_read_data().
| void BKE_particle_system_blend_write | ( | BlendWriter * | writer, |
| ListBase * | particles ) |
Definition at line 5332 of file particle.cc.
References BKE_particle_system_blend_write(), BKE_ptcache_blend_write(), BLO_write_struct, BLO_write_struct_array, ParticleData::boid, ParticleSystem::child, ParticleSystem::clmd, ClothModifierData::coll_parms, SPHFluidSettings::flag, ParticleSettings::fluid, ParticleSystem::fluid_springs, ParticleData::hair, LISTBASE_FOREACH, ParticleSystem::part, PART_PHYS_BOIDS, PART_PHYS_FLUID, ParticleSystem::particles, ParticleSettings::phystype, ParticleSystem::ptcaches, ClothModifierData::sim_parms, SPH_VISCOELASTIC_SPRINGS, ParticleSystem::targets, ParticleSystem::tot_fluidsprings, ParticleSystem::totchild, ParticleData::totkey, and ParticleSystem::totpart.
Referenced by BKE_particle_system_blend_write(), and object_blend_write().
| ParticleSettings * BKE_particlesettings_add | ( | Main * | bmain, |
| const char * | name ) |
Definition at line 4119 of file particle.cc.
References BKE_id_new(), and BKE_particlesettings_add().
Referenced by BKE_particlesettings_add(), blo_do_versions_pre250(), new_particle_settings_exec(), object_add_or_copy_particle_system(), and object_copy_particle_system().
| void BKE_particlesettings_clump_curve_init | ( | ParticleSettings * | part | ) |
Definition at line 4128 of file particle.cc.
References BKE_curvemapping_add(), BKE_curvemapping_init(), BKE_particlesettings_clump_curve_init(), ParticleSettings::clumpcurve, CurveMapping::cm, CurveMap::curve, CurveMapPoint::x, and CurveMapPoint::y.
Referenced by BKE_particlesettings_clump_curve_init(), and psys_unique_name().
| void BKE_particlesettings_rough_curve_init | ( | ParticleSettings * | part | ) |
Definition at line 4142 of file particle.cc.
References BKE_curvemapping_add(), BKE_curvemapping_init(), BKE_particlesettings_rough_curve_init(), CurveMapping::cm, CurveMap::curve, ParticleSettings::roughcurve, CurveMapPoint::x, and CurveMapPoint::y.
Referenced by BKE_particlesettings_rough_curve_init(), and psys_unique_name().
| void BKE_particlesettings_twist_curve_init | ( | ParticleSettings * | part | ) |
Definition at line 4156 of file particle.cc.
References BKE_curvemapping_add(), BKE_curvemapping_init(), BKE_particlesettings_twist_curve_init(), CurveMapping::cm, CurveMap::curve, ParticleSettings::twistcurve, CurveMapPoint::x, and CurveMapPoint::y.
Referenced by BKE_particlesettings_twist_curve_init(), and psys_unique_name().
|
static |
Struct size for the rule type, or zero for unknown types.
Definition at line 323 of file particle.cc.
References boid_rule_struct_size(), eBoidRuleType_AverageSpeed, eBoidRuleType_Avoid, eBoidRuleType_AvoidCollision, eBoidRuleType_Fight, eBoidRuleType_Flock, eBoidRuleType_FollowLeader, eBoidRuleType_Goal, eBoidRuleType_None, and eBoidRuleType_Separate.
Referenced by boid_rule_struct_size(), and particle_settings_blend_read_data().
|
static |
Definition at line 3239 of file particle.cc.
References angle(), axis_angle_to_quat(), cache_key_incremental_rotation(), ParticleCacheKey::co, copy_v3_v3(), copy_v4_v4(), cross_v3_v3v3(), dot_v3v3(), i, mul_qt_qtqt(), normalize_v3(), ParticleCacheKey::rot, safe_acosf(), sub_v3_v3v3(), and unit_qt().
Referenced by cache_key_incremental_rotation(), psys_cache_edit_paths_iter(), and psys_cache_paths().
| void copy_particle_key | ( | ParticleKey * | to, |
| ParticleKey * | from, | ||
| int | time ) |
Definition at line 3765 of file particle.cc.
References copy_particle_key(), and ParticleKey::time.
Referenced by boid_body(), copy_particle_key(), do_particle_interpolation(), dynamics_step(), get_pointcache_keys_for_time(), integrate_particle(), psys_get_particle_on_path(), psys_get_particle_state(), psys_interpolate_mcol(), set_keyed_keys(), and sph_integrate().
| int count_particles | ( | ParticleSystem * | psys | ) |
Definition at line 481 of file particle.cc.
References count_particles(), ParticleSettings::flag, LOOP_SHOWN_PARTICLES, PARS_DEAD, PARS_UNBORN, ParticleSystem::part, PART_DIED, PART_UNBORN, and PARTICLE_P.
Referenced by count_particles().
| int count_particles_mod | ( | ParticleSystem * | psys, |
| int | totgr, | ||
| int | cur ) |
Definition at line 499 of file particle.cc.
References count_particles_mod(), ParticleSettings::flag, LOOP_SHOWN_PARTICLES, PARS_DEAD, PARS_UNBORN, ParticleSystem::part, PART_DIED, PART_UNBORN, and PARTICLE_P.
Referenced by count_particles_mod().
| bool do_guides | ( | Depsgraph * | depsgraph, |
| ParticleSettings * | part, | ||
| ListBase * | effectors, | ||
| ParticleKey * | state, | ||
| int | index, | ||
| float | time ) |
Definition at line 2367 of file particle.cc.
References add_v3_v3(), angle(), axis_angle_to_quat(), BKE_curvemapping_changed_all(), BKE_displist_calc_taper(), BKE_where_on_path(), ParticleSettings::child_flag, CLAMP, PartDeflect::clump_fac, ParticleSettings::clump_noise_size, PartDeflect::clump_pow, ParticleSettings::clumpcurve, ParticleKey::co, copy_v3_v3(), cross_v3_v3v3(), CU_PATH_RADIUS, data, do_clump(), do_guides(), do_kink(), dot_v3v3(), Curve::flag, PartDeflect::flag, PartDeflect::forcefield, PartDeflect::free_end, interp_v3_v3v3(), PartDeflect::kink, PartDeflect::kink_amp, PartDeflect::kink_axis, PartDeflect::kink_freq, PartDeflect::kink_shape, len_v3(), LISTBASE_FOREACH, madd_v3_v3fl(), mul_m4_v3(), mul_mat3_m4_v3(), mul_qt_v3(), mul_v3_fl(), normalize_v3(), PART_CHILD_USE_CLUMP_CURVE, PART_CHILD_USE_CLUMP_NOISE, PART_CHILD_USE_ROUGH_CURVE, PFIELD_GUIDE, PFIELD_GUIDE_PATH_ADD, PFIELD_GUIDE_PATH_WEIGHT, ParticleSettings::roughcurve, safe_acosf(), state, and Curve::taperobj.
Referenced by basic_integrate(), do_child_modifiers(), do_guides(), psys_cache_paths(), psys_get_particle_on_path(), and psys_unique_name().
|
static |
Definition at line 1390 of file particle.cc.
References ParticleInterpolationData::bspline, ParticleInterpolationData::cache, CLAMP, copy_particle_key(), ParticleData::dietime, do_particle_interpolation(), ParticleTarget::duration, edit_to_particle(), ParticleInterpolationData::ekey, ParticleInterpolationData::epoint, ListBase::first, ParticleSystem::flag, get_pointcache_keys_for_time(), ParticleData::hair, hair_to_particle(), ParticleInterpolationData::hkey, interp_qt_qtqt(), KEY_BSPLINE, KEY_CARDINAL, ParticleInterpolationData::keyed, PTCacheEditPoint::keys, ParticleInterpolationData::kkey, ListBase::last, ParticleInterpolationData::mesh, mul_v3_fl(), mvert_to_particle(), ParticleTarget::next, ParticleSystem::part, PART_PHYS_KEYED, ParticleSettings::phystype, ParticleInterpolationData::pm, ParticleTarget::prev, psys_interpolate_particle(), PSYS_KEYED_TIMING, result, ParticleKey::rot, ParticleSystem::targets, HairKey::time, ParticleData::time, ParticleKey::time, ParticleTarget::time, PTCacheEditKey::time, ParticleSettings::timetweak, ParticleData::totkey, PTCacheEditPoint::totkey, PTCacheEditKey::vel, and ParticleInterpolationData::vert_positions.
Referenced by do_particle_interpolation(), psys_cache_edit_paths_iter(), psys_cache_paths(), and psys_get_particle_on_path().
|
static |
Definition at line 2534 of file particle.cc.
References add_v3_v3(), BKE_effectors_apply(), ParticleCacheKey::co, ParticleKey::co, ParticleSimulationData::colliders, copy_qt_qt(), copy_v3_v3(), do_path_effectors(), ParticleSettings::eff_hair, ParticleSettings::effector_weights, ParticleSystem::effectors, ParticleSystem::flag, i, len_v3(), length(), madd_v3_v3v3fl(), mul_v3_fl(), normalize_v3(), ParticleSystem::part, ParticleSystem::particles, pd_point_from_particle(), powf, ParticleSimulationData::psys, PSYS_HAIR_DYNAMICS, ParticleKey::rot, sub_v3_v3v3(), and ParticleKey::vel.
Referenced by do_path_effectors(), psys_cache_paths(), and psys_thread_create_path().
|
static |
Definition at line 1370 of file particle.cc.
References ParticleKey::co, PTCacheEditKey::co, copy_v3_v3(), edit_to_particle(), ParticleKey::time, PTCacheEditKey::time, ParticleKey::vel, and PTCacheEditKey::vel.
Referenced by do_particle_interpolation(), and edit_to_particle().
|
static |
Definition at line 3165 of file particle.cc.
References ParticleTask::begin, BLI_assert, ParticleSystem::child, ParticleSystem::childcache, ParticleTask::ctx, exec_child_path_cache(), i, ParticleSimulationData::psys, psys_thread_create_path(), and ParticleThreadContext::sim.
Referenced by exec_child_path_cache(), and psys_cache_child_paths().
|
static |
Definition at line 871 of file particle.cc.
References fluid_free_settings(), and MEM_freeN().
Referenced by fluid_free_settings(), and particle_settings_free_data().
|
static |
Definition at line 933 of file particle.cc.
References ParticleSystem::childcache, ParticleSystem::childcachebufs, free_child_path_cache(), psys_free_path_cache_buffers(), and ParticleSystem::totchildcache.
Referenced by free_child_path_cache(), psys_cache_child_paths(), psys_free_children(), and psys_free_path_cache().
| void free_hair | ( | Object * | object, |
| ParticleSystem * | psys, | ||
| int | dynamics ) |
Definition at line 878 of file particle.cc.
References BKE_id_free(), BKE_modifier_free(), BKE_ptcache_id_clear(), BKE_ptcache_id_from_particles(), ParticleSystem::clmd, cloth_free_modifier(), ParticleSystem::flag, free_hair(), ParticleSystem::hair_in_mesh, ParticleSystem::hair_out_mesh, LOOP_PARTICLES, MEM_SAFE_FREE, PARTICLE_P, PSYS_HAIR_DONE, and PTCACHE_CLEAR_ALL.
Referenced by free_hair(), particle_system_update(), psys_changed_type(), and psys_free().
| void free_keyed_keys | ( | ParticleSystem * | psys | ) |
Definition at line 913 of file particle.cc.
References free_keyed_keys(), ParticleData::keys, LOOP_PARTICLES, MEM_freeN(), ParticleSystem::part, PART_HAIR, PARTICLE_P, ParticleSystem::particles, and ParticleSettings::type.
Referenced by free_keyed_keys(), particle_system_update(), psys_prepare_physics(), and set_keyed_keys().
|
static |
Definition at line 4562 of file particle.cc.
References ParticleSystem::cfra, ParticleSystem::child, ParticleTexture::clump, ParticleTexture::effector, ParticleTexture::exist, get_child_modifier_parameters(), get_cpa_texture(), i, ParticleTexture::kink_freq, ParticleTexture::length, ParticleThreadContext::mesh, ChildParticle::pa, PAMAP_CHILD, PAMAP_DENS, ParticleSystem::particles, ParticleSimulationData::psys, psys_frand(), psys_interpolate_value_from_verts(), ParticleTexture::rough1, ParticleTexture::rough2, ParticleTexture::roughe, ParticleThreadContext::sim, ParticleTexture::twist, ParticleThreadContext::vg_clump, ParticleThreadContext::vg_effector, ParticleThreadContext::vg_kink, ParticleThreadContext::vg_length, ParticleThreadContext::vg_rough1, ParticleThreadContext::vg_rough2, ParticleThreadContext::vg_roughe, and ParticleThreadContext::vg_twist.
Referenced by get_child_modifier_parameters(), psys_get_particle_on_path(), and psys_thread_create_path().
|
static |
Definition at line 4267 of file particle.cc.
References ATTR_FALLTHROUGH, MTex::blendtype, CLAMP_PARTICLE_TEXTURE_POS, CLAMP_WARP_PARTICLE_TEXTURE_POS, ParticleSettings::clength, ParticleSettings::clength_thres, ParticleTexture::clump, MTex::clumpfac, ParticleKey::co, copy_v3_v3(), ParticleTexture::damp, MTex::def_var, ParticleData::dietime, ParticleSettings::distr, ParticleTexture::effector, ELEM, ParticleTexture::exist, ParticleTexture::field, ParticleSettings::from, get_cpa_texture(), get_particle_uv(), ParticleTexture::gravity, ParticleTexture::ivel, ParticleTexture::kink_amp, ParticleTexture::kink_freq, MTex::kinkampfac, MTex::kinkfac, ParticleTexture::length, MTex::lengthfac, ParticleTexture::life, MTex::mapto, MAX_MTEX, ParticleSettings::mtex, mul_m4_v3(), MTex::object, MTex::padensfac, PAMAP_CLUMP, PAMAP_DENS, PAMAP_KINK_AMP, PAMAP_KINK_FREQ, PAMAP_LENGTH, PAMAP_ROUGH, PAMAP_TWIST, PART_DISTR_GRID, PART_FROM_FACE, PART_FROM_VERT, PART_FROM_VOLUME, psys_frand(), ParticleSettings::randlength, RE_texture_evaluate(), ParticleTexture::rough1, ParticleTexture::rough2, ParticleTexture::roughe, MTex::roughfac, SET_PARTICLE_TEXTURE, ParticleTexture::size, ParticleData::state, MTex::tex, MTex::texco, TEXCO_GLOB, TEXCO_OBJECT, TEXCO_ORCO, TEXCO_PARTICLE, TEXCO_UV, texture_value_blend(), ParticleData::time, ParticleTexture::time, ParticleTexture::twist, MTex::twistfac, and MTex::uvname.
Referenced by get_child_modifier_parameters(), get_cpa_texture(), and psys_find_parents().
|
static |
Definition at line 4174 of file particle.cc.
References CD_MFACE, CD_MTFACE, CustomData_get_layer(), CustomData_get_layer_for_write(), CustomData_get_layer_named(), DMCACHE_ISCHILD, DMCACHE_NOTFOUND, ELEM, Mesh::fdata_legacy, get_particle_uv(), i, ParticleData::num, ParticleData::num_dmcache, psys_interpolate_uvs(), Mesh::totface_legacy, MFace::v1, MFace::v2, MFace::v3, MFace::v4, and Mesh::verts_num.
Referenced by get_cpa_texture(), get_particle_uv(), and psys_get_texture().
|
static |
Assumes pointcache->mem_cache exists, so for disk cached particles call psys_make_temp_pointcache() before use. It uses ParticleInterpolationData.pm to store the current memory cache frame so it's thread safe.
Definition at line 1228 of file particle.cc.
References BKE_ptcache_make_particle_key(), BKE_ptcache_mem_index_find(), copy_particle_key(), PTCacheMem::data, ListBase::first, PTCacheMem::frame, get_pointcache_keys_for_time(), PointCache::mem_cache, PTCacheMem::next, and PTCacheMem::prev.
Referenced by do_particle_interpolation(), get_pointcache_keys_for_time(), and init_particle_interpolation().
|
static |
Definition at line 1279 of file particle.cc.
References BKE_ptcache_mem_index_find(), get_pointcache_times_for_particle(), LISTBASE_FOREACH, LISTBASE_FOREACH_BACKWARD, PointCache::mem_cache, and ret.
Referenced by get_pointcache_times_for_particle(), and init_particle_interpolation().
|
static |
Definition at line 1378 of file particle.cc.
References HairKey::co, ParticleKey::co, copy_v3_v3(), hair_to_particle(), HairKey::time, and ParticleKey::time.
Referenced by do_particle_interpolation(), and hair_to_particle().
|
static |
Definition at line 1321 of file particle.cc.
References ParticleInterpolationData::birthtime, ParticleInterpolationData::cache, ParticleData::dietime, ParticleInterpolationData::dietime, ParticleInterpolationData::ekey, PointCache::endframe, ParticleInterpolationData::epoint, get_pointcache_keys_for_time(), get_pointcache_times_for_particle(), ParticleData::hair, ParticleData::hair_index, ParticleInterpolationData::hkey, init_particle_interpolation(), ParticleInterpolationData::keyed, ParticleData::keys, PTCacheEditPoint::keys, ParticleInterpolationData::kkey, ParticleInterpolationData::mesh, ParticleSystem::particles, ParticleInterpolationData::pm, PointCache::startframe, HairKey::time, ParticleData::time, ParticleKey::time, PTCacheEditKey::time, ParticleData::totkey, PTCacheEditPoint::totkey, and ParticleInterpolationData::vert_positions.
Referenced by init_particle_interpolation(), psys_cache_edit_paths_iter(), psys_cache_paths(), and psys_get_particle_on_path().
|
static |
Definition at line 1157 of file particle.cc.
References CLAMP, interpolate_particle_value(), v2, and w().
Referenced by interpolate_particle_value(), and psys_interpolate_value_from_verts().
|
static |
Definition at line 1594 of file particle.cc.
References ParticleCacheKey::co, copy_qt_qt(), i, interp_qt_qtqt(), interp_v3_v3v3(), interpolate_pathcache(), mul_qt_qtqt(), result, ParticleCacheKey::rot, ParticleCacheKey::segments, ParticleCacheKey::time, and ParticleCacheKey::vel.
Referenced by interpolate_pathcache(), and psys_get_particle_on_path().
|
static |
Definition at line 1384 of file particle.cc.
References ParticleKey::co, copy_v3_v3(), mvert_to_particle(), HairKey::time, and ParticleKey::time.
Referenced by do_particle_interpolation(), and mvert_to_particle().
|
static |
Definition at line 3945 of file particle.cc.
References BKE_modifier_new(), BKE_modifier_unique_name(), BKE_modifiers_persistent_uid_init(), BKE_object_modifier_set_active(), BKE_particlesettings_add(), BKE_ptcache_add(), BKE_scene_frame_to_ctime(), BLI_addtail(), ParticleSystem::cfra, RenderData::cfra, DATA_, DEG_id_tag_update(), DEG_relations_tag_update(), eModifierType_ParticleSystem, ListBase::first, ParticleSystem::flag, Object::id, ParticleSettings::id, ID_RECALC_GEOMETRY, id_us_plus(), MEM_callocN(), Object::modifiers, ModifierData::name, ParticleSystem::name, ParticleSystem::next, OB_MESH, object_add_or_copy_particle_system(), ParticleSystem::part, Object::particlesystem, ParticleSystem::pointcache, ParticleSystemModifierData::psys, PSYS_CURRENT, psys_unique_name(), ParticleSystem::ptcaches, Scene::r, STRNCPY(), ParticleSystem::totpart, and Object::type.
Referenced by object_add_or_copy_particle_system(), object_add_particle_system(), and object_copy_particle_system().
| ModifierData * object_add_particle_system | ( | Main * | bmain, |
| const Scene * | scene, | ||
| Object * | ob, | ||
| const char * | name ) |
Definition at line 3999 of file particle.cc.
References object_add_or_copy_particle_system(), and object_add_particle_system().
| ModifierData * object_copy_particle_system | ( | Main * | bmain, |
| const Scene * | scene, | ||
| Object * | ob, | ||
| const ParticleSystem * | psys_orig ) |
Definition at line 4007 of file particle.cc.
References object_add_or_copy_particle_system(), and object_copy_particle_system().
| void object_remove_particle_system | ( | Main * | bmain, |
| Scene * | scene, | ||
| Object * | ob, | ||
| ParticleSystem * | psys ) |
Definition at line 4015 of file particle.cc.
References BKE_modifier_free(), BKE_modifier_remove_from_list(), BKE_modifiers_findby_type(), BLI_remlink(), DynamicPaintModifierData::brush, DEG_id_tag_update(), DEG_relations_tag_update(), FluidModifierData::domain, ELEM, eModifierType_DynamicPaint, eModifierType_Fluid, ListBase::first, FluidModifierData::flow, FLUID_DOMAIN_PARTICLE_BUBBLE, FLUID_DOMAIN_PARTICLE_FLIP, FLUID_DOMAIN_PARTICLE_FOAM, FLUID_DOMAIN_PARTICLE_SPRAY, FLUID_DOMAIN_PARTICLE_TRACER, Object::id, ParticleSettings::id, ID_RECALC_GEOMETRY, ID_RECALC_SYNC_TO_EVAL, id_us_min(), MOD_FLUID_TYPE_DOMAIN, MOD_FLUID_TYPE_FLOW, Object::mode, OB_MODE_PARTICLE_EDIT, object_remove_particle_system(), ParticleSystem::part, 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, FluidDomainSettings::particle_type, Object::particlesystem, DynamicPaintBrushSettings::psys, FluidFlowSettings::psys, PSYS_CURRENT, psys_free(), psys_get_modifier(), FluidDomainSettings::sndparticle_combined_export, SNDPARTICLE_COMBINED_EXPORT_OFF, FluidModifierData::type, and ParticleSettings::type.
Referenced by object_copy_particle_system(), blender::ed::object::object_modifier_remove(), object_remove_particle_system(), and particle_system_remove_exec().
|
static |
Definition at line 2586 of file particle.cc.
References add_v3_v3(), ParticleKey::co, copy_qt_qt(), copy_v3_v3(), ChildParticle::fuv, mul_qt_v3(), mul_v3_fl(), offset_child(), ParticleKey::rot, unit_qt(), and ParticleKey::vel.
Referenced by offset_child(), psys_get_particle_on_path(), psys_get_particle_state(), and psys_thread_create_path().
|
static |
Definition at line 407 of file particle.cc.
References BLI_freelistN(), ListBase::first, ParticleSettings::instance_collection, ParticleSettings::instance_weights, and particle_settings_blend_read_after_liblink().
Referenced by particle_settings_blend_read_after_liblink().
|
static |
Definition at line 345 of file particle.cc.
References BKE_curvemapping_blend_read(), BKE_effector_add_weights(), BKE_particle_partdeflect_blend_read_data(), BLO_read_struct, BLO_read_struct_list, BLO_read_struct_list_with_type_size(), boid_rule_struct_size(), ParticleSettings::boids, CLAMP, ParticleSettings::clumpcurve, eBoidRuleType_None, ParticleSettings::effector_weights, ParticleSettings::fluid, ParticleSettings::instance_weights, LISTBASE_FOREACH, MAX_MTEX, ParticleSettings::mtex, particle_settings_blend_read_data(), ParticleSettings::pd, ParticleSettings::pd2, ParticleSettings::roughcurve, state, BoidSettings::states, ParticleSettings::trail_count, ParticleSettings::twistcurve, and BoidRule::type.
Referenced by particle_settings_blend_read_data().
|
static |
Definition at line 261 of file particle.cc.
References BKE_curvemapping_blend_write(), BKE_id_blend_write(), BLO_write_id_struct, BLO_write_struct, ParticleSettings::boids, ParticleSettings::clumpcurve, ParticleSettings::effector_weights, ParticleSettings::fluid, FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN, FOREACH_COLLECTION_OBJECT_RECURSIVE_END, ParticleSettings::id, ParticleSettings::instance_collection, ParticleSettings::instance_weights, LISTBASE_FOREACH, MAX_MTEX, ParticleSettings::mtex, PART_PHYS_BOIDS, PART_PHYS_FLUID, particle_settings_blend_write(), ParticleSettings::pd, ParticleSettings::pd2, ParticleSettings::phystype, ParticleSettings::roughcurve, state, BoidSettings::states, ParticleSettings::twistcurve, and write_boid_state().
Referenced by particle_settings_blend_write().
|
static |
Definition at line 104 of file particle.cc.
References BKE_curvemapping_copy(), BKE_partdeflect_copy(), BLI_duplicatelist(), boid_copy_settings(), ParticleSettings::boids, ParticleSettings::clumpcurve, ParticleSettings::effector_weights, ParticleSettings::fluid, ParticleSettings::instance_weights, MAX_MTEX, MEM_dupallocN(), ParticleSettings::mtex, particle_settings_copy_data(), ParticleSettings::pd, ParticleSettings::pd2, ParticleSettings::roughcurve, and ParticleSettings::twistcurve.
Referenced by particle_settings_copy_data().
|
static |
Definition at line 172 of file particle.cc.
References ParticleSettings::bb_ob, BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL, BKE_LIB_FOREACHID_PROCESS_IDSUPER, BKE_lib_query_foreachid_process_flags_get(), BKE_texture_mtex_foreach_id(), ParticleSettings::boids, ParticleSettings::collision_group, data, eBoidRuleType_Avoid, eBoidRuleType_FollowLeader, eBoidRuleType_Goal, ParticleSettings::effector_weights, ELEM, PartDeflect::f_source, EffectorWeights::group, i, IDWALK_CB_NOP, IDWALK_CB_USER, IDWALK_DO_DEPRECATED_POINTERS, ParticleSettings::instance_collection, ParticleSettings::instance_object, ParticleSettings::instance_weights, LISTBASE_FOREACH, MAX_MTEX, ParticleSettings::mtex, BoidRuleFollowLeader::ob, BoidRuleGoalAvoid::ob, particle_settings_foreach_id(), ParticleSettings::pd, ParticleSettings::pd2, state, BoidSettings::states, and PartDeflect::tex.
Referenced by particle_settings_foreach_id().
|
static |
Definition at line 143 of file particle.cc.
References BKE_curvemapping_free(), BKE_partdeflect_free(), BLI_freelistN(), boid_free_settings(), ParticleSettings::boids, ParticleSettings::clumpcurve, ParticleSettings::effector_weights, ParticleSettings::fluid, fluid_free_settings(), ParticleSettings::instance_weights, MAX_MTEX, MEM_SAFE_FREE, ParticleSettings::mtex, particle_settings_free_data(), ParticleSettings::pd, ParticleSettings::pd2, ParticleSettings::roughcurve, and ParticleSettings::twistcurve.
Referenced by particle_settings_free_data().
|
static |
Definition at line 92 of file particle.cc.
References BKE_effector_add_weights(), BKE_partdeflect_new(), BLI_assert, DNA_struct_default_get, ParticleSettings::effector_weights, MEMCMP_STRUCT_AFTER_IS_ZERO, MEMCPY_STRUCT_AFTER, particle_settings_init(), ParticleSettings::pd, ParticleSettings::pd2, and PFIELD_NULL.
Referenced by particle_settings_init().
|
static |
Definition at line 522 of file particle.cc.
References pcache_key_segment_endpoint_safe(), and ParticleCacheKey::segments.
Referenced by pcache_key_segment_endpoint_safe(), and psys_thread_create_path().
| void precalc_guides | ( | ParticleSimulationData * | sim, |
| ListBase * | effectors ) |
Definition at line 2313 of file particle.cc.
References copy_v3_v3(), data, EffectorData::distance, effector_falloff(), ParticleSettings::effector_weights, ParticleSettings::from, len_v3(), LISTBASE_FOREACH, LOOP_PARTICLES, MEM_calloc_arrayN(), mul_m4_v3(), mul_mat3_m4_v3(), EffectorData::nor, ParticleSimulationData::ob, ParticleSystem::part, PARTICLE_P, pd_point_from_particle(), PFIELD_GUIDE, precalc_guides(), ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_particle_on_emitter(), state, sub_v3_v3v3(), ParticleSystem::totpart, and EffectorData::vec_to_point.
Referenced by precalc_guides(), psys_unique_name(), and psys_update_effectors().
|
static |
Definition at line 527 of file particle.cc.
References BLI_addtail(), LinkData::data, i, MEM_calloc_arrayN(), MEM_callocN(), PATH_CACHE_BUF_SIZE, and psys_alloc_path_cache_buffers().
Referenced by psys_alloc_path_cache_buffers(), psys_cache_child_paths(), psys_cache_edit_paths(), and psys_cache_paths().
| void psys_apply_hair_lattice | ( | Depsgraph * | depsgraph, |
| Scene * | scene, | ||
| Object * | ob, | ||
| ParticleSystem * | psys ) |
Definition at line 5277 of file particle.cc.
References BKE_lattice_deform_data_eval_co(), HairKey::co, ParticleSimulationData::depsgraph, ParticleSystem::flag, ParticleSettings::from, ParticleData::hair, invert_m4_m4(), ParticleSystem::lattice_deform_data, ParticleSystem::lattice_strength, ParticleSystemModifierData::mesh_final, mul_m4_v3(), ParticleSimulationData::ob, ParticleSystem::part, ParticleSystem::particles, ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_apply_hair_lattice(), PSYS_EDITED, psys_get_modifier(), psys_mat_hair_to_global(), psys_sim_data_free(), psys_sim_data_init(), ParticleSimulationData::scene, ParticleData::totkey, and ParticleSystem::totpart.
Referenced by blender::ed::object::modifier_apply_obdata(), psys_apply_hair_lattice(), and psys_unique_name().
| void psys_cache_child_paths | ( | ParticleSimulationData * | sim, |
| float | cfra, | ||
| const bool | editupdate, | ||
| const bool | use_render_params ) |
Definition at line 3181 of file particle.cc.
References BLI_task_pool_create(), BLI_task_pool_free(), BLI_task_pool_push(), BLI_task_pool_work_and_wait(), ParticleSystem::childcache, ParticleSystem::childcachebufs, exec_child_path_cache(), ParticleThreadContext::extra_segments, ParticleSystem::flag, free_child_path_cache(), ParticleThreadContext::parent_pass, ParticleSimulationData::psys, psys_alloc_path_cache_buffers(), psys_cache_child_paths(), PSYS_GLOBAL_HAIR, psys_task_init_path(), psys_tasks_create(), psys_tasks_free(), psys_thread_context_free(), psys_thread_context_init_path(), ParticleSimulationData::scene, ParticleThreadContext::segments, TASK_PRIORITY_HIGH, ParticleThreadContext::totchild, ParticleSystem::totchildcache, and ParticleThreadContext::totparent.
Referenced by psys_cache_child_paths(), psys_cache_edit_paths(), psys_unique_name(), and psys_update_path_cache().
| void psys_cache_edit_paths | ( | Depsgraph * | depsgraph, |
| Scene * | scene, | ||
| Object * | ob, | ||
| PTCacheEdit * | edit, | ||
| float | cfra, | ||
| const bool | use_render_params ) |
Definition at line 3686 of file particle.cc.
References BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), ParticleEditSettings::brushtype, ParticleSimulationData::depsgraph, ParticleEditSettings::draw_step, CacheEditrPathsIterData::edit, PTCacheEditPoint::flag, i, ParticleSimulationData::ob, CacheEditrPathsIterData::object, CacheEditrPathsIterData::pa, ToolSettings::particle, ParticleSystem::particles, PTCacheEdit::pathcache, PTCacheEdit::pathcachebufs, PE_BRUSH_WEIGHT, PEP_EDIT_RECALC, PTCacheEdit::points, CacheEditrPathsIterData::psmd, ParticleSimulationData::psmd, PTCacheEdit::psmd_eval, ParticleSimulationData::psys, PTCacheEdit::psys, psys_alloc_path_cache_buffers(), psys_cache_child_paths(), psys_cache_edit_paths(), psys_cache_edit_paths_iter(), psys_free_path_cache(), ParticleSimulationData::scene, CacheEditrPathsIterData::segments, Scene::toolsettings, PTCacheEdit::totcached, PTCacheEdit::totpoint, and CacheEditrPathsIterData::use_weight.
Referenced by blender::draw::drw_particle_update_ptcache_edit(), PE_update_object(), PE_update_selection(), psys_cache_edit_paths(), and psys_unique_name().
|
static |
Definition at line 3520 of file particle.cc.
References ParticleInterpolationData::birthtime, BKE_defvert_weight_to_rgb(), ParticleInterpolationData::bspline, ParticleInterpolationData::cache, cache_key_incremental_rotation(), ParticleCacheKey::co, ParticleCacheKey::col, copy_qt_qt(), copy_v3_v3(), ParticleInterpolationData::dietime, do_particle_interpolation(), CacheEditrPathsIterData::edit, ParticleInterpolationData::ekey, ParticleInterpolationData::epoint, ParticleSettings::flag, ParticleSystem::flag, PTCacheEditPoint::flag, ParticleSettings::from, ParticleData::hair, ParticleInterpolationData::hkey, init_particle_interpolation(), interp_v3_v3v3(), ParticleInterpolationData::keyed, PTCacheEditPoint::keys, mat3_to_quat_legacy(), ParticleInterpolationData::mesh, ParticleSystemModifierData::mesh_final, mul_m4_v3(), CacheEditrPathsIterData::object, CacheEditrPathsIterData::pa, ParticleSystem::part, PART_HAIR_BSPLINE, PTCacheEdit::pathcache, PEK_SELECT, PEP_EDIT_RECALC, PTCacheEdit::points, CacheEditrPathsIterData::psmd, PTCacheEdit::psys, psys_cache_edit_paths_iter(), PSYS_GLOBAL_HAIR, psys_mat_hair_to_global(), result, ParticleCacheKey::rot, rot, CacheEditrPathsIterData::segments, ParticleCacheKey::segments, sub_v3_v3v3(), HairKey::time, ParticleCacheKey::time, PTCacheEditKey::time, PTCacheEdit::totcached, ParticleData::totkey, PTCacheEditPoint::totkey, CacheEditrPathsIterData::use_weight, ParticleCacheKey::vel, and HairKey::weight.
Referenced by psys_cache_edit_paths(), and psys_cache_edit_paths_iter().
| void psys_cache_paths | ( | struct ParticleSimulationData * | sim, |
| float | cfra, | ||
| bool | use_render_params ) |
Calculates paths ready for drawing/rendering
Definition at line 3280 of file particle.cc.
References ParticleInterpolationData::birthtime, BKE_lattice_deform_data_eval_co(), BKE_mesh_tessface_ensure(), BKE_object_material_get(), ParticleInterpolationData::bspline, ParticleInterpolationData::cache, cache_key_incremental_rotation(), HairKey::co, ParticleCacheKey::co, ParticleCacheKey::col, copy_qt_qt(), copy_v3_v3(), ParticleSimulationData::depsgraph, ParticleInterpolationData::dietime, do_guides(), do_particle_interpolation(), do_path_effectors(), ParticleSettings::draw, ParticleSettings::draw_col, ParticleSettings::draw_step, ParticleSystem::edit, ParticleSystem::effectors, ParticleInterpolationData::epoint, ListBase::first, ParticleEditSettings::flag, ParticleSettings::flag, ParticleSystem::flag, ParticleSettings::from, ParticleSystem::hair_out_mesh, init_particle_interpolation(), ParticleInterpolationData::keyed, ParticleSystem::lattice_deform_data, ParticleSystem::lattice_strength, len_v3(), length(), ParticleTexture::length, LOOP_PARTICLES, mat3_to_quat_legacy(), PointCache::mem_cache, MEM_freeN(), ParticleInterpolationData::mesh, mul_m4_v3(), mul_v3_m4v3(), ParticleSimulationData::ob, ParticleSettings::omat, PAMAP_LENGTH, ParticleSystem::part, PART_ABS_PATH_TIME, PART_CHILD_EFFECT, PART_DRAW_COL_MAT, PART_FROM_VERT, PART_HAIR, PART_HAIR_BSPLINE, ToolSettings::particle, PARTICLE_P, PARTICLE_PSMD, ParticleSettings::path_end, ParticleSettings::path_start, ParticleSystem::pathcache, ParticleSystem::pathcachebufs, PE_DRAW_PART, ParticleSystem::pointcache, pow, ParticleSimulationData::psys, psys_alloc_path_cache_buffers(), psys_cache_paths(), psys_cache_vgroup(), psys_frand(), psys_free_path_cache(), psys_get_texture(), PSYS_GLOBAL_HAIR, PSYS_HAIR_DONE, PSYS_HAIR_DYNAMICS, psys_in_edit_mode(), PSYS_KEYED, psys_mat_hair_to_global(), psys_particle_value_from_verts(), psys_sim_data_free(), psys_sim_data_init(), PSYS_VG_EFFECTOR, PSYS_VG_LENGTH, Material::r, ParticleSettings::randlength, ParticleSettings::ren_step, result, ParticleCacheKey::rot, rot, ParticleSimulationData::scene, ParticleSystem::seed, ParticleCacheKey::segments, sub_v3_v3v3(), ParticleCacheKey::time, Scene::toolsettings, ParticleSystem::totcached, ParticleSystem::totchild, ParticleSystem::totpart, ParticleSettings::type, ParticleCacheKey::vel, and HairKey::world_co.
Referenced by psys_cache_paths(), psys_unique_name(), and psys_update_path_cache().
| float * psys_cache_vgroup | ( | Mesh * | mesh, |
| ParticleSystem * | psys, | ||
| int | vgroup ) |
Definition at line 2610 of file particle.cc.
References BKE_defvert_find_weight(), i, MEM_calloc_arrayN(), psys_cache_vgroup(), Mesh::verts_num, ParticleSystem::vg_neg, and ParticleSystem::vgroup.
Referenced by psys_cache_paths(), psys_cache_vgroup(), psys_thread_context_init_distribute(), and psys_thread_context_init_path().
| bool psys_check_edited | ( | ParticleSystem * | psys | ) |
Definition at line 768 of file particle.cc.
References ParticleSystem::edit, PointCache::edit, PTCacheEdit::edited, ParticleSystem::flag, ParticleSystem::part, PART_HAIR, ParticleSystem::pointcache, psys_check_edited(), PSYS_EDITED, and ParticleSettings::type.
Referenced by psys_check_edited(), and psys_in_edit_mode().
| bool psys_check_enabled | ( | Object * | ob, |
| ParticleSystem * | psys, | ||
| const bool | use_render_params ) |
Definition at line 742 of file particle.cc.
References eModifierMode_Realtime, eModifierMode_Render, ParticleSystem::flag, ModifierData::mode, ParticleSystemModifierData::modifier, ParticleSystem::part, psys_check_enabled(), PSYS_DELETE, PSYS_DISABLED, and psys_get_modifier().
Referenced by BKE_effector_relations_create(), BKE_object_handle_data_update(), deform_verts(), DRW_object_is_visible_psys_in_active_context(), dynamicPaint_doStep(), blender::io::hydra::HairData::is_visible(), make_duplis_particle_system(), particle_system_update(), pointdensity_cache_psys(), psys_check_enabled(), and psys_in_edit_mode().
| void psys_check_group_weights | ( | ParticleSettings * | part | ) |
Definition at line 798 of file particle.cc.
References BKE_collection_has_object_recursive(), BLI_addtail(), BLI_freelinkN(), BLI_freelistN(), ParticleDupliWeight::count, ListBase::first, ParticleDupliWeight::flag, FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN, FOREACH_COLLECTION_OBJECT_RECURSIVE_END, ParticleDupliWeight::index, ParticleSettings::instance_collection, ParticleSettings::instance_weights, LISTBASE_FOREACH, MEM_callocN(), ParticleDupliWeight::next, ParticleDupliWeight::ob, PART_DRAW_GR, PART_DUPLIW_CURRENT, psys_check_group_weights(), psys_find_group_weights(), and ParticleSettings::ren_as.
Referenced by dupliob_refresh_exec(), psys_check_group_weights(), and psys_in_edit_mode().
| void psys_copy_particles | ( | struct ParticleSystem * | psys_dst, |
| struct ParticleSystem * | psys_src ) |
Copy.
Definition at line 1088 of file particle.cc.
References ParticleData::boid, ParticleSystem::child, ParticleData::hair, ParticleData::keys, MEM_dupallocN(), ParticleSystem::particles, psys_copy_particles(), psys_free_children(), psys_free_particles(), ParticleSystem::totchild, ParticleData::totkey, and ParticleSystem::totpart.
Referenced by BKE_object_copy_particlesystem(), PE_create_particle_edit(), pe_get_current(), psys_copy_particles(), and psys_in_edit_mode().
| void psys_disable_all | ( | Object * | ob | ) |
Definition at line 675 of file particle.cc.
References ListBase::first, ParticleSystem::flag, ParticleSystem::next, Object::particlesystem, psys_disable_all(), and PSYS_DISABLED.
Referenced by particle_intersect_mesh(), and psys_disable_all().
| void psys_emitter_customdata_mask | ( | ParticleSystem * | psys, |
| CustomData_MeshMasks * | r_cddata_masks ) |
Definition at line 2238 of file particle.cc.
References CD_MASK_MDEFORMVERT, CD_MASK_MTFACE, CD_MASK_ORCO, CD_MASK_ORIGINDEX, CD_MASK_ORIGSPACE_MLOOP, CustomData_MeshMasks::emask, CustomData_MeshMasks::fmask, i, CustomData_MeshMasks::lmask, MTex::mapto, MAX_MTEX, ParticleSettings::mtex, ParticleSystem::part, CustomData_MeshMasks::pmask, psys_emitter_customdata_mask(), PSYS_TOT_VG, ParticleSettings::tanfac, MTex::texco, TEXCO_UV, ParticleSystem::vgroup, and CustomData_MeshMasks::vmask.
Referenced by copy_particle_systems_to_object(), psys_emitter_customdata_mask(), psys_interpolate_mcol(), and required_data_mask().
| void psys_enable_all | ( | Object * | ob | ) |
Definition at line 683 of file particle.cc.
References ListBase::first, ParticleSystem::flag, ParticleSystem::next, Object::particlesystem, PSYS_DISABLED, and psys_enable_all().
Referenced by particle_intersect_mesh(), and psys_enable_all().
| ParticleSystem * psys_eval_get | ( | struct Depsgraph * | depsgraph, |
| struct Object * | object, | ||
| struct ParticleSystem * | psys ) |
For a given original object and its particle system, get evaluated particle system within a given dependency graph.
Definition at line 700 of file particle.cc.
References DEG_get_evaluated(), ListBase::first, ParticleSystem::next, ParticleSystem::orig_psys, Object::particlesystem, and psys_eval_get().
Referenced by BKE_ptcache_bake(), blender::ed::object::convert_psys_to_mesh(), disconnect_hair(), PE_create_particle_edit(), psys_eval_get(), and remap_hair_emitter().
|
static |
Definition at line 3834 of file particle.cc.
References BKE_mesh_orco_verts_transform(), CD_MFACE, CD_ORCO, CD_ORIGINDEX, CD_ORIGSPACE, copy_v3_v3(), CustomData_get_for_write(), CustomData_get_layer(), CustomData_get_layer_for_write(), Object::data, DMCACHE_ISCHILD, DMCACHE_NOTFOUND, ELEM, Mesh::fdata_legacy, i, ParticleData::num, ParticleData::num_dmcache, psys_face_mat(), Mesh::totface_legacy, triatomat(), unit_m4(), OrigSpaceFace::uv, v, MFace::v1, MFace::v2, MFace::v3, and Mesh::vert_data.
Referenced by psys_face_mat(), psys_mat_hair_to_object(), psys_mat_hair_to_orco(), and psys_vec_rot_to_face().
| void psys_find_group_weights | ( | ParticleSettings * | part | ) |
Definition at line 777 of file particle.cc.
References BKE_collection_object_cache_get(), BLI_findlink(), ParticleSettings::instance_collection, ParticleSettings::instance_weights, LISTBASE_FOREACH, Base::object, and psys_find_group_weights().
Referenced by make_duplis_particle_system(), psys_check_group_weights(), psys_find_group_weights(), and psys_in_edit_mode().
| void psys_find_parents | ( | ParticleSimulationData * | sim, |
| const bool | use_render_params ) |
Definition at line 2636 of file particle.cc.
References ParticleSystem::cfra, ParticleSystem::child, ParticleSettings::child_percent, ParticleSettings::child_render_percent, DMCACHE_ISCHILD, ParticleTexture::exist, ChildParticle::foffset, ChildParticle::fuv, get_cpa_texture(), ParticleSystemModifierData::mesh_final, ChildParticle::num, ChildParticle::pa, PAMAP_CHILD, PAMAP_DENS, ChildParticle::parent, ParticleSettings::parents, ParticleSystem::part, PART_FROM_FACE, ParticleSystem::particles, ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_find_parents(), psys_frand(), psys_particle_on_emitter(), ParticleSystem::totchild, and ParticleSystem::totpart.
Referenced by object_copy_particle_system(), psys_find_parents(), and psys_update_path_cache().
| void psys_free | ( | struct Object * | ob, |
| struct ParticleSystem * | psys ) |
Free everything.
Definition at line 1010 of file particle.cc.
References BKE_effectors_free(), BKE_modifier_free(), BKE_particle_batch_cache_free(), BKE_ptcache_free_list(), BLI_bvhtree_free(), BLI_freelistN(), ParticleSystem::bvhtree, ParticleSystem::child, ParticleSystem::clmd, ParticleSystem::edit, ParticleSystem::effectors, ELEM, ParticleSystem::flag, ParticleSystem::fluid_springs, ParticleSystem::free_edit, free_hair(), LISTBASE_FOREACH, MEM_freeN(), OB_DUPLIPARTS, ParticleSystem::part, PART_DRAW_GR, PART_DRAW_OB, Object::particlesystem, ParticleSystem::pdd, ParticleSystem::pointcache, psys_free(), psys_free_particles(), psys_free_path_cache(), psys_free_pdd(), PSYS_SHARED_CACHES, ParticleSystem::ptcaches, ParticleSystem::targets, ParticleSystem::totchild, Object::transflag, and ParticleSystem::tree.
Referenced by BKE_object_free_particlesystems(), BKE_object_handle_data_update(), object_remove_particle_system(), psys_free(), and psys_in_edit_mode().
| void psys_free_children | ( | ParticleSystem * | psys | ) |
Definition at line 954 of file particle.cc.
References ParticleSystem::child, free_child_path_cache(), MEM_freeN(), psys_free_children(), and ParticleSystem::totchild.
Referenced by psys_copy_particles(), psys_free_children(), psys_update_path_cache(), and update_children().
| void psys_free_particles | ( | ParticleSystem * | psys | ) |
Definition at line 964 of file particle.cc.
References ParticleData::boid, ParticleData::keys, LOOP_PARTICLES, MEM_freeN(), ParticleSystem::part, PART_HAIR, PARTICLE_P, ParticleSystem::particles, psys_free_particles(), ParticleSystem::totpart, and ParticleSettings::type.
Referenced by psys_copy_particles(), psys_free(), psys_free_particles(), psys_reset(), and blender::ed::curves::convert_to_particle_system::try_convert_single_object().
| void psys_free_path_cache | ( | struct ParticleSystem * | psys, |
| struct PTCacheEdit * | edit ) |
Free cache path.
Definition at line 939 of file particle.cc.
References free_child_path_cache(), ParticleSystem::pathcache, PTCacheEdit::pathcache, ParticleSystem::pathcachebufs, PTCacheEdit::pathcachebufs, psys_free_path_cache(), psys_free_path_cache_buffers(), ParticleSystem::totcached, and PTCacheEdit::totcached.
Referenced by BKE_object_free_caches(), brush_edit_apply(), disconnect_hair(), mirror_exec(), particle_system_update(), particle_undosys_step_decode(), PE_free_ptcache_edit(), psys_cache_edit_paths(), psys_cache_paths(), psys_free(), psys_free_path_cache(), psys_in_edit_mode(), psys_reset(), psys_update_path_cache(), remap_hair_emitter(), and shape_cut_exec().
|
static |
Definition at line 554 of file particle.cc.
References BLI_freelistN(), LISTBASE_FOREACH, MEM_freeN(), and psys_free_path_cache_buffers().
Referenced by free_child_path_cache(), psys_free_path_cache(), and psys_free_path_cache_buffers().
| void psys_free_pdd | ( | ParticleSystem * | psys | ) |
Definition at line 994 of file particle.cc.
References ParticleDrawData::cdata, MEM_SAFE_FREE, ParticleDrawData::ndata, ParticleDrawData::partsize, ParticleSystem::pdd, psys_free_pdd(), ParticleDrawData::totpart, ParticleDrawData::totpoint, ParticleDrawData::vdata, and ParticleDrawData::vedata.
Referenced by psys_free(), psys_free_pdd(), and realloc_particles().
| float psys_get_child_size | ( | ParticleSystem * | psys, |
| ChildParticle * | cpa, | ||
| float | cfra, | ||
| float * | pa_time ) |
Definition at line 4534 of file particle.cc.
References ParticleSystem::child, ParticleSettings::childrandsize, ParticleSettings::childsize, ParticleSettings::childtype, ChildParticle::pa, ChildParticle::parent, ParticleSystem::part, PART_CHILD_FACES, ParticleSystem::particles, psys_frand(), psys_get_child_size(), ParticleData::size, ChildParticle::w, and w().
Referenced by make_duplis_particle_system(), modify_mesh(), psys_get_child_size(), and psys_unique_name().
| float psys_get_child_time | ( | ParticleSystem * | psys, |
| ChildParticle * | cpa, | ||
| float | cfra, | ||
| float * | birthtime, | ||
| float * | dietime ) |
Definition at line 4502 of file particle.cc.
References ParticleSystem::child, ParticleSettings::childtype, ParticleData::lifetime, ParticleSettings::lifetime, ChildParticle::pa, ChildParticle::parent, ParticleSystem::part, PART_CHILD_FACES, ParticleSystem::particles, psys_frand(), psys_get_child_time(), ParticleSettings::randlife, ParticleData::time, ChildParticle::w, and w().
Referenced by pointdensity_cache_psys(), psys_get_child_time(), psys_get_particle_on_path(), psys_get_particle_state(), and psys_unique_name().
| ParticleSystem * psys_get_current | ( | struct Object * | ob | ) |
Get object's active particle system safely.
Definition at line 570 of file particle.cc.
References LISTBASE_FOREACH, Object::particlesystem, PSYS_CURRENT, and psys_get_current().
Referenced by buttons_context_path_particle(), buttons_texture_users_from_context(), clear_edited_exec(), connect_hair_exec(), copy_particle_systems_exec(), blender::ed::curves::convert_from_particle_system::curves_convert_from_particle_system_exec(), disconnect_hair_exec(), duplicate_particle_systems_exec(), blender::ed::object::object_select_all_by_particle(), blender::ed::outliner::outliner_draw_mode_column_toggle(), blender::ed::outliner::outliner_set_properties_tab(), particle_system_remove_exec(), and psys_get_current().
| short psys_get_current_num | ( | Object * | ob | ) |
Definition at line 584 of file particle.cc.
References ListBase::first, ParticleSystem::flag, i, ParticleSystem::next, Object::particlesystem, PSYS_CURRENT, and psys_get_current_num().
Referenced by psys_get_current_num().
| float psys_get_dietime_from_cache | ( | PointCache * | cache, |
| int | index ) |
Definition at line 1306 of file particle.cc.
References BKE_ptcache_mem_index_find(), LISTBASE_FOREACH_BACKWARD, PointCache::mem_cache, and psys_get_dietime_from_cache().
Referenced by psys_get_dietime_from_cache(), and reset_particle().
| void psys_get_dupli_path_transform | ( | ParticleSimulationData * | sim, |
| ParticleData * | pa, | ||
| ChildParticle * | cpa, | ||
| ParticleCacheKey * | cache, | ||
| float | mat[4][4], | ||
| float * | scale ) |
Definition at line 5183 of file particle.cc.
References axis_angle_to_quat(), ParticleSettings::childflat, ParticleCacheKey::co, copy_v3_v3(), cross_v3_v3v3(), DMCACHE_ISCHILD, dot_v3v3(), fabsf, ChildParticle::foffset, ParticleData::foffset, ParticleSettings::from, ChildParticle::fuv, ParticleData::fuv, len(), M_PI, mul_m3_v3(), mul_qt_v3(), normalize_v3(), ChildParticle::num, ParticleData::num, ParticleData::num_dmcache, ParticleSimulationData::ob, ChildParticle::pa, ParticleSystem::part, PART_CHILD_FACES, PART_FROM_FACE, PART_ROT_VEL, ParticleSystem::particles, ParticleSettings::phasefac, ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_frand(), psys_get_dupli_path_transform(), psys_particle_on_emitter(), quat_to_mat4(), ParticleSettings::randphasefac, ParticleKey::rot, ParticleSettings::rotmode, ParticleCacheKey::segments, ParticleData::state, sub_v3_v3v3(), transpose_m3_m4(), and unit_m4().
Referenced by make_duplis_particle_system(), psys_get_dupli_path_transform(), and psys_unique_name().
| void psys_get_dupli_texture | ( | ParticleSystem * | psys, |
| ParticleSettings * | part, | ||
| ParticleSystemModifierData * | psmd, | ||
| ParticleData * | pa, | ||
| ChildParticle * | cpa, | ||
| float | uv[2], | ||
| float | orco[3] ) |
Definition at line 5080 of file particle.cc.
References CD_MFACE, CD_MTFACE, ParticleSettings::childtype, CustomData_get_for_write(), CustomData_get_layer_n(), CustomData_get_render_layer(), ParticleSettings::distr, DMCACHE_ISCHILD, DMCACHE_NOTFOUND, ELEM, Mesh::fdata_legacy, ChildParticle::foffset, ParticleData::foffset, ParticleSettings::from, ChildParticle::fuv, ParticleData::fuv, ParticleSystemModifierData::mesh_final, ChildParticle::num, num, ParticleData::num, ParticleData::num_dmcache, ChildParticle::pa, PART_CHILD_FACES, PART_DISTR_GRID, PART_FROM_FACE, PART_FROM_VERT, ParticleSystem::particles, psys_get_dupli_texture(), psys_interpolate_uvs(), psys_particle_on_emitter(), Mesh::totface_legacy, and MFace::v4.
Referenced by make_duplis_particle_system(), psys_get_dupli_texture(), and psys_unique_name().
| void psys_get_from_key | ( | ParticleKey * | key, |
| float | loc[3], | ||
| float | vel[3], | ||
| float | rot[4], | ||
| float * | time ) |
Definition at line 3776 of file particle.cc.
References ParticleKey::co, copy_qt_qt(), copy_v3_v3(), psys_get_from_key(), ParticleKey::rot, rot, ParticleKey::time, and ParticleKey::vel.
Referenced by psys_get_from_key(), and psys_interpolate_face().
| ParticleSystemModifierData * psys_get_modifier | ( | Object * | ob, |
| ParticleSystem * | psys ) |
Definition at line 2186 of file particle.cc.
References eModifierType_ParticleSystem, LISTBASE_FOREACH, Object::modifiers, ParticleSystemModifierData::psys, and psys_get_modifier().
Referenced by BKE_particle_system_blend_read_after_liblink(), disconnect_hair(), make_duplis_particle_system(), modify_mesh(), object_remove_particle_system(), blender::draw::particle_batch_cache_ensure_pos(), particle_system_minmax(), particle_system_update(), PE_create_particle_edit(), pointdensity_cache_psys(), psys_apply_hair_lattice(), psys_check_enabled(), psys_get_modifier(), psys_interpolate_mcol(), psys_sim_data_init(), remap_hair_emitter(), remove_tagged_keys(), and blender::io::hydra::HairData::write_curves().
| void psys_get_particle_on_path | ( | struct ParticleSimulationData * | sim, |
| int | pa_num, | ||
| struct ParticleKey * | state, | ||
| bool | vel ) |
Gets hair (or keyed) particles state at the "path time" specified in state->time.
Definition at line 4623 of file particle.cc.
References BKE_lattice_deform_data_eval_co(), BKE_object_material_get(), ParticleInterpolationData::bspline, ParticleInterpolationData::cache, ParticleSystem::child, ParticleSystem::childcache, ParticleSettings::childflat, ParticleSettings::childrad, ParticleSettings::childtype, CLAMP, ParticleKey::co, copy_particle_key(), copy_qt_qt(), copy_v3_v3(), ParticleChildModifierContext::cpa, ParticleSimulationData::depsgraph, DMCACHE_ISCHILD, do_child_modifiers(), do_guides(), do_particle_interpolation(), ParticleSystem::effectors, ParticleInterpolationData::epoint, ParticleData::flag, ParticleSettings::flag, ParticleSystem::flag, ChildParticle::foffset, ParticleData::foffset, ParticleSettings::from, ChildParticle::fuv, ParticleData::fuv, get_child_modifier_parameters(), ParticleSystem::hair_out_mesh, init_particle_interpolation(), interpolate_pathcache(), ParticleInterpolationData::keyed, ParticleSystem::lattice_deform_data, ParticleSystem::lattice_strength, len_v3(), length(), ParticleThreadContext::ma, ParticleInterpolationData::mesh, ParticleThreadContext::mesh, ParticleSystemModifierData::mesh_final, mul_m4_v3(), mul_mat3_m4_v3(), mul_v3_fl(), normalize_v3(), nullptr, ChildParticle::num, ParticleData::num, ParticleData::num_dmcache, ParticleSimulationData::ob, offset_child(), ParticleSettings::omat, ParticleChildModifierContext::orco, ChildParticle::pa, ParticleChildModifierContext::par_co, ParticleChildModifierContext::par_orco, ParticleChildModifierContext::par_rot, ParticleChildModifierContext::par_vel, ChildParticle::parent, ParticleChildModifierContext::parent_keys, PARS_REKEY, ParticleSystem::part, PART_CHILD_FACES, PART_CHILD_GUIDE, PART_FROM_FACE, PART_HAIR, PART_HAIR_BSPLINE, PART_PHYS_KEYED, PARTICLE_PSMD, ParticleSystem::particles, ParticleSystem::pathcache, ParticleSettings::phystype, ParticleSystem::pointcache, ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_get_child_time(), psys_get_particle_on_path(), PSYS_GLOBAL_HAIR, psys_in_edit_mode(), PSYS_KEYED, psys_mat_hair_to_global(), psys_particle_on_emitter(), ParticleChildModifierContext::ptex, result, ParticleKey::rot, ParticleChildModifierContext::sim, ParticleThreadContext::sim, state, sub_v3_v3v3(), ParticleChildModifierContext::thread_ctx, ParticleKey::time, ParticleSystem::totchild, ParticleSystem::totpart, ParticleSettings::type, unit_m4(), ParticleKey::vel, ChildParticle::w, and w().
Referenced by brush_add(), modify_mesh(), psys_get_particle_on_path(), psys_get_particle_state(), psys_unique_name(), rekey_particle(), rekey_particle_to_time(), and subdivide_particle().
| bool psys_get_particle_state | ( | struct ParticleSimulationData * | sim, |
| int | p, | ||
| struct ParticleKey * | state, | ||
| bool | always ) |
Gets particle's state at a time. Must call psys_sim_data_init before this.
Definition at line 4910 of file particle.cc.
References ParticleKey::ave, BKE_lattice_deform_data_eval_co(), ParticleSystem::child, ParticleSystem::childcache, ParticleSettings::childflat, ParticleSettings::childrad, ParticleSettings::childtype, CLAMP, ParticleKey::co, copy_particle_key(), ParticleChildModifierContext::cpa, DEG_get_ctime(), ParticleSimulationData::depsgraph, ParticleData::dietime, do_child_modifiers(), ELEM, ParticleSettings::end, ParticleSettings::flag, ParticleSystem::flag, RenderData::frs_sec, ChildParticle::fuv, interp_qt_qtqt(), interp_v3_v3v3(), ParticleSystem::lattice_deform_data, ParticleSystem::lattice_strength, ParticleData::lifetime, ParticleSettings::lifetime, madd_v3_v3v3fl(), mul_v3_fl(), offset_child(), ParticleChildModifierContext::orco, ParticleChildModifierContext::par_co, ParticleChildModifierContext::par_orco, ParticleChildModifierContext::par_rot, ParticleChildModifierContext::par_vel, ChildParticle::parent, ParticleChildModifierContext::parent_keys, ParticleSystem::part, PART_CHILD_FACES, PART_DIED, PART_PHYS_KEYED, PART_PHYS_NO, PART_UNBORN, ParticleSystem::particles, ParticleSettings::phystype, ParticleData::prev_state, ParticleSimulationData::psys, psys_frand(), psys_get_child_time(), psys_get_particle_on_path(), psys_get_particle_state(), psys_get_timestep(), psys_interpolate_particle(), PSYS_KEYED, ParticleChildModifierContext::ptex, Scene::r, ParticleKey::rot, ParticleSimulationData::scene, ParticleChildModifierContext::sim, ParticleSettings::sta, ParticleData::state, state, ParticleChildModifierContext::thread_ctx, ParticleData::time, ParticleKey::time, ParticleSystem::totchild, ParticleSystem::totpart, unit_m4(), and ParticleKey::vel.
Referenced by blender::io::alembic::ABCPointsWriter::do_write(), explodeMesh(), get_effector_data(), make_duplis_particle_system(), modify_mesh(), blender::draw::particle_batch_cache_ensure_pos(), particle_system_minmax(), pointdensity_cache_psys(), psys_get_particle_state(), psys_unique_name(), and set_keyed_keys().
| void psys_get_texture | ( | ParticleSimulationData * | sim, |
| ParticleData * | pa, | ||
| ParticleTexture * | ptex, | ||
| int | event, | ||
| float | cfra ) |
Definition at line 4362 of file particle.cc.
References ATTR_FALLTHROUGH, BKE_mesh_texspace_ensure(), MTex::blendtype, CLAMP_PARTICLE_TEXTURE_POS, CLAMP_PARTICLE_TEXTURE_POSNEG, CLAMP_WARP_PARTICLE_TEXTURE_POS, ParticleTexture::clump, ParticleKey::co, copy_v3_v3(), ParticleTexture::damp, MTex::dampfac, Object::data, MTex::def_var, ParticleData::dietime, ParticleSettings::distr, ParticleTexture::effector, ELEM, ParticleTexture::exist, fabsf, ParticleTexture::field, MTex::fieldfac, ParticleData::foffset, ParticleSettings::from, ParticleData::fuv, get_particle_uv(), ParticleTexture::gravity, MTex::gravityfac, ParticleTexture::ivel, MTex::ivelfac, ParticleTexture::kink_amp, ParticleTexture::kink_freq, ParticleTexture::length, MTex::lengthfac, ParticleTexture::life, MTex::lifefac, MTex::mapto, MAX_MTEX, ParticleSystemModifierData::mesh_final, ParticleSettings::mtex, mul_m4_v3(), ParticleData::num, ParticleData::num_dmcache, ParticleSimulationData::ob, MTex::object, MTex::padensfac, PAMAP_DAMP, PAMAP_DENS, PAMAP_FIELD, PAMAP_GRAVITY, PAMAP_IVEL, PAMAP_LENGTH, PAMAP_LIFE, PAMAP_SIZE, PAMAP_TIME, PAMAP_TWIST, ParticleSystem::part, PART_DISTR_GRID, PART_FROM_FACE, PART_FROM_VERT, PART_FROM_VOLUME, ParticleSystem::particles, ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_get_texture(), psys_particle_on_emitter(), RE_texture_evaluate(), ParticleTexture::rough1, ParticleTexture::rough2, ParticleTexture::roughe, SET_PARTICLE_TEXTURE, ParticleTexture::size, MTex::sizefac, ParticleData::state, sub_v3_v3(), MTex::tex, MTex::texco, TEXCO_GLOB, TEXCO_OBJECT, TEXCO_ORCO, TEXCO_PARTICLE, TEXCO_UV, Mesh::texspace_location, Mesh::texspace_size, texture_value_blend(), ParticleData::time, ParticleTexture::time, MTex::timefac, ParticleSystem::totpart, ParticleTexture::twist, MTex::twistfac, and MTex::uvname.
Referenced by basic_integrate(), cached_step(), dynamics_step(), init_particle_texture(), particle_system_update(), psys_cache_paths(), psys_get_birth_coords(), psys_get_texture(), and reset_particle().
| float psys_get_timestep | ( | ParticleSimulationData * | sim | ) |
Definition at line 4498 of file particle.cc.
References ParticleSystem::part, ParticleSimulationData::psys, psys_get_timestep(), and ParticleSettings::timetweak.
Referenced by basic_integrate(), brush_add(), collision_check(), dynamics_step(), pd_point_from_particle(), psys_get_particle_state(), psys_get_timestep(), psys_unique_name(), and sph_integrate().
| bool psys_in_edit_mode | ( | Depsgraph * | depsgraph, |
| const ParticleSystem * | psys ) |
Definition at line 724 of file particle.cc.
References BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), DAG_EVAL_RENDER, DEG_get_input_scene(), DEG_get_input_view_layer(), DEG_get_mode(), ParticleSystem::edit, PointCache::edit, Object::mode, OB_MODE_PARTICLE_EDIT, ParticleSystem::pointcache, psys_in_edit_mode(), and psys_orig_get().
| void psys_interpolate_face | ( | Mesh * | mesh, |
| const float(*) | vert_positions[3], | ||
| const float(*) | vert_normals[3], | ||
| const MFace * | mface, | ||
| MTFace * | tface, | ||
| const float(*) | orcodata[3], | ||
| float | w[4], | ||
| float | vec[3], | ||
| float | nor[3], | ||
| float | utan[3], | ||
| float | vtan[3], | ||
| float | orco[3] ) |
Definition at line 1630 of file particle.cc.
References BKE_mesh_orco_verts_transform(), copy_v3_v3(), MFace::flag, interp_v3_v3v3v3(), interp_v3_v3v3v3v3(), map_to_sphere(), normal_quad_v3(), normal_tri_v3(), psys_interpolate_face(), sub_v3_v3v3(), MTFace::uv, MFace::v1, MFace::v2, v2, MFace::v3, MFace::v4, and w().
Definition at line 1781 of file particle.cc.
References psys_interpolate_mcol(), and w().
| void psys_interpolate_particle | ( | short | type, |
| ParticleKey | keys[4], | ||
| float | dt, | ||
| ParticleKey * | result, | ||
| bool | velocity ) |
Definition at line 1172 of file particle.cc.
References ParticleKey::co, interp_cubic_v3(), interp_v3_v3v3v3v3(), key_curve_position_weights(), psys_interpolate_particle(), result, sub_v3_v3v3(), and ParticleKey::vel.
Referenced by do_particle_interpolation(), psys_get_particle_state(), psys_interpolate_particle(), ptcache_cloth_interpolate(), ptcache_particle_interpolate(), and ptcache_softbody_interpolate().
| void psys_interpolate_uvs | ( | const MTFace * | tface, |
| int | quad, | ||
| const float | w[4], | ||
| float | uvco[2] ) |
Definition at line 1758 of file particle.cc.
References psys_interpolate_uvs(), MTFace::uv, and w().
|
static |
Definition at line 1807 of file particle.cc.
References CD_MFACE, CustomData_get_layer_for_write(), Mesh::fdata_legacy, interpolate_particle_value(), PART_FROM_FACE, PART_FROM_VERT, PART_FROM_VOLUME, psys_interpolate_value_from_verts(), Mesh::totface_legacy, MFace::v1, MFace::v2, MFace::v3, and MFace::v4.
Referenced by get_child_modifier_parameters(), psys_interpolate_value_from_verts(), and psys_particle_value_from_verts().
|
static |
Definition at line 1980 of file particle.cc.
References CD_MFACE, CD_ORIGSPACE, copy_v4_v4(), CustomData_get_layer(), CustomData_get_layer_for_write(), DMCACHE_ISCHILD, DMCACHE_NOTFOUND, Mesh::fdata_legacy, i, PART_FROM_VERT, psys_map_index_on_dm(), psys_origspace_to_w(), Mesh::runtime, Mesh::totface_legacy, MFace::v4, and Mesh::verts_num.
Referenced by psys_map_index_on_dm(), psys_particle_on_dm(), and psys_particle_value_from_verts().
| void psys_mat_hair_to_global | ( | Object * | ob, |
| Mesh * | mesh, | ||
| short | from, | ||
| ParticleData * | pa, | ||
| float | hairmat[4][4] ) |
Definition at line 3931 of file particle.cc.
References mul_m4_m4m4(), psys_mat_hair_to_global(), and psys_mat_hair_to_object().
Referenced by brush_add(), brush_puff(), blender::ed::transform::createTransParticleVerts(), disconnect_hair(), blender::ed::transform::flushTransParticles(), foreach_mouse_hit_key_iter(), modify_mesh(), PE_lasso_select(), PE_minmax(), psys_apply_hair_lattice(), psys_cache_edit_paths_iter(), psys_cache_paths(), psys_get_particle_on_path(), psys_mat_hair_to_global(), psys_thread_create_path(), and update_world_cos().
| void psys_mat_hair_to_object | ( | Object * | ob, |
| Mesh * | mesh, | ||
| short | from, | ||
| ParticleData * | pa, | ||
| float | hairmat[4][4] ) |
Definition at line 3875 of file particle.cc.
References copy_v3_v3(), ParticleData::foffset, ParticleData::fuv, ParticleData::num, ParticleData::num_dmcache, psys_face_mat(), psys_mat_hair_to_object(), psys_particle_on_dm(), and unit_m4().
Referenced by deflect_emitter_iter(), hair_create_input_mesh(), psys_mat_hair_to_global(), psys_mat_hair_to_object(), remap_hair_emitter(), remove_doubles_exec(), and blender::ed::curves::convert_to_particle_system::try_convert_single_object().
| void psys_mat_hair_to_orco | ( | Object * | ob, |
| Mesh * | mesh, | ||
| short | from, | ||
| ParticleData * | pa, | ||
| float | hairmat[4][4] ) |
Definition at line 3901 of file particle.cc.
References copy_v3_v3(), ParticleData::foffset, ParticleData::fuv, ParticleData::num, ParticleData::num_dmcache, psys_face_mat(), psys_mat_hair_to_orco(), and psys_particle_on_dm().
Referenced by PE_mirror_particle(), PE_update_mirror_cache(), and psys_mat_hair_to_orco().
|
static |
Definition at line 716 of file particle.cc.
References ParticleSystem::edit, ParticleSystem::orig_psys, and psys_orig_edit_get().
Referenced by psys_orig_edit_get(), psys_thread_context_init_path(), and psys_thread_create_path().
| ParticleSystem * psys_orig_get | ( | struct ParticleSystem * | psys | ) |
For a given evaluated particle system get its original.
If this input is an original particle system already, the return value is the same as the input.
Definition at line 692 of file particle.cc.
References ParticleSystem::orig_psys, and psys_orig_get().
Referenced by blender::draw::drw_particle_get_hair_source(), particle_system_update(), psys_in_edit_mode(), and psys_orig_get().
|
static |
Definition at line 1837 of file particle.cc.
References interp_weights_poly_v3(), psys_origspace_to_w(), psys_w_to_origspace(), OrigSpaceFace::uv, v, and w().
Referenced by psys_map_index_on_dm(), and psys_origspace_to_w().
| int psys_particle_dm_face_lookup | ( | struct Mesh * | mesh_final, |
| struct Mesh * | mesh_original, | ||
| int | findex_orig, | ||
| const float | fw[4], | ||
| struct LinkNode ** | poly_nodes ) |
Find the final derived mesh tessface for a particle, from its original tessface index. This is slow and can be optimized but only for many lookups.
| mesh_final | Final mesh, it may not have the same topology as original mesh. |
| mesh_original | Original mesh, use for accessing poly to MFace mapping. |
| findex_orig | The input tessface index. |
| fw | Face weights (position of the particle inside the findex_orig tessface). |
| poly_nodes | May be NULL, otherwise an array of linked list, one for each final mesh_final face, containing all its tessfaces indices. |
Definition at line 1866 of file particle.cc.
References BKE_mesh_origindex_mface_mpoly(), BLI_assert, CD_MFACE, CD_ORIGINDEX, CD_ORIGSPACE, CustomData_get_layer(), CustomData_get_layer_for_write(), DMCACHE_NOTFOUND, ELEM, Mesh::face_data, Mesh::fdata_legacy, isect_point_quad_v2(), isect_point_tri_v2(), LinkNode::link, LinkNode::next, POINTER_AS_INT, printf, psys_particle_dm_face_lookup(), psys_w_to_origspace(), Mesh::runtime, Mesh::totface_legacy, and OrigSpaceFace::uv.
Referenced by BKE_psys_collision_neartest_cb(), brush_add_count_iter(), PE_mirror_x(), psys_calc_dmcache(), psys_particle_dm_face_lookup(), and remap_hair_emitter().
| void psys_particle_on_dm | ( | struct Mesh * | mesh_final, |
| int | from, | ||
| int | index, | ||
| int | index_dmcache, | ||
| const float | fw[4], | ||
| float | foffset, | ||
| float | vec[3], | ||
| float | nor[3], | ||
| float | utan[3], | ||
| float | vtan[3], | ||
| float | orco[3] ) |
Interprets particle data to get a point on a mesh in object space.
Definition at line 2053 of file particle.cc.
References add_v3_v3(), BKE_mesh_orco_verts_transform(), CD_MFACE, CD_MTFACE, CD_ORCO, copy_v3_v3(), CustomData_get_layer(), CustomData_get_layer_for_write(), blender::Span< T >::data(), Mesh::fdata_legacy, mul_v3_fl(), normalize_v3(), PART_FROM_VERT, PART_FROM_VOLUME, psys_interpolate_face(), psys_map_index_on_dm(), psys_particle_on_dm(), Mesh::totface_legacy, and Mesh::vert_data.
Referenced by BKE_psys_collision_neartest_cb(), brush_add(), distribute_children_exec(), distribute_from_verts_exec(), psys_mat_hair_to_object(), psys_mat_hair_to_orco(), psys_particle_on_dm(), psys_particle_on_emitter(), and psys_thread_context_init_distribute().
| void psys_particle_on_emitter | ( | ParticleSystemModifierData * | psmd, |
| int | from, | ||
| int | index, | ||
| int | index_dmcache, | ||
| float | fuv[4], | ||
| float | foffset, | ||
| float | vec[3], | ||
| float | nor[3], | ||
| float | utan[3], | ||
| float | vtan[3], | ||
| float | orco[3] ) |
Definition at line 2277 of file particle.cc.
References copy_v3_v3(), ParticleSettings::distr, ParticleSettings::from, ParticleSystemModifierData::mesh_final, ParticleSystem::part, PART_DISTR_GRID, PART_FROM_VERT, ParticleSystemModifierData::psys, psys_particle_on_dm(), psys_particle_on_emitter(), and psys_particle_on_shape().
Referenced by createFacepa(), precalc_guides(), psys_find_parents(), psys_get_birth_coords(), psys_get_dupli_path_transform(), psys_get_dupli_texture(), psys_get_particle_on_path(), psys_get_texture(), psys_interpolate_mcol(), psys_particle_on_emitter(), and psys_thread_create_path().
|
static |
Definition at line 2206 of file particle.cc.
References copy_v3_v3(), and psys_particle_on_shape().
Referenced by psys_particle_on_emitter(), and psys_particle_on_shape().
| float psys_particle_value_from_verts | ( | Mesh * | mesh, |
| short | from, | ||
| ParticleData * | pa, | ||
| float * | values ) |
Definition at line 2172 of file particle.cc.
References ParticleData::foffset, ParticleData::fuv, ParticleData::num, ParticleData::num_dmcache, psys_interpolate_value_from_verts(), psys_map_index_on_dm(), and psys_particle_value_from_verts().
Referenced by psys_cache_paths(), psys_get_birth_coords(), psys_interpolate_face(), and psys_particle_value_from_verts().
| void psys_set_current_num | ( | Object * | ob, |
| int | index ) |
Definition at line 603 of file particle.cc.
References ListBase::first, ParticleSystem::flag, i, ParticleSystem::next, Object::particlesystem, PSYS_CURRENT, and psys_set_current_num().
Referenced by psys_set_current_num().
| void psys_sim_data_free | ( | ParticleSimulationData * | sim | ) |
Definition at line 665 of file particle.cc.
References BKE_lattice_deform_data_destroy(), ParticleSystem::lattice_deform_data, ParticleSimulationData::psys, and psys_sim_data_free().
Referenced by cached_step(), blender::io::alembic::ABCPointsWriter::do_write(), explodeMesh(), make_duplis_particle_system(), modify_mesh(), blender::draw::particle_batch_cache_ensure_pos(), particle_system_minmax(), pointdensity_cache_psys(), psys_apply_hair_lattice(), psys_cache_paths(), psys_sim_data_free(), psys_thread_context_free(), save_hair(), and system_step().
| void psys_sim_data_init | ( | struct ParticleSimulationData * | sim | ) |
Initialize/free data for particle simulation evaluation.
Definition at line 624 of file particle.cc.
References BKE_curvemapping_init(), BKE_lattice_deform_data_create(), ParticleSettings::child_flag, ParticleSettings::clumpcurve, DAG_EVAL_RENDER, DEG_get_mode(), ParticleSimulationData::depsgraph, eModifierMode_Realtime, eModifierMode_Render, eModifierType_Lattice, ParticleSystem::lattice_deform_data, ParticleSystem::lattice_strength, ModifierData::mode, ModifierData::next, ParticleSimulationData::ob, LatticeModifierData::object, ParticleSystem::part, PART_CHILD_USE_CLUMP_CURVE, PART_CHILD_USE_ROUGH_CURVE, PART_CHILD_USE_TWIST_CURVE, ParticleSimulationData::psys, psys_get_modifier(), psys_in_edit_mode(), psys_sim_data_init(), ParticleSettings::roughcurve, LatticeModifierData::strength, ParticleSettings::twistcurve, and ModifierData::type.
Referenced by cached_step(), blender::io::alembic::ABCPointsWriter::do_write(), explodeMesh(), make_duplis_particle_system(), modify_mesh(), blender::draw::particle_batch_cache_ensure_pos(), particle_system_minmax(), pointdensity_cache_psys(), psys_apply_hair_lattice(), psys_cache_paths(), psys_sim_data_init(), psys_thread_context_init_path(), and save_hair().
|
static |
Definition at line 2816 of file particle.cc.
References BLI_rng_new(), ParticleSimulationData::psys, psys_task_init_path(), ParticleTask::rng_path, and ParticleSystem::seed.
Referenced by psys_cache_child_paths(), and psys_task_init_path().
|
static |
Definition at line 2709 of file particle.cc.
References ParticleThreadContext::between, BKE_curvemapping_changed_all(), BKE_curvemapping_copy(), ParticleThreadContext::cfra, ParticleSettings::child_flag, ParticleSettings::child_percent, ParticleSettings::child_render_percent, ParticleSettings::childtype, ParticleSettings::clumpcurve, ParticleThreadContext::clumpcurve, ParticleSimulationData::depsgraph, ParticleSettings::disp, ParticleEditSettings::draw_step, ParticleSettings::draw_step, ParticleThreadContext::editupdate, ELEM, ParticleThreadContext::extra_segments, ParticleEditSettings::flag, ParticleSettings::flag, ParticleSettings::kink, ParticleSettings::kink_extra_steps, max_ii(), ParticleThreadContext::mesh, ParticleThreadContext::parent_pass, ParticleSettings::parents, ParticleSystem::part, PART_CHILD_EFFECT, PART_CHILD_FACES, PART_CHILD_USE_CLUMP_CURVE, PART_CHILD_USE_ROUGH_CURVE, PART_CHILD_USE_TWIST_CURVE, PART_KINK_SPIRAL, ToolSettings::particle, PE_DRAW_PART, ParticleSimulationData::psys, psys_cache_vgroup(), psys_in_edit_mode(), psys_orig_edit_get(), psys_sim_data_init(), psys_thread_context_init(), psys_thread_context_init_path(), PSYS_VG_CLUMP, PSYS_VG_EFFECTOR, PSYS_VG_KINK, PSYS_VG_LENGTH, PSYS_VG_ROUGH1, PSYS_VG_ROUGH2, PSYS_VG_ROUGHE, PSYS_VG_TWIST, ParticleSettings::ren_step, ParticleSettings::roughcurve, ParticleThreadContext::roughcurve, ParticleThreadContext::segments, ParticleThreadContext::sim, Scene::toolsettings, ParticleSystem::totchild, ParticleThreadContext::totchild, ParticleThreadContext::totparent, ParticleSettings::twistcurve, ParticleThreadContext::twistcurve, ParticleThreadContext::vg_clump, ParticleThreadContext::vg_effector, ParticleThreadContext::vg_kink, ParticleThreadContext::vg_length, ParticleThreadContext::vg_rough1, ParticleThreadContext::vg_rough2, ParticleThreadContext::vg_roughe, and ParticleThreadContext::vg_twist.
Referenced by psys_cache_child_paths(), and psys_thread_context_init_path().
|
static |
Definition at line 2825 of file particle.cc.
References add_v3_v3(), ParticleThreadContext::between, BLI_assert, BLI_listbase_clear(), ParticleThreadContext::cfra, ParticleSystem::childcache, ParticleSettings::childflat, ParticleSettings::childrad, CLAMP, ParticleCacheKey::co, copy_qt_qt(), copy_v3_v3(), ParticleTask::ctx, ParticleSimulationData::depsgraph, DMCACHE_ISCHILD, DMCACHE_NOTFOUND, do_path_effectors(), dot_v3v3(), ParticleThreadContext::editupdate, ParticleTexture::effector, ELEM, ParticleTexture::exist, ParticleData::flag, ParticleSettings::flag, PTCacheEditPoint::flag, ChildParticle::foffset, ParticleData::foffset, ParticleSettings::from, ChildParticle::fuv, ParticleData::fuv, get_child_modifier_parameters(), i, interp_v3_v3v3v3v3(), interp_v4_v4v4(), len_v3(), len_v3v3(), madd_v3_v3fl(), ParticleSystemModifierData::mesh_final, mul_m4_v3(), mul_qt_qtqt(), mul_qt_v3(), normalize_v3(), ChildParticle::num, ParticleData::num, ParticleData::num_dmcache, ParticleSimulationData::ob, offset_child(), ChildParticle::pa, ChildParticle::parent, ParticleSettings::parents, PARS_UNEXIST, ParticleSystem::part, PART_CHILD_EFFECT, PART_CHILD_LONG_HAIR, PART_FROM_FACE, ParticleSystem::particles, ParticleSettings::parting_fac, ParticleSettings::parting_max, ParticleSettings::parting_min, ParticleSystem::pathcache, PTCacheEdit::pathcache, pcache_key_segment_endpoint_safe(), PEP_EDIT_RECALC, PTCacheEdit::points, project_v3_v3v3(), ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_apply_child_modifiers(), psys_frand(), psys_in_edit_mode(), psys_mat_hair_to_global(), psys_orig_edit_get(), psys_particle_on_emitter(), psys_thread_create_path(), RAD2DEGF, ParticleCacheKey::rot, rot, safe_acosf(), ParticleCacheKey::segments, ParticleThreadContext::segments, ParticleThreadContext::sim, sub_v3_v3v3(), ParticleCacheKey::time, ParticleSystem::totchildcache, Mesh::totface_legacy, ParticleThreadContext::totparent, unit_qt(), v2, ParticleCacheKey::vel, ChildParticle::w, w(), and zero_v3().
Referenced by exec_child_path_cache(), and psys_thread_create_path().
| int psys_uses_gravity | ( | ParticleSimulationData * | sim | ) |
Definition at line 861 of file particle.cc.
References ParticleSettings::effector_weights, PhysicsSettings::flag, EffectorWeights::global_gravity, ParticleSystem::part, PHYS_GLOBAL_GRAVITY, Scene::physics_settings, ParticleSimulationData::psys, psys_uses_gravity(), and ParticleSimulationData::scene.
Referenced by basic_integrate(), boid_body(), psys_in_edit_mode(), psys_sph_init(), psys_uses_gravity(), and rule_average_speed().
| void psys_vec_rot_to_face | ( | Mesh * | mesh, |
| ParticleData * | pa, | ||
| float | vec[3] ) |
Definition at line 3922 of file particle.cc.
References mul_mat3_m4_v3(), psys_face_mat(), psys_vec_rot_to_face(), and transpose_m4().
Referenced by psys_vec_rot_to_face(), and save_hair().
|
static |
Definition at line 1830 of file particle.cc.
References psys_w_to_origspace(), and w().
Referenced by psys_origspace_to_w(), psys_particle_dm_face_lookup(), and psys_w_to_origspace().
|
static |
Definition at line 3792 of file particle.cc.
References cross_v3_v3v3(), normal_tri_v3(), normalize_v3(), sub_v3_v3v3(), triatomat(), and v2.
Referenced by psys_face_mat(), and triatomat().
|
static |
Definition at line 226 of file particle.cc.
References BLO_write_struct, eBoidRuleType_AverageSpeed, eBoidRuleType_Avoid, eBoidRuleType_AvoidCollision, eBoidRuleType_Fight, eBoidRuleType_FollowLeader, eBoidRuleType_Goal, LISTBASE_FOREACH, state, and write_boid_state().
Referenced by particle_settings_blend_write(), and write_boid_state().
| void(*) BKE_particle_batch_cache_dirty_tag_cb(ParticleSystem *psys, int mode) | ( | ParticleSystem * | psys, |
| int | mode ) = nullptr |
Definition at line 5316 of file particle.cc.
Referenced by BKE_particle_batch_cache_dirty_tag(), and DRW_module_init().
| void(*) BKE_particle_batch_cache_free_cb(ParticleSystem *psys) | ( | ParticleSystem * | psys | ) | = nullptr |
Definition at line 5317 of file particle.cc.
Referenced by BKE_particle_batch_cache_free(), and DRW_module_init().
| IDTypeInfo IDType_ID_PA |
Definition at line 416 of file particle.cc.
| float PSYS_FRAND_BASE[PSYS_FRAND_COUNT] |
Definition at line 448 of file particle.cc.
Referenced by BKE_particle_init_rng(), psys_frand(), and psys_frand_vec().
| uint PSYS_FRAND_SEED_MULTIPLIER[PSYS_FRAND_COUNT] |
Definition at line 447 of file particle.cc.
Referenced by BKE_particle_init_rng(), psys_frand(), and psys_frand_vec().
| uint PSYS_FRAND_SEED_OFFSET[PSYS_FRAND_COUNT] |
Definition at line 446 of file particle.cc.
Referenced by BKE_particle_init_rng(), psys_frand(), and psys_frand_vec().