Blender V2.61 - r43446
Classes | Defines | Typedefs | Enumerations | Functions | Variables

particle_edit.c File Reference

#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <assert.h>
#include "MEM_guardedalloc.h"
#include "DNA_scene_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_view3d_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_dynstr.h"
#include "BLI_kdtree.h"
#include "BLI_rand.h"
#include "BLI_utildefines.h"
#include "BKE_DerivedMesh.h"
#include "BKE_depsgraph.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_object.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
#include "BKE_particle.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_pointcache.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "ED_physics.h"
#include "ED_mesh.h"
#include "ED_particle.h"
#include "ED_view3d.h"
#include "UI_resources.h"
#include "WM_api.h"
#include "WM_types.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "physics_intern.h"

Go to the source code of this file.

Classes

struct  PEData
struct  BrushEdit

Defines

#define KEY_K   PTCacheEditKey *key; int k
#define POINT_P   PTCacheEditPoint *point; int p
#define LOOP_POINTS   for(p=0, point=edit->points; p<edit->totpoint; p++, point++)
#define LOOP_VISIBLE_POINTS   for(p=0, point=edit->points; p<edit->totpoint; p++, point++) if(!(point->flag & PEP_HIDE))
#define LOOP_SELECTED_POINTS   for(p=0, point=edit->points; p<edit->totpoint; p++, point++) if(point_is_selected(point))
#define LOOP_UNSELECTED_POINTS   for(p=0, point=edit->points; p<edit->totpoint; p++, point++) if(!point_is_selected(point))
#define LOOP_EDITED_POINTS   for(p=0, point=edit->points; p<edit->totpoint; p++, point++) if(point->flag & PEP_EDIT_RECALC)
#define LOOP_TAGGED_POINTS   for(p=0, point=edit->points; p<edit->totpoint; p++, point++) if(point->flag & PEP_TAG)
#define LOOP_KEYS   for(k=0, key=point->keys; k<point->totkey; k++, key++)
#define LOOP_VISIBLE_KEYS   for(k=0, key=point->keys; k<point->totkey; k++, key++) if(!(key->flag & PEK_HIDE))
#define LOOP_SELECTED_KEYS   for(k=0, key=point->keys; k<point->totkey; k++, key++) if((key->flag & PEK_SELECT) && !(key->flag & PEK_HIDE))
#define LOOP_TAGGED_KEYS   for(k=0, key=point->keys; k<point->totkey; k++, key++) if(key->flag & PEK_TAG)
#define KEY_WCO   (key->flag & PEK_USE_WCO ? key->world_co : key->co)

Typedefs

typedef struct PEData PEData
typedef void(* ForPointFunc )(PEData *data, int point_index)
typedef void(* ForKeyFunc )(PEData *data, int point_index, int key_index)
typedef void(* ForKeyMatFunc )(PEData *data, float mat[][4], float imat[][4], int point_index, int key_index, PTCacheEditKey *key)
typedef struct BrushEdit BrushEdit

Enumerations

enum  { DEL_PARTICLE, DEL_KEY }

Functions

static void PE_create_particle_edit (Scene *scene, Object *ob, PointCache *cache, ParticleSystem *psys)
static void PTCacheUndo_clear (PTCacheEdit *edit)
static void recalc_emitter_field (Object *ob, ParticleSystem *psys)
int PE_poll (bContext *C)
int PE_hair_poll (bContext *C)
int PE_poll_view3d (bContext *C)
void PE_free_ptcache_edit (PTCacheEdit *edit)
int PE_start_edit (PTCacheEdit *edit)
ParticleEditSettingsPE_settings (Scene *scene)
static PTCacheEditpe_get_current (Scene *scene, Object *ob, int create)
PTCacheEditPE_get_current (Scene *scene, Object *ob)
PTCacheEditPE_create_current (Scene *scene, Object *ob)
void PE_current_changed (Scene *scene, Object *ob)
void PE_hide_keys_time (Scene *scene, PTCacheEdit *edit, float cfra)
static int pe_x_mirror (Object *ob)
static void PE_set_data (bContext *C, PEData *data)
static void PE_set_view3d_data (bContext *C, PEData *data)
static int key_test_depth (PEData *data, const float co[3])
static int key_inside_circle (PEData *data, float rad, const float co[3], float *distance)
static int key_inside_rect (PEData *data, const float co[3])
static int key_inside_test (PEData *data, const float co[3])
static int point_is_selected (PTCacheEditPoint *point)
static void for_mouse_hit_keys (PEData *data, ForKeyFunc func, int nearest)
static void foreach_mouse_hit_point (PEData *data, ForPointFunc func, int selected)
static void foreach_mouse_hit_key (PEData *data, ForKeyMatFunc func, int selected)
static void foreach_selected_point (PEData *data, ForPointFunc func)
static void foreach_selected_key (PEData *data, ForKeyFunc func)
static void foreach_point (PEData *data, ForPointFunc func)
static int count_selected_keys (Scene *scene, PTCacheEdit *edit)
static void PE_update_mirror_cache (Object *ob, ParticleSystem *psys)
static void PE_mirror_particle (Object *ob, DerivedMesh *dm, ParticleSystem *psys, ParticleData *pa, ParticleData *mpa)
static void PE_apply_mirror (Object *ob, ParticleSystem *psys)
static void pe_deflect_emitter (Scene *scene, Object *ob, PTCacheEdit *edit)
static void PE_apply_lengths (Scene *scene, PTCacheEdit *edit)
static void pe_iterate_lengths (Scene *scene, PTCacheEdit *edit)
static void recalc_lengths (PTCacheEdit *edit)
static void PE_update_selection (Scene *scene, Object *ob, int useflag)
static void update_world_cos (Object *ob, PTCacheEdit *edit)
static void update_velocities (PTCacheEdit *edit)
void PE_update_object (Scene *scene, Object *ob, int useflag)
static void select_key (PEData *data, int point_index, int key_index)
static void select_keys (PEData *data, int point_index, int UNUSED(key_index))
static void toggle_key_select (PEData *data, int point_index, int key_index)
static int pe_select_all_exec (bContext *C, wmOperator *op)
void PARTICLE_OT_select_all (wmOperatorType *ot)
int PE_mouse_particles (bContext *C, const int mval[2], int extend)
static void select_root (PEData *data, int point_index)
static int select_roots_exec (bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_select_roots (wmOperatorType *ot)
static void select_tip (PEData *data, int point_index)
static int select_tips_exec (bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_select_tips (wmOperatorType *ot)
static int select_linked_exec (bContext *C, wmOperator *op)
static int select_linked_invoke (bContext *C, wmOperator *op, wmEvent *event)
void PARTICLE_OT_select_linked (wmOperatorType *ot)
void PE_deselect_all_visible (PTCacheEdit *edit)
int PE_border_select (bContext *C, rcti *rect, int select, int extend)
int PE_circle_select (bContext *C, int selecting, const int mval[2], float rad)
int PE_lasso_select (bContext *C, int mcords[][2], short moves, short extend, short select)
static int hide_exec (bContext *C, wmOperator *op)
void PARTICLE_OT_hide (wmOperatorType *ot)
static int reveal_exec (bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_reveal (wmOperatorType *ot)
static void select_less_keys (PEData *data, int point_index)
static int select_less_exec (bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_select_less (wmOperatorType *ot)
static void select_more_keys (PEData *data, int point_index)
static int select_more_exec (bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_select_more (wmOperatorType *ot)
static void rekey_particle (PEData *data, int pa_index)
static int rekey_exec (bContext *C, wmOperator *op)
void PARTICLE_OT_rekey (wmOperatorType *ot)
static void rekey_particle_to_time (Scene *scene, Object *ob, int pa_index, float path_time)
static int remove_tagged_particles (Object *ob, ParticleSystem *psys, int mirror)
static void remove_tagged_keys (Object *ob, ParticleSystem *psys)
static void subdivide_particle (PEData *data, int pa_index)
static int subdivide_exec (bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_subdivide (wmOperatorType *ot)
static int remove_doubles_exec (bContext *C, wmOperator *op)
void PARTICLE_OT_remove_doubles (wmOperatorType *ot)
static int weight_set_exec (bContext *C, wmOperator *op)
void PARTICLE_OT_weight_set (wmOperatorType *ot)
static void brush_drawcursor (bContext *C, int x, int y, void *UNUSED(customdata))
static void toggle_particle_cursor (bContext *C, int enable)
static void set_delete_particle (PEData *data, int pa_index)
static void set_delete_particle_key (PEData *data, int pa_index, int key_index)
static int delete_exec (bContext *C, wmOperator *op)
void PARTICLE_OT_delete (wmOperatorType *ot)
static void PE_mirror_x (Scene *scene, Object *ob, int tagged)
static int mirror_exec (bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_mirror (wmOperatorType *ot)
static void brush_comb (PEData *data, float UNUSED(mat[][4]), float imat[][4], int point_index, int key_index, PTCacheEditKey *key)
static void brush_cut (PEData *data, int pa_index)
static void brush_length (PEData *data, int point_index)
static void brush_puff (PEData *data, int point_index)
static void brush_weight (PEData *data, float UNUSED(mat[][4]), float UNUSED(imat[][4]), int point_index, int key_index, PTCacheEditKey *UNUSED(key))
static void brush_smooth_get (PEData *data, float mat[][4], float UNUSED(imat[][4]), int UNUSED(point_index), int key_index, PTCacheEditKey *key)
static void brush_smooth_do (PEData *data, float UNUSED(mat[][4]), float imat[][4], int point_index, int key_index, PTCacheEditKey *key)
static void intersect_dm_quad_weights (const float v1[3], const float v2[3], const float v3[3], const float v4[3], float w[4])
static int particle_intersect_dm (Scene *scene, Object *ob, DerivedMesh *dm, float *vert_cos, const float co1[3], const float co2[3], float *min_d, int *min_face, float *min_w, float *face_minmax, float *pa_minmax, float radius, float *ipoint)
static int brush_add (PEData *data, short number)
static int brush_edit_init (bContext *C, wmOperator *op)
static void brush_edit_apply (bContext *C, wmOperator *op, PointerRNA *itemptr)
static void brush_edit_exit (wmOperator *op)
static int brush_edit_exec (bContext *C, wmOperator *op)
static void brush_edit_apply_event (bContext *C, wmOperator *op, wmEvent *event)
static int brush_edit_invoke (bContext *C, wmOperator *op, wmEvent *event)
static int brush_edit_modal (bContext *C, wmOperator *op, wmEvent *event)
static int brush_edit_cancel (bContext *UNUSED(C), wmOperator *op)
void PARTICLE_OT_brush_edit (wmOperatorType *ot)
static void free_PTCacheUndo (PTCacheUndo *undo)
static void make_PTCacheUndo (PTCacheEdit *edit, PTCacheUndo *undo)
static void get_PTCacheUndo (PTCacheEdit *edit, PTCacheUndo *undo)
void PE_undo_push (Scene *scene, const char *str)
void PE_undo_step (Scene *scene, int step)
int PE_undo_valid (Scene *scene)
void PE_undo (Scene *scene)
void PE_redo (Scene *scene)
void PE_undo_number (Scene *scene, int nr)
const char * PE_undo_get_name (Scene *scene, int nr, int *active)
int PE_minmax (Scene *scene, float min[3], float max[3])
static int particle_edit_toggle_poll (bContext *C)
static int particle_edit_toggle_exec (bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_particle_edit_toggle (wmOperatorType *ot)
static int clear_edited_exec (bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_edited_clear (wmOperatorType *ot)

Variables

static EnumPropertyItem delete_type_items []

Detailed Description

Definition in file particle_edit.c.


Define Documentation

#define KEY_K   PTCacheEditKey *key; int k
#define KEY_WCO   (key->flag & PEK_USE_WCO ? key->world_co : key->co)
#define LOOP_EDITED_POINTS   for(p=0, point=edit->points; p<edit->totpoint; p++, point++) if(point->flag & PEP_EDIT_RECALC)
#define LOOP_KEYS   for(k=0, key=point->keys; k<point->totkey; k++, key++)
#define LOOP_POINTS   for(p=0, point=edit->points; p<edit->totpoint; p++, point++)
#define LOOP_SELECTED_KEYS   for(k=0, key=point->keys; k<point->totkey; k++, key++) if((key->flag & PEK_SELECT) && !(key->flag & PEK_HIDE))
#define LOOP_SELECTED_POINTS   for(p=0, point=edit->points; p<edit->totpoint; p++, point++) if(point_is_selected(point))
#define LOOP_TAGGED_KEYS   for(k=0, key=point->keys; k<point->totkey; k++, key++) if(key->flag & PEK_TAG)

Definition at line 101 of file particle_edit.c.

Referenced by remove_tagged_keys().

#define LOOP_TAGGED_POINTS   for(p=0, point=edit->points; p<edit->totpoint; p++, point++) if(point->flag & PEP_TAG)

Definition at line 97 of file particle_edit.c.

Referenced by remove_tagged_particles().

#define LOOP_UNSELECTED_POINTS   for(p=0, point=edit->points; p<edit->totpoint; p++, point++) if(!point_is_selected(point))

Definition at line 95 of file particle_edit.c.

Referenced by hide_exec().

#define LOOP_VISIBLE_KEYS   for(k=0, key=point->keys; k<point->totkey; k++, key++) if(!(key->flag & PEK_HIDE))
#define LOOP_VISIBLE_POINTS   for(p=0, point=edit->points; p<edit->totpoint; p++, point++) if(!(point->flag & PEP_HIDE))
#define POINT_P   PTCacheEditPoint *point; int p

Typedef Documentation

typedef struct BrushEdit BrushEdit
typedef void(* ForKeyFunc)(PEData *data, int point_index, int key_index)

Definition at line 513 of file particle_edit.c.

typedef void(* ForKeyMatFunc)(PEData *data, float mat[][4], float imat[][4], int point_index, int key_index, PTCacheEditKey *key)

Definition at line 514 of file particle_edit.c.

typedef void(* ForPointFunc)(PEData *data, int point_index)

Definition at line 512 of file particle_edit.c.

typedef struct PEData PEData

Enumeration Type Documentation

anonymous enum
Enumerator:
DEL_PARTICLE 
DEL_KEY 

Definition at line 2491 of file particle_edit.c.


Function Documentation

static int brush_add ( PEData data,
short  number 
) [static]

Definition at line 3173 of file particle_edit.c.

References add_v3_v3(), add_v3_v3v3(), ViewContext::ar, BLI_frand(), BLI_kdtree_balance(), BLI_kdtree_find_n_nearest(), BLI_kdtree_free(), BLI_kdtree_insert(), BLI_kdtree_new(), BLI_srandom(), ParticleEditSettings::brush, CD_MASK_BAREMESH, ParticleKey::co, co, HairKey::co, PTCacheEditKey::co, DerivedMesh::deformedOnly, KDTreeNearest::dist, ParticleSystemModifierData::dm, ED_view3d_win_to_segment_clip(), PEData::edit, PTCacheEditPoint::flag, PTCacheEditKey::flag, ParticleEditSettings::flag, ParticleSystem::flag, ParticleData::foffset, ParticleSettings::from, ParticleData::fuv, ParticleData::hair, i, KDTreeNearest::index, initialize_particle(), invert_m4_m4(), PTCacheEditPoint::keys, madd_v3_v3v3fl(), MEM_callocN(), MEM_freeN(), mesh_get_derived_deform(), MIN2, PTCacheEdit::mirror_cache, mul_m4_v3(), mul_v3_fl(), PEData::mval, NULL, ParticleData::num, ParticleData::num_dmcache, ParticleSimulationData::ob, PEData::ob, Object::obmat, ParticleSystem::part, particle_intersect_dm(), ParticleSystem::particles, PE_BRUSH_ADD, PE_INTERPOLATE_ADDED, PE_settings(), pe_x_mirror(), PEK_USE_WCO, PEP_EDIT_RECALC, PEP_TAG, PTCacheEdit::points, pow(), ParticleSimulationData::psmd, ParticleSimulationData::psys, PTCacheEdit::psys, psys_get_modifier(), psys_get_particle_on_path(), psys_get_timestep(), PSYS_GLOBAL_HAIR, psys_mat_hair_to_global(), psys_particle_dm_face_lookup(), psys_particle_on_dm(), DerivedMesh::release, reset_particle(), ParticleSimulationData::scene, PEData::scene, ParticleSystem::seed, ParticleBrushData::size, size(), sub_v3_v3v3(), ParticleKey::time, HairKey::time, PTCacheEditKey::time, ParticleEditSettings::totaddkey, ParticleData::totkey, PTCacheEditPoint::totkey, ParticleSystem::totpart, PTCacheEdit::totpoint, ViewContext::v3d, PEData::vc, simple_enum_gen::w, and HairKey::weight.

Referenced by brush_edit_apply().

static void brush_comb ( PEData data,
float   UNUSEDmat[][4],
float  imat[][4],
int  point_index,
int  key_index,
PTCacheEditKey key 
) [static]
static void brush_cut ( PEData data,
int  pa_index 
) [static]
static void brush_drawcursor ( bContext C,
int  x,
int  y,
void *  UNUSEDcustomdata 
) [static]
static void brush_edit_apply ( bContext C,
wmOperator op,
PointerRNA itemptr 
) [static]

Definition at line 3427 of file particle_edit.c.

References ParticleEditSettings::brush, brush_add(), brush_comb(), brush_cut(), brush_length(), brush_puff(), brush_smooth_do(), brush_smooth_get(), brush_weight(), ParticleEditSettings::brushtype, PEData::combfac, ParticleBrushData::count, count_selected_keys(), CTX_wm_region(), wmOperator::customdata, PEData::cutfac, DAG_id_tag_update(), BrushEdit::data, ParticleSystemModifierData::dm, PEData::dm, PEData::dvec, ED_view3d_win_to_delta(), BrushEdit::edit, ELEM, fabs(), BrushEdit::first, ParticleSystem::flag, ParticleEditSettings::flag, foreach_mouse_hit_key(), foreach_mouse_hit_point(), foreach_point(), foreach_selected_point(), ParticleSettings::from, PEData::growfac, Object::id, Object::imat, PEData::invert, ParticleBrushData::invert, invert_m4_m4(), BrushEdit::lastmouse, MAX2, mul_v3_fl(), PEData::mval, NA_EDITED, NC_OBJECT, ND_MODIFIER, ND_PARTICLE, NULL, BrushEdit::ob, OB_RECALC_DATA, Object::obmat, ParticleSystem::part, PART_FROM_FACE, PTCacheEdit::pathcache, PE_BRUSH_ADD, PE_BRUSH_COMB, PE_BRUSH_CUT, PE_BRUSH_LENGTH, PE_BRUSH_PUFF, PE_BRUSH_SMOOTH, PE_BRUSH_WEIGHT, PE_KEEP_LENGTHS, PE_LOCK_FIRST, PE_mirror_x(), PE_settings(), PE_start_edit(), PE_update_object(), pe_x_mirror(), PTCacheEdit::psys, psys_free_path_cache(), psys_get_modifier(), PSYS_GLOBAL_HAIR, PEData::pufffac, PEData::rad, recalc_lengths(), remove_tagged_particles(), RNA_boolean_get(), RNA_float_get_array(), BrushEdit::scene, PEData::select, ParticleBrushData::size, PEData::smoothfac, sqrt(), ParticleBrushData::step, step(), ParticleBrushData::strength, PEData::tot, update_world_cos(), PEData::vec, view3d_operator_needs_opengl(), PEData::weightfac, and WM_event_add_notifier().

Referenced by brush_edit_apply_event(), and brush_edit_exec().

static void brush_edit_apply_event ( bContext C,
wmOperator op,
wmEvent event 
) [static]
static int brush_edit_cancel ( bContext UNUSEDC,
wmOperator op 
) [static]

Definition at line 3716 of file particle_edit.c.

References brush_edit_exit(), and OPERATOR_CANCELLED.

Referenced by PARTICLE_OT_brush_edit().

static int brush_edit_exec ( bContext C,
wmOperator op 
) [static]
static void brush_edit_exit ( wmOperator op) [static]

Definition at line 3649 of file particle_edit.c.

References wmOperator::customdata, and MEM_freeN().

Referenced by brush_edit_cancel(), brush_edit_exec(), and brush_edit_modal().

static int brush_edit_init ( bContext C,
wmOperator op 
) [static]
static int brush_edit_invoke ( bContext C,
wmOperator op,
wmEvent event 
) [static]
static int brush_edit_modal ( bContext C,
wmOperator op,
wmEvent event 
) [static]
static void brush_length ( PEData data,
int  point_index 
) [static]
static void brush_puff ( PEData data,
int  point_index 
) [static]
static void brush_smooth_do ( PEData data,
float   UNUSEDmat[][4],
float  imat[][4],
int  point_index,
int  key_index,
PTCacheEditKey key 
) [static]
static void brush_smooth_get ( PEData data,
float  mat[][4],
float   UNUSEDimat[][4],
int   UNUSEDpoint_index,
int  key_index,
PTCacheEditKey key 
) [static]
static void brush_weight ( PEData data,
float   UNUSEDmat[][4],
float   UNUSEDimat[][4],
int  point_index,
int  key_index,
PTCacheEditKey UNUSEDkey 
) [static]
static int clear_edited_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int count_selected_keys ( Scene scene,
PTCacheEdit edit 
) [static]
static int delete_exec ( bContext C,
wmOperator op 
) [static]
static void for_mouse_hit_keys ( PEData data,
ForKeyFunc  func,
int  nearest 
) [static]
static void foreach_mouse_hit_key ( PEData data,
ForKeyMatFunc  func,
int  selected 
) [static]
static void foreach_mouse_hit_point ( PEData data,
ForPointFunc  func,
int  selected 
) [static]
static void foreach_point ( PEData data,
ForPointFunc  func 
) [static]
static void foreach_selected_key ( PEData data,
ForKeyFunc  func 
) [static]

Definition at line 658 of file particle_edit.c.

References PEData::edit, KEY_K, LOOP_SELECTED_KEYS, LOOP_VISIBLE_POINTS, p, and POINT_P.

Referenced by delete_exec().

static void foreach_selected_point ( PEData data,
ForPointFunc  func 
) [static]

Definition at line 648 of file particle_edit.c.

References PEData::edit, LOOP_SELECTED_POINTS, p, and POINT_P.

Referenced by brush_edit_apply(), delete_exec(), and rekey_exec().

static void free_PTCacheUndo ( PTCacheUndo undo) [static]
static void get_PTCacheUndo ( PTCacheEdit edit,
PTCacheUndo undo 
) [static]
static int hide_exec ( bContext C,
wmOperator op 
) [static]
static void intersect_dm_quad_weights ( const float  v1[3],
const float  v2[3],
const float  v3[3],
const float  v4[3],
float  w[4] 
) [static]

Definition at line 3027 of file particle_edit.c.

References co, copy_v3_v3(), and interp_weights_poly_v3().

Referenced by particle_intersect_dm().

static int key_inside_circle ( PEData data,
float  rad,
const float  co[3],
float *  distance 
) [static]
static int key_inside_rect ( PEData data,
const float  co[3] 
) [static]
static int key_inside_test ( PEData data,
const float  co[3] 
) [static]

Definition at line 488 of file particle_edit.c.

References key_inside_circle(), key_inside_rect(), PEData::mval, NULL, and PEData::rad.

Referenced by for_mouse_hit_keys().

static int key_test_depth ( PEData data,
const float  co[3] 
) [static]
static void make_PTCacheUndo ( PTCacheEdit edit,
PTCacheUndo undo 
) [static]
static int mirror_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int particle_edit_toggle_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int particle_edit_toggle_poll ( bContext C) [static]
static int particle_intersect_dm ( Scene scene,
Object ob,
DerivedMesh dm,
float *  vert_cos,
const float  co1[3],
const float  co2[3],
float *  min_d,
int *  min_face,
float *  min_w,
float *  face_minmax,
float *  pa_minmax,
float  radius,
float *  ipoint 
) [static]
void PARTICLE_OT_brush_edit ( wmOperatorType ot)
void PARTICLE_OT_delete ( wmOperatorType ot)
void PARTICLE_OT_edited_clear ( wmOperatorType ot)
void PARTICLE_OT_hide ( wmOperatorType ot)
void PARTICLE_OT_mirror ( wmOperatorType ot)
void PARTICLE_OT_particle_edit_toggle ( wmOperatorType ot)
void PARTICLE_OT_rekey ( wmOperatorType ot)
void PARTICLE_OT_remove_doubles ( wmOperatorType ot)
void PARTICLE_OT_reveal ( wmOperatorType ot)
void PARTICLE_OT_select_all ( wmOperatorType ot)
void PARTICLE_OT_select_less ( wmOperatorType ot)
void PARTICLE_OT_select_linked ( wmOperatorType ot)
void PARTICLE_OT_select_more ( wmOperatorType ot)
void PARTICLE_OT_select_roots ( wmOperatorType ot)
void PARTICLE_OT_select_tips ( wmOperatorType ot)
void PARTICLE_OT_subdivide ( wmOperatorType ot)
void PARTICLE_OT_weight_set ( wmOperatorType ot)
static void PE_apply_lengths ( Scene scene,
PTCacheEdit edit 
) [static]
static void PE_apply_mirror ( Object ob,
ParticleSystem psys 
) [static]
int PE_border_select ( bContext C,
rcti rect,
int  select,
int  extend 
)
int PE_circle_select ( bContext C,
int  selecting,
const int  mval[2],
float  rad 
)
PTCacheEdit* PE_create_current ( Scene scene,
Object ob 
) [read]

Definition at line 290 of file particle_edit.c.

References pe_get_current().

Referenced by draw_object(), particle_edit_toggle_exec(), and PE_current_changed().

static void PE_create_particle_edit ( Scene scene,
Object ob,
PointCache cache,
ParticleSystem psys 
) [static]
void PE_current_changed ( Scene scene,
Object ob 
)

Definition at line 295 of file particle_edit.c.

References Object::mode, OB_MODE_PARTICLE_EDIT, and PE_create_current().

static void pe_deflect_emitter ( Scene scene,
Object ob,
PTCacheEdit edit 
) [static]
void PE_deselect_all_visible ( PTCacheEdit edit)
void PE_free_ptcache_edit ( PTCacheEdit edit)
static PTCacheEdit* pe_get_current ( Scene scene,
Object ob,
int  create 
) [static]
PTCacheEdit* PE_get_current ( Scene scene,
Object ob 
) [read]
int PE_hair_poll ( bContext C)
void PE_hide_keys_time ( Scene scene,
PTCacheEdit edit,
float  cfra 
)
static void pe_iterate_lengths ( Scene scene,
PTCacheEdit edit 
) [static]
int PE_lasso_select ( bContext C,
int  mcords[][2],
short  moves,
short  extend,
short  select 
)
int PE_minmax ( Scene scene,
float  min[3],
float  max[3] 
)
static void PE_mirror_particle ( Object ob,
DerivedMesh dm,
ParticleSystem psys,
ParticleData pa,
ParticleData mpa 
) [static]
static void PE_mirror_x ( Scene scene,
Object ob,
int  tagged 
) [static]
int PE_mouse_particles ( bContext C,
const int  mval[2],
int  extend 
)
int PE_poll ( bContext C)
int PE_poll_view3d ( bContext C)
void PE_redo ( Scene scene)

Definition at line 3986 of file particle_edit.c.

References PE_undo_step().

Referenced by ed_undo_step().

static int pe_select_all_exec ( bContext C,
wmOperator op 
) [static]
static void PE_set_data ( bContext C,
PEData data 
) [static]
static void PE_set_view3d_data ( bContext C,
PEData data 
) [static]
ParticleEditSettings* PE_settings ( Scene scene) [read]
int PE_start_edit ( PTCacheEdit edit)
void PE_undo ( Scene scene)

Definition at line 3981 of file particle_edit.c.

References PE_undo_step().

Referenced by ed_undo_step().

const char* PE_undo_get_name ( Scene scene,
int  nr,
int *  active 
)
void PE_undo_number ( Scene scene,
int  nr 
)
void PE_undo_push ( Scene scene,
const char *  str 
)
void PE_undo_step ( Scene scene,
int  step 
)
int PE_undo_valid ( Scene scene)

Definition at line 3956 of file particle_edit.c.

References ListBase::first, ListBase::last, OBACT, PE_get_current(), and PTCacheEdit::undo.

Referenced by ED_undo_valid().

static void PE_update_mirror_cache ( Object ob,
ParticleSystem psys 
) [static]
void PE_update_object ( Scene scene,
Object ob,
int  useflag 
)
static void PE_update_selection ( Scene scene,
Object ob,
int  useflag 
) [static]
static int pe_x_mirror ( Object ob) [static]
static int point_is_selected ( PTCacheEditPoint point) [static]

Definition at line 496 of file particle_edit.c.

References PTCacheEditPoint::flag, KEY_K, LOOP_SELECTED_KEYS, and PEP_HIDE.

Referenced by PE_mirror_x().

static void PTCacheUndo_clear ( PTCacheEdit edit) [static]
static void recalc_emitter_field ( Object ob,
ParticleSystem psys 
) [static]
static void recalc_lengths ( PTCacheEdit edit) [static]
static int rekey_exec ( bContext C,
wmOperator op 
) [static]
static void rekey_particle ( PEData data,
int  pa_index 
) [static]
static void rekey_particle_to_time ( Scene scene,
Object ob,
int  pa_index,
float  path_time 
) [static]
static int remove_doubles_exec ( bContext C,
wmOperator op 
) [static]
static void remove_tagged_keys ( Object ob,
ParticleSystem psys 
) [static]
static int remove_tagged_particles ( Object ob,
ParticleSystem psys,
int  mirror 
) [static]
static int reveal_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static void select_key ( PEData data,
int  point_index,
int  key_index 
) [static]
static void select_keys ( PEData data,
int  point_index,
int   UNUSEDkey_index 
) [static]
static int select_less_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static void select_less_keys ( PEData data,
int  point_index 
) [static]
static int select_linked_exec ( bContext C,
wmOperator op 
) [static]
static int select_linked_invoke ( bContext C,
wmOperator op,
wmEvent event 
) [static]
static int select_more_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static void select_more_keys ( PEData data,
int  point_index 
) [static]
static void select_root ( PEData data,
int  point_index 
) [static]
static int select_roots_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static void select_tip ( PEData data,
int  point_index 
) [static]
static int select_tips_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static void set_delete_particle ( PEData data,
int  pa_index 
) [static]

Definition at line 2498 of file particle_edit.c.

References PEData::edit, PTCacheEditPoint::flag, PEP_TAG, and PTCacheEdit::points.

Referenced by delete_exec().

static void set_delete_particle_key ( PEData data,
int  pa_index,
int  key_index 
) [static]
static int subdivide_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static void subdivide_particle ( PEData data,
int  pa_index 
) [static]
static void toggle_key_select ( PEData data,
int  point_index,
int  key_index 
) [static]
static void toggle_particle_cursor ( bContext C,
int  enable 
) [static]
static void update_velocities ( PTCacheEdit edit) [static]
static void update_world_cos ( Object ob,
PTCacheEdit edit 
) [static]
static int weight_set_exec ( bContext C,
wmOperator op 
) [static]

Variable Documentation

Initial value:
 {
    {DEL_PARTICLE, "PARTICLE", 0, "Particle", ""},
    {DEL_KEY, "KEY", 0, "Key", ""},
    {0, NULL, 0, NULL, NULL}}

Definition at line 2493 of file particle_edit.c.