Blender  V3.3
Macros | Typedefs | Enumerations | Functions | Variables
particle_object.c File Reference
#include <stdlib.h>
#include <string.h>
#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.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BKE_bvhutils.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_mesh.h"
#include "BKE_mesh_legacy_convert.h"
#include "BKE_mesh_runtime.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
#include "BKE_report.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
#include "DEG_depsgraph_query.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_prototypes.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_object.h"
#include "ED_particle.h"
#include "ED_screen.h"
#include "UI_resources.h"
#include "particle_edit_utildefines.h"
#include "physics_intern.h"

Go to the source code of this file.

Macros

#define PSYS_FROM_FIRST   (single_psys_from ? single_psys_from : ob_from->particlesystem.first)
 
#define PSYS_FROM_NEXT(cur)   (single_psys_from ? NULL : (cur)->next)
 

Typedefs

typedef enum eCopyParticlesSpace eCopyParticlesSpace
 

Enumerations

enum  eCopyParticlesSpace { PAR_COPY_SPACE_OBJECT = 0 , PAR_COPY_SPACE_WORLD = 1 }
 

Functions

static int particle_system_add_exec (bContext *C, wmOperator *UNUSED(op))
 
void OBJECT_OT_particle_system_add (wmOperatorType *ot)
 
static int particle_system_remove_exec (bContext *C, wmOperator *UNUSED(op))
 
void OBJECT_OT_particle_system_remove (wmOperatorType *ot)
 
static bool psys_poll (bContext *C)
 
static int new_particle_settings_exec (bContext *C, wmOperator *UNUSED(op))
 
void PARTICLE_OT_new (wmOperatorType *ot)
 
static int new_particle_target_exec (bContext *C, wmOperator *UNUSED(op))
 
void PARTICLE_OT_new_target (wmOperatorType *ot)
 
static int remove_particle_target_exec (bContext *C, wmOperator *UNUSED(op))
 
void PARTICLE_OT_target_remove (wmOperatorType *ot)
 
static int target_move_up_exec (bContext *C, wmOperator *UNUSED(op))
 
void PARTICLE_OT_target_move_up (wmOperatorType *ot)
 
static int target_move_down_exec (bContext *C, wmOperator *UNUSED(op))
 
void PARTICLE_OT_target_move_down (wmOperatorType *ot)
 
static int dupliob_refresh_exec (bContext *C, wmOperator *UNUSED(op))
 
void PARTICLE_OT_dupliob_refresh (wmOperatorType *ot)
 
static int dupliob_move_up_exec (bContext *C, wmOperator *UNUSED(op))
 
void PARTICLE_OT_dupliob_move_up (wmOperatorType *ot)
 
static int copy_particle_dupliob_exec (bContext *C, wmOperator *UNUSED(op))
 
void PARTICLE_OT_dupliob_copy (wmOperatorType *ot)
 
static int remove_particle_dupliob_exec (bContext *C, wmOperator *UNUSED(op))
 
void PARTICLE_OT_dupliob_remove (wmOperatorType *ot)
 
static int dupliob_move_down_exec (bContext *C, wmOperator *UNUSED(op))
 
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   (single_psys_from ? single_psys_from : ob_from->particlesystem.first)

◆ PSYS_FROM_NEXT

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

Typedef Documentation

◆ eCopyParticlesSpace

Enumeration Type Documentation

◆ eCopyParticlesSpace

Enumerator
PAR_COPY_SPACE_OBJECT 
PAR_COPY_SPACE_WORLD 

Definition at line 988 of file particle_object.c.

Function Documentation

◆ connect_hair()

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

◆ connect_hair_exec()

static int connect_hair_exec ( bContext C,
wmOperator op 
)
static

◆ copy_particle_dupliob_exec()

static int copy_particle_dupliob_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ copy_particle_edit()

static void copy_particle_edit ( Depsgraph depsgraph,
Scene scene,
Object ob,
ParticleSystem psys,
ParticleSystem psys_from 
)
static

◆ copy_particle_systems_exec()

static int copy_particle_systems_exec ( bContext C,
wmOperator op 
)
static

◆ copy_particle_systems_poll()

static bool copy_particle_systems_poll ( bContext C)
static

◆ copy_particle_systems_to_object()

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

◆ disconnect_hair()

static void disconnect_hair ( Depsgraph depsgraph,
Scene scene,
Object ob,
ParticleSystem psys 
)
static

◆ disconnect_hair_exec()

static int disconnect_hair_exec ( bContext C,
wmOperator op 
)
static

◆ duplicate_particle_systems_exec()

static int duplicate_particle_systems_exec ( bContext C,
wmOperator op 
)
static

◆ duplicate_particle_systems_poll()

static bool duplicate_particle_systems_poll ( bContext C)
static

◆ dupliob_move_down_exec()

static int dupliob_move_down_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ dupliob_move_up_exec()

static int dupliob_move_up_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ dupliob_refresh_exec()

static int dupliob_refresh_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ new_particle_settings_exec()

static int new_particle_settings_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ new_particle_target_exec()

static int new_particle_target_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ OBJECT_OT_particle_system_add()

void OBJECT_OT_particle_system_add ( wmOperatorType ot)

◆ OBJECT_OT_particle_system_remove()

void OBJECT_OT_particle_system_remove ( wmOperatorType ot)

◆ PARTICLE_OT_connect_hair()

void PARTICLE_OT_connect_hair ( wmOperatorType ot)

◆ PARTICLE_OT_copy_particle_systems()

void PARTICLE_OT_copy_particle_systems ( wmOperatorType ot)

◆ PARTICLE_OT_disconnect_hair()

void PARTICLE_OT_disconnect_hair ( wmOperatorType ot)

◆ PARTICLE_OT_duplicate_particle_system()

void PARTICLE_OT_duplicate_particle_system ( wmOperatorType ot)

◆ PARTICLE_OT_dupliob_copy()

void PARTICLE_OT_dupliob_copy ( wmOperatorType ot)

◆ PARTICLE_OT_dupliob_move_down()

void PARTICLE_OT_dupliob_move_down ( wmOperatorType ot)

◆ PARTICLE_OT_dupliob_move_up()

void PARTICLE_OT_dupliob_move_up ( wmOperatorType ot)

◆ PARTICLE_OT_dupliob_refresh()

void PARTICLE_OT_dupliob_refresh ( wmOperatorType ot)

◆ PARTICLE_OT_dupliob_remove()

void PARTICLE_OT_dupliob_remove ( wmOperatorType ot)

◆ PARTICLE_OT_new()

void PARTICLE_OT_new ( wmOperatorType ot)

◆ PARTICLE_OT_new_target()

void PARTICLE_OT_new_target ( wmOperatorType ot)

◆ PARTICLE_OT_target_move_down()

void PARTICLE_OT_target_move_down ( wmOperatorType ot)

◆ PARTICLE_OT_target_move_up()

void PARTICLE_OT_target_move_up ( wmOperatorType ot)

◆ PARTICLE_OT_target_remove()

void PARTICLE_OT_target_remove ( wmOperatorType ot)

◆ particle_system_add_exec()

static int particle_system_add_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ particle_system_remove_exec()

static int particle_system_remove_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ psys_poll()

static bool psys_poll ( bContext C)
static

Definition at line 150 of file particle_object.c.

References C, CTX_data_pointer_get_type(), PointerRNA::data, NULL, 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()

static int remove_particle_dupliob_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ remove_particle_systems_from_object()

static void remove_particle_systems_from_object ( Object ob_to)
static

◆ remove_particle_target_exec()

static int remove_particle_target_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ target_move_down_exec()

static int target_move_down_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ target_move_up_exec()

static int target_move_up_exec ( bContext C,
wmOperator UNUSEDop 
)
static

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 58 of file particle_object.c.

Referenced by copy_particle_systems_to_object().