Blender V4.3
particle_object.cc File Reference
#include <cstdlib>
#include <cstring>
#include "MEM_guardedalloc.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "DNA_scene_types.h"
#include "BLI_listbase.h"
#include "BLI_math_geom.h"
#include "BLI_math_matrix.h"
#include "BLI_math_vector.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BKE_bvhutils.hh"
#include "BKE_context.hh"
#include "BKE_customdata.hh"
#include "BKE_global.hh"
#include "BKE_layer.hh"
#include "BKE_lib_id.hh"
#include "BKE_mesh.hh"
#include "BKE_mesh_legacy_convert.hh"
#include "BKE_modifier.hh"
#include "BKE_object.hh"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
#include "BKE_report.hh"
#include "DEG_depsgraph.hh"
#include "DEG_depsgraph_build.hh"
#include "DEG_depsgraph_query.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "RNA_prototypes.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "ED_object.hh"
#include "ED_particle.hh"
#include "ED_screen.hh"
#include "particle_edit_utildefines.h"
#include "physics_intern.hh"

Go to the source code of this file.

Macros

#define PSYS_FROM_FIRST
 
#define PSYS_FROM_NEXT(cur)   (single_psys_from ? nullptr : (cur)->next)
 

Enumerations

enum  eCopyParticlesSpace { PAR_COPY_SPACE_OBJECT = 0 , PAR_COPY_SPACE_WORLD = 1 }
 

Functions

static int particle_system_add_exec (bContext *C, wmOperator *)
 
void OBJECT_OT_particle_system_add (wmOperatorType *ot)
 
static int particle_system_remove_exec (bContext *C, wmOperator *)
 
void OBJECT_OT_particle_system_remove (wmOperatorType *ot)
 
static bool psys_poll (bContext *C)
 
static int new_particle_settings_exec (bContext *C, wmOperator *)
 
void PARTICLE_OT_new (wmOperatorType *ot)
 
static int new_particle_target_exec (bContext *C, wmOperator *)
 
void PARTICLE_OT_new_target (wmOperatorType *ot)
 
static int remove_particle_target_exec (bContext *C, wmOperator *)
 
void PARTICLE_OT_target_remove (wmOperatorType *ot)
 
static int target_move_up_exec (bContext *C, wmOperator *)
 
void PARTICLE_OT_target_move_up (wmOperatorType *ot)
 
static int target_move_down_exec (bContext *C, wmOperator *)
 
void PARTICLE_OT_target_move_down (wmOperatorType *ot)
 
static int dupliob_refresh_exec (bContext *C, wmOperator *)
 
void PARTICLE_OT_dupliob_refresh (wmOperatorType *ot)
 
static int dupliob_move_up_exec (bContext *C, wmOperator *)
 
void PARTICLE_OT_dupliob_move_up (wmOperatorType *ot)
 
static int copy_particle_dupliob_exec (bContext *C, wmOperator *)
 
void PARTICLE_OT_dupliob_copy (wmOperatorType *ot)
 
static int remove_particle_dupliob_exec (bContext *C, wmOperator *)
 
void PARTICLE_OT_dupliob_remove (wmOperatorType *ot)
 
static int dupliob_move_down_exec (bContext *C, wmOperator *)
 
void PARTICLE_OT_dupliob_move_down (wmOperatorType *ot)
 
static void disconnect_hair (Depsgraph *depsgraph, Scene *scene, Object *ob, ParticleSystem *psys)
 
static int disconnect_hair_exec (bContext *C, wmOperator *op)
 
void PARTICLE_OT_disconnect_hair (wmOperatorType *ot)
 
static bool remap_hair_emitter (Depsgraph *depsgraph, Scene *scene, Object *ob, ParticleSystem *psys, Object *target_ob, ParticleSystem *target_psys, PTCacheEdit *target_edit, const float from_mat[4][4], const float to_mat[4][4], bool from_global, bool to_global)
 
static bool connect_hair (Depsgraph *depsgraph, Scene *scene, Object *ob, ParticleSystem *psys)
 
static int connect_hair_exec (bContext *C, wmOperator *op)
 
void PARTICLE_OT_connect_hair (wmOperatorType *ot)
 
static void copy_particle_edit (Depsgraph *depsgraph, Scene *scene, Object *ob, ParticleSystem *psys, ParticleSystem *psys_from)
 
static void remove_particle_systems_from_object (Object *ob_to)
 
static bool copy_particle_systems_to_object (const bContext *C, Scene *scene, Object *ob_from, ParticleSystem *single_psys_from, Object *ob_to, int space, bool duplicate_settings)
 
static bool copy_particle_systems_poll (bContext *C)
 
static int copy_particle_systems_exec (bContext *C, wmOperator *op)
 
void PARTICLE_OT_copy_particle_systems (wmOperatorType *ot)
 
static bool duplicate_particle_systems_poll (bContext *C)
 
static int duplicate_particle_systems_exec (bContext *C, wmOperator *op)
 
void PARTICLE_OT_duplicate_particle_system (wmOperatorType *ot)
 

Variables

static float I [4][4]
 

Macro Definition Documentation

◆ PSYS_FROM_FIRST

#define PSYS_FROM_FIRST
Value:
static_cast<ParticleSystem *>( \
(single_psys_from ? single_psys_from : ob_from->particlesystem.first))

Referenced by copy_particle_systems_to_object().

◆ PSYS_FROM_NEXT

#define PSYS_FROM_NEXT ( cur)    (single_psys_from ? nullptr : (cur)->next)

Enumeration Type Documentation

◆ eCopyParticlesSpace

Enumerator
PAR_COPY_SPACE_OBJECT 
PAR_COPY_SPACE_WORLD 

Definition at line 990 of file particle_object.cc.

Function Documentation

◆ connect_hair()

static bool connect_hair ( Depsgraph * depsgraph,
Scene * scene,
Object * ob,
ParticleSystem * psys )
static

◆ connect_hair_exec()

◆ copy_particle_dupliob_exec()

◆ copy_particle_edit()

◆ copy_particle_systems_exec()

◆ copy_particle_systems_poll()

◆ copy_particle_systems_to_object()

◆ disconnect_hair()

◆ disconnect_hair_exec()

◆ duplicate_particle_systems_exec()

◆ duplicate_particle_systems_poll()

◆ dupliob_move_down_exec()

◆ dupliob_move_up_exec()

◆ dupliob_refresh_exec()

◆ new_particle_settings_exec()

◆ new_particle_target_exec()

◆ OBJECT_OT_particle_system_add()

◆ OBJECT_OT_particle_system_remove()

◆ PARTICLE_OT_connect_hair()

◆ PARTICLE_OT_copy_particle_systems()

◆ PARTICLE_OT_disconnect_hair()

◆ PARTICLE_OT_duplicate_particle_system()

◆ PARTICLE_OT_dupliob_copy()

◆ PARTICLE_OT_dupliob_move_down()

◆ PARTICLE_OT_dupliob_move_up()

◆ PARTICLE_OT_dupliob_refresh()

◆ PARTICLE_OT_dupliob_remove()

◆ PARTICLE_OT_new()

◆ PARTICLE_OT_new_target()

◆ PARTICLE_OT_target_move_down()

◆ PARTICLE_OT_target_move_up()

◆ PARTICLE_OT_target_remove()

◆ particle_system_add_exec()

◆ particle_system_remove_exec()

◆ psys_poll()

static bool psys_poll ( bContext * C)
static

Definition at line 152 of file particle_object.cc.

References CTX_data_pointer_get_type(), PointerRNA::data, and ptr.

Referenced by PARTICLE_OT_new().

◆ remap_hair_emitter()

static bool remap_hair_emitter ( Depsgraph * depsgraph,
Scene * scene,
Object * ob,
ParticleSystem * psys,
Object * target_ob,
ParticleSystem * target_psys,
PTCacheEdit * target_edit,
const float from_mat[4][4],
const float to_mat[4][4],
bool from_global,
bool to_global )
static

◆ remove_particle_dupliob_exec()

◆ remove_particle_systems_from_object()

◆ remove_particle_target_exec()

◆ target_move_down_exec()

◆ target_move_up_exec()

Variable Documentation

◆ I

float I[4][4]
static
Initial value:
= {
{1.0f, 0.0f, 0.0f, 0.0f},
{0.0f, 1.0f, 0.0f, 0.0f},
{0.0f, 0.0f, 1.0f, 0.0f},
{0.0f, 0.0f, 0.0f, 1.0f},
}

Definition at line 59 of file particle_object.cc.

Referenced by copy_particle_systems_to_object().