|
Blender V4.3
|
#include <optional>#include "BLI_buffer.h"#include "BLI_compiler_attrs.h"#include "BLI_map.hh"#include "BLI_ordered_edge.hh"#include "BLI_utildefines.h"#include "DNA_particle_types.h"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 679 of file BKE_particle.h.
Referenced by brush_add_count_iter(), distribute_children_exec(), get_particle_uv(), blender::draw::particle_calculate_parent_mcol(), blender::draw::particle_calculate_parent_uvs(), PE_mirror_x(), psys_calc_dmcache(), psys_face_mat(), psys_find_parents(), psys_get_dupli_path_transform(), psys_get_dupli_texture(), psys_get_particle_on_path(), psys_map_index_on_dm(), psys_thread_create_path(), remap_hair_emitter(), and blender::io::hydra::HairData::write_curves().
| #define DMCACHE_NOTFOUND -1 |
Definition at line 678 of file BKE_particle.h.
Referenced by brush_add(), brush_add_count_iter(), distribute_from_verts_exec(), get_particle_uv(), blender::draw::particle_calculate_parent_mcol(), blender::draw::particle_calculate_parent_uvs(), blender::draw::particle_interpolate_children_mcol(), blender::draw::particle_interpolate_children_uvs(), psys_calc_dmcache(), psys_face_mat(), psys_get_dupli_texture(), psys_map_index_on_dm(), psys_particle_dm_face_lookup(), psys_thread_create_path(), blender::ed::curves::convert_to_particle_system::try_convert_single_object(), and blender::io::hydra::HairData::write_curves().
| #define LOOP_DYNAMIC_PARTICLES |
Definition at line 62 of file BKE_particle.h.
Referenced by dynamics_step().
| #define LOOP_EXISTING_PARTICLES |
Definition at line 55 of file BKE_particle.h.
Referenced by dynamics_step(), and particle_system_update().
| #define LOOP_PARTICLES for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++) |
Definition at line 54 of file BKE_particle.h.
Referenced by cached_step(), distribute_invalid(), do_hair_dynamics(), free_hair(), free_keyed_keys(), free_unexisting_particles(), hair_create_input_mesh(), hair_step(), initialize_all_particles(), PE_update_mirror_cache(), precalc_guides(), psys_cache_paths(), psys_calc_dmcache(), psys_check_boid_data(), psys_free_particles(), psys_reset(), realloc_particles(), save_hair(), set_keyed_keys(), and system_step().
| #define LOOP_SHOWN_PARTICLES |
Definition at line 58 of file BKE_particle.h.
Referenced by count_particles(), count_particles_mod(), dynamics_step(), psys_update_particle_bvhtree(), and psys_update_particle_tree().
| #define PARTICLE_COLLISION_MAX_COLLISIONS 10 |
Definition at line 49 of file BKE_particle.h.
Referenced by collision_check().
| #define PARTICLE_DRAW_DATA_UPDATED 1 |
Definition at line 244 of file BKE_particle.h.
| #define PARTICLE_P |
Definition at line 51 of file BKE_particle.h.
Referenced by cached_step(), count_particles(), count_particles_mod(), distribute_invalid(), do_hair_dynamics(), dynamics_step(), free_hair(), free_keyed_keys(), free_unexisting_particles(), hair_create_input_mesh(), hair_step(), initialize_all_particles(), particle_system_update(), PE_update_mirror_cache(), precalc_guides(), psys_cache_paths(), psys_calc_dmcache(), psys_check_boid_data(), psys_free_particles(), psys_reset(), psys_update_particle_bvhtree(), psys_update_particle_tree(), realloc_particles(), save_hair(), set_keyed_keys(), and system_step().
| #define PARTICLE_PSMD ParticleSystemModifierData *psmd = sim->psmd ? sim->psmd : psys_get_modifier(sim->ob, sim->psys) |
Definition at line 67 of file BKE_particle.h.
Referenced by distribute_particles(), psys_cache_paths(), and psys_get_particle_on_path().
| #define PSYS_FRAND_COUNT 1024 |
Definition at line 246 of file BKE_particle.h.
Referenced by BKE_particle_init_rng(), psys_frand(), and psys_frand_vec().
| #define PSYS_RESET_ALL 1 |
Definition at line 672 of file BKE_particle.h.
Referenced by BKE_ptcache_object_reset(), particle_system_update(), psys_changed_type(), and psys_reset().
| #define PSYS_RESET_CACHE_MISS 4 |
Definition at line 675 of file BKE_particle.h.
Referenced by psys_reset(), and system_step().
| #define PSYS_RESET_DEPSGRAPH 2 |
Definition at line 673 of file BKE_particle.h.
Referenced by BKE_ptcache_id_reset(), clear_edited_exec(), and psys_reset().
| 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) |
Callback format for performing operations on ID-pointers for particle systems.
Definition at line 533 of file BKE_particle.h.
| typedef struct ParticleTask ParticleTask |
| typedef struct ParticleTexture ParticleTexture |
| typedef struct ParticleThreadContext ParticleThreadContext |
| typedef struct SPHData SPHData |
| anonymous enum |
| Enumerator | |
|---|---|
| BKE_PARTICLE_BATCH_DIRTY_ALL | |
Definition at line 691 of file BKE_particle.h.
| void BKE_particle_batch_cache_dirty_tag | ( | struct ParticleSystem * | psys, |
| int | mode ) |
Definition at line 5295 of file particle.cc.
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 5301 of file particle.cc.
References ParticleSystem::batch_cache, and BKE_particle_batch_cache_free_cb.
Referenced by psys_free().
| void BKE_particle_init_rng | ( | void | ) |
Definition at line 415 of file particle.cc.
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 ) |
Definition at line 316 of file particle.cc.
Referenced by object_blend_read_data(), and particle_settings_blend_read_data().
| void BKE_particle_settings_eval_reset | ( | struct Depsgraph * | depsgraph, |
| struct ParticleSettings * | particle_settings ) |
Definition at line 5088 of file particle_system.cc.
References DEG_debug_print_eval(), depsgraph, ParticleSettings::id, ID_RECALC_PSYS_RESET, ID::name, and ID::recalc.
| void BKE_particle_system_blend_read_after_liblink | ( | struct BlendLibReader * | reader, |
| struct Object * | ob, | ||
| struct ID * | id, | ||
| struct ListBase * | particles ) |
Definition at line 5441 of file particle.cc.
References BKE_modifier_free(), BKE_modifier_remove_from_list(), 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 object_blend_read_after_liblink().
| void BKE_particle_system_blend_read_data | ( | struct BlendDataReader * | reader, |
| struct ListBase * | particles ) |
Definition at line 5353 of file particle.cc.
References ParticleSystem::batch_cache, 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, ParticleSystem::ptcaches, ClothModifierData::sim_parms, ClothModifierData::solver_result, ParticleSystem::targets, ParticleSystem::tot_fluidsprings, ParticleSystem::totchild, ParticleData::totkey, ParticleSystem::totpart, and ParticleSystem::tree.
Referenced by object_blend_read_data().
| void BKE_particle_system_blend_write | ( | struct BlendWriter * | writer, |
| struct ListBase * | particles ) |
Definition at line 5308 of file particle.cc.
References 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().
| void BKE_particle_system_eval_init | ( | struct Depsgraph * | depsgraph, |
| struct Object * | object ) |
Definition at line 5094 of file particle_system.cc.
References DEG_debug_print_eval(), depsgraph, and ID_RECALC_PSYS_ALL.
Referenced by blender::deg::DepsgraphNodeBuilder::build_particle_systems().
| struct ParticleSettings * BKE_particlesettings_add | ( | struct Main * | bmain, |
| const char * | name ) |
Definition at line 4095 of file particle.cc.
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 4104 of file particle.cc.
References BKE_curvemapping_add(), BKE_curvemapping_init(), CurveMapping::cm, CurveMap::curve, CurveMapPoint::x, and CurveMapPoint::y.
| void BKE_particlesettings_fluid_default_settings | ( | struct ParticleSettings * | part | ) |
Definition at line 4722 of file particle_system.cc.
References SPHFluidSettings::buoyancy, SPHFluidSettings::flag, 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 4118 of file particle.cc.
References BKE_curvemapping_add(), BKE_curvemapping_init(), CurveMapping::cm, CurveMap::curve, CurveMapPoint::x, and CurveMapPoint::y.
| void BKE_particlesettings_twist_curve_init | ( | struct ParticleSettings * | part | ) |
Definition at line 4132 of file particle.cc.
References BKE_curvemapping_add(), BKE_curvemapping_init(), CurveMapping::cm, CurveMap::curve, CurveMapPoint::x, and CurveMapPoint::y.
| void BKE_particlesystem_id_loop | ( | struct ParticleSystem * | psys, |
| ParticleSystemIDFunc | func, | ||
| void * | userdata ) |
Definition at line 5029 of file particle_system.cc.
References BKE_lib_query_foreachid_process_flags_get(), BKE_modifier_get_info(), ParticleData::boid, ParticleSystem::clmd, ModifierTypeInfo::foreach_ID_link, BoidParticle::ground, IDWALK_CB_NEVER_NULL, IDWALK_CB_NOP, IDWALK_CB_USER, IDWALK_NO_ORIG_POINTERS_ACCESS, LISTBASE_FOREACH, ClothModifierData::modifier, ParticleSystem::parent, ParticleSystem::part, PART_PHYS_BOIDS, ParticleSystem::particles, particlesystem_modifiersForeachIDLink(), ParticleSettings::phystype, ParticleSystemIDLoopForModifier::psys, ParticleSystem::target_ob, ParticleSystem::targets, ParticleSystem::totpart, and ModifierData::type.
Referenced by object_foreach_id().
| void BKE_particlesystem_reset_all | ( | struct Object * | object | ) |
Reset all particle systems in the given object.
Definition at line 5072 of file particle_system.cc.
References eModifierType_ParticleSystem, ID_RECALC_PSYS_RESET, ParticleSystemModifierData::psys, and ParticleSystem::recalc.
Referenced by blender::ed::sculpt_paint::dyntopo::disable(), and blender::ed::object::editmode_exit_ex().
| void BKE_psys_collision_neartest_cb | ( | void * | userdata, |
| int | index, | ||
| const struct BVHTreeRay * | ray, | ||
| struct BVHTreeRayHit * | hit ) |
Callback for BVHTree near test.
Referenced by boid_find_ground(), and rule_avoid_collision().
| void copy_particle_key | ( | struct ParticleKey * | to, |
| struct ParticleKey * | from, | ||
| int | time ) |
Definition at line 3741 of file particle.cc.
Referenced by boid_body(), do_particle_interpolation(), dynamics_step(), get_pointcache_keys_for_time(), integrate_particle(), psys_get_particle_on_path(), psys_get_particle_state(), set_keyed_keys(), and sph_integrate().
| int count_particles | ( | struct ParticleSystem * | psys | ) |
Definition at line 446 of file particle.cc.
References 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 464 of file particle.cc.
References 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 1394 of file particle_distribute.cc.
References distribute_invalid(), distribute_particles_on_dm(), distribute_particles_on_shape(), and PARTICLE_PSMD.
Referenced by particle_system_update(), psys_update_path_cache(), system_step(), and update_children().
| bool do_guides | ( | struct Depsgraph * | depsgraph, |
| struct ParticleSettings * | part, | ||
| struct ListBase * | effectors, | ||
| ParticleKey * | state, | ||
| int | index, | ||
| float | time ) |
Definition at line 2332 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(), CLAMP, PartDeflect::clump_fac, PartDeflect::clump_pow, ParticleKey::co, copy_v3_v3(), cross_v3_v3v3(), CU_PATH_RADIUS, data, depsgraph, do_clump(), 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, safe_acosf(), state, and Curve::taperobj.
Referenced by basic_integrate(), do_child_modifiers(), psys_cache_paths(), and psys_get_particle_on_path().
| void free_hair | ( | struct Object * | ob, |
| struct ParticleSystem * | psys, | ||
| int | dynamics ) |
Definition at line 843 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, ParticleSystem::hair_in_mesh, ParticleSystem::hair_out_mesh, LOOP_PARTICLES, MEM_SAFE_FREE, PARTICLE_P, 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 878 of file particle.cc.
References ParticleData::keys, LOOP_PARTICLES, MEM_freeN(), 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 ) |
Set particle parameters that don't change during particle's life.
Definition at line 576 of file particle_system.cc.
References ParticleData::flag, float, ParticleData::hair_index, ParticleSystem::part, ParticleSystem::particles, ParticleSimulationData::psys, ParticleData::time, and ParticleSystem::totpart.
Referenced by brush_add(), and initialize_all_particles().
| struct ModifierData * object_add_particle_system | ( | struct Main * | bmain, |
| const struct Scene * | scene, | ||
| struct Object * | ob, | ||
| const char * | name ) |
| struct ModifierData * object_copy_particle_system | ( | struct Main * | bmain, |
| const 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, | ||
| struct ParticleSystem * | psys ) |
Definition at line 3991 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, 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, 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 blender::ed::object::object_modifier_remove(), and particle_system_remove_exec().
| void particle_system_update | ( | struct Depsgraph * | depsgraph, |
| struct Scene * | scene, | ||
| struct Object * | ob, | ||
| struct ParticleSystem * | psys, | ||
| bool | use_render_params ) |
Main particle update call, checks that things are ok on the large scale and then advances in to actual particle calculations depending on particle type.
Definition at line 4792 of file particle_system.cc.
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(), depsgraph, ParticleSimulationData::depsgraph, distribute_particles(), ParticleSystem::edit, emit_particles(), eParticleSystemFlag_Pars, eParticleSystemFlag_psys_updated, evaluate_emitter_anim(), ParticleData::flag, ParticleDrawData::flag, ParticleSystem::flag, ParticleSystemModifierData::flag, PTCacheEdit::flags, float, ParticleSystem::free_edit, free_hair(), free_keyed_keys(), free_unexisting_particles(), 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, ParticleSimulationData::ob, PAMAP_SIZE, PARS_NO_DISP, ParticleSystem::part, PART_FROM_VERT, PART_HAIR, PART_HAIR_REGROW, PART_PHYS_KEYED, PART_PHYS_NO, 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, 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_get_texture(), PSYS_HAIR_DONE, PSYS_OB_ANIM_RESTORE, psys_orig_get(), psys_prepare_physics(), psys_reset(), PSYS_RESET_ALL, psys_update_path_cache(), PT_CACHE_EDIT_UPDATE_PARTICLE_FROM_EVAL, ParticleSystem::recalc, reset_particle(), save_hair(), ParticleSimulationData::scene, scene, set_keyed_keys(), ParticleData::size, ParticleTexture::size, system_step(), ParticleSettings::totpart, ParticleSystem::totpart, and ParticleSystem::totunexist.
Referenced by BKE_object_handle_data_update(), and deform_verts().
| void precalc_guides | ( | struct ParticleSimulationData * | sim, |
| struct ListBase * | effectors ) |
Definition at line 2277 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_callocN, mul_m4_v3(), mul_mat3_m4_v3(), EffectorData::nor, ParticleSimulationData::ob, ParticleSystem::part, PARTICLE_P, pd_point_from_particle(), PFIELD_GUIDE, point, 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 287 of file particle_child.cc.
References check_path_length(), ParticleCacheKey::co, ParticleKey::co, ParticleCacheKey::col, copy_v3_v3(), ParticleChildModifierContext::cpa, do_child_modifiers(), do_kink_spiral(), ELEM, float, ParticleTexture::length, ParticleThreadContext::ma, mul_v3_fl(), 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, ParticleChildModifierContext::sim, ParticleThreadContext::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 5253 of file particle.cc.
References BKE_lattice_deform_data_eval_co(), HairKey::co, depsgraph, 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_EDITED, psys_get_modifier(), psys_mat_hair_to_global(), psys_sim_data_free(), psys_sim_data_init(), ParticleSimulationData::scene, scene, ParticleData::totkey, and ParticleSystem::totpart.
Referenced by blender::ed::object::modifier_apply_obdata().
| void psys_cache_child_paths | ( | struct ParticleSimulationData * | sim, |
| float | cfra, | ||
| bool | editupdate, | ||
| bool | use_render_params ) |
Definition at line 3148 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_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_pool, TASK_PRIORITY_HIGH, 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, | ||
| bool | use_render_params ) |
Definition at line 3662 of file particle.cc.
References BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), ParticleEditSettings::brushtype, depsgraph, ParticleSimulationData::depsgraph, ParticleEditSettings::draw_step, CacheEditrPathsIterData::edit, ParticleSimulationData::ob, CacheEditrPathsIterData::object, CacheEditrPathsIterData::pa, ParticleSystem::particles, PTCacheEdit::pathcache, PTCacheEdit::pathcachebufs, PE_BRUSH_WEIGHT, PEP_EDIT_RECALC, point, 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_iter(), psys_free_path_cache(), ParticleSimulationData::scene, scene, CacheEditrPathsIterData::segments, PTCacheEdit::totcached, PTCacheEdit::totpoint, and CacheEditrPathsIterData::use_weight.
Referenced by blender::draw::drw_particle_update_ptcache_edit(), PE_update_object(), and PE_update_selection().
| void void psys_cache_paths | ( | struct ParticleSimulationData * | sim, |
| float | cfra, | ||
| bool | use_render_params ) |
Calculates paths ready for drawing/rendering
Definition at line 3256 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, col, ParticleCacheKey::col, copy_qt_qt(), copy_v3_v3(), ParticleSimulationData::depsgraph, ParticleInterpolationData::dietime, do_guides(), do_particle_interpolation(), do_path_effectors(), ParticleSettings::draw_col, ParticleSystem::edit, ParticleSystem::effectors, ParticleInterpolationData::epoint, ListBase::first, ParticleEditSettings::flag, ParticleSettings::flag, ParticleSystem::flag, float, ParticleSettings::from, ParticleSystem::hair_out_mesh, init_particle_interpolation(), int, 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, ParticleSystem::pathcache, ParticleSystem::pathcachebufs, PE_DRAW_PART, ParticleSystem::pointcache, pow(), ParticleSimulationData::psys, psys_alloc_path_cache_buffers(), 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, 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_update_path_cache().
| float * psys_cache_vgroup | ( | struct Mesh * | mesh, |
| struct ParticleSystem * | psys, | ||
| int | vgroup ) |
Definition at line 2575 of file particle.cc.
References BKE_defvert_find_weight(), MEM_callocN, ParticleSystem::vg_neg, and ParticleSystem::vgroup.
Referenced by psys_cache_paths(), 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 305 of file particle_system.cc.
References CD_ORIGINDEX, CustomData_get_layer(), Object::data, DMCACHE_ISCHILD, DMCACHE_NOTFOUND, Mesh::face_data, Mesh::fdata_legacy, ParticleSettings::from, LinkNode::link, LOOP_PARTICLES, MEM_callocN, MEM_freeN(), node, ORIGINDEX_NONE, ParticleSystem::part, PART_FROM_VERT, PARTICLE_P, POINTER_AS_INT, POINTER_FROM_INT, psys_particle_dm_face_lookup(), Mesh::runtime, Mesh::totface_legacy, ParticleSettings::use_modifier_stack, Mesh::vert_data, and Mesh::verts_num.
Referenced by distribute_particles_on_dm(), distribute_simple_children(), and hair_step().
| void psys_changed_type | ( | struct Object * | ob, |
| struct ParticleSystem * | psys ) |
System type has changed so set sensible defaults and clear non applicable flags.
Definition at line 4653 of file particle_system.cc.
References BKE_ptcache_id_clear(), BKE_ptcache_id_from_particles(), CLAMP, ELEM, ParticleSystem::flag, free_hair(), 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, psys_reset(), PSYS_RESET_ALL, and PTCACHE_CLEAR_ALL.
Referenced by blender::ed::curves::convert_to_particle_system::try_convert_single_object().
| void psys_check_boid_data | ( | struct ParticleSystem * | psys | ) |
Definition at line 4691 of file particle_system.cc.
References ParticleData::boid, LOOP_PARTICLES, MEM_callocN, MEM_freeN(), 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 732 of file particle.cc.
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, | ||
| bool | use_render_params ) |
Definition at line 706 of file particle.cc.
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(), 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(), and pointdensity_cache_psys().
| void psys_check_group_weights | ( | struct ParticleSettings * | part | ) |
Definition at line 762 of file particle.cc.
References BKE_collection_has_object_recursive(), BLI_addtail(), BLI_freelinkN(), BLI_freelistN(), ParticleDupliWeight::count, ParticleDupliWeight::flag, FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN, FOREACH_COLLECTION_OBJECT_RECURSIVE_END, ParticleDupliWeight::index, LISTBASE_FOREACH, MEM_callocN, ParticleDupliWeight::next, ParticleDupliWeight::ob, PART_DRAW_GR, PART_DUPLIW_CURRENT, and psys_find_group_weights().
Referenced by dupliob_refresh_exec().
| void psys_copy_particles | ( | struct ParticleSystem * | psys_dst, |
| struct ParticleSystem * | psys_src ) |
Copy.
Definition at line 1053 of file particle.cc.
References ParticleData::boid, ParticleSystem::child, ParticleData::hair, ParticleData::keys, MEM_dupallocN, ParticleSystem::particles, psys_free_children(), psys_free_particles(), ParticleSystem::totchild, ParticleData::totkey, and ParticleSystem::totpart.
Referenced by BKE_object_copy_particlesystem(), PE_create_particle_edit(), and pe_get_current().
| void psys_count_keyed_targets | ( | struct ParticleSimulationData * | sim | ) |
Counts valid keyed targets.
Definition at line 1180 of file particle_system.cc.
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().
| void psys_disable_all | ( | struct Object * | ob | ) |
Definition at line 639 of file particle.cc.
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 2202 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, 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 required_data_mask().
| void psys_enable_all | ( | struct Object * | ob | ) |
Definition at line 647 of file particle.cc.
References ListBase::first, ParticleSystem::flag, ParticleSystem::next, and Object::particlesystem.
Referenced by particle_intersect_mesh().
| struct 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 664 of file particle.cc.
References DEG_get_evaluated_object(), depsgraph, ListBase::first, ParticleSystem::next, ParticleSystem::orig_psys, and Object::particlesystem.
Referenced by BKE_ptcache_bake(), blender::ed::object::convert_psys_to_mesh(), disconnect_hair(), PE_create_particle_edit(), and remap_hair_emitter().
| void psys_find_group_weights | ( | struct ParticleSettings * | part | ) |
Definition at line 741 of file particle.cc.
References BKE_collection_object_cache_get(), BLI_findlink(), LISTBASE_FOREACH, and Base::object.
Referenced by make_duplis_particle_system(), and psys_check_group_weights().
| void psys_find_parents | ( | struct ParticleSimulationData * | sim, |
| bool | use_render_params ) |
Definition at line 2601 of file particle.cc.
References ParticleSystem::cfra, ParticleSystem::child, DMCACHE_ISCHILD, ParticleTexture::exist, float, ChildParticle::foffset, ChildParticle::fuv, get_cpa_texture(), int, ParticleSystemModifierData::mesh_final, ChildParticle::num, ChildParticle::pa, PAMAP_CHILD, PAMAP_DENS, ChildParticle::parent, ParticleSystem::part, PART_FROM_FACE, ParticleSystem::particles, ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_frand(), psys_particle_on_emitter(), 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 253 of file BKE_particle.h.
References PSYS_FRAND_BASE, PSYS_FRAND_COUNT, PSYS_FRAND_SEED_MULTIPLIER, PSYS_FRAND_SEED_OFFSET, ParticleSystem::seed, and 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(), modify_mesh(), particle_skip(), particle_system_update(), particles_fluid_step(), psys_cache_paths(), 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 265 of file BKE_particle.h.
References PSYS_FRAND_BASE, PSYS_FRAND_COUNT, PSYS_FRAND_SEED_MULTIPLIER, PSYS_FRAND_SEED_OFFSET, ParticleSystem::seed, and seed.
Referenced by do_child_modifiers().
| void psys_free | ( | struct Object * | ob, |
| struct ParticleSystem * | psys ) |
Free everything.
Definition at line 975 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(), 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, 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 919 of file particle.cc.
References ParticleSystem::child, free_child_path_cache(), MEM_freeN(), 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 929 of file particle.cc.
References ParticleData::boid, ParticleData::keys, LOOP_PARTICLES, MEM_freeN(), ParticleSystem::part, PART_HAIR, PARTICLE_P, ParticleSystem::particles, ParticleSystem::totpart, and ParticleSettings::type.
Referenced by psys_copy_particles(), psys_free(), 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 904 of file particle.cc.
References free_child_path_cache(), ParticleSystem::pathcache, PTCacheEdit::pathcache, ParticleSystem::pathcachebufs, PTCacheEdit::pathcachebufs, 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_reset(), psys_update_path_cache(), remap_hair_emitter(), and shape_cut_exec().
| void psys_free_pdd | ( | struct ParticleSystem * | psys | ) |
Definition at line 959 of file particle.cc.
References ParticleDrawData::cdata, MEM_SAFE_FREE, ParticleDrawData::ndata, 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 709 of file particle_system.cc.
References axis_angle_to_quat(), BLI_assert, ParticleData::boid, copy_qt_qt(), copy_v3_v3(), cosf, cross_v3_v3v3(), dot_v3v3(), fabsf, ParticleData::foffset, 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_legacy(), 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(), ParticleData::num, ParticleData::num_dmcache, ParticleSimulationData::ob, OB_POSX, OB_POSZ, 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, ParticleSystem::particles, ParticleData::prev_state, project_v3_v3v3(), ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_frand(), psys_get_texture(), psys_particle_on_emitter(), psys_particle_value_from_verts(), rot, sinf, ParticleData::state, state, sub_v3_v3(), sub_v3_v3v3(), 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, | ||
| bool | use_render_params ) |
Definition at line 278 of file particle_system.cc.
References ParticleSettings::child_percent, ParticleSettings::child_render_percent, ParticleSettings::childtype, get_render_child_particle_number(), and ParticleSystem::part.
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 ) |
Definition at line 4510 of file particle.cc.
References ParticleSystem::child, ChildParticle::pa, ChildParticle::parent, ParticleSystem::part, PART_CHILD_FACES, ParticleSystem::particles, psys_frand(), ParticleData::size, size(), ChildParticle::w, and w().
Referenced by make_duplis_particle_system(), and modify_mesh().
| float psys_get_child_time | ( | struct ParticleSystem * | psys, |
| struct ChildParticle * | cpa, | ||
| float | cfra, | ||
| float * | birthtime, | ||
| float * | dietime ) |
Definition at line 4478 of file particle.cc.
References ParticleSystem::child, ParticleData::lifetime, ChildParticle::pa, ChildParticle::parent, ParticleSystem::part, PART_CHILD_FACES, ParticleSystem::particles, psys_frand(), ParticleData::time, time, ChildParticle::w, and w().
Referenced by pointdensity_cache_psys(), psys_get_particle_on_path(), and psys_get_particle_state().
| struct ParticleSystem * psys_get_current | ( | struct Object * | ob | ) |
Get object's active particle system safely.
Definition at line 534 of file particle.cc.
References LISTBASE_FOREACH, Object::particlesystem, and PSYS_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(), and particle_system_remove_exec().
| float psys_get_current_display_percentage | ( | struct ParticleSystem * | psys, |
| bool | use_render_params ) |
Definition at line 91 of file particle_system.cc.
References 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 548 of file particle.cc.
References ListBase::first, ParticleSystem::flag, ParticleSystem::next, Object::particlesystem, and PSYS_CURRENT.
| float psys_get_dietime_from_cache | ( | struct PointCache * | cache, |
| int | index ) |
Definition at line 1271 of file particle.cc.
References BKE_ptcache_mem_index_find(), float, LISTBASE_FOREACH_BACKWARD, and PointCache::mem_cache.
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 5159 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(), nor, 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_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 5056 of file particle.cc.
References CD_MFACE, CD_MTFACE, CustomData_get_for_write(), CustomData_get_layer_n(), CustomData_get_render_layer(), DMCACHE_ISCHILD, DMCACHE_NOTFOUND, ELEM, Mesh::fdata_legacy, ChildParticle::foffset, ParticleData::foffset, ChildParticle::fuv, ParticleData::fuv, ParticleSystemModifierData::mesh_final, 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_legacy, 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 3752 of file particle.cc.
References ParticleKey::co, copy_qt_qt(), copy_v3_v3(), ParticleKey::rot, rot, ParticleKey::time, and ParticleKey::vel.
| struct ParticleSystemModifierData * psys_get_modifier | ( | struct Object * | ob, |
| struct ParticleSystem * | psys ) |
Definition at line 2150 of file particle.cc.
References eModifierType_ParticleSystem, LISTBASE_FOREACH, Object::modifiers, and ParticleSystemModifierData::psys.
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_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 4599 of file particle.cc.
References BKE_lattice_deform_data_eval_co(), BKE_object_material_get(), ParticleInterpolationData::bspline, ParticleInterpolationData::cache, ParticleSystem::child, ParticleSystem::childcache, 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(), ParticleThreadContext::ma, ParticleInterpolationData::mesh, ParticleThreadContext::mesh, ParticleSystemModifierData::mesh_final, mul_m4_v3(), mul_mat3_m4_v3(), mul_v3_fl(), normalize_v3(), ChildParticle::num, ParticleData::num, ParticleData::num_dmcache, ParticleSimulationData::ob, offset_child(), 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, 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, ParticleData::time, ParticleKey::time, ParticleSystem::totchild, ParticleSystem::totpart, unit_m4(), ParticleKey::vel, ChildParticle::w, and w().
Referenced by brush_add(), modify_mesh(), psys_get_particle_on_path(), psys_get_particle_state(), 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 4886 of file particle.cc.
References ParticleKey::ave, BKE_lattice_deform_data_eval_co(), ParticleSystem::child, ParticleSystem::childcache, CLAMP, ParticleKey::co, copy_particle_key(), ParticleChildModifierContext::cpa, DEG_get_ctime(), ParticleSimulationData::depsgraph, ParticleData::dietime, do_child_modifiers(), ELEM, ParticleSystem::flag, RenderData::frs_sec, ChildParticle::fuv, interp_qt_qtqt(), interp_v3_v3v3(), ParticleSystem::lattice_deform_data, ParticleSystem::lattice_strength, ParticleData::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, ParticleData::prev_state, ParticleSimulationData::psys, psys_frand(), psys_get_child_time(), psys_get_particle_on_path(), psys_get_timestep(), psys_interpolate_particle(), PSYS_KEYED, ParticleChildModifierContext::ptex, Scene::r, ParticleKey::rot, ParticleSimulationData::scene, ParticleChildModifierContext::sim, 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(), and set_keyed_keys().
| void psys_get_pointcache_start_end | ( | struct Scene * | scene, |
| ParticleSystem * | psys, | ||
| int * | sfra, | ||
| int * | efra ) |
Definition at line 1306 of file particle_system.cc.
References max_ii(), min_ii(), and ParticleSystem::part.
Referenced by BKE_ptcache_bake(), and system_step().
| struct ParticleSystem * psys_get_target_system | ( | struct Object * | ob, |
| struct ParticleTarget * | pt ) |
Definition at line 1155 of file particle_system.cc.
References BLI_findlink(), ELEM, ParticleTarget::flag, 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 4338 of file particle.cc.
References ATTR_FALLTHROUGH, BKE_mesh_texspace_ensure(), blend, 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, ParticleTexture::effector, ELEM, ParticleTexture::exist, fabsf, ParticleTexture::field, MTex::fieldfac, float, 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, 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_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, 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(), and reset_particle().
| float psys_get_timestep | ( | struct ParticleSimulationData * | sim | ) |
Definition at line 4474 of file particle.cc.
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, | ||
| bool | use_render_params ) |
Definition at line 296 of file particle_system.cc.
References psys_get_child_number(), 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 Mesh * | mesh, |
| const float(*) | vert_positions[3], | ||
| const float(*) | vert_normals[3], | ||
| const struct MFace * | mface, | ||
| struct MTFace * | tface, | ||
| const float(*) | orcodata[3], | ||
| float | w[4], | ||
| float | vec[3], | ||
| float | nor[3], | ||
| float | utan[3], | ||
| float | vtan[3], | ||
| float | orco[3] ) |
Interpolate a location on a face based on face coordinates.
Referenced by distribute_from_volume_exec().
| void psys_interpolate_particle | ( | short | type, |
| struct ParticleKey | keys[4], | ||
| float | dt, | ||
| struct ParticleKey * | result, | ||
| bool | velocity ) |
Definition at line 1137 of file particle.cc.
References ParticleKey::co, interp_cubic_v3(), interp_v3_v3v3v3v3(), key_curve_position_weights(), sub_v3_v3v3(), and ParticleKey::vel.
Referenced by do_particle_interpolation(), psys_get_particle_state(), ptcache_cloth_interpolate(), ptcache_particle_interpolate(), and ptcache_softbody_interpolate().
| void psys_make_temp_pointcache | ( | struct Object * | ob, |
| struct ParticleSystem * | psys ) |
Definition at line 1288 of file particle_system.cc.
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 3907 of file particle.cc.
References mul_m4_m4m4(), and psys_mat_hair_to_object().
Referenced by brush_add(), brush_puff(), createTransParticleVerts(), disconnect_hair(), 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_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] ) |
Definition at line 3851 of file particle.cc.
References copy_v3_v3(), ParticleData::foffset, ParticleData::fuv, ParticleData::num, ParticleData::num_dmcache, psys_face_mat(), psys_particle_on_dm(), and unit_m4().
Referenced by deflect_emitter_iter(), hair_create_input_mesh(), psys_mat_hair_to_global(), remap_hair_emitter(), remove_doubles_exec(), and blender::ed::curves::convert_to_particle_system::try_convert_single_object().
| void psys_mat_hair_to_orco | ( | struct Object * | ob, |
| struct Mesh * | mesh, | ||
| short | from, | ||
| struct ParticleData * | pa, | ||
| float | hairmat[4][4] ) |
Definition at line 3877 of file particle.cc.
References copy_v3_v3(), ParticleData::foffset, ParticleData::fuv, 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 | ) |
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 656 of file particle.cc.
References ParticleSystem::orig_psys.
Referenced by blender::draw::drw_particle_get_hair_source(), particle_system_update(), and psys_in_edit_mode().
| 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 1830 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, float, isect_point_quad_v2(), isect_point_tri_v2(), LinkNode::link, LinkNode::next, POINTER_AS_INT, printf, psys_w_to_origspace(), Mesh::runtime, Mesh::totface_legacy, 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] ) |
Interprets particle data to get a point on a mesh in object space.
Definition at line 2017 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, float, mul_v3_fl(), nor, normalize_v3(), PART_FROM_VERT, PART_FROM_VOLUME, psys_interpolate_face(), psys_map_index_on_dm(), Mesh::totface_legacy, and Mesh::vert_data.
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 2241 of file particle.cc.
References copy_v3_v3(), ParticleSettings::distr, 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 2136 of file particle.cc.
References ParticleData::foffset, ParticleData::fuv, ParticleData::num, ParticleData::num_dmcache, psys_interpolate_value_from_verts(), and psys_map_index_on_dm().
Referenced by psys_cache_paths(), and 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 118 of file particle_system.cc.
References ParticleSystem::alloc_fluidsprings, BKE_ptcache_invalidate(), ParticleSystem::child, ParticleSystem::edit, ELEM, ParticleSystem::flag, ParticleSystem::fluid_springs, ParticleSystem::free_edit, LOOP_PARTICLES, MEM_SAFE_FREE, 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().
Definition at line 567 of file particle.cc.
References ListBase::first, ParticleSystem::flag, ParticleSystem::next, Object::particlesystem, and PSYS_CURRENT.
| void psys_sim_data_free | ( | struct ParticleSimulationData * | sim | ) |
Definition at line 629 of file particle.cc.
References BKE_lattice_deform_data_destroy(), ParticleSystem::lattice_deform_data, and ParticleSimulationData::psys.
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_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 588 of file particle.cc.
References BKE_curvemapping_init(), BKE_lattice_deform_data_create(), DAG_EVAL_RENDER, DEG_get_mode(), ParticleSimulationData::depsgraph, eModifierMode_Realtime, eModifierMode_Render, eModifierType_Lattice, 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(), LatticeModifierData::strength, 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_thread_context_init_path(), and save_hair().
Sample the density field at a point in space.
Definition at line 2177 of file particle_system.cc.
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 2172 of file particle_system.cc.
References psys_sph_flush_springs().
Referenced by dynamics_step().
| void psys_sph_init | ( | struct ParticleSimulationData * | sim, |
| struct SPHData * | sphdata ) |
Definition at line 2121 of file particle_system.cc.
References BLI_buffer_field_init, SPHData::density_cb, SPHData::eh, ListBase::first, ParticleSettings::fluid, SPHData::force_cb, PhysicsSettings::gravity, SPHData::gravity, SPHData::hfac, SPHData::mass, SPHData::new_springs, ParticleTarget::next, 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 448 of file particle_system.cc.
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 478 of file particle_system.cc.
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 495 of file particle_system.cc.
References BKE_curvemapping_free(), ParticleThreadContext::clumpcurve, ParticleThreadContext::index, ParticleThreadContext::jit, ParticleThreadContext::jitoff, MEM_freeN(), psys_sim_data_free(), 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 ) |
Threaded child particle distribution and path caching.
Definition at line 440 of file particle_system.cc.
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 ) |
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 1368 of file particle_system.cc.
References LOOP_SHOWN_PARTICLES, PARS_ALIVE, PARTICLE_P, ParticleSystem::tree, and ParticleSystem::tree_frame.
Referenced by dynamics_step(), and precalculate_effector().
| int psys_uses_gravity | ( | struct ParticleSimulationData * | sim | ) |
Definition at line 826 of file particle.cc.
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 3898 of file particle.cc.
References 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 ) |
Sets particle to the emitter surface with initial velocity & rotation.
Definition at line 1058 of file particle_system.cc.
References BoidData::acc, ParticleData::alive, ParticleData::boid, ParticleSystem::cfra, BoidParticle::data, ParticleSimulationData::depsgraph, ParticleData::dietime, eBoidMode_InAir, evaluate_emitter_anim(), ListBase::first, ParticleSystem::flag, PhysicsSettings::flag, PointCache::flag, BoidParticle::gravity, PhysicsSettings::gravity, BoidData::health, init_particle_texture(), ParticleTexture::life, ParticleData::lifetime, PointCache::mem_cache, 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, ParticleSystem::pointcache, ParticleSimulationData::psys, psys_frand(), psys_get_birth_coords(), psys_get_dietime_from_cache(), psys_get_texture(), PSYS_OB_ANIM_RESTORE, PTCACHE_BAKED, ParticleSimulationData::scene, ParticleData::state, BoidData::state_id, ParticleData::time, and ParticleKey::time.
Referenced by brush_add(), cached_step(), dynamics_step(), particle_system_update(), and reset_all_particles().
|
extern |
Definition at line 5292 of file particle.cc.
Referenced by BKE_particle_batch_cache_dirty_tag(), and DRW_engines_register().
|
extern |
Definition at line 5293 of file particle.cc.
Referenced by BKE_particle_batch_cache_free(), and DRW_engines_register().
|
extern |
Definition at line 413 of file particle.cc.
Referenced by BKE_particle_init_rng(), psys_frand(), and psys_frand_vec().
|
extern |
Definition at line 412 of file particle.cc.
Referenced by BKE_particle_init_rng(), psys_frand(), and psys_frand_vec().
|
extern |
Definition at line 411 of file particle.cc.
Referenced by BKE_particle_init_rng(), psys_frand(), and psys_frand_vec().