Blender V5.0
ParticleSystem Class Reference

#include <DNA_particle_types.h>

Inherits Node.

Public Member Functions

NODE_DECLARE ParticleSystem ()
 ~ParticleSystem () override
void tag_update (Scene *scene)
Public Member Functions inherited from Node
 Node (const NodeType *type, ustring name=ustring())
virtual ~Node ()=0
void set (const SocketType &input, bool value)
void set (const SocketType &input, const int value)
void set (const SocketType &input, const uint value)
void set (const SocketType &input, const uint64_t value)
void set (const SocketType &input, const float value)
void set (const SocketType &input, const float2 value)
void set (const SocketType &input, const float3 value)
void set (const SocketType &input, const char *value)
void set (const SocketType &input, ustring value)
void set (const SocketType &input, const Transform &value)
void set (const SocketType &input, Node *value)
template<class ValueType, std::enable_if_t< std::is_enum_v< ValueType >, bool > = true>
void set (const SocketType &input, const ValueType &value)
void set (const SocketType &input, array< bool > &value)
void set (const SocketType &input, array< int > &value)
void set (const SocketType &input, array< float > &value)
void set (const SocketType &input, array< float2 > &value)
void set (const SocketType &input, array< float3 > &value)
void set (const SocketType &input, array< ustring > &value)
void set (const SocketType &input, array< Transform > &value)
void set (const SocketType &input, array< Node * > &value)
bool get_bool (const SocketType &input) const
int get_int (const SocketType &input) const
uint get_uint (const SocketType &input) const
uint64_t get_uint64 (const SocketType &input) const
float get_float (const SocketType &input) const
float2 get_float2 (const SocketType &input) const
float3 get_float3 (const SocketType &input) const
ustring get_string (const SocketType &input) const
Transform get_transform (const SocketType &input) const
Nodeget_node (const SocketType &input) const
const array< bool > & get_bool_array (const SocketType &input) const
const array< int > & get_int_array (const SocketType &input) const
const array< float > & get_float_array (const SocketType &input) const
const array< float2 > & get_float2_array (const SocketType &input) const
const array< float3 > & get_float3_array (const SocketType &input) const
const array< ustring > & get_string_array (const SocketType &input) const
const array< Transform > & get_transform_array (const SocketType &input) const
const array< Node * > & get_node_array (const SocketType &input) const
bool has_default_value (const SocketType &input) const
void set_default_value (const SocketType &input)
bool equals_value (const Node &other, const SocketType &socket) const
void copy_value (const SocketType &socket, const Node &other, const SocketType &other_socket)
void set_value (const SocketType &socket, const Node &other, const SocketType &other_socket)
bool equals (const Node &other) const
void hash (MD5Hash &md5)
size_t get_total_size_in_bytes () const
bool is_a (const NodeType *type)
bool socket_is_modified (const SocketType &input) const
bool is_modified () const
void tag_modified ()
void clear_modified ()
void print_modified_sockets () const
const NodeOwnerget_owner () const
void set_owner (const NodeOwner *owner_)
int reference_count () const
void reference ()
void dereference ()
void clear_reference_count ()

Public Attributes

struct ParticleSystemnext
struct ParticleSystemprev
ParticleSettingspart
ParticleDataparticles
ChildParticlechild
struct PTCacheEditedit
void(* free_edit )(struct PTCacheEdit *edit)
struct ParticleCacheKey ** pathcache
struct ParticleCacheKey ** childcache
ListBase pathcachebufs
ListBase childcachebufs
struct ClothModifierDataclmd
struct Meshhair_in_mesh
struct Meshhair_out_mesh
struct Objecttarget_ob
struct LatticeDeformDatalattice_deform_data
struct Objectparent
struct ListBase targets
char name [64]
float imat [4][4]
float cfra
float tree_frame
float bvhtree_frame
int seed
int child_seed
int flag
int totpart
int totunexist
int totchild
int totcached
int totchildcache
int recalc
short target_psys
short totkeyed
short bakespace
char _pad1 [6]
char bb_uvname[3][68] DNA_DEPRECATED
char _pad2 [4]
short vgroup [13]
short vg_neg
short rt3
char _pad3 [6]
struct PointCachepointcache
struct ListBase ptcaches
struct ListBaseeffectors
ParticleSpringfluid_springs
int tot_fluidsprings
int alloc_fluidsprings
struct KDTree_3d * tree
struct BVHTreebvhtree
struct ParticleDrawDatapdd
float dt_frac
float lattice_strength
void * batch_cache
struct ParticleSystemorig_psys
array< Particleparticles
Public Attributes inherited from Node
ustring name
const NodeTypetype
InternalNode internal
LeafNode leaf

Additional Inherited Members

Protected Member Functions inherited from Node
template<typename T>
void set_if_different (const SocketType &input, T value)
void set_if_different (const SocketType &input, Node *value)
template<typename T>
void set_if_different (const SocketType &input, array< T > &value)
void set_if_different (const SocketType &input, array< Node * > &value)
void dereference_all_used_nodes ()
Static Protected Member Functions inherited from Node
template<typename T>
static Tget_socket_value (const Node *node, const SocketType &socket)
Protected Attributes inherited from Node
const NodeOwnerowner
int ref_count {0}
SocketModifiedFlags socket_modified

Detailed Description

Definition at line 303 of file DNA_particle_types.h.

Constructor & Destructor Documentation

◆ ParticleSystem()

ParticleSystem::ParticleSystem ( )

Definition at line 23 of file scene/particles.cpp.

References Node::Node().

◆ ~ParticleSystem()

ParticleSystem::~ParticleSystem ( )
overridedefault

Member Function Documentation

◆ tag_update()

void ParticleSystem::tag_update ( Scene * scene)

Definition at line 27 of file scene/particles.cpp.

References Scene::particle_system_manager.

Member Data Documentation

◆ _pad1

char ParticleSystem::_pad1[6]

Definition at line 361 of file DNA_particle_types.h.

◆ _pad2

char ParticleSystem::_pad2[4]

Definition at line 366 of file DNA_particle_types.h.

◆ _pad3

char ParticleSystem::_pad3[6]

Definition at line 370 of file DNA_particle_types.h.

◆ alloc_fluidsprings

int ParticleSystem::alloc_fluidsprings

◆ bakespace

short ParticleSystem::bakespace

Definition at line 360 of file DNA_particle_types.h.

◆ batch_cache

◆ bvhtree

struct BVHTree* ParticleSystem::bvhtree

Used for interactions with self and other systems.

Definition at line 384 of file DNA_particle_types.h.

Referenced by BKE_object_copy_particlesystem(), BKE_particle_system_blend_read_data(), psys_free(), and psys_update_particle_bvhtree().

◆ bvhtree_frame

float ParticleSystem::bvhtree_frame

Definition at line 353 of file DNA_particle_types.h.

Referenced by psys_update_particle_bvhtree().

◆ cfra

◆ child

◆ child_seed

int ParticleSystem::child_seed

◆ childcache

◆ childcachebufs

◆ clmd

◆ DNA_DEPRECATED

char bb_uvname [3][ 68] ParticleSystem::DNA_DEPRECATED

Billboard UV name.

Definition at line 364 of file DNA_particle_types.h.

◆ dt_frac

float ParticleSystem::dt_frac

Current time step, as a fraction of a frame.

Definition at line 389 of file DNA_particle_types.h.

Referenced by sync_timestep(), system_step(), and update_timestep().

◆ edit

◆ effectors

◆ flag

int ParticleSystem::flag

Definition at line 355 of file DNA_particle_types.h.

Referenced by BKE_object_copy_particlesystem(), BKE_object_handle_data_update(), BKE_particle_system_blend_read_data(), blo_do_versions_pre250(), brush_add(), brush_edit_apply(), brush_puff(), blender::deg::DepsgraphRelationBuilder::build_particle_systems(), clear_edited_exec(), connect_hair(), copy_particle_edit(), blender::ed::transform::createTransParticleVerts(), disconnect_hair(), do_particle_interpolation(), do_path_effectors(), DRW_object_is_visible_psys_in_active_context(), blender::draw::drw_particle_update_ptcache_edit(), blender::ed::transform::flushTransParticles(), foreach_mouse_hit_key_iter(), free_data(), free_hair(), hair_needs_recalc(), hair_step(), make_duplis_particle_system(), modify_mesh(), object_add_or_copy_particle_system(), particle_system_update(), particles_are_dynamic(), PE_apply_lengths(), PE_create_particle_edit(), pe_deflect_emitter(), pe_get_current(), PE_get_current_from_psys(), pe_iterate_lengths(), PE_lasso_select(), PE_mirror_x(), PE_start_edit(), pe_update_hair_particle_edit_pointers(), PE_update_object(), psys_apply_hair_lattice(), psys_cache_child_paths(), psys_cache_edit_paths_iter(), psys_cache_paths(), psys_changed_type(), psys_check_edited(), psys_check_enabled(), psys_count_keyed_targets(), psys_disable_all(), psys_enable_all(), psys_free(), psys_get_current_num(), psys_get_particle_on_path(), psys_get_particle_state(), psys_prepare_physics(), psys_reset(), psys_set_current_num(), psys_update_path_cache(), rekey_particle(), remove_doubles_exec(), reset_particle(), set_keyed_keys(), shape_cut_exec(), subdivide_particle(), blender::ed::curves::convert_to_particle_system::try_convert_single_object(), undoptcache_from_editcache(), undoptcache_to_editcache(), update_children(), and update_world_cos().

◆ fluid_springs

◆ free_edit

void(* ParticleSystem::free_edit) (struct PTCacheEdit *edit)

◆ hair_in_mesh

struct Mesh* ParticleSystem::hair_in_mesh

Input/output for cloth simulation.

Definition at line 335 of file DNA_particle_types.h.

Referenced by BKE_object_copy_particlesystem(), BKE_particle_system_blend_read_data(), do_hair_dynamics(), and free_hair().

◆ hair_out_mesh

◆ imat

float ParticleSystem::imat[4][4]

Used for instancing.

Definition at line 352 of file DNA_particle_types.h.

Referenced by blender::draw::CurvesEvalCache::ensure_positions(), and particle_system_update().

◆ lattice_deform_data

struct LatticeDeformData* ParticleSystem::lattice_deform_data

◆ lattice_strength

float ParticleSystem::lattice_strength

Influence of the lattice modifier.

Definition at line 391 of file DNA_particle_types.h.

Referenced by psys_apply_hair_lattice(), psys_cache_paths(), psys_get_particle_on_path(), psys_get_particle_state(), and psys_sim_data_init().

◆ name

◆ next

◆ orig_psys

struct ParticleSystem* ParticleSystem::orig_psys

Set by dependency graph's copy-on-evaluation, allows to quickly go from evaluated particle system to original one.

Original system will have this set to NULL.

Use psys_orig_get() function to access.

Definition at line 403 of file DNA_particle_types.h.

Referenced by BKE_particle_system_blend_read_data(), psys_eval_get(), psys_orig_edit_get(), and psys_orig_get().

◆ parent

struct Object* ParticleSystem::parent

Particles from global space -> parent space.

Definition at line 343 of file DNA_particle_types.h.

Referenced by BKE_particlesystem_id_loop().

◆ part

ParticleSettings* ParticleSystem::part

Particle settings.

Definition at line 313 of file DNA_particle_types.h.

Referenced by alloc_child_particles(), basic_force_cb(), basic_integrate(), BKE_effectors_create(), BKE_object_copy_particlesystem(), BKE_object_dupli_find_rgba_attribute(), BKE_object_handle_data_update(), BKE_particle_system_blend_read_after_liblink(), BKE_particle_system_blend_write(), BKE_particlesystem_id_loop(), BKE_ptcache_bake(), BKE_ptcache_id_from_particles(), blo_do_versions_pre250(), brush_add(), brush_add_count_iter(), brush_edit_apply(), brush_puff(), blender::deg::DepsgraphRelationBuilder::build_particle_systems(), buttons_context_id_path(), buttons_texture_users_from_context(), cached_step(), collision_check(), blender::ed::object::convert_psys_to_mesh(), copy_particle_dupliob_exec(), count_particles(), count_particles_mod(), createFacepa(), blender::ed::transform::createTransParticleVerts(), deflect_emitter_iter(), disconnect_hair(), distribute_grid(), do_child_modifiers(), do_hair_dynamics(), do_kink_spiral(), do_particle_interpolation(), do_path_effectors(), do_twist(), blender::io::alembic::ABCHairWriter::do_write(), blender::io::usd::USDHairWriter::do_write(), DRW_object_is_visible_psys_in_active_context(), dupliob_move_down_exec(), dupliob_move_up_exec(), dupliob_refresh_exec(), dynamic_paint_paint_particle_cell_point_cb_ex(), dynamicPaint_paintParticles(), dynamics_step(), dynamics_step_sph_classical_integrate_task_cb_ex(), dynamics_step_sph_ddr_task_cb_ex(), blender::draw::CurvesEvalCache::ensure_positions(), blender::draw::ensure_seg_pt_count(), exec_distribute_parent(), blender::ed::transform::flushTransParticles(), blender::eevee::foreach_hair_particle_handle(), foreach_mouse_hit_key_iter(), free_keyed_keys(), get_effector_tot(), hair_create_input_mesh(), hair_needs_recalc(), hair_step(), blender::workbench::Instance::hair_sync(), init_particle(), init_particle_texture(), initialize_all_particles(), blender::draw::interpolate_face_corner_attribute_to_curve(), blender::io::hydra::HairData::is_supported(), make_duplis_particle_system(), mirror_poll(), modify_mesh(), modify_mesh(), new_particle_settings_exec(), object_add_or_copy_particle_system(), object_copy_modifier_particle_system_ensure(), object_remove_particle_system(), blender::ed::object::object_select_all_by_particle(), blender::workbench::Instance::object_sync(), panel_draw(), blender::draw::particle_batch_cache_ensure_pos(), blender::draw::particle_batch_cache_ensure_pos_and_seg(), blender::draw::particle_batch_cache_fill_segments(), blender::draw::particle_calculate_parent_mcol(), blender::draw::particle_calculate_parent_uvs(), blender::draw::particle_interpolate_children_mcol(), blender::draw::particle_interpolate_children_uvs(), particle_skip(), particle_system_update(), particles_are_dynamic(), particles_fluid_step(), blender::ed::curves::convert_from_particle_system::particles_to_curves(), paste_mtex_exec(), pd_point_from_particle(), pe_get_current(), PE_get_current_from_psys(), PE_lasso_select(), PE_minmax(), PE_mirror_particle(), PE_mirror_x(), PE_update_mirror_cache(), PE_update_object(), precalc_guides(), psys_apply_child_modifiers(), psys_apply_hair_lattice(), psys_cache_edit_paths_iter(), psys_cache_paths(), psys_calc_dmcache(), psys_changed_type(), psys_check_boid_data(), psys_check_edited(), psys_check_enabled(), psys_count_keyed_targets(), psys_emitter_customdata_mask(), psys_find_parents(), psys_free(), psys_free_particles(), psys_get_birth_coords(), psys_get_child_number(), psys_get_child_size(), psys_get_child_time(), psys_get_current_display_percentage(), psys_get_dupli_path_transform(), psys_get_particle_on_path(), psys_get_particle_state(), psys_get_pointcache_start_end(), psys_get_texture(), psys_get_timestep(), psys_particle_on_emitter(), psys_prepare_physics(), psys_sim_data_init(), psys_sph_density(), psys_sph_init(), psys_thread_context_init(), psys_thread_context_init_distribute(), psys_thread_context_init_path(), psys_thread_create_path(), psys_update_effectors(), psys_update_path_cache(), psys_uses_gravity(), ptcache_particle_extra_write(), ptcache_particle_interpolate(), ptcache_particle_read(), ptcache_particle_totwrite(), ptcache_particle_write(), realloc_particles(), remap_hair_emitter(), remove_doubles_exec(), remove_particle_dupliob_exec(), reset_particle(), rule_fight(), save_hair(), sph_evaluate_func(), sph_force_cb(), sph_integrate(), sph_particle_courant(), sph_springs_modify(), sphclassical_calc_dens(), sphclassical_density_accum_cb(), sphclassical_force_cb(), blender::eevee::SyncModule::sync_curves(), system_step(), tot_particles(), blender::ed::curves::convert_to_particle_system::try_convert_single_object(), twist_num_segments(), update_children(), update_timestep(), update_world_cos(), and blender::io::hydra::HairData::write_curves().

◆ particles [1/2]

array<Particle> ParticleSystem::particles

Definition at line 41 of file particles.h.

◆ particles [2/2]

ParticleData* ParticleSystem::particles

(parent) particles.

Definition at line 316 of file DNA_particle_types.h.

Referenced by basic_integrate(), BKE_brush_weight_get(), BKE_particle_system_blend_read_data(), BKE_particle_system_blend_write(), BKE_particlesystem_id_loop(), brush_add(), brush_puff(), collision_check(), copy_particle_edit(), createFacepa(), blender::ed::transform::createTransParticleVerts(), deflect_emitter_iter(), deform_verts(), ParticleSystemManager::device_update_particles(), ObjectManager::device_update_transforms(), disconnect_hair(), distribute_grid(), do_path_effectors(), blender::io::alembic::ABCPointsWriter::do_write(), dynamic_paint_paint_particle_cell_point_cb_ex(), dynamicPaint_paintParticles(), dynamics_step_sph_classical_basic_integrate_task_cb_ex(), dynamics_step_sph_classical_calc_density_task_cb_ex(), dynamics_step_sph_classical_integrate_task_cb_ex(), dynamics_step_sph_ddr_task_cb_ex(), exec_distribute_parent(), explodeMesh(), blender::ed::transform::flushTransParticles(), foreach_mouse_hit_key_iter(), free_keyed_keys(), free_unexisting_particles(), get_child_modifier_parameters(), get_effector_data(), hair_step(), init_particle(), init_particle_interpolation(), blender::draw::interpolate_face_corner_attribute_to_curve(), make_duplis_particle_system(), modify_mesh(), modify_mesh(), blender::draw::particle_batch_cache_ensure_edit_pos_and_seg(), blender::draw::particle_batch_cache_ensure_pos(), blender::draw::particle_calculate_parent_mcol(), blender::draw::particle_calculate_parent_uvs(), particle_skip(), particles_fluid_step(), pd_point_from_particle(), PE_apply_mirror(), PE_create_particle_edit(), PE_lasso_select(), PE_minmax(), PE_mirror_particle(), PE_mirror_x(), pe_update_hair_particle_edit_pointers(), PE_update_selection(), psys_apply_hair_lattice(), psys_cache_edit_paths(), psys_check_boid_data(), psys_copy_particles(), psys_find_parents(), psys_free_particles(), psys_get_birth_coords(), psys_get_child_size(), psys_get_child_time(), psys_get_dupli_path_transform(), psys_get_dupli_texture(), psys_get_particle_on_path(), psys_get_particle_state(), psys_get_texture(), psys_thread_context_init_distribute(), psys_thread_create_path(), ptcache_particle_interpolate(), ptcache_particle_read(), ptcache_particle_totwrite(), ptcache_particle_write(), realloc_particles(), rekey_particle(), rekey_particle_to_time(), remap_hair_emitter(), remove_doubles_exec(), remove_tagged_keys(), remove_tagged_particles(), reset_all_particles(), reset_particle(), rule_avoid_collision(), rule_fight(), rule_flock(), rule_follow_leader(), rule_separate(), set_keyed_keys(), sph_density_accum_cb(), sph_force_cb(), sph_particle_courant(), sph_springs_modify(), sphclassical_density_accum_cb(), sphclassical_force_cb(), sphclassical_neighbor_accum_cb(), subdivide_particle(), blender::ed::curves::convert_to_particle_system::try_convert_single_object(), undoptcache_from_editcache(), undoptcache_to_editcache(), update_world_cos(), and weight_set_exec().

◆ pathcache

◆ pathcachebufs

ListBase ParticleSystem::pathcachebufs

◆ pdd

◆ pointcache

◆ prev

struct ParticleSystem * ParticleSystem::prev

Definition at line 310 of file DNA_particle_types.h.

◆ ptcaches

◆ recalc

◆ rt3

short ParticleSystem::rt3

Definition at line 369 of file DNA_particle_types.h.

◆ seed

◆ target_ob

struct Object* ParticleSystem::target_ob

Definition at line 337 of file DNA_particle_types.h.

Referenced by BKE_particlesystem_id_loop().

◆ target_psys

short ParticleSystem::target_psys

Definition at line 360 of file DNA_particle_types.h.

◆ targets

◆ tot_fluidsprings

◆ totcached

◆ totchild

◆ totchildcache

◆ totkeyed

short ParticleSystem::totkeyed

Definition at line 360 of file DNA_particle_types.h.

Referenced by psys_count_keyed_targets(), psys_reset(), and set_keyed_keys().

◆ totpart

int ParticleSystem::totpart

Definition at line 355 of file DNA_particle_types.h.

Referenced by BKE_particle_system_blend_read_data(), BKE_particle_system_blend_write(), blo_do_versions_pre250(), brush_add(), createFacepa(), distribute_particles_on_dm(), distribute_simple_children(), blender::io::alembic::ABCPointsWriter::do_write(), blender::io::usd::USDHairWriter::do_write(), dynamicPaint_paintParticles(), dynamics_step(), emit_particles(), blender::draw::ensure_seg_pt_count(), explodeMesh(), free_unexisting_particles(), get_effector_tot(), init_particle(), blender::draw::interpolate_face_corner_attribute_to_curve(), make_duplis_particle_system(), modify_mesh(), modify_mesh(), object_add_or_copy_particle_system(), blender::draw::particle_batch_cache_ensure_pos(), blender::draw::particle_batch_cache_ensure_pos_and_seg(), blender::draw::particle_batch_cache_fill_segments(), particle_skip(), particle_system_update(), particles_fluid_step(), PE_create_particle_edit(), PE_mirror_x(), PE_update_mirror_cache(), precalc_guides(), psys_apply_hair_lattice(), psys_cache_paths(), psys_check_boid_data(), psys_copy_particles(), psys_find_parents(), psys_free_particles(), psys_get_particle_on_path(), psys_get_particle_state(), psys_get_texture(), psys_get_tot_child(), psys_reset(), psys_thread_context_init_distribute(), psys_update_path_cache(), ptcache_particle_interpolate(), ptcache_particle_read(), ptcache_particle_totpoint(), ptcache_particle_totwrite(), realloc_particles(), remove_doubles_exec(), remove_tagged_particles(), reset_all_particles(), rule_follow_leader(), save_hair(), set_keyed_keys(), system_step(), blender::ed::curves::convert_to_particle_system::try_convert_single_object(), and undoptcache_to_editcache().

◆ totunexist

int ParticleSystem::totunexist

◆ tree

struct KDTree_3d* ParticleSystem::tree

◆ tree_frame

float ParticleSystem::tree_frame

Definition at line 353 of file DNA_particle_types.h.

Referenced by psys_update_particle_tree().

◆ vg_neg

short ParticleSystem::vg_neg

Definition at line 369 of file DNA_particle_types.h.

Referenced by psys_cache_vgroup().

◆ vgroup

short ParticleSystem::vgroup[13]

Vertex groups, 0==disable, 1==starting index.

Definition at line 369 of file DNA_particle_types.h.

Referenced by blo_do_versions_pre250(), psys_cache_vgroup(), psys_emitter_customdata_mask(), and psys_update_path_cache().


The documentation for this class was generated from the following files: