|
Blender
V2.93
|
Go to the source code of this file.
Classes | |
| struct | ParticleSimulationData |
| struct | SPHData |
| struct | ParticleTexture |
| struct | ParticleSeam |
| struct | ParticleCacheKey |
| struct | ParticleThreadContext |
| struct | ParticleTask |
| struct | ParticleCollisionElement |
| struct | ParticleCollision |
| struct | ParticleDrawData |
Macros | |
| #define | PARTICLE_COLLISION_MAX_COLLISIONS 10 |
| #define | PARTICLE_P |
| #define | LOOP_PARTICLES for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++) |
| #define | LOOP_EXISTING_PARTICLES |
| #define | LOOP_SHOWN_PARTICLES |
| #define | LOOP_DYNAMIC_PARTICLES |
| #define | PARTICLE_PSMD ParticleSystemModifierData *psmd = sim->psmd ? sim->psmd : psys_get_modifier(sim->ob, sim->psys) |
| #define | PARTICLE_DRAW_DATA_UPDATED 1 |
| #define | PSYS_FRAND_COUNT 1024 |
| #define | PSYS_RESET_ALL 1 |
| #define | PSYS_RESET_DEPSGRAPH 2 |
| #define | PSYS_RESET_CACHE_MISS 4 |
| #define | DMCACHE_NOTFOUND -1 |
| #define | DMCACHE_ISCHILD -2 |
Typedefs | |
| typedef struct ParticleSimulationData | ParticleSimulationData |
| typedef struct SPHData | SPHData |
| typedef struct ParticleTexture | ParticleTexture |
| typedef struct ParticleSeam | ParticleSeam |
| typedef struct ParticleCacheKey | ParticleCacheKey |
| typedef struct ParticleThreadContext | ParticleThreadContext |
| typedef struct ParticleTask | ParticleTask |
| typedef struct ParticleCollisionElement | ParticleCollisionElement |
| typedef struct ParticleCollision | ParticleCollision |
| typedef struct ParticleDrawData | ParticleDrawData |
| typedef void(* | ParticleSystemIDFunc) (struct ParticleSystem *psys, struct ID **idpoin, void *userdata, int cb_flag) |
Enumerations | |
| enum | { BKE_PARTICLE_BATCH_DIRTY_ALL = 0 } |
Variables | |
| unsigned int | PSYS_FRAND_SEED_OFFSET [PSYS_FRAND_COUNT] |
| unsigned int | PSYS_FRAND_SEED_MULTIPLIER [PSYS_FRAND_COUNT] |
| float | PSYS_FRAND_BASE [PSYS_FRAND_COUNT] |
| void(* | BKE_particle_batch_cache_dirty_tag_cb )(struct ParticleSystem *psys, int mode) |
| void(* | BKE_particle_batch_cache_free_cb )(struct ParticleSystem *psys) |
| #define DMCACHE_ISCHILD -2 |
Definition at line 607 of file BKE_particle.h.
| #define DMCACHE_NOTFOUND -1 |
Definition at line 606 of file BKE_particle.h.
| #define LOOP_DYNAMIC_PARTICLES |
Definition at line 77 of file BKE_particle.h.
| #define LOOP_EXISTING_PARTICLES |
Definition at line 70 of file BKE_particle.h.
| #define LOOP_PARTICLES for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++) |
Definition at line 69 of file BKE_particle.h.
| #define LOOP_SHOWN_PARTICLES |
Definition at line 73 of file BKE_particle.h.
| #define PARTICLE_COLLISION_MAX_COLLISIONS 10 |
Definition at line 64 of file BKE_particle.h.
| #define PARTICLE_DRAW_DATA_UPDATED 1 |
Definition at line 257 of file BKE_particle.h.
| #define PARTICLE_P |
Definition at line 66 of file BKE_particle.h.
| #define PARTICLE_PSMD ParticleSystemModifierData *psmd = sim->psmd ? sim->psmd : psys_get_modifier(sim->ob, sim->psys) |
Definition at line 82 of file BKE_particle.h.
| #define PSYS_FRAND_COUNT 1024 |
Definition at line 259 of file BKE_particle.h.
| #define PSYS_RESET_ALL 1 |
Definition at line 600 of file BKE_particle.h.
| #define PSYS_RESET_CACHE_MISS 4 |
Definition at line 603 of file BKE_particle.h.
| #define PSYS_RESET_DEPSGRAPH 2 |
Definition at line 601 of file BKE_particle.h.
| typedef struct ParticleCacheKey ParticleCacheKey |
| typedef struct ParticleCollision ParticleCollision |
Container for moving data between deflet_particle and particle_intersect_face.
| typedef struct ParticleCollisionElement ParticleCollisionElement |
| typedef struct ParticleDrawData ParticleDrawData |
| typedef struct ParticleSeam ParticleSeam |
| typedef struct ParticleSimulationData ParticleSimulationData |
| typedef void(* ParticleSystemIDFunc) (struct ParticleSystem *psys, struct ID **idpoin, void *userdata, int cb_flag) |
Definition at line 493 of file BKE_particle.h.
| typedef struct ParticleTask ParticleTask |
| typedef struct ParticleTexture ParticleTexture |
| typedef struct ParticleThreadContext ParticleThreadContext |
| anonymous enum |
| Enumerator | |
|---|---|
| BKE_PARTICLE_BATCH_DIRTY_ALL | |
Definition at line 619 of file BKE_particle.h.
| void BKE_particle_batch_cache_dirty_tag | ( | struct ParticleSystem * | psys, |
| int | mode | ||
| ) |
Definition at line 5243 of file particle.c.
References ParticleSystem::batch_cache, and BKE_particle_batch_cache_dirty_tag_cb.
Referenced by BKE_object_eval_eval_base_flags(), brush_edit_apply(), clear_edited_exec(), delete_exec(), flushTransParticles(), mirror_exec(), particle_system_update(), particle_undosys_step_decode(), and shape_cut_exec().
| void BKE_particle_batch_cache_free | ( | struct ParticleSystem * | psys | ) |
Definition at line 5249 of file particle.c.
References ParticleSystem::batch_cache, and BKE_particle_batch_cache_free_cb.
Referenced by psys_free().
| void BKE_particle_init_rng | ( | void | ) |
Definition at line 523 of file particle.c.
References BLI_rng_free(), BLI_rng_get_float(), BLI_rng_get_int(), BLI_rng_new_srandom(), PSYS_FRAND_BASE, PSYS_FRAND_COUNT, PSYS_FRAND_SEED_MULTIPLIER, and PSYS_FRAND_SEED_OFFSET.
Referenced by main().
| void BKE_particle_partdeflect_blend_read_data | ( | struct BlendDataReader * | reader, |
| struct PartDeflect * | pd | ||
| ) |
Referenced by object_blend_read_data().
| void BKE_particle_partdeflect_blend_read_lib | ( | struct BlendLibReader * | reader, |
| struct ID * | id, | ||
| struct PartDeflect * | pd | ||
| ) |
Definition at line 372 of file particle.c.
References BLO_read_id_address, PartDeflect::f_source, id, ID::lib, and PartDeflect::tex.
Referenced by object_blend_read_lib(), and particle_settings_blend_read_lib().
| void BKE_particle_settings_eval_reset | ( | struct Depsgraph * | depsgraph, |
| struct ParticleSettings * | particle_settings | ||
| ) |
Definition at line 5054 of file particle_system.c.
References DEG_debug_print_eval(), depsgraph, ParticleSettings::id, ID_RECALC_PSYS_RESET, ID::name, and ID::recalc.
| void BKE_particle_system_blend_read_data | ( | struct BlendDataReader * | reader, |
| struct ListBase * | particles | ||
| ) |
Definition at line 5300 of file particle.c.
References Freestyle::a, ParticleSystem::batch_cache, BKE_ptcache_blend_read_data(), BLI_listbase_clear(), BLO_read_data_address, BLO_read_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, NULL, 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, ParticleData::totkey, ParticleSystem::totpart, and ParticleSystem::tree.
Referenced by object_blend_read_data().
| void BKE_particle_system_blend_read_lib | ( | struct BlendLibReader * | reader, |
| struct Object * | ob, | ||
| struct ID * | id, | ||
| struct ListBase * | particles | ||
| ) |
Definition at line 5388 of file particle.c.
References BKE_modifier_free(), BKE_modifier_remove_from_list(), BLI_remlink(), BLO_read_id_address, ParticleSystem::clmd, ClothModifierData::coll_parms, ModifierData::error, ListBase::first, ClothCollSettings::group, id, ListBase::last, ID::lib, LISTBASE_FOREACH, LISTBASE_FOREACH_MUTABLE, MEM_freeN, ClothModifierData::modifier, NULL, ParticleSystem::parent, ParticleSystem::part, ClothModifierData::point_cache, ParticleSystem::pointcache, psys_get_modifier(), ClothModifierData::ptcaches, ParticleSystem::target_ob, and ParticleSystem::targets.
Referenced by object_blend_read_lib().
| void BKE_particle_system_blend_write | ( | struct BlendWriter * | writer, |
| struct ListBase * | particles | ||
| ) |
Definition at line 5256 of file particle.c.
References Freestyle::a, 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 object_blend_write().
Definition at line 5061 of file particle_system.c.
References DEG_debug_print_eval(), depsgraph, ListBase::first, Object::id, ID_RECALC_PSYS_ALL, ID::name, NULL, and Object::particlesystem.
Referenced by blender::deg::DepsgraphNodeBuilder::build_particle_systems().
| struct ParticleSettings* BKE_particlesettings_add | ( | struct Main * | bmain, |
| const char * | name | ||
| ) |
Definition at line 4086 of file particle.c.
References BKE_id_new(), and ID_PA.
Referenced by blo_do_versions_pre250(), new_particle_settings_exec(), and object_add_or_copy_particle_system().
| void BKE_particlesettings_clump_curve_init | ( | struct ParticleSettings * | part | ) |
Definition at line 4095 of file particle.c.
References BKE_curvemapping_add(), BKE_curvemapping_init(), ParticleSettings::clumpcurve, CurveMapping::cm, CurveMap::curve, CurveMapPoint::x, and CurveMapPoint::y.
| void BKE_particlesettings_fluid_default_settings | ( | struct ParticleSettings * | part | ) |
Definition at line 4702 of file particle_system.c.
References SPHFluidSettings::buoyancy, SPHFluidSettings::flag, ParticleSettings::fluid, SPHFluidSettings::plasticity_constant, SPHFluidSettings::radius, SPHFluidSettings::rest_density, SPHFluidSettings::rest_length, SPH_FAC_DENSITY, SPH_FAC_RADIUS, SPH_FAC_REPULSION, SPH_FAC_REST_LENGTH, SPH_FAC_VISCOSITY, SPHFluidSettings::spring_k, SPHFluidSettings::stiffness_k, SPHFluidSettings::stiffness_knear, SPHFluidSettings::viscosity_beta, SPHFluidSettings::viscosity_omega, and SPHFluidSettings::yield_ratio.
| void BKE_particlesettings_rough_curve_init | ( | struct ParticleSettings * | part | ) |
Definition at line 4109 of file particle.c.
References BKE_curvemapping_add(), BKE_curvemapping_init(), CurveMapping::cm, CurveMap::curve, ParticleSettings::roughcurve, CurveMapPoint::x, and CurveMapPoint::y.
| void BKE_particlesettings_twist_curve_init | ( | struct ParticleSettings * | part | ) |
Definition at line 4123 of file particle.c.
References BKE_curvemapping_add(), BKE_curvemapping_init(), CurveMapping::cm, CurveMap::curve, ParticleSettings::twistcurve, CurveMapPoint::x, and CurveMapPoint::y.
| void BKE_particlesystem_id_loop | ( | struct ParticleSystem * | psys, |
| ParticleSystemIDFunc | func, | ||
| void * | userdata | ||
| ) |
Definition at line 5006 of file particle_system.c.
References BKE_modifier_get_info(), ParticleData::boid, ParticleSystem::clmd, data, ListBase::first, ModifierTypeInfo::foreachIDLink, BoidParticle::ground, IDWALK_CB_NEVER_NULL, IDWALK_CB_NOP, IDWALK_CB_USER, ClothModifierData::modifier, ParticleTarget::next, NULL, ParticleTarget::ob, ParticleSystem::parent, ParticleSystem::part, PART_PHYS_BOIDS, ParticleSystem::particles, particlesystem_modifiersForeachIDLink(), ParticleSettings::phystype, ParticleSystem::target_ob, ParticleSystem::targets, and ModifierData::type.
Referenced by object_foreach_id().
| void BKE_particlesystem_reset_all | ( | struct Object * | object | ) |
Definition at line 5040 of file particle_system.c.
References eModifierType_ParticleSystem, ListBase::first, ID_RECALC_PSYS_RESET, Object::modifiers, NULL, ParticleSystemModifierData::psys, and ParticleSystem::recalc.
Referenced by ED_object_editmode_exit_ex(), and SCULPT_dynamic_topology_disable_ex().
| void BKE_psys_collision_neartest_cb | ( | void * | userdata, |
| int | index, | ||
| const struct BVHTreeRay * | ray, | ||
| struct BVHTreeRayHit * | hit | ||
| ) |
Referenced by boid_find_ground(), and rule_avoid_collision().
| void copy_particle_key | ( | struct ParticleKey * | to, |
| struct ParticleKey * | from, | ||
| int | time | ||
| ) |
Definition at line 3763 of file particle.c.
References from, time, and ParticleKey::time.
Referenced by boid_body(), do_particle_interpolation(), dynamics_step(), get_pointcache_keys_for_time(), integrate_particle(), psys_get_particle_on_path(), set_keyed_keys(), and sph_integrate().
| int count_particles | ( | struct ParticleSystem * | psys | ) |
Definition at line 555 of file particle.c.
References ParticleSettings::flag, LOOP_SHOWN_PARTICLES, PARS_DEAD, PARS_UNBORN, ParticleSystem::part, PART_DIED, PART_UNBORN, and PARTICLE_P.
| int count_particles_mod | ( | struct ParticleSystem * | psys, |
| int | totgr, | ||
| int | cur | ||
| ) |
Definition at line 573 of file particle.c.
References ParticleSettings::flag, LOOP_SHOWN_PARTICLES, PARS_DEAD, PARS_UNBORN, ParticleSystem::part, PART_DIED, PART_UNBORN, and PARTICLE_P.
| void distribute_particles | ( | struct ParticleSimulationData * | sim, |
| int | from | ||
| ) |
Definition at line 1371 of file particle_distribute.c.
References distribute_invalid(), distribute_particles_on_dm(), distribute_particles_on_shape(), from, and PARTICLE_PSMD.
Referenced by particle_system_update(), psys_update_path_cache(), system_step(), and update_children().
| int do_guides | ( | struct Depsgraph * | depsgraph, |
| struct ParticleSettings * | part, | ||
| struct ListBase * | effectors, | ||
| ParticleKey * | state, | ||
| int | index, | ||
| float | time | ||
| ) |
Definition at line 2381 of file particle.c.
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, Object::data, depsgraph, do_clump(), do_kink(), dot_v3v3(), ListBase::first, Curve::flag, PartDeflect::flag, PartDeflect::forcefield, PartDeflect::free_end, EffectorCache::guide_data, EffectorCache::guide_dir, EffectorCache::guide_loc, if(), interp_v3_v3v3(), PartDeflect::kink, PartDeflect::kink_amp, PartDeflect::kink_axis, PartDeflect::kink_freq, PartDeflect::kink_shape, len_v3(), madd_v3_v3fl(), mul_m4_v3(), mul_mat3_m4_v3(), mul_qt_v3(), mul_v3_fl(), EffectorCache::next, normalize_v3(), NULL, EffectorCache::ob, Object::obmat, PART_CHILD_USE_CLUMP_CURVE, PART_CHILD_USE_CLUMP_NOISE, PART_CHILD_USE_ROUGH_CURVE, EffectorCache::pd, PFIELD_GUIDE, PFIELD_GUIDE_PATH_ADD, PFIELD_GUIDE_PATH_WEIGHT, ParticleSettings::roughcurve, saacos(), EffectorCache::scene, state, Curve::taperobj, and time.
Referenced by basic_integrate(), do_child_modifiers(), and psys_get_particle_on_path().
| void free_hair | ( | struct Object * | ob, |
| struct ParticleSystem * | psys, | ||
| int | dynamics | ||
| ) |
Definition at line 922 of file particle.c.
References BKE_id_free(), BKE_modifier_free(), BKE_ptcache_id_clear(), BKE_ptcache_id_from_particles(), ParticleSystem::clmd, cloth_free_modifier(), ParticleSystem::flag, ParticleSystem::hair_in_mesh, ParticleSystem::hair_out_mesh, LOOP_PARTICLES, MEM_freeN, NULL, PARTICLE_P, PSYS_HAIR_DONE, and PTCACHE_CLEAR_ALL.
Referenced by particle_system_update(), psys_changed_type(), and psys_free().
| void free_keyed_keys | ( | struct ParticleSystem * | psys | ) |
Definition at line 960 of file particle.c.
References ParticleData::keys, LOOP_PARTICLES, MEM_freeN, NULL, ParticleSystem::part, PART_HAIR, PARTICLE_P, ParticleSystem::particles, and ParticleSettings::type.
Referenced by particle_system_update(), psys_prepare_physics(), and set_keyed_keys().
| void init_particle | ( | struct ParticleSimulationData * | sim, |
| struct ParticleData * | pa | ||
| ) |
Definition at line 601 of file particle_system.c.
References ParticleSettings::end, ParticleData::flag, float(), ParticleData::hair_index, PARS_UNEXIST, ParticleSystem::part, ParticleSystem::particles, ParticleSimulationData::psys, ParticleSettings::sta, ParticleData::time, and ParticleSystem::totpart.
Referenced by brush_add(), and initialize_all_particles().
| struct ModifierData* object_add_particle_system | ( | struct Main * | bmain, |
| struct Scene * | scene, | ||
| struct Object * | ob, | ||
| const char * | name | ||
| ) |
Definition at line 3975 of file particle.c.
References NULL, object_add_or_copy_particle_system(), and scene.
Referenced by ED_object_modifier_add(), and particle_system_add_exec().
| struct ModifierData* object_copy_particle_system | ( | struct Main * | bmain, |
| struct Scene * | scene, | ||
| struct Object * | ob, | ||
| const struct ParticleSystem * | psys_orig | ||
| ) |
| void object_remove_particle_system | ( | struct Main * | bmain, |
| struct Scene * | scene, | ||
| struct Object * | ob | ||
| ) |
Referenced by object_modifier_remove(), and particle_system_remove_exec().
| void particle_system_update | ( | struct Depsgraph * | depsgraph, |
| struct Scene * | scene, | ||
| struct Object * | ob, | ||
| struct ParticleSystem * | psys, | ||
| const bool | use_render_params | ||
| ) |
Definition at line 4773 of file particle_system.c.
References ParticleSettings::adt, ADT_RECALC_ANIM, BKE_animsys_eval_context_construct(), BKE_animsys_evaluate_animdata(), BKE_mesh_tessface_ensure(), BKE_particle_batch_cache_dirty_tag(), BKE_PARTICLE_BATCH_DIRTY_ALL, ParticleSystem::cfra, DEG_get_ctime(), DEG_is_active(), ParticleSimulationData::depsgraph, depsgraph, distribute_particles(), ParticleSystem::edit, emit_particles(), eParticleSystemFlag_Pars, eParticleSystemFlag_psys_updated, evaluate_emitter_anim(), ParticleDrawData::flag, ParticleSystemModifierData::flag, ParticleData::flag, ParticleSettings::flag, ParticleSystem::flag, PTCacheEdit::flags, float(), ParticleSystem::free_edit, free_hair(), free_keyed_keys(), free_unexisting_particles(), ParticleSettings::from, hair_needs_recalc(), hair_step(), ParticleSettings::hair_step, ParticleSettings::id, ID_RECALC_PSYS_RESET, ParticleSystem::imat, initialize_all_particles(), invert_m4_m4(), LOOP_EXISTING_PARTICLES, ParticleSystemModifierData::mesh_final, NULL, ParticleSimulationData::ob, Object::obmat, PARS_NO_DISP, ParticleSystem::part, PART_FROM_VERT, PART_HAIR, PART_HAIR_REGROW, PART_PHYS_KEYED, PART_PHYS_NO, PARTICLE_DRAW_DATA_UPDATED, PARTICLE_P, particle_settings_free_local(), particle_settings_localize(), particles_fluid_step(), particles_has_bubble(), particles_has_flip(), particles_has_foam(), particles_has_spray(), particles_has_tracer(), ParticleSystem::pdd, ParticleSettings::phystype, ParticleSimulationData::psmd, PTCacheEdit::psmd_eval, ParticleSimulationData::psys, PTCacheEdit::psys, psys_check_enabled(), psys_count_keyed_targets(), PSYS_EDITED, PTCacheEdit::psys_eval, psys_frand(), psys_free_path_cache(), psys_get_current_display_percentage(), psys_get_modifier(), PSYS_HAIR_DONE, PSYS_OB_ANIM_RESTORE, psys_orig_get(), psys_prepare_physics(), psys_reset(), PSYS_RESET_ALL, PSYS_SHARED_CACHES, psys_update_path_cache(), PT_CACHE_EDIT_UPDATE_PARTICLE_FROM_EVAL, ParticleSettings::randsize, ParticleSystem::recalc, reset_particle(), save_hair(), ParticleSimulationData::scene, scene, set_keyed_keys(), ParticleData::size, ParticleSettings::size, system_step(), ParticleSettings::totpart, ParticleSystem::totpart, ParticleSystem::totunexist, and ParticleSettings::type.
Referenced by BKE_object_handle_data_update(), and deformVerts().
| void precalc_guides | ( | struct ParticleSimulationData * | sim, |
| struct ListBase * | effectors | ||
| ) |
Definition at line 2325 of file particle.c.
References copy_v3_v3(), data, EffectorData::distance, effector_falloff(), ParticleSettings::effector_weights, ListBase::first, PartDeflect::forcefield, ParticleSettings::from, EffectorCache::guide_data, EffectorCache::guide_dir, EffectorCache::guide_loc, len_v3(), LOOP_PARTICLES, MEM_callocN, mul_m4_v3(), mul_mat3_m4_v3(), EffectorCache::next, EffectorData::nor, ParticleSimulationData::ob, Object::obmat, ParticleSystem::part, PARTICLE_P, EffectorCache::pd, pd_point_from_particle(), PFIELD_GUIDE, ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_particle_on_emitter(), state, sub_v3_v3v3(), ParticleSystem::totpart, and EffectorData::vec_to_point.
Referenced by psys_update_effectors().
| void psys_apply_child_modifiers | ( | struct ParticleThreadContext * | ctx, |
| struct ListBase * | modifiers, | ||
| struct ChildParticle * | cpa, | ||
| struct ParticleTexture * | ptex, | ||
| const float | orco[3], | ||
| float | hairmat[4][4], | ||
| struct ParticleCacheKey * | keys, | ||
| struct ParticleCacheKey * | parent_keys, | ||
| const float | parent_orco[3] | ||
| ) |
Definition at line 314 of file particle_child.c.
References check_path_length(), ParticleCacheKey::co, ParticleKey::co, ParticleCacheKey::col, copy_v3_v3(), ParticleChildModifierContext::cpa, do_child_modifiers(), do_kink_spiral(), ParticleSettings::draw_col, ELEM, float(), ParticleSettings::kink, ParticleTexture::length, ParticleThreadContext::ma, mod(), mul_v3_fl(), NULL, ParticleChildModifierContext::orco, ParticleChildModifierContext::par_co, ParticleChildModifierContext::par_orco, ParticleChildModifierContext::par_rot, ParticleChildModifierContext::par_vel, ParticlePathIterator::parent_key, ParticleChildModifierContext::parent_keys, ParticlePathIterator::parent_rotation, ParticleSystem::part, PART_DRAW_COL_MAT, PART_KINK_SPIRAL, ParticleSimulationData::psys, psys_path_iter_get(), ParticleChildModifierContext::ptex, Material::r, ParticleCacheKey::segments, ParticleThreadContext::segments, ParticleThreadContext::sim, ParticleChildModifierContext::sim, sub_v3_v3v3(), ParticleChildModifierContext::thread_ctx, ParticlePathIterator::time, ParticleCacheKey::vel, and ParticleKey::vel.
Referenced by psys_thread_create_path().
| void psys_apply_hair_lattice | ( | struct Depsgraph * | depsgraph, |
| struct Scene * | scene, | ||
| struct Object * | ob, | ||
| struct ParticleSystem * | psys | ||
| ) |
Definition at line 5201 of file particle.c.
References BKE_lattice_deform_data_destroy(), BKE_lattice_deform_data_eval_co(), HairKey::co, ParticleSimulationData::depsgraph, depsgraph, ParticleSystem::flag, ParticleSettings::from, ParticleData::hair, invert_m4_m4(), ParticleSystem::lattice_deform_data, ParticleSystem::lattice_strength, ParticleSystemModifierData::mesh_final, mul_m4_v3(), NULL, ParticleSimulationData::ob, ParticleSystem::part, ParticleSystem::particles, ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_create_lattice_deform_data(), PSYS_EDITED, psys_get_modifier(), psys_mat_hair_to_global(), ParticleSimulationData::scene, scene, ParticleData::totkey, and ParticleSystem::totpart.
| void psys_cache_child_paths | ( | struct ParticleSimulationData * | sim, |
| float | cfra, | ||
| const bool | editupdate, | ||
| const bool | use_render_params | ||
| ) |
Definition at line 3165 of file particle.c.
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(), NULL, ParticleThreadContext::parent_pass, ParticleSimulationData::psys, psys_alloc_path_cache_buffers(), 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, blender::compositor::task, task_pool, TASK_PRIORITY_LOW, ParticleThreadContext::totchild, ParticleSystem::totchildcache, and ParticleThreadContext::totparent.
Referenced by psys_cache_edit_paths(), and psys_update_path_cache().
| void psys_cache_edit_paths | ( | struct Depsgraph * | depsgraph, |
| struct Scene * | scene, | ||
| struct Object * | ob, | ||
| struct PTCacheEdit * | edit, | ||
| float | cfra, | ||
| const bool | use_render_params | ||
| ) |
Definition at line 3686 of file particle.c.
References BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), ParticleEditSettings::brushtype, ParticleSimulationData::depsgraph, depsgraph, ParticleEditSettings::draw_step, CacheEditrPathsIterData::edit, PTCacheEditPoint::flag, MAX2, NULL, ParticleSimulationData::ob, CacheEditrPathsIterData::object, CacheEditrPathsIterData::pa, ToolSettings::particle, ParticleSystem::particles, PTCacheEdit::pathcache, PTCacheEdit::pathcachebufs, PE_BRUSH_WEIGHT, PEP_EDIT_RECALC, PTCacheEdit::points, ParticleSimulationData::psmd, CacheEditrPathsIterData::psmd, PTCacheEdit::psmd_eval, ParticleSimulationData::psys, PTCacheEdit::psys, psys_alloc_path_cache_buffers(), psys_cache_child_paths(), psys_cache_edit_paths_iter(), psys_free_path_cache(), ParticleSimulationData::scene, scene, CacheEditrPathsIterData::segments, Scene::toolsettings, PTCacheEdit::totcached, PTCacheEdit::totpoint, and CacheEditrPathsIterData::use_weight.
Referenced by drw_particle_update_ptcache_edit(), PE_update_object(), and PE_update_selection().
| void psys_cache_paths | ( | ParticleSimulationData * | sim, |
| float | cfra, | ||
| const bool | use_render_params | ||
| ) |
Calculates paths ready for drawing/rendering
Definition at line 3278 of file particle.c.
References col, ParticleSystem::flag, ParticleSystem::hair_out_mesh, NULL, ParticleSystem::part, PART_HAIR, ToolSettings::particle, PARTICLE_P, PARTICLE_PSMD, ParticleSimulationData::psys, PSYS_HAIR_DYNAMICS, result, ParticleSimulationData::scene, t, time, Scene::toolsettings, and ParticleSettings::type.
Referenced by psys_update_path_cache().
| float* psys_cache_vgroup | ( | struct Mesh * | mesh, |
| struct ParticleSystem * | psys, | ||
| int | vgroup | ||
| ) |
Definition at line 2619 of file particle.c.
References BKE_defvert_find_weight(), Mesh::dvert, MEM_callocN, mesh, Mesh::totvert, ParticleSystem::vg_neg, and ParticleSystem::vgroup.
Referenced by psys_thread_context_init_distribute(), and psys_thread_context_init_path().
| void psys_calc_dmcache | ( | struct Object * | ob, |
| struct Mesh * | mesh_final, | ||
| struct Mesh * | mesh_original, | ||
| struct ParticleSystem * | psys | ||
| ) |
Definition at line 332 of file particle_system.c.
References CD_ORIGINDEX, CustomData_get_layer(), Object::data, Mesh_Runtime::deformed_only, DMCACHE_ISCHILD, DMCACHE_NOTFOUND, Mesh::fdata, ParticleSettings::from, if(), LinkNode::link, LOOP_PARTICLES, MEM_callocN, MEM_freeN, node, NULL, ORIGINDEX_NONE, ParticleSystem::part, PART_FROM_VERT, PARTICLE_P, POINTER_AS_INT, POINTER_FROM_INT, psys_particle_dm_face_lookup(), Mesh::runtime, Mesh::totface, Mesh::totvert, and ParticleSettings::use_modifier_stack.
Referenced by distribute_particles_on_dm(), distribute_simple_children(), and hair_step().
| void psys_changed_type | ( | struct Object * | ob, |
| struct ParticleSystem * | psys | ||
| ) |
Definition at line 4634 of file particle_system.c.
References BKE_ptcache_id_clear(), BKE_ptcache_id_from_particles(), CLAMP, ParticleSettings::distr, ParticleSettings::draw_as, ELEM, ParticleSettings::end, ParticleSystem::flag, free_hair(), ParticleSettings::lifetime, MAX2, ParticleSystem::part, PART_DISTR_GRID, PART_DISTR_JIT, PART_DRAW_GR, PART_DRAW_NOT, PART_DRAW_OB, PART_DRAW_PATH, PART_DRAW_REND, PART_HAIR, PART_PHYS_KEYED, ParticleSettings::path_end, ParticleSettings::path_start, ParticleSettings::phystype, PSYS_KEYED, psys_reset(), PSYS_RESET_ALL, PTCACHE_CLEAR_ALL, ParticleSettings::ren_as, and ParticleSettings::type.
| void psys_check_boid_data | ( | struct ParticleSystem * | psys | ) |
Definition at line 4672 of file particle_system.c.
References ParticleData::boid, LOOP_PARTICLES, MEM_callocN, MEM_freeN, NULL, ParticleSystem::part, PART_PHYS_BOIDS, PARTICLE_P, ParticleSystem::particles, ParticleSettings::phystype, and ParticleSystem::totpart.
Referenced by new_particle_settings_exec(), and psys_prepare_physics().
| bool psys_check_edited | ( | struct ParticleSystem * | psys | ) |
Definition at line 815 of file particle.c.
References ParticleSystem::edit, PointCache::edit, PTCacheEdit::edited, ParticleSystem::flag, ParticleSystem::part, PART_HAIR, ParticleSystem::pointcache, PSYS_EDITED, and ParticleSettings::type.
| bool psys_check_enabled | ( | struct Object * | ob, |
| struct ParticleSystem * | psys, | ||
| const bool | use_render_params | ||
| ) |
Definition at line 789 of file particle.c.
References eModifierMode_Realtime, eModifierMode_Render, ParticleSystem::flag, ModifierData::mode, ParticleSystemModifierData::modifier, ParticleSystem::part, PSYS_DELETE, PSYS_DISABLED, and psys_get_modifier().
Referenced by BKE_effector_relations_create(), BKE_object_handle_data_update(), deformVerts(), DRW_object_is_visible_psys_in_active_context(), dynamicPaint_doStep(), make_duplis_particle_system(), particle_system_update(), and pointdensity_cache_psys().
| void psys_check_group_weights | ( | struct ParticleSettings * | part | ) |
Definition at line 845 of file particle.c.
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, MEM_callocN, ParticleDupliWeight::next, NULL, ParticleDupliWeight::ob, ParticleSystem::part, PART_DRAW_GR, PART_DUPLIW_CURRENT, psys_find_group_weights(), and ParticleSettings::ren_as.
Referenced by dupliob_refresh_exec().
| void psys_copy_particles | ( | struct ParticleSystem * | psys_dst, |
| struct ParticleSystem * | psys_src | ||
| ) |
Definition at line 1149 of file particle.c.
References ParticleData::boid, ParticleSystem::child, ParticleData::hair, ParticleData::keys, MEM_dupallocN, NULL, ParticleSystem::part, PART_HAIR, ParticleSystem::particles, psys_free_children(), psys_free_particles(), ParticleSystem::totchild, ParticleData::totkey, ParticleSystem::totpart, and ParticleSettings::type.
Referenced by BKE_object_copy_particlesystem(), PE_create_particle_edit(), and pe_get_current().
| void psys_count_keyed_targets | ( | struct ParticleSimulationData * | sim | ) |
Definition at line 1193 of file particle_system.c.
References ParticleTarget::duration, ListBase::first, ParticleSystem::flag, ParticleSettings::keyed_loops, ParticleTarget::next, ParticleSimulationData::ob, ParticleSystem::part, ParticleSimulationData::psys, psys_get_target_system(), PSYS_KEYED_TIMING, ParticleSystem::targets, and ParticleSystem::totkeyed.
Referenced by particle_system_update().
| struct LatticeDeformData* psys_create_lattice_deform_data | ( | struct ParticleSimulationData * | sim | ) |
Definition at line 696 of file particle.c.
References BKE_lattice_deform_data_create(), DAG_EVAL_RENDER, DEG_get_mode(), ParticleSimulationData::depsgraph, eModifierMode_Realtime, eModifierMode_Render, eModifierType_Lattice, lattice, ParticleSystem::lattice_strength, ModifierData::mode, ModifierData::next, NULL, ParticleSimulationData::ob, LatticeModifierData::object, ParticleSimulationData::psys, psys_get_modifier(), psys_in_edit_mode(), LatticeModifierData::strength, and ModifierData::type.
Referenced by cached_step(), blender::io::alembic::ABCPointsWriter::do_write(), explodeMesh(), make_duplis_particle_system(), modifyMesh(), particle_batch_cache_ensure_pos(), particle_system_minmax(), pointdensity_cache_psys(), psys_apply_hair_lattice(), psys_thread_context_init_path(), and save_hair().
| void psys_disable_all | ( | struct Object * | ob | ) |
Definition at line 724 of file particle.c.
References ListBase::first, ParticleSystem::flag, ParticleSystem::next, Object::particlesystem, and PSYS_DISABLED.
Referenced by particle_intersect_mesh().
| void psys_emitter_customdata_mask | ( | struct ParticleSystem * | psys, |
| struct CustomData_MeshMasks * | r_cddata_masks | ||
| ) |
Definition at line 2251 of file particle.c.
References CD_MASK_MDEFORMVERT, CD_MASK_MTFACE, CD_MASK_ORCO, CD_MASK_ORIGINDEX, CD_MASK_ORIGSPACE_MLOOP, CustomData_MeshMasks::emask, CustomData_MeshMasks::fmask, CustomData_MeshMasks::lmask, MTex::mapto, MAX_MTEX, ParticleSettings::mtex, ParticleSystem::part, CustomData_MeshMasks::pmask, PSYS_TOT_VG, ParticleSettings::tanfac, MTex::texco, TEXCO_UV, ParticleSystem::vgroup, and CustomData_MeshMasks::vmask.
Referenced by copy_particle_systems_to_object(), and requiredDataMask().
| void psys_enable_all | ( | struct Object * | ob | ) |
Definition at line 732 of file particle.c.
References ListBase::first, ParticleSystem::flag, ParticleSystem::next, Object::particlesystem, and PSYS_DISABLED.
Referenced by particle_intersect_mesh().
| struct ParticleSystem* psys_eval_get | ( | struct Depsgraph * | depsgraph, |
| struct Object * | object, | ||
| struct ParticleSystem * | psys | ||
| ) |
Definition at line 749 of file particle.c.
References DEG_get_evaluated_object(), depsgraph, ListBase::first, ParticleSystem::next, NULL, ParticleSystem::orig_psys, and Object::particlesystem.
Referenced by disconnect_hair(), ED_object_modifier_convert(), PE_create_particle_edit(), and remap_hair_emitter().
| void psys_find_group_weights | ( | struct ParticleSettings * | part | ) |
Definition at line 824 of file particle.c.
References BKE_collection_object_cache_get(), BLI_findlink(), ParticleSettings::instance_collection, ParticleSettings::instance_weights, LISTBASE_FOREACH, NULL, Base::object, and ParticleSystem::part.
Referenced by make_duplis_particle_system(), and psys_check_group_weights().
| void psys_find_parents | ( | struct ParticleSimulationData * | sim, |
| const bool | use_render_params | ||
| ) |
Definition at line 2645 of file particle.c.
References ParticleSystem::cfra, ParticleSystem::child, ParticleSettings::child_nbr, DMCACHE_ISCHILD, ParticleTexture::exist, float(), ChildParticle::foffset, from, ChildParticle::fuv, get_cpa_texture(), ParticleSystemModifierData::mesh_final, NULL, ChildParticle::num, ChildParticle::pa, PAMAP_CHILD, PAMAP_DENS, ChildParticle::parent, ParticleSettings::parents, ParticleSystem::part, PART_FROM_FACE, ParticleSystem::particles, ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_frand(), psys_particle_on_emitter(), ParticleSettings::ren_child_nbr, ParticleSystem::totchild, ParticleSystem::totpart, and tree.
Referenced by psys_update_path_cache().
| BLI_INLINE float psys_frand | ( | ParticleSystem * | psys, |
| unsigned int | seed | ||
| ) |
Definition at line 266 of file BKE_particle.h.
References PSYS_FRAND_BASE, PSYS_FRAND_COUNT, PSYS_FRAND_SEED_MULTIPLIER, PSYS_FRAND_SEED_OFFSET, seed, and ParticleSystem::seed.
Referenced by boid_brain(), cached_step(), distribute_grid(), do_kink_spiral(), dynamics_step(), get_child_modifier_parameters(), get_cpa_texture(), hair_create_input_mesh(), hair_step(), init_particle_texture(), modifyMesh(), particle_skip(), particle_system_update(), particles_fluid_step(), psys_find_parents(), psys_get_birth_coords(), psys_get_child_size(), psys_get_child_time(), psys_get_dupli_path_transform(), psys_get_particle_state(), psys_thread_create_path(), reset_particle(), and system_step().
| BLI_INLINE void psys_frand_vec | ( | ParticleSystem * | psys, |
| unsigned int | seed, | ||
| float | vec[3] | ||
| ) |
Definition at line 278 of file BKE_particle.h.
References PSYS_FRAND_BASE, PSYS_FRAND_COUNT, PSYS_FRAND_SEED_MULTIPLIER, PSYS_FRAND_SEED_OFFSET, seed, and ParticleSystem::seed.
Referenced by do_child_modifiers().
| void psys_free | ( | struct Object * | ob, |
| struct ParticleSystem * | psys | ||
| ) |
Definition at line 1070 of file particle.c.
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, ListBase::first, ParticleSystem::flag, ParticleSystem::fluid_springs, ParticleSystem::free_edit, free_hair(), MEM_freeN, ParticleSystem::next, NULL, OB_DUPLIPARTS, ParticleSystem::part, PART_DRAW_GR, PART_DRAW_OB, Object::particlesystem, ParticleSystem::pdd, ParticleSystem::pointcache, psys_free_particles(), psys_free_path_cache(), psys_free_pdd(), PSYS_SHARED_CACHES, ParticleSystem::ptcaches, ParticleSettings::ren_as, ParticleSystem::targets, ParticleSystem::totchild, Object::transflag, and ParticleSystem::tree.
Referenced by BKE_object_free_particlesystems(), BKE_object_handle_data_update(), and object_remove_particle_system().
| void psys_free_children | ( | struct ParticleSystem * | psys | ) |
Definition at line 1001 of file particle.c.
References ParticleSystem::child, free_child_path_cache(), MEM_freeN, NULL, and ParticleSystem::totchild.
Referenced by psys_copy_particles(), psys_update_path_cache(), and update_children().
| void psys_free_particles | ( | struct ParticleSystem * | psys | ) |
Definition at line 1011 of file particle.c.
References ParticleData::boid, ParticleData::keys, LOOP_PARTICLES, MEM_freeN, NULL, ParticleSystem::part, PART_HAIR, PARTICLE_P, ParticleSystem::particles, ParticleSystem::totpart, and ParticleSettings::type.
Referenced by psys_copy_particles(), psys_free(), and psys_reset().
| void psys_free_path_cache | ( | struct ParticleSystem * | psys, |
| struct PTCacheEdit * | edit | ||
| ) |
Definition at line 986 of file particle.c.
References ParticleSystem::edit, free_child_path_cache(), NULL, PTCacheEdit::pathcache, ParticleSystem::pathcache, PTCacheEdit::pathcachebufs, ParticleSystem::pathcachebufs, psys_free_path_cache_buffers(), PTCacheEdit::totcached, and ParticleSystem::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_free(), psys_reset(), psys_update_path_cache(), remap_hair_emitter(), and shape_cut_exec().
| void psys_free_pdd | ( | struct ParticleSystem * | psys | ) |
Definition at line 1041 of file particle.c.
References ParticleDrawData::cdata, MEM_freeN, ParticleDrawData::ndata, NULL, ParticleDrawData::partsize, ParticleSystem::pdd, ParticleDrawData::totpart, ParticleDrawData::totpoint, ParticleDrawData::vdata, and ParticleDrawData::vedata.
Referenced by psys_free(), and realloc_particles().
| void psys_get_birth_coords | ( | struct ParticleSimulationData * | sim, |
| struct ParticleData * | pa, | ||
| struct ParticleKey * | state, | ||
| float | dtime, | ||
| float | cfra | ||
| ) |
Definition at line 732 of file particle_system.c.
References ParticleSettings::avefac, ParticleSettings::avemode, axis_angle_to_quat(), BLI_assert, ParticleData::boid, copy_qt_qt(), copy_v3_v3(), cosf, cross_v3_v3v3(), dot_v3v3(), fabsf, ParticleData::foffset, ParticleSettings::from, ParticleData::fuv, get_angular_velocity_vector(), interp_qt_qtqt(), invert_qt_qt_normalized(), ParticleTexture::ivel, M_PI, madd_v3_v3fl(), mat3_to_quat(), mat3_to_quat_is_ok(), mat4_to_quat(), mul_m4_v3(), mul_mat3_m4_v3(), mul_qt_qtqt(), mul_qt_v3(), mul_v3_fl(), mul_v3_v3fl(), negate_v3(), negate_v3_v3(), nor, normalize_qt(), normalize_v3(), normalize_v3_v3(), ParticleSettings::normfac, NULL, ParticleData::num, ParticleData::num_dmcache, ParticleSimulationData::ob, OB_POSX, OB_POSZ, ParticleSettings::ob_vel, ParticleSettings::obfac, Object::obmat, PAMAP_IVEL, ParticleSystem::part, PART_AVE_RAND, PART_PHYS_BOIDS, PART_ROT_GLOB_X, PART_ROT_GLOB_Y, PART_ROT_GLOB_Z, PART_ROT_NOR, PART_ROT_NOR_TAN, PART_ROT_OB_X, PART_ROT_OB_Y, PART_ROT_OB_Z, PART_ROT_VEL, ParticleSettings::partfac, ParticleSystem::particles, ParticleSettings::phasefac, ParticleSettings::phystype, ParticleData::prev_state, project_v3_v3v3(), ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_frand(), psys_get_texture(), psys_particle_on_emitter(), psys_particle_value_from_verts(), ParticleSettings::randfac, ParticleSettings::randphasefac, ParticleSettings::randrotfac, rot, ParticleSettings::rotmode, sinf, ParticleData::state, state, sub_v3_v3(), sub_v3_v3v3(), ParticleSettings::tanfac, ParticleSettings::tanphase, unit_qt(), vec_to_quat(), ParticleKey::vel, and zero_v3().
Referenced by explodeMesh(), and reset_particle().
| int psys_get_child_number | ( | struct Scene * | scene, |
| struct ParticleSystem * | psys, | ||
| const bool | use_render_params | ||
| ) |
Definition at line 305 of file particle_system.c.
References ParticleSettings::child_nbr, ParticleSettings::childtype, get_render_child_particle_number(), ParticleSystem::part, Scene::r, ParticleSettings::ren_child_nbr, and scene.
Referenced by distribute_simple_children(), and psys_get_tot_child().
| float psys_get_child_size | ( | struct ParticleSystem * | psys, |
| struct ChildParticle * | cpa, | ||
| float | cfra, | ||
| float * | pa_time | ||
| ) |
Referenced by make_duplis_particle_system(), and modifyMesh().
| float psys_get_child_time | ( | struct ParticleSystem * | psys, |
| struct ChildParticle * | cpa, | ||
| float | cfra, | ||
| float * | birthtime, | ||
| float * | dietime | ||
| ) |
Definition at line 4463 of file particle.c.
References ParticleSystem::child, ParticleSettings::childtype, ParticleData::lifetime, ParticleSettings::lifetime, ChildParticle::pa, ChildParticle::parent, ParticleSystem::part, PART_CHILD_FACES, ParticleSystem::particles, psys_frand(), ParticleSettings::randlife, time, ParticleData::time, w(), and ChildParticle::w.
Referenced by pointdensity_cache_psys(), psys_get_particle_on_path(), and psys_get_particle_state().
| struct ParticleSystem* psys_get_current | ( | struct Object * | ob | ) |
Definition at line 645 of file particle.c.
References ListBase::first, ParticleSystem::flag, ParticleSystem::next, NULL, Object::particlesystem, and PSYS_CURRENT.
Referenced by buttons_context_path_particle(), buttons_texture_users_from_context(), clear_edited_exec(), connect_hair_exec(), disconnect_hair_exec(), duplicate_particle_systems_exec(), object_remove_particle_system(), object_select_all_by_particle(), outliner_draw_mode_column_toggle(), and outliner_set_properties_tab().
| float psys_get_current_display_percentage | ( | struct ParticleSystem * | psys, |
| const bool | use_render_params | ||
| ) |
Definition at line 114 of file particle_system.c.
References ParticleSettings::child_nbr, ParticleSettings::childtype, ParticleSettings::disp, PointCache::flag, ParticleSystem::part, particles_are_dynamic(), ParticleSystem::pointcache, and PTCACHE_BAKING.
Referenced by cached_step(), hair_step(), particle_system_update(), and system_step().
| short psys_get_current_num | ( | struct Object * | ob | ) |
Definition at line 660 of file particle.c.
References ListBase::first, ParticleSystem::flag, ParticleSystem::next, NULL, Object::particlesystem, and PSYS_CURRENT.
| float psys_get_dietime_from_cache | ( | struct PointCache * | cache, |
| int | index | ||
| ) |
Definition at line 1347 of file particle.c.
References BKE_ptcache_mem_index_find(), PTCacheMem::frame, ListBase::last, PointCache::mem_cache, and PTCacheMem::prev.
Referenced by reset_particle().
| void psys_get_dupli_path_transform | ( | struct ParticleSimulationData * | sim, |
| struct ParticleData * | pa, | ||
| struct ChildParticle * | cpa, | ||
| struct ParticleCacheKey * | cache, | ||
| float | mat[4][4], | ||
| float * | scale | ||
| ) |
Definition at line 5107 of file particle.c.
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, Object::imat, len, M_PI, mul_m3_v3(), mul_qt_v3(), nor, normalize_v3(), NULL, 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_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().
| void psys_get_dupli_texture | ( | struct ParticleSystem * | psys, |
| struct ParticleSettings * | part, | ||
| struct ParticleSystemModifierData * | psmd, | ||
| struct ParticleData * | pa, | ||
| struct ChildParticle * | cpa, | ||
| float | uv[2], | ||
| float | orco[3] | ||
| ) |
Definition at line 5019 of file particle.c.
References CD_MFACE, CD_MTFACE, ParticleSettings::childtype, CustomData_get(), CustomData_get_layer_n(), CustomData_get_render_layer(), ParticleSettings::distr, DMCACHE_ISCHILD, DMCACHE_NOTFOUND, ELEM, Mesh::fdata, ChildParticle::foffset, ParticleData::foffset, ParticleSettings::from, ChildParticle::fuv, ParticleData::fuv, ParticleSystemModifierData::mesh_final, NULL, ChildParticle::num, ParticleData::num, ParticleData::num_dmcache, ChildParticle::pa, PART_CHILD_FACES, PART_DISTR_GRID, PART_FROM_FACE, PART_FROM_VERT, ParticleSystem::particles, psys_interpolate_uvs(), psys_particle_on_emitter(), Mesh::totface, and MFace::v4.
Referenced by make_duplis_particle_system().
| void psys_get_from_key | ( | struct ParticleKey * | key, |
| float | loc[3], | ||
| float | vel[3], | ||
| float | rot[4], | ||
| float * | time | ||
| ) |
Definition at line 3774 of file particle.c.
References ParticleKey::co, copy_qt_qt(), copy_v3_v3(), rot, ParticleKey::rot, time, ParticleKey::time, and ParticleKey::vel.
| struct ParticleSystemModifierData* psys_get_modifier | ( | struct Object * | ob, |
| struct ParticleSystem * | psys | ||
| ) |
Definition at line 2201 of file particle.c.
References eModifierType_ParticleSystem, ListBase::first, Object::modifiers, ModifierData::next, NULL, ParticleSystemModifierData::psys, and ModifierData::type.
Referenced by BKE_particle_system_blend_read_lib(), disconnect_hair(), make_duplis_particle_system(), modifyMesh(), object_remove_particle_system(), 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_create_lattice_deform_data(), remap_hair_emitter(), and remove_tagged_keys().
| void psys_get_particle_on_path | ( | struct ParticleSimulationData * | sim, |
| int | pa_num, | ||
| struct ParticleKey * | state, | ||
| const bool | vel | ||
| ) |
Definition at line 4585 of file particle.c.
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, ParticleThreadContext::mesh, ParticleInterpolationData::mesh, ParticleSystemModifierData::mesh_final, mul_m4_v3(), mul_mat3_m4_v3(), mul_v3_fl(), normalize_v3(), NULL, ChildParticle::num, ParticleData::num, ParticleData::num_dmcache, ParticleSimulationData::ob, Object::obmat, 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, ParticleThreadContext::sim, ParticleChildModifierContext::sim, state, sub_v3_v3v3(), t, ParticleChildModifierContext::thread_ctx, ParticleKey::time, ParticleData::time, ParticleSystem::totchild, ParticleSystem::totpart, ParticleSettings::type, unit_m4(), ParticleKey::vel, w(), and ChildParticle::w.
Referenced by brush_add(), modifyMesh(), psys_get_particle_on_path(), psys_get_particle_state(), rekey_particle(), rekey_particle_to_time(), and subdivide_particle().
| int psys_get_particle_state | ( | struct ParticleSimulationData * | sim, |
| int | p, | ||
| struct ParticleKey * | state, | ||
| int | always | ||
| ) |
Definition at line 4854 of file particle.c.
References BKE_lattice_deform_data_eval_co(), ParticleSystem::child, ParticleSystem::childcache, ParticleSettings::childflat, ParticleSettings::childrad, ParticleSettings::childtype, CLAMP, ParticleChildModifierContext::cpa, DEG_get_ctime(), ParticleSimulationData::depsgraph, ParticleData::dietime, do_child_modifiers(), ParticleSettings::end, ParticleSettings::flag, ParticleSystem::flag, ChildParticle::fuv, ParticleSystem::lattice_deform_data, ParticleSystem::lattice_strength, ParticleData::lifetime, ParticleSettings::lifetime, MIN2, NULL, 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_UNBORN, ParticleSystem::particles, ParticleSimulationData::psys, psys_frand(), psys_get_child_time(), psys_get_particle_on_path(), psys_get_timestep(), PSYS_KEYED, ParticleChildModifierContext::ptex, ParticleChildModifierContext::sim, ParticleSettings::sta, ParticleData::state, state, t, ParticleChildModifierContext::thread_ctx, time, ParticleData::time, ParticleSystem::totchild, ParticleSystem::totpart, and unit_m4().
Referenced by blender::io::alembic::ABCPointsWriter::do_write(), explodeMesh(), get_effector_data(), make_duplis_particle_system(), modifyMesh(), particle_batch_cache_ensure_pos(), particle_system_minmax(), pointdensity_cache_psys(), and set_keyed_keys().
| void psys_get_pointcache_start_end | ( | struct Scene * | scene, |
| ParticleSystem * | psys, | ||
| int * | sfra, | ||
| int * | efra | ||
| ) |
Definition at line 1315 of file particle_system.c.
References RenderData::efra, ParticleSettings::end, ParticleSettings::lifetime, max_ii(), min_ii(), ParticleSystem::part, RenderData::pefra, Scene::r, scene, and ParticleSettings::sta.
Referenced by BKE_ptcache_bake(), and system_step().
| struct ParticleSystem* psys_get_target_system | ( | struct Object * | ob, |
| struct ParticleTarget * | pt | ||
| ) |
Definition at line 1169 of file particle_system.c.
References BLI_findlink(), ELEM, ParticleTarget::flag, NULL, ParticleTarget::ob, Object::particlesystem, ParticleTarget::psys, and PTARGET_VALID.
Referenced by dynamics_step(), psys_count_keyed_targets(), psys_sph_init(), rule_avoid_collision(), rule_fight(), and rule_separate().
| void psys_get_texture | ( | struct ParticleSimulationData * | sim, |
| struct ParticleData * | pa, | ||
| struct ParticleTexture * | ptex, | ||
| int | event, | ||
| float | cfra | ||
| ) |
Definition at line 4326 of file particle.c.
References ATTR_FALLTHROUGH, BKE_mesh_texspace_ensure(), blend(), CLAMP_PARTICLE_TEXTURE_POS, CLAMP_PARTICLE_TEXTURE_POSNEG, CLAMP_WARP_PARTICLE_TEXTURE_POS, ParticleTexture::clump, ParticleKey::co, copy_v3_v3(), ParticleTexture::damp, Object::data, ParticleData::dietime, ParticleTexture::effector, ELEM, ParticleTexture::exist, fabsf, ParticleTexture::field, float(), ParticleData::foffset, ParticleSettings::from, ParticleData::fuv, get_particle_uv(), ParticleTexture::gravity, ParticleTexture::ivel, ParticleTexture::kink_amp, ParticleTexture::kink_freq, ParticleTexture::length, ParticleTexture::life, Mesh::loc, MAP_PA_TIME, MAX_MTEX, ParticleSystemModifierData::mesh_final, mul_m4_v3(), NULL, ParticleData::num, ParticleData::num_dmcache, ParticleSimulationData::ob, 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_particle_on_emitter(), RE_texture_evaluate(), ParticleTexture::rough1, ParticleTexture::rough2, ParticleTexture::roughe, SET_PARTICLE_TEXTURE, ParticleTexture::size, Mesh::size, ParticleData::state, sub_v3_v3(), TEXCO_GLOB, TEXCO_OBJECT, TEXCO_ORCO, TEXCO_PARTICLE, TEXCO_UV, texture_value_blend(), ParticleTexture::time, ParticleData::time, ParticleSystem::totpart, and ParticleTexture::twist.
Referenced by basic_integrate(), cached_step(), dynamics_step(), init_particle_texture(), psys_get_birth_coords(), and reset_particle().
| float psys_get_timestep | ( | struct ParticleSimulationData * | sim | ) |
Definition at line 4459 of file particle.c.
References ParticleSystem::part, ParticleSimulationData::psys, and ParticleSettings::timetweak.
Referenced by basic_integrate(), brush_add(), collision_check(), dynamics_step(), pd_point_from_particle(), psys_get_particle_state(), and sph_integrate().
| int psys_get_tot_child | ( | struct Scene * | scene, |
| struct ParticleSystem * | psys, | ||
| const bool | use_render_params | ||
| ) |
Definition at line 323 of file particle_system.c.
References psys_get_child_number(), scene, and ParticleSystem::totpart.
Referenced by distribute_invalid(), distribute_simple_children(), psys_thread_context_init_distribute(), psys_update_path_cache(), and update_children().
| bool psys_in_edit_mode | ( | struct Depsgraph * | depsgraph, |
| const struct ParticleSystem * | psys | ||
| ) |
| void psys_interpolate_face | ( | struct MVert * | mvert, |
| struct MFace * | mface, | ||
| struct MTFace * | tface, | ||
| float(*) | orcodata[3], | ||
| float | w[4], | ||
| float | vec[3], | ||
| float | nor[3], | ||
| float | utan[3], | ||
| float | vtan[3], | ||
| float | orco[3] | ||
| ) |
Definition at line 1670 of file particle.c.
References MVert::co, copy_v3_v3(), MFace::flag, interp_v3_v3v3v3(), interp_v3_v3v3v3v3(), map_to_sphere(), ME_SMOOTH, MVert::no, nor, normal_quad_v3(), normal_short_to_float_v3(), normal_tri_v3(), sub_v3_v3v3(), MTFace::uv, v1, MFace::v1, v2, MFace::v2, MFace::v3, MFace::v4, and w().
Referenced by distribute_from_volume_exec(), and psys_particle_on_dm().
| void psys_interpolate_mcol | ( | const struct MCol * | mcol, |
| int | quad, | ||
| const float | w[4], | ||
| struct MCol * | mc | ||
| ) |
Referenced by particle_calculate_parent_mcol(), and particle_interpolate_children_mcol().
| void psys_interpolate_particle | ( | short | type, |
| struct ParticleKey | keys[4], | ||
| float | dt, | ||
| struct ParticleKey * | result, | ||
| bool | velocity | ||
| ) |
Definition at line 1212 of file particle.c.
References ParticleKey::co, interp_cubic_v3(), interp_v3_v3v3v3v3(), key_curve_position_weights(), result, sub_v3_v3v3(), t, type, and ParticleKey::vel.
Referenced by do_particle_interpolation(), ptcache_cloth_interpolate(), ptcache_particle_interpolate(), ptcache_rigidbody_interpolate(), and ptcache_softbody_interpolate().
| void psys_interpolate_uvs | ( | const struct MTFace * | tface, |
| int | quad, | ||
| const float | w[4], | ||
| float | uvco[2] | ||
| ) |
Referenced by particle_calculate_parent_uvs(), and particle_interpolate_children_uvs().
| void psys_make_temp_pointcache | ( | struct Object * | ob, |
| struct ParticleSystem * | psys | ||
| ) |
Definition at line 1297 of file particle_system.c.
References BKE_ptcache_disk_to_mem(), BKE_ptcache_id_from_particles(), BLI_listbase_is_empty(), PointCache::flag, PointCache::mem_cache, ParticleSystem::pointcache, and PTCACHE_DISK_CACHE.
| void psys_mat_hair_to_global | ( | struct Object * | ob, |
| struct Mesh * | mesh, | ||
| short | from, | ||
| struct ParticleData * | pa, | ||
| float | hairmat[4][4] | ||
| ) |
Definition at line 3909 of file particle.c.
References from, mesh, mul_m4_m4m4(), Object::obmat, and psys_mat_hair_to_object().
Referenced by brush_add(), brush_puff(), createTransParticleVerts(), disconnect_hair(), flushTransParticles(), foreach_mouse_hit_key_iter(), modifyMesh(), PE_lasso_select(), PE_minmax(), psys_apply_hair_lattice(), psys_cache_edit_paths_iter(), psys_get_particle_on_path(), psys_thread_create_path(), and update_world_cos().
| void psys_mat_hair_to_object | ( | struct Object * | ob, |
| struct Mesh * | mesh, | ||
| short | from, | ||
| struct ParticleData * | pa, | ||
| float | hairmat[4][4] | ||
| ) |
Referenced by deflect_emitter_iter(), hair_create_input_mesh(), remap_hair_emitter(), and remove_doubles_exec().
| void psys_mat_hair_to_orco | ( | struct Object * | ob, |
| struct Mesh * | mesh, | ||
| short | from, | ||
| struct ParticleData * | pa, | ||
| float | hairmat[4][4] | ||
| ) |
Definition at line 3884 of file particle.c.
References BKE_mesh_orco_verts_transform(), CD_ORIGINDEX, copy_v3_v3(), CustomData_get_layer(), Object::data, ParticleData::foffset, from, ParticleData::fuv, mesh, ParticleData::num, ParticleData::num_dmcache, psys_face_mat(), and psys_particle_on_dm().
Referenced by PE_mirror_particle(), and PE_update_mirror_cache().
| struct ParticleSystem* psys_orig_get | ( | struct ParticleSystem * | psys | ) |
Definition at line 741 of file particle.c.
References NULL, and ParticleSystem::orig_psys.
Referenced by drw_particle_get_hair_source(), particle_system_update(), and psys_in_edit_mode().
| int psys_particle_dm_face_lookup | ( | Mesh * | mesh_final, |
| 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 MPoly 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 polygon, containing all its tessfaces indices. |
Definition at line 1913 of file particle.c.
References BKE_mesh_origindex_mface_mpoly(), BLI_assert, CD_ORIGINDEX, CD_ORIGSPACE, CustomData_get_layer(), Mesh_Runtime::deformed_only, DMCACHE_NOTFOUND, ELEM, Mesh::fdata, isect_point_quad_v2(), isect_point_tri_v2(), LinkNode::link, Mesh::mface, LinkNode::next, NULL, POINTER_AS_INT, psys_w_to_origspace(), Mesh::runtime, Mesh::totface, and OrigSpaceFace::uv.
Referenced by brush_add_count_iter(), PE_mirror_x(), psys_calc_dmcache(), 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] | ||
| ) |
Definition at line 2095 of file particle.c.
References add_v3_v3(), CD_ORCO, MVert::co, copy_v3_v3(), CustomData_get_layer(), float(), from, Mesh::mface, Mesh::mtface, mul_v3_fl(), Mesh::mvert, MVert::no, nor, normal_short_to_float_v3(), normalize_v3(), PART_FROM_VERT, PART_FROM_VOLUME, psys_interpolate_face(), and psys_map_index_on_dm().
Referenced by brush_add(), distribute_children_exec(), distribute_from_verts_exec(), psys_mat_hair_to_object(), psys_mat_hair_to_orco(), psys_particle_on_emitter(), and psys_thread_context_init_distribute().
| void psys_particle_on_emitter | ( | struct 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 2290 of file particle.c.
References copy_v3_v3(), ParticleSettings::distr, from, ParticleSettings::from, ParticleSystemModifierData::mesh_final, nor, ParticleSystem::part, PART_DISTR_GRID, PART_FROM_VERT, ParticleSystemModifierData::psys, psys_particle_on_dm(), 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(), and psys_thread_create_path().
| float psys_particle_value_from_verts | ( | struct Mesh * | mesh, |
| short | from, | ||
| struct ParticleData * | pa, | ||
| float * | values | ||
| ) |
Definition at line 2188 of file particle.c.
References ParticleData::foffset, from, ParticleData::fuv, mesh, ParticleData::num, ParticleData::num_dmcache, psys_interpolate_value_from_verts(), and psys_map_index_on_dm().
Referenced by psys_get_birth_coords().
| bool psys_render_simplify_params | ( | struct ParticleSystem * | psys, |
| struct ChildParticle * | cpa, | ||
| float * | params | ||
| ) |
| void psys_reset | ( | struct ParticleSystem * | psys, |
| int | mode | ||
| ) |
Definition at line 141 of file particle_system.c.
References ParticleSystem::alloc_fluidsprings, BKE_ptcache_invalidate(), ParticleSystem::child, ParticleSystem::edit, ELEM, ParticleSystem::flag, ParticleSystem::fluid_springs, ParticleSystem::free_edit, LOOP_PARTICLES, MEM_freeN, NULL, PARS_NO_DISP, PARTICLE_P, ParticleSystem::pointcache, PSYS_EDITED, psys_free_particles(), psys_free_path_cache(), PSYS_HAIR_DONE, PSYS_KEYED, PSYS_RESET_ALL, PSYS_RESET_CACHE_MISS, PSYS_RESET_DEPSGRAPH, ParticleSystem::tot_fluidsprings, tot_particles(), ParticleSystem::totchild, ParticleSystem::totkeyed, and ParticleSystem::totpart.
Referenced by BKE_ptcache_id_reset(), clear_edited_exec(), particle_system_update(), psys_changed_type(), and system_step().
| void psys_set_current_num | ( | struct Object * | ob, |
| int | index | ||
| ) |
Definition at line 677 of file particle.c.
References ListBase::first, ParticleSystem::flag, ParticleSystem::next, NULL, Object::particlesystem, and PSYS_CURRENT.
Definition at line 2182 of file particle_system.c.
References SPHRangeData::data, SPHData::density_cb, SPHFluidSettings::flag, ParticleSettings::fluid, SPHRangeData::h, SPHData::hfac, SPHData::mass, SPHRangeData::mass, ParticleSystem::part, SPHData::psys, SPHFluidSettings::radius, ParticleSettings::size, sph_evaluate_func(), SPH_FAC_RADIUS, and tree.
| void psys_sph_finalize | ( | struct SPHData * | sphdata | ) |
Definition at line 2171 of file particle_system.c.
References BLI_edgehash_free(), SPHData::eh, NULL, and psys_sph_flush_springs().
Referenced by dynamics_step().
| void psys_sph_init | ( | struct ParticleSimulationData * | sim, |
| struct SPHData * | sphdata | ||
| ) |
Definition at line 2122 of file particle_system.c.
References BLI_buffer_field_init, SPHData::density_cb, SPHData::eh, ListBase::first, ParticleSettings::fluid, SPHData::force_cb, SPHData::gravity, PhysicsSettings::gravity, SPHData::hfac, SPHData::mass, SPHData::new_springs, ParticleTarget::next, NULL, ParticleSimulationData::ob, SPHData::pa, ParticleSystem::part, Scene::physics_settings, ParticleSimulationData::psys, SPHData::psys, psys_get_target_system(), psys_uses_gravity(), ParticleSimulationData::scene, SPHFluidSettings::solver, sph_density_accum_cb(), sph_force_cb(), SPH_SOLVER_DDR, sph_springhash_build(), sphclassical_density_accum_cb(), sphclassical_force_cb(), and ParticleSystem::targets.
Referenced by dynamics_step().
| void psys_tasks_create | ( | struct ParticleThreadContext * | ctx, |
| int | startpart, | ||
| int | endpart, | ||
| struct ParticleTask ** | r_tasks, | ||
| int * | r_numtasks | ||
| ) |
Definition at line 470 of file particle_system.c.
References ParticleTask::begin, BLI_assert, BLI_system_thread_count(), ParticleTask::ctx, ParticleTask::end, MEM_callocN, and min_ii().
Referenced by distribute_particles_on_dm(), and psys_cache_child_paths().
| void psys_tasks_free | ( | struct ParticleTask * | tasks, |
| int | numtasks | ||
| ) |
Definition at line 499 of file particle_system.c.
References BLI_rng_free(), and MEM_freeN.
Referenced by distribute_particles_on_dm(), and psys_cache_child_paths().
| void psys_thread_context_free | ( | struct ParticleThreadContext * | ctx | ) |
Definition at line 516 of file particle_system.c.
References BKE_curvemapping_free(), BKE_lattice_deform_data_destroy(), ParticleThreadContext::clumpcurve, ParticleThreadContext::index, ParticleThreadContext::jit, ParticleThreadContext::jitoff, ParticleSystem::lattice_deform_data, MEM_freeN, NULL, ParticleSimulationData::psys, ParticleThreadContext::roughcurve, ParticleThreadContext::seams, ParticleThreadContext::sim, ParticleThreadContext::tree, ParticleThreadContext::twistcurve, ParticleThreadContext::vg_clump, ParticleThreadContext::vg_kink, ParticleThreadContext::vg_length, ParticleThreadContext::vg_rough1, ParticleThreadContext::vg_rough2, ParticleThreadContext::vg_roughe, ParticleThreadContext::vg_twist, and ParticleThreadContext::weight.
Referenced by distribute_particles_on_dm(), and psys_cache_child_paths().
| void psys_thread_context_init | ( | struct ParticleThreadContext * | ctx, |
| struct ParticleSimulationData * | sim | ||
| ) |
Definition at line 462 of file particle_system.c.
References BKE_object_material_get(), ParticleThreadContext::ma, ParticleThreadContext::mesh, ParticleSystemModifierData::mesh_final, ParticleSimulationData::ob, ParticleSettings::omat, ParticleSystem::part, ParticleSimulationData::psmd, ParticleSimulationData::psys, and ParticleThreadContext::sim.
Referenced by psys_thread_context_init_distribute(), and psys_thread_context_init_path().
| void psys_unique_name | ( | struct Object * | object, |
| struct ParticleSystem * | psys, | ||
| const char * | defname | ||
| ) |
Definition at line 193 of file particle_system.c.
References BLI_uniquename(), ParticleSystem::name, and Object::particlesystem.
Referenced by copy_particle_systems_to_object(), and object_add_or_copy_particle_system().
| void psys_update_particle_tree | ( | struct ParticleSystem * | psys, |
| float | cfra | ||
| ) |
Definition at line 1367 of file particle_system.c.
References LOOP_SHOWN_PARTICLES, PARS_ALIVE, PARTICLE_P, ParticleSystem::totpart, ParticleSystem::tree, and ParticleSystem::tree_frame.
Referenced by dynamics_step(), and precalculate_effector().
| int psys_uses_gravity | ( | struct ParticleSimulationData * | sim | ) |
Definition at line 907 of file particle.c.
References ParticleSettings::effector_weights, PhysicsSettings::flag, EffectorWeights::global_gravity, ParticleSystem::part, PHYS_GLOBAL_GRAVITY, Scene::physics_settings, ParticleSimulationData::psys, and ParticleSimulationData::scene.
Referenced by basic_integrate(), boid_body(), psys_sph_init(), and rule_average_speed().
| void psys_vec_rot_to_face | ( | struct Mesh * | mesh, |
| struct ParticleData * | pa, | ||
| float | vec[3] | ||
| ) |
Definition at line 3900 of file particle.c.
References mesh, mul_mat3_m4_v3(), psys_face_mat(), and transpose_m4().
Referenced by save_hair().
| void reset_particle | ( | struct ParticleSimulationData * | sim, |
| struct ParticleData * | pa, | ||
| float | dtime, | ||
| float | cfra | ||
| ) |
Definition at line 1076 of file particle_system.c.
References BoidData::acc, ParticleData::alive, ParticleData::boid, ParticleSettings::boids, ParticleSystem::cfra, BoidParticle::data, ParticleSimulationData::depsgraph, ParticleData::dietime, eBoidMode_InAir, evaluate_emitter_anim(), ListBase::first, ParticleSystem::flag, PointCache::flag, PhysicsSettings::flag, BoidParticle::gravity, PhysicsSettings::gravity, BoidData::health, BoidSettings::health, init_particle_texture(), ParticleTexture::life, ParticleData::lifetime, ParticleSettings::lifetime, PointCache::mem_cache, MIN2, BoidData::mode, ParticleSimulationData::ob, PAMAP_LIFE, PARS_ALIVE, PARS_DEAD, PARS_UNBORN, ParticleSystem::part, PART_HAIR, PART_PHYS_BOIDS, ParticleSystem::particles, PHYS_GLOBAL_GRAVITY, Scene::physics_settings, ParticleSettings::phystype, ParticleSystem::pointcache, ParticleSimulationData::psys, psys_frand(), psys_get_birth_coords(), psys_get_dietime_from_cache(), psys_get_texture(), PSYS_OB_ANIM_RESTORE, PTCACHE_BAKED, ParticleSettings::randlife, ParticleSimulationData::scene, ParticleData::state, BoidData::state_id, BoidSettings::states, ParticleKey::time, ParticleData::time, and ParticleSettings::type.
Referenced by brush_add(), cached_step(), dynamics_step(), particle_system_update(), and reset_all_particles().
|
extern |
Definition at line 5240 of file particle.c.
Referenced by BKE_particle_batch_cache_dirty_tag(), and DRW_engines_register().
|
extern |
Definition at line 5241 of file particle.c.
Referenced by BKE_particle_batch_cache_free(), and DRW_engines_register().
|
extern |
Definition at line 521 of file particle.c.
Referenced by BKE_particle_init_rng(), psys_frand(), and psys_frand_vec().
|
extern |
Definition at line 520 of file particle.c.
Referenced by BKE_particle_init_rng(), psys_frand(), and psys_frand_vec().
|
extern |
Definition at line 519 of file particle.c.
Referenced by BKE_particle_init_rng(), psys_frand(), and psys_frand_vec().