Blender V2.61 - r43446
|
#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) |
ParticleEditSettings * | PE_settings (Scene *scene) |
static PTCacheEdit * | pe_get_current (Scene *scene, Object *ob, int create) |
PTCacheEdit * | PE_get_current (Scene *scene, Object *ob) |
PTCacheEdit * | PE_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 [] |
Definition in file particle_edit.c.
#define KEY_K PTCacheEditKey *key; int k |
Definition at line 90 of file particle_edit.c.
Referenced by brush_length(), brush_puff(), count_selected_keys(), for_mouse_hit_keys(), foreach_mouse_hit_key(), foreach_mouse_hit_point(), foreach_selected_key(), get_PTCacheUndo(), hide_exec(), PE_apply_lengths(), PE_create_particle_edit(), pe_deflect_emitter(), PE_deselect_all_visible(), PE_hide_keys_time(), PE_lasso_select(), PE_minmax(), PE_mirror_x(), PE_mouse_particles(), pe_select_all_exec(), PE_update_selection(), point_is_selected(), recalc_lengths(), remove_tagged_keys(), reveal_exec(), select_keys(), select_less_keys(), select_more_keys(), update_velocities(), update_world_cos(), and weight_set_exec().
#define KEY_WCO (key->flag & PEK_USE_WCO ? key->world_co : key->co) |
Definition at line 103 of file particle_edit.c.
Referenced by for_mouse_hit_keys(), foreach_mouse_hit_key(), and foreach_mouse_hit_point().
#define LOOP_EDITED_POINTS for(p=0, point=edit->points; p<edit->totpoint; p++, point++) if(point->flag & PEP_EDIT_RECALC) |
Definition at line 96 of file particle_edit.c.
Referenced by PE_apply_lengths(), pe_deflect_emitter(), pe_iterate_lengths(), recalc_lengths(), and update_velocities().
Definition at line 98 of file particle_edit.c.
Referenced by brush_length(), brush_puff(), get_PTCacheUndo(), hide_exec(), PE_apply_lengths(), PE_create_particle_edit(), pe_deflect_emitter(), PE_hide_keys_time(), PE_lasso_select(), PE_update_selection(), remove_tagged_keys(), reveal_exec(), select_keys(), select_less_keys(), select_more_keys(), update_velocities(), and update_world_cos().
Definition at line 92 of file particle_edit.c.
Referenced by foreach_point(), get_PTCacheUndo(), PE_apply_mirror(), PE_create_particle_edit(), PE_free_ptcache_edit(), PE_hide_keys_time(), PE_mirror_x(), PE_update_object(), PE_update_selection(), remove_tagged_keys(), reveal_exec(), and update_world_cos().
#define LOOP_SELECTED_KEYS for(k=0, key=point->keys; k<point->totkey; k++, key++) if((key->flag & PEK_SELECT) && !(key->flag & PEK_HIDE)) |
Definition at line 100 of file particle_edit.c.
Referenced by count_selected_keys(), foreach_selected_key(), PE_deselect_all_visible(), PE_minmax(), PE_mouse_particles(), pe_select_all_exec(), point_is_selected(), select_less_keys(), and weight_set_exec().
#define LOOP_SELECTED_POINTS for(p=0, point=edit->points; p<edit->totpoint; p++, point++) if(point_is_selected(point)) |
Definition at line 94 of file particle_edit.c.
Referenced by foreach_selected_point(), hide_exec(), remove_doubles_exec(), and weight_set_exec().
#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)) |
Definition at line 99 of file particle_edit.c.
Referenced by for_mouse_hit_keys(), foreach_mouse_hit_key(), foreach_mouse_hit_point(), and pe_select_all_exec().
#define LOOP_VISIBLE_POINTS for(p=0, point=edit->points; p<edit->totpoint; p++, point++) if(!(point->flag & PEP_HIDE)) |
Definition at line 93 of file particle_edit.c.
Referenced by count_selected_keys(), for_mouse_hit_keys(), foreach_mouse_hit_key(), foreach_mouse_hit_point(), foreach_selected_key(), PE_deselect_all_visible(), PE_lasso_select(), PE_minmax(), PE_mirror_x(), PE_mouse_particles(), and pe_select_all_exec().
#define POINT_P PTCacheEditPoint *point; int p |
Definition at line 91 of file particle_edit.c.
Referenced by count_selected_keys(), for_mouse_hit_keys(), foreach_mouse_hit_key(), foreach_mouse_hit_point(), foreach_point(), foreach_selected_key(), foreach_selected_point(), get_PTCacheUndo(), hide_exec(), PE_apply_lengths(), PE_apply_mirror(), PE_create_particle_edit(), pe_deflect_emitter(), PE_deselect_all_visible(), PE_free_ptcache_edit(), PE_hide_keys_time(), pe_iterate_lengths(), PE_lasso_select(), PE_minmax(), PE_mirror_x(), PE_mouse_particles(), pe_select_all_exec(), PE_update_object(), PE_update_selection(), recalc_lengths(), remove_doubles_exec(), remove_tagged_keys(), remove_tagged_particles(), reveal_exec(), update_velocities(), update_world_cos(), and weight_set_exec().
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.
anonymous enum |
Definition at line 2491 of file particle_edit.c.
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] |
Definition at line 2712 of file particle_edit.c.
References add_v3_v3(), PTCacheEditKey::co, PEData::combfac, copy_v3_v3(), PEData::dist, PEData::dvec, PEData::edit, ParticleEditSettings::flag, mul_mat3_m4_v3(), mul_v3_fl(), PE_LOCK_FIRST, PE_settings(), PEP_EDIT_RECALC, PTCacheEdit::points, pow(), PEData::rad, and PEData::scene.
Referenced by brush_edit_apply().
static void brush_cut | ( | PEData * | data, |
int | pa_index | ||
) | [static] |
Definition at line 2729 of file particle_edit.c.
References ViewContext::ar, BLI_frand(), ParticleCacheKey::co, PEData::cutfac, simple_enum_gen::d, ParticleEditSettings::draw_step, PEData::edit, PTCacheEditPoint::flag, key_test_depth(), PEData::mval, PEData::ob, PTCacheEdit::pathcache, PE_settings(), PEP_EDIT_RECALC, PEP_HIDE, PEP_TAG, PTCacheEdit::points, pow(), project_int_noclip(), PEData::rad, rekey_particle_to_time(), PEData::scene, sqrt(), and PEData::vc.
Referenced by brush_edit_apply().
static void brush_drawcursor | ( | bContext * | C, |
int | x, | ||
int | y, | ||
void * | UNUSEDcustomdata | ||
) | [static] |
Definition at line 2451 of file particle_edit.c.
References ParticleEditSettings::brush, ParticleEditSettings::brushtype, CTX_data_scene(), glutil_draw_lined_arc(), M_PI, PE_settings(), and ParticleBrushData::size.
Referenced by toggle_particle_cursor().
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] |
Definition at line 3671 of file particle_edit.c.
References brush_edit_apply(), FALSE, wmEvent::mval, wmOperator::ptr, RNA_boolean_set(), RNA_collection_add(), RNA_float_set_array(), wmEvent::shift, and VECCOPY2D.
Referenced by brush_edit_invoke(), and brush_edit_modal().
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] |
Definition at line 3656 of file particle_edit.c.
References brush_edit_apply(), brush_edit_exit(), brush_edit_init(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_BEGIN, and RNA_END.
Referenced by PARTICLE_OT_brush_edit().
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] |
Definition at line 3399 of file particle_edit.c.
References ParticleEditSettings::brushtype, CTX_data_active_object(), CTX_data_scene(), CTX_wm_region(), wmOperator::customdata, BrushEdit::data, BrushEdit::edit, BrushEdit::first, initgrabz(), MEM_callocN(), BrushEdit::ob, Object::obmat, PE_get_current(), PE_set_view3d_data(), PE_settings(), ARegion::regiondata, and BrushEdit::scene.
Referenced by brush_edit_exec(), and brush_edit_invoke().
static int brush_edit_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 3688 of file particle_edit.c.
References brush_edit_apply_event(), brush_edit_init(), OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, and WM_event_add_modal_handler().
Referenced by PARTICLE_OT_brush_edit().
static int brush_edit_modal | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 3700 of file particle_edit.c.
References brush_edit_apply_event(), brush_edit_exit(), LEFTMOUSE, MIDDLEMOUSE, MOUSEMOVE, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, RIGHTMOUSE, and wmEvent::type.
Referenced by PARTICLE_OT_brush_edit().
static void brush_length | ( | PEData * | data, |
int | point_index | ||
) | [static] |
Definition at line 2826 of file particle_edit.c.
References add_v3_v3v3(), copy_v3_v3(), PEData::edit, PTCacheEditPoint::flag, PEData::growfac, KEY_K, LOOP_KEYS, mul_v3_fl(), PEP_EDIT_RECALC, PTCacheEdit::points, and sub_v3_v3v3().
Referenced by brush_edit_apply().
static void brush_puff | ( | PEData * | data, |
int | point_index | ||
) | [static] |
Definition at line 2848 of file particle_edit.c.
References add_v3_v3(), BLI_kdtree_find_nearest(), ParticleEditSettings::brush, ParticleEditSettings::brushtype, co, copy_v3_v3(), cross_v3_v3v3(), PEData::dist, PEData::dm, PEData::edit, PTCacheEdit::emitter_cosnos, PTCacheEdit::emitter_field, PTCacheEditPoint::flag, ParticleSystem::flag, ParticleBrushData::flag, ParticleSettings::from, Object::imat, PEData::invert, invert_m4_m4(), KEY_K, len_v3(), len_v3v3(), length(), LOOP_KEYS, madd_v3_v3fl(), madd_v3_v3v3fl(), mul_m4_v3(), mul_mat3_m4_v3(), mul_v3_fl(), mul_v3_m4v3(), normalize_v3(), NULL, PEData::ob, Object::obmat, ParticleSystem::part, ParticleSystem::particles, PE_BRUSH_DATA_PUFF_VOLUME, PE_settings(), PEK_HIDE, PEK_SELECT, PEP_EDIT_RECALC, PTCacheEdit::points, pow(), PTCacheEdit::psys, PSYS_GLOBAL_HAIR, psys_mat_hair_to_global(), PEData::pufffac, PEData::rad, PEData::scene, PEData::select, sub_v3_v3v3(), and unit_m4().
Referenced by brush_edit_apply().
static void brush_smooth_do | ( | PEData * | data, |
float | UNUSEDmat[][4], | ||
float | imat[][4], | ||
int | point_index, | ||
int | key_index, | ||
PTCacheEditKey * | key | ||
) | [static] |
Definition at line 3007 of file particle_edit.c.
References add_v3_v3(), PTCacheEditKey::co, copy_v3_v3(), PEData::edit, mul_mat3_m4_v3(), mul_v3_fl(), PEP_EDIT_RECALC, PTCacheEdit::points, PEData::smoothfac, sub_v3_v3v3(), and PEData::vec.
Referenced by brush_edit_apply().
static void brush_smooth_get | ( | PEData * | data, |
float | mat[][4], | ||
float | UNUSEDimat[][4], | ||
int | UNUSEDpoint_index, | ||
int | key_index, | ||
PTCacheEditKey * | key | ||
) | [static] |
Definition at line 2995 of file particle_edit.c.
References add_v3_v3(), PTCacheEditKey::co, mul_mat3_m4_v3(), sub_v3_v3v3(), PEData::tot, and PEData::vec.
Referenced by brush_edit_apply().
static void brush_weight | ( | PEData * | data, |
float | UNUSEDmat[][4], | ||
float | UNUSEDimat[][4], | ||
int | point_index, | ||
int | key_index, | ||
PTCacheEditKey * | UNUSEDkey | ||
) | [static] |
Definition at line 2981 of file particle_edit.c.
References PEData::edit, ParticleData::hair, ParticleSystem::particles, PEP_EDIT_RECALC, PTCacheEdit::points, PTCacheEdit::psys, HairKey::weight, and PEData::weightfac.
Referenced by brush_edit_apply().
static int clear_edited_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 4230 of file particle_edit.c.
References CTX_data_active_object(), DAG_id_tag_update(), ParticleSystem::edit, PTCacheEdit::edited, ParticleSystem::flag, ParticleSystem::free_edit, Object::id, NA_EDITED, NC_OBJECT, ND_PARTICLE, NULL, OB_RECALC_DATA, OPERATOR_FINISHED, PE_free_ptcache_edit(), PSYS_EDITED, psys_get_current(), PSYS_GLOBAL_HAIR, PSYS_RECALC_RESET, psys_reset(), PSYS_RESET_DEPSGRAPH, ParticleSystem::recalc, and WM_event_add_notifier().
Referenced by PARTICLE_OT_edited_clear().
static int count_selected_keys | ( | Scene * | scene, |
PTCacheEdit * | edit | ||
) | [static] |
Definition at line 680 of file particle_edit.c.
References KEY_K, LOOP_SELECTED_KEYS, LOOP_VISIBLE_POINTS, PE_settings(), PEK_SELECT, POINT_P, SCE_SELECT_END, SCE_SELECT_POINT, and ParticleEditSettings::selectmode.
Referenced by brush_edit_apply().
static int delete_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 2512 of file particle_edit.c.
References DAG_id_tag_update(), data, DEL_KEY, DEL_PARTICLE, PEData::edit, foreach_selected_key(), foreach_selected_point(), Object::id, NA_EDITED, NC_OBJECT, ND_PARTICLE, PEData::ob, OB_RECALC_DATA, OPERATOR_FINISHED, PE_set_data(), pe_x_mirror(), PTCacheEdit::psys, wmOperator::ptr, recalc_lengths(), remove_tagged_keys(), remove_tagged_particles(), RNA_enum_get(), set_delete_particle(), set_delete_particle_key(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_delete().
static void for_mouse_hit_keys | ( | PEData * | data, |
ForKeyFunc | func, | ||
int | nearest | ||
) | [static] |
Definition at line 516 of file particle_edit.c.
References PEData::edit, key_inside_circle(), key_inside_test(), KEY_K, KEY_WCO, LOOP_VISIBLE_KEYS, LOOP_VISIBLE_POINTS, p, PE_settings(), POINT_P, PEData::rad, SCE_SELECT_END, SCE_SELECT_PATH, PEData::scene, and ParticleEditSettings::selectmode.
Referenced by PE_border_select(), PE_circle_select(), PE_mouse_particles(), and select_linked_exec().
static void foreach_mouse_hit_key | ( | PEData * | data, |
ForKeyMatFunc | func, | ||
int | selected | ||
) | [static] |
Definition at line 598 of file particle_edit.c.
References PEData::dist, ParticleSystemModifierData::dm, PEData::edit, ParticleSystem::flag, ParticleSettings::from, invert_m4_m4(), key_inside_circle(), KEY_K, KEY_WCO, LOOP_VISIBLE_KEYS, LOOP_VISIBLE_POINTS, MAT4_UNITY, NULL, PEData::ob, p, ParticleSystem::part, ParticleSystem::particles, PE_settings(), PEK_SELECT, POINT_P, PTCacheEdit::psys, psys_get_modifier(), PSYS_GLOBAL_HAIR, psys_mat_hair_to_global(), PEData::rad, SCE_SELECT_END, SCE_SELECT_PATH, PEData::scene, and ParticleEditSettings::selectmode.
Referenced by brush_edit_apply().
static void foreach_mouse_hit_point | ( | PEData * | data, |
ForPointFunc | func, | ||
int | selected | ||
) | [static] |
Definition at line 565 of file particle_edit.c.
References PEData::dist, PEData::edit, key_inside_circle(), KEY_K, KEY_WCO, LOOP_VISIBLE_KEYS, LOOP_VISIBLE_POINTS, p, PE_settings(), PEK_SELECT, POINT_P, PEData::rad, SCE_SELECT_END, SCE_SELECT_PATH, PEData::scene, and ParticleEditSettings::selectmode.
Referenced by brush_edit_apply().
static void foreach_point | ( | PEData * | data, |
ForPointFunc | func | ||
) | [static] |
Definition at line 670 of file particle_edit.c.
References PEData::edit, LOOP_POINTS, p, and POINT_P.
Referenced by brush_edit_apply(), select_less_exec(), select_more_exec(), select_roots_exec(), select_tips_exec(), and subdivide_exec().
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] |
Definition at line 3745 of file particle_edit.c.
References BKE_ptcache_free_mem(), ParticleData::hair, i, PTCacheEditPoint::keys, PTCacheUndo::mem_cache, MEM_freeN(), PTCacheUndo::particles, and PTCacheUndo::points.
Referenced by PE_undo_push(), and PTCacheUndo_clear().
static void get_PTCacheUndo | ( | PTCacheEdit * | edit, |
PTCacheUndo * | undo | ||
) | [static] |
Definition at line 3803 of file particle_edit.c.
References BKE_ptcache_free_mem(), BKE_ptcache_mem_pointers_incr(), BKE_ptcache_mem_pointers_init(), BLI_duplicatelist(), BPHYS_DATA_LOCATION, BPHYS_DATA_ROTATION, BPHYS_DATA_VELOCITY, BPHYS_TOT_DATA, PTCacheID::cache, HairKey::co, PTCacheMem::cur, PTCacheMem::data, ListBase::first, ParticleSystem::flag, PTCacheMem::frame, ParticleData::hair, i, KEY_K, LOOP_KEYS, LOOP_POINTS, PTCacheUndo::mem_cache, PointCache::mem_cache, MEM_dupallocN(), MEM_freeN(), PTCacheEdit::mirror_cache, PTCacheMem::next, NULL, p, PTCacheUndo::particles, ParticleSystem::particles, PTCacheEdit::pid, POINT_P, PTCacheUndo::points, PTCacheEdit::points, PTCacheEdit::psys, PTCacheUndo::psys_flag, HairKey::time, ParticleSystem::totpart, PTCacheUndo::totpoint, and PTCacheEdit::totpoint.
Referenced by PE_undo_step().
static int hide_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1676 of file particle_edit.c.
References CTX_data_active_object(), CTX_data_scene(), KEY_K, LOOP_KEYS, LOOP_SELECTED_POINTS, LOOP_UNSELECTED_POINTS, NA_SELECTED, NC_OBJECT, ND_PARTICLE, OPERATOR_FINISHED, PE_get_current(), PE_update_selection(), PEK_SELECT, PEP_EDIT_RECALC, PEP_HIDE, POINT_P, wmOperator::ptr, RNA_enum_get(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_hide().
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] |
Definition at line 445 of file particle_edit.c.
References ViewContext::ar, IS_CLIPPED, key_test_depth(), PEData::mval, project_int(), sqrt(), and PEData::vc.
Referenced by for_mouse_hit_keys(), foreach_mouse_hit_key(), foreach_mouse_hit_point(), and key_inside_test().
static int key_inside_rect | ( | PEData * | data, |
const float | co[3] | ||
) | [static] |
Definition at line 472 of file particle_edit.c.
References ViewContext::ar, IS_CLIPPED, key_test_depth(), project_int(), PEData::rect, PEData::vc, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by key_inside_test().
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] |
Definition at line 401 of file particle_edit.c.
References ViewContext::ar, assert, ViewDepths::depths, RegionView3D::depths, View3D::drawtype, View3D::flag, IS_CLIPPED, PEData::mats, bglMats::modelview, OB_WIRE, project_short(), bglMats::projection, ViewContext::rv3d, ViewContext::v3d, V3D_ZBUF_SELECT, PEData::vc, bglMats::viewport, ViewDepths::w, ARegion::winrct, rcti::xmin, and rcti::ymin.
Referenced by brush_cut(), key_inside_circle(), key_inside_rect(), and PE_lasso_select().
static void make_PTCacheUndo | ( | PTCacheEdit * | edit, |
PTCacheUndo * | undo | ||
) | [static] |
Definition at line 3765 of file particle_edit.c.
References BLI_duplicatelist(), BPHYS_TOT_DATA, PTCacheID::cache, PTCacheMem::data, ListBase::first, ParticleSystem::flag, ParticleData::hair, i, PTCacheEditPoint::keys, PointCache::mem_cache, PTCacheUndo::mem_cache, MEM_dupallocN(), PTCacheMem::next, ParticleSystem::particles, PTCacheUndo::particles, PTCacheEdit::pid, PTCacheEdit::points, PTCacheUndo::points, PTCacheEdit::psys, PTCacheUndo::psys_flag, PTCacheEdit::totpoint, and PTCacheUndo::totpoint.
Referenced by PE_undo_push().
static int mirror_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 2681 of file particle_edit.c.
References CTX_data_active_object(), CTX_data_scene(), DAG_id_tag_update(), Object::id, NA_EDITED, NC_OBJECT, ND_PARTICLE, OB_RECALC_DATA, OPERATOR_FINISHED, PE_get_current(), PE_mirror_x(), update_world_cos(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_mirror().
static int particle_edit_toggle_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 4184 of file particle_edit.c.
References CTX_data_active_object(), CTX_data_scene(), DAG_id_tag_update(), Object::id, Object::mode, NC_SCENE, ND_MODE, NS_MODE_OBJECT, NS_MODE_PARTICLE, NULL, OB_MODE_PARTICLE_EDIT, OB_RECALC_DATA, OPERATOR_FINISHED, PE_create_current(), PTCacheEdit::psys, recalc_emitter_field(), toggle_particle_cursor(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_particle_edit_toggle().
static int particle_edit_toggle_poll | ( | bContext * | C | ) | [static] |
Definition at line 4173 of file particle_edit.c.
References CTX_data_active_object(), CTX_data_scene(), eModifierType_Cloth, eModifierType_Softbody, ListBase::first, Object::id, ID::lib, modifiers_findByType(), and Object::particlesystem.
Referenced by PARTICLE_OT_edited_clear(), and PARTICLE_OT_particle_edit_toggle().
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] |
Definition at line 3044 of file particle_edit.c.
References CD_MFACE, CD_MVERT, MVert::co, copy_v3_v3(), DO_MINMAX, DerivedMesh::getFaceDataArray, DerivedMesh::getNumFaces, DerivedMesh::getVertDataArray, i, INIT_MINMAX, intersect(), intersect_dm_quad_weights(), isect_aabb_aabb_v3(), isect_line_tri_v3(), isect_sweeping_sphere_tri_v3(), max, mesh_get_derived_deform(), mesh_get_derived_final(), min, NULL, psys_disable_all(), psys_enable_all(), MFace::v1, MFace::v2, MFace::v3, and MFace::v4.
Referenced by brush_add().
void PARTICLE_OT_brush_edit | ( | wmOperatorType * | ot | ) |
Definition at line 3723 of file particle_edit.c.
References brush_edit_cancel(), brush_edit_exec(), brush_edit_invoke(), brush_edit_modal(), wmOperatorType::cancel, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_REGISTER, OPTYPE_UNDO, PE_poll_view3d(), wmOperatorType::poll, RNA_def_collection_runtime(), RNA_OperatorStrokeElement, and wmOperatorType::srna.
Referenced by operatortypes_particle().
void PARTICLE_OT_delete | ( | wmOperatorType * | ot | ) |
Definition at line 2536 of file particle_edit.c.
References DEL_PARTICLE, delete_exec(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, PE_hair_poll(), wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), wmOperatorType::srna, and WM_menu_invoke().
Referenced by operatortypes_particle().
void PARTICLE_OT_edited_clear | ( | wmOperatorType * | ot | ) |
Definition at line 4262 of file particle_edit.c.
References clear_edited_exec(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, particle_edit_toggle_poll(), and wmOperatorType::poll.
Referenced by operatortypes_particle().
void PARTICLE_OT_hide | ( | wmOperatorType * | ot | ) |
Definition at line 1708 of file particle_edit.c.
References wmOperatorType::exec, wmOperatorType::flag, hide_exec(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, PE_poll(), wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by operatortypes_particle().
void PARTICLE_OT_mirror | ( | wmOperatorType * | ot | ) |
Definition at line 2696 of file particle_edit.c.
References wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, mirror_exec(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, PE_poll(), and wmOperatorType::poll.
Referenced by operatortypes_particle().
void PARTICLE_OT_particle_edit_toggle | ( | wmOperatorType * | ot | ) |
Definition at line 4213 of file particle_edit.c.
References wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, particle_edit_toggle_exec(), particle_edit_toggle_poll(), and wmOperatorType::poll.
Referenced by operatortypes_particle().
void PARTICLE_OT_rekey | ( | wmOperatorType * | ot | ) |
Definition at line 1965 of file particle_edit.c.
References wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, PE_poll(), wmOperatorType::poll, rekey_exec(), RNA_def_int(), wmOperatorType::srna, and WM_operator_props_popup().
Referenced by operatortypes_particle().
void PARTICLE_OT_remove_doubles | ( | wmOperatorType * | ot | ) |
Definition at line 2383 of file particle_edit.c.
References wmOperatorType::exec, wmOperatorType::flag, FLT_MAX, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, PE_poll(), wmOperatorType::poll, remove_doubles_exec(), RNA_def_float(), and wmOperatorType::srna.
Referenced by operatortypes_particle().
void PARTICLE_OT_reveal | ( | wmOperatorType * | ot | ) |
Definition at line 1750 of file particle_edit.c.
References wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, PE_poll(), wmOperatorType::poll, and reveal_exec().
Referenced by operatortypes_particle().
void PARTICLE_OT_select_all | ( | wmOperatorType * | ot | ) |
Definition at line 1362 of file particle_edit.c.
References wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, PE_poll(), pe_select_all_exec(), wmOperatorType::poll, and WM_operator_properties_select_all().
Referenced by operatortypes_particle().
void PARTICLE_OT_select_less | ( | wmOperatorType * | ot | ) |
Definition at line 1808 of file particle_edit.c.
References wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, PE_poll(), wmOperatorType::poll, and select_less_exec().
Referenced by operatortypes_particle().
void PARTICLE_OT_select_linked | ( | wmOperatorType * | ot | ) |
Definition at line 1520 of file particle_edit.c.
References wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, PE_poll_view3d(), wmOperatorType::poll, RNA_def_boolean(), RNA_def_int_vector(), select_linked_exec(), select_linked_invoke(), and wmOperatorType::srna.
Referenced by operatortypes_particle().
void PARTICLE_OT_select_more | ( | wmOperatorType * | ot | ) |
Definition at line 1869 of file particle_edit.c.
References wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, PE_poll(), wmOperatorType::poll, and select_more_exec().
Referenced by operatortypes_particle().
void PARTICLE_OT_select_roots | ( | wmOperatorType * | ot | ) |
Definition at line 1436 of file particle_edit.c.
References wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, PE_poll(), wmOperatorType::poll, and select_roots_exec().
Referenced by operatortypes_particle().
void PARTICLE_OT_select_tips | ( | wmOperatorType * | ot | ) |
Definition at line 1476 of file particle_edit.c.
References wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, PE_poll(), wmOperatorType::poll, and select_tips_exec().
Referenced by operatortypes_particle().
void PARTICLE_OT_subdivide | ( | wmOperatorType * | ot | ) |
Definition at line 2295 of file particle_edit.c.
References wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, PE_poll(), wmOperatorType::poll, and subdivide_exec().
Referenced by operatortypes_particle().
void PARTICLE_OT_weight_set | ( | wmOperatorType * | ot | ) |
Definition at line 2433 of file particle_edit.c.
References wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, PE_poll(), wmOperatorType::poll, RNA_def_float(), wmOperatorType::srna, and weight_set_exec().
Referenced by operatortypes_particle().
static void PE_apply_lengths | ( | Scene * | scene, |
PTCacheEdit * | edit | ||
) | [static] |
Definition at line 956 of file particle_edit.c.
References add_v3_v3v3(), ParticleSystem::flag, ParticleEditSettings::flag, KEY_K, length(), LOOP_EDITED_POINTS, LOOP_KEYS, mul_v3_fl(), normalize_v3(), PE_KEEP_LENGTHS, PE_settings(), POINT_P, PTCacheEdit::psys, PSYS_GLOBAL_HAIR, and sub_v3_v3v3().
Referenced by PE_update_object().
static void PE_apply_mirror | ( | Object * | ob, |
ParticleSystem * | psys | ||
) | [static] |
Definition at line 846 of file particle_edit.c.
References ParticleSystemModifierData::dm, ParticleSystem::edit, PTCacheEditPoint::flag, LOOP_POINTS, PTCacheEdit::mirror_cache, NULL, p, ParticleSystem::particles, PE_mirror_particle(), PE_update_mirror_cache(), PEP_EDIT_RECALC, POINT_P, PTCacheEdit::points, and psys_get_modifier().
Referenced by PE_update_object().
Definition at line 1552 of file particle_edit.c.
References CTX_data_active_object(), CTX_data_scene(), data, for_mouse_hit_keys(), NA_SELECTED, NC_OBJECT, ND_PARTICLE, OPERATOR_CANCELLED, OPERATOR_FINISHED, PE_deselect_all_visible(), PE_get_current(), PE_set_view3d_data(), PE_start_edit(), PE_update_selection(), PEData::rect, PEData::select, select_key(), and WM_event_add_notifier().
Referenced by view3d_borderselect_exec().
int PE_circle_select | ( | bContext * | C, |
int | selecting, | ||
const int | mval[2], | ||
float | rad | ||
) |
Definition at line 1579 of file particle_edit.c.
References CTX_data_active_object(), CTX_data_scene(), data, for_mouse_hit_keys(), PEData::mval, NA_SELECTED, NC_OBJECT, ND_PARTICLE, OPERATOR_FINISHED, PE_get_current(), PE_set_view3d_data(), PE_start_edit(), PE_update_selection(), PEData::rad, PEData::select, select_key(), and WM_event_add_notifier().
Referenced by view3d_circle_select_exec().
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] |
Definition at line 4067 of file particle_edit.c.
References BKE_ptcache_mem_pointers_incr(), BKE_ptcache_mem_pointers_seek(), BPHYS_DATA_LOCATION, BPHYS_DATA_ROTATION, BPHYS_DATA_VELOCITY, HairKey::co, PTCacheMem::cur, PointCache::edit, ParticleSystem::edit, HairKey::editflag, ListBase::first, ParticleSystem::flag, PointCache::flag, PTCacheMem::frame, PointCache::free_edit, ParticleSystem::free_edit, ParticleData::hair, KEY_K, ListBase::last, LOOP_KEYS, LOOP_POINTS, PointCache::mem_cache, MEM_callocN(), PTCacheMem::next, PTCacheEdit::nosel_col, NULL, p, ParticleSystem::particles, PTCacheEdit::pathcache, PTCacheEdit::pathcachebufs, PE_free_ptcache_edit(), PE_undo_push(), PE_update_object(), PEK_USE_WCO, PEP_EDIT_RECALC, POINT_P, PTCacheEdit::points, PTCacheEdit::psys, psys_get_modifier(), PSYS_GLOBAL_HAIR, PTCACHE_DISK_CACHE, PTCacheUndo_clear(), recalc_emitter_field(), recalc_lengths(), PTCacheEdit::sel_col, TH_EDGE_SELECT, TH_WIRE, HairKey::time, ParticleData::totkey, ParticleSystem::totpart, PTCacheEdit::totpoint, UI_GetThemeColor3ubv(), and update_world_cos().
Referenced by pe_get_current().
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] |
Definition at line 889 of file particle_edit.c.
References add_v3_v3(), BLI_kdtree_find_nearest(), co, copy_v3_v3(), ParticleSystemModifierData::dm, dot(), dot_v3v3(), PTCacheEdit::emitter_cosnos, PTCacheEdit::emitter_field, ParticleEditSettings::emitterdist, ParticleSystem::flag, ParticleEditSettings::flag, ParticleSettings::from, invert_m4_m4(), KEY_K, len_v3v3(), LOOP_EDITED_POINTS, LOOP_KEYS, mul_m4_v3(), mul_v3_fl(), normalize_v3(), NULL, p, ParticleSystem::part, ParticleSystem::particles, PE_DEFLECT_EMITTER, PE_settings(), POINT_P, PTCacheEdit::psys, psys_get_modifier(), PSYS_GLOBAL_HAIR, psys_mat_hair_to_object(), and sub_v3_v3v3().
Referenced by PE_update_object().
void PE_deselect_all_visible | ( | PTCacheEdit * | edit | ) |
Definition at line 1540 of file particle_edit.c.
References KEY_K, LOOP_SELECTED_KEYS, LOOP_VISIBLE_POINTS, PEK_SELECT, PEP_EDIT_RECALC, and POINT_P.
Referenced by PE_border_select(), and PE_lasso_select().
void PE_free_ptcache_edit | ( | PTCacheEdit * | edit | ) |
Definition at line 138 of file particle_edit.c.
References BLI_kdtree_free(), PTCacheEdit::emitter_cosnos, PTCacheEdit::emitter_field, LOOP_POINTS, MEM_freeN(), PTCacheEdit::mirror_cache, POINT_P, PTCacheEdit::points, PTCacheEdit::psys, psys_free_path_cache(), and PTCacheUndo_clear().
Referenced by clear_edited_exec(), PE_create_particle_edit(), and ptcache_free_bake_exec().
static PTCacheEdit* pe_get_current | ( | Scene * | scene, |
Object * | ob, | ||
int | create | ||
) | [static] |
Definition at line 198 of file particle_edit.c.
References BKE_ptcache_ids_from_object(), BLI_freelistN(), PTCacheID::cache, PTCacheID::calldata, ParticleSystem::edit, PointCache::edit, ParticleEditSettings::edittype, ListBase::first, ParticleEditSettings::flag, PointCache::flag, ParticleSystem::flag, ListBase::last, PTCacheID::next, NULL, ParticleEditSettings::object, ParticleSystem::part, PART_HAIR, PE_create_particle_edit(), PE_FADE_TIME, PE_settings(), PE_TYPE_CLOTH, PE_TYPE_PARTICLES, PE_TYPE_SOFTBODY, PTCacheEdit::pid, ParticleSystem::pointcache, PSYS_CURRENT, PSYS_HAIR_DONE, PSYS_HAIR_DYNAMICS, PTCACHE_BAKED, PTCACHE_TYPE_CLOTH, PTCACHE_TYPE_PARTICLES, PTCACHE_TYPE_SOFTBODY, ParticleEditSettings::scene, ParticleSettings::type, and PTCacheID::type.
Referenced by PE_create_current(), and PE_get_current().
PTCacheEdit* PE_get_current | ( | Scene * | scene, |
Object * | ob | ||
) | [read] |
Definition at line 285 of file particle_edit.c.
References pe_get_current().
Referenced by brush_edit_init(), calc_manipulator_stats(), createTransData(), createTransParticleVerts(), flushTransParticles(), hide_exec(), mirror_exec(), PE_border_select(), PE_circle_select(), PE_hair_poll(), PE_lasso_select(), PE_minmax(), PE_mirror_x(), PE_mouse_particles(), PE_poll(), pe_select_all_exec(), PE_set_data(), PE_undo_get_name(), PE_undo_number(), PE_undo_push(), PE_undo_step(), PE_undo_valid(), PE_update_object(), PE_update_selection(), recalcData_view3d(), rekey_particle_to_time(), remove_doubles_exec(), reveal_exec(), special_aftertrans_update(), and weight_set_exec().
int PE_hair_poll | ( | bContext * | C | ) |
Definition at line 118 of file particle_edit.c.
References CTX_data_active_object(), CTX_data_scene(), Object::mode, OB_MODE_PARTICLE_EDIT, PE_get_current(), and PTCacheEdit::psys.
Referenced by PARTICLE_OT_delete().
void PE_hide_keys_time | ( | Scene * | scene, |
PTCacheEdit * | edit, | ||
float | cfra | ||
) |
Definition at line 301 of file particle_edit.c.
References fabs(), ParticleEditSettings::fade_frames, ParticleEditSettings::flag, KEY_K, LOOP_KEYS, LOOP_POINTS, PE_FADE_TIME, PE_settings(), PEK_HIDE, POINT_P, SCE_SELECT_POINT, and ParticleEditSettings::selectmode.
Referenced by draw_ptcache_edit(), and PE_update_object().
static void pe_iterate_lengths | ( | Scene * | scene, |
PTCacheEdit * | edit | ||
) | [static] |
Definition at line 981 of file particle_edit.c.
References add_v3_v3(), add_v3_v3v3(), PTCacheEditKey::co, co, ParticleSystem::flag, ParticleEditSettings::flag, PTCacheEditKey::length, length(), LOOP_EDITED_POINTS, mul(), mul_v3_fl(), normalize_v3(), PE_KEEP_LENGTHS, PE_LOCK_FIRST, PE_settings(), POINT_P, PTCacheEdit::psys, PSYS_GLOBAL_HAIR, and sub_v3_v3v3().
Referenced by PE_update_object().
int PE_lasso_select | ( | bContext * | C, |
int | mcords[][2], | ||
short | moves, | ||
short | extend, | ||
short | select | ||
) |
Definition at line 1604 of file particle_edit.c.
References co, copy_v3_v3(), CTX_data_active_object(), CTX_data_scene(), CTX_wm_region(), data, ParticleSystemModifierData::dm, ParticleSystem::flag, ParticleSettings::from, IS_CLIPPED, KEY_K, key_test_depth(), lasso_inside(), LOOP_KEYS, LOOP_VISIBLE_POINTS, MAT4_UNITY, mul_m4_v3(), NA_SELECTED, NC_OBJECT, ND_PARTICLE, OPERATOR_CANCELLED, OPERATOR_FINISHED, p, ParticleSystem::part, ParticleSystem::particles, PE_deselect_all_visible(), PE_get_current(), PE_set_view3d_data(), PE_settings(), PE_start_edit(), PE_update_selection(), PEK_SELECT, PEP_EDIT_RECALC, POINT_P, project_int(), PTCacheEdit::psys, psys_get_modifier(), PSYS_GLOBAL_HAIR, psys_mat_hair_to_global(), SCE_SELECT_END, SCE_SELECT_POINT, ParticleEditSettings::selectmode, and WM_event_add_notifier().
Referenced by view3d_lasso_select().
int PE_minmax | ( | Scene * | scene, |
float | min[3], | ||
float | max[3] | ||
) |
Definition at line 4027 of file particle_edit.c.
References co, copy_v3_v3(), ParticleSystemModifierData::dm, DO_MINMAX, ParticleSettings::from, KEY_K, LOOP_SELECTED_KEYS, LOOP_VISIBLE_POINTS, minmax_object(), mul_m4_v3(), NULL, OBACT, p, ParticleSystem::part, ParticleSystem::particles, PE_get_current(), POINT_P, PTCacheEdit::psys, psys_get_modifier(), psys_mat_hair_to_global(), and unit_m4().
Referenced by viewselected_exec().
static void PE_mirror_particle | ( | Object * | ob, |
DerivedMesh * | dm, | ||
ParticleSystem * | psys, | ||
ParticleData * | pa, | ||
ParticleData * | mpa | ||
) | [static] |
Definition at line 769 of file particle_edit.c.
References HairKey::co, PTCacheEditKey::co, copy_v3_v3(), ParticleSystem::edit, PTCacheEditPoint::flag, PTCacheEditKey::flag, ParticleSettings::from, ParticleData::hair, i, invert_m4_m4(), PTCacheEditPoint::keys, PTCacheEditKey::length, MEM_dupallocN(), MEM_freeN(), PTCacheEdit::mirror_cache, mul_m4_v3(), ParticleSystem::part, ParticleSystem::particles, PE_update_mirror_cache(), PEK_SELECT, PEK_TAG, PEP_EDIT_RECALC, PEP_TAG, PTCacheEdit::points, psys_mat_hair_to_orco(), HairKey::time, PTCacheEditPoint::totkey, and ParticleData::totkey.
Referenced by PE_apply_mirror(), PE_mirror_x(), remove_tagged_keys(), and remove_tagged_particles().
Definition at line 2556 of file particle_edit.c.
References HairKey::co, PTCacheEditKey::co, Object::data, ParticleSystemModifierData::dm, ParticleSystem::flag, ParticleData::fuv, ParticleData::hair, KEY_K, PTCacheEditPoint::keys, LOOP_POINTS, LOOP_VISIBLE_POINTS, MEM_callocN(), MEM_dupallocN(), MEM_freeN(), mesh_get_x_mirror_faces(), Mesh::mface, PTCacheEdit::mirror_cache, NULL, ParticleData::num, ParticleData::num_dmcache, p, ParticleSystem::particles, PE_get_current(), PE_mirror_particle(), PE_update_mirror_cache(), PEP_HIDE, PEP_TAG, point_is_selected(), POINT_P, PTCacheEdit::points, PTCacheEdit::psys, psys_get_modifier(), PSYS_GLOBAL_HAIR, psys_particle_dm_face_lookup(), SHIFT3, SHIFT4, HairKey::time, ParticleSystem::totpart, PTCacheEdit::totpoint, and MFace::v4.
Referenced by brush_edit_apply(), and mirror_exec().
int PE_mouse_particles | ( | bContext * | C, |
const int | mval[2], | ||
int | extend | ||
) |
Definition at line 1380 of file particle_edit.c.
References CTX_data_active_object(), CTX_data_scene(), data, for_mouse_hit_keys(), KEY_K, LOOP_SELECTED_KEYS, LOOP_VISIBLE_POINTS, PEData::mval, NA_SELECTED, NC_OBJECT, ND_PARTICLE, PEData::ob, OPERATOR_CANCELLED, OPERATOR_FINISHED, PE_get_current(), PE_set_view3d_data(), PE_start_edit(), PE_update_selection(), PEK_SELECT, PEP_EDIT_RECALC, POINT_P, PEData::rad, toggle_key_select(), and WM_event_add_notifier().
Referenced by view3d_select_invoke().
int PE_poll | ( | bContext * | C | ) |
Definition at line 107 of file particle_edit.c.
References CTX_data_active_object(), CTX_data_scene(), Object::mode, NULL, OB_MODE_PARTICLE_EDIT, and PE_get_current().
Referenced by buttons_context(), keymap_particle(), PARTICLE_OT_hide(), PARTICLE_OT_mirror(), PARTICLE_OT_rekey(), PARTICLE_OT_remove_doubles(), PARTICLE_OT_reveal(), PARTICLE_OT_select_all(), PARTICLE_OT_select_less(), PARTICLE_OT_select_more(), PARTICLE_OT_select_roots(), PARTICLE_OT_select_tips(), PARTICLE_OT_subdivide(), PARTICLE_OT_weight_set(), and PE_poll_view3d().
int PE_poll_view3d | ( | bContext * | C | ) |
Definition at line 132 of file particle_edit.c.
References CTX_wm_area(), CTX_wm_region(), PE_poll(), ARegion::regiontype, RGN_TYPE_WINDOW, SPACE_VIEW3D, and ScrArea::spacetype.
Referenced by PARTICLE_OT_brush_edit(), PARTICLE_OT_select_linked(), and toggle_particle_cursor().
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] |
Definition at line 1307 of file particle_edit.c.
References CTX_data_active_object(), CTX_data_scene(), KEY_K, LOOP_SELECTED_KEYS, LOOP_VISIBLE_KEYS, LOOP_VISIBLE_POINTS, NA_SELECTED, NC_OBJECT, ND_PARTICLE, OPERATOR_FINISHED, PE_get_current(), PE_update_selection(), PEK_SELECT, PEP_EDIT_RECALC, POINT_P, wmOperator::ptr, RNA_enum_get(), SEL_DESELECT, SEL_INVERT, SEL_SELECT, SEL_TOGGLE, and WM_event_add_notifier().
Referenced by PARTICLE_OT_select_all().
Definition at line 368 of file particle_edit.c.
References CTX_data_active_object(), CTX_data_scene(), PEData::edit, PEData::ob, PE_get_current(), and PEData::scene.
Referenced by delete_exec(), PE_set_view3d_data(), rekey_exec(), select_less_exec(), select_more_exec(), select_roots_exec(), select_tips_exec(), and subdivide_exec().
Definition at line 377 of file particle_edit.c.
References ViewContext::ar, View3D::drawtype, ED_view3d_depth_update(), View3D::flag, PEData::mats, NULL, OB_WIRE, PE_set_data(), ViewContext::rv3d, ViewContext::v3d, V3D_INVALID_BACKBUF, V3D_ZBUF_SELECT, PEData::vc, view3d_get_transformation(), view3d_operator_needs_opengl(), view3d_set_viewcontext(), and view3d_validate_backbuf().
Referenced by brush_edit_init(), PE_border_select(), PE_circle_select(), PE_lasso_select(), PE_mouse_particles(), and select_linked_exec().
ParticleEditSettings* PE_settings | ( | Scene * | scene | ) | [read] |
Definition at line 189 of file particle_edit.c.
References NULL, ToolSettings::particle, and Scene::toolsettings.
Referenced by brush_add(), brush_comb(), brush_cut(), brush_drawcursor(), brush_edit_apply(), brush_edit_init(), brush_puff(), count_selected_keys(), createTransParticleVerts(), disconnect_hair(), draw_new_particle_system(), draw_ptcache_edit(), for_mouse_hit_keys(), foreach_mouse_hit_key(), foreach_mouse_hit_point(), PE_apply_lengths(), pe_deflect_emitter(), pe_get_current(), PE_hide_keys_time(), pe_iterate_lengths(), PE_lasso_select(), PE_update_object(), toggle_particle_cursor(), and weight_set_exec().
int PE_start_edit | ( | PTCacheEdit * | edit | ) |
Definition at line 177 of file particle_edit.c.
References PTCacheEdit::edited, ParticleSystem::flag, PTCacheEdit::psys, and PSYS_EDITED.
Referenced by brush_edit_apply(), createTransData(), PE_border_select(), PE_circle_select(), PE_lasso_select(), and PE_mouse_particles().
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 | ||
) |
Definition at line 4007 of file particle_edit.c.
References BLI_findlink(), PTCacheEdit::curundo, PTCacheUndo::name, NULL, OBACT, PE_get_current(), and PTCacheEdit::undo.
Referenced by rna_undo_itemf().
void PE_undo_number | ( | Scene * | scene, |
int | nr | ||
) |
Definition at line 3991 of file particle_edit.c.
References PTCacheEdit::curundo, ListBase::first, PTCacheUndo::next, OBACT, PE_get_current(), PE_undo_step(), and PTCacheEdit::undo.
Referenced by undo_history_exec().
void PE_undo_push | ( | Scene * | scene, |
const char * | str | ||
) |
Definition at line 3882 of file particle_edit.c.
References BLI_addtail(), BLI_remlink(), BLI_strncpy(), PTCacheEdit::curundo, ListBase::first, free_PTCacheUndo(), ListBase::last, make_PTCacheUndo(), MEM_callocN(), MEM_freeN(), PTCacheUndo::name, OBACT, PE_get_current(), PTCacheUndo::prev, U, PTCacheEdit::undo, and UserDef::undosteps.
Referenced by ED_undo_push(), and PE_create_particle_edit().
void PE_undo_step | ( | Scene * | scene, |
int | step | ||
) |
Definition at line 3924 of file particle_edit.c.
References PTCacheEdit::curundo, DAG_id_tag_update(), G, G_DEBUG, get_PTCacheUndo(), PTCacheUndo::name, PTCacheUndo::next, NULL, OB_RECALC_DATA, OBACT, PE_get_current(), and PTCacheUndo::prev.
Referenced by PE_redo(), PE_undo(), and PE_undo_number().
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] |
Definition at line 706 of file particle_edit.c.
References BLI_kdtree_balance(), BLI_kdtree_find_nearest(), BLI_kdtree_free(), BLI_kdtree_insert(), BLI_kdtree_new(), HairKey::co, co, copy_v3_v3(), KDTreeNearest::dist, ParticleSystemModifierData::dm, ParticleSystem::edit, ParticleSettings::from, LOOP_PARTICLES, MEM_callocN(), PTCacheEdit::mirror_cache, mul_m4_v3(), NULL, p, ParticleSystem::part, PARTICLE_P, psys_get_modifier(), psys_mat_hair_to_orco(), and ParticleSystem::totpart.
Referenced by PE_apply_mirror(), PE_mirror_particle(), and PE_mirror_x().
Definition at line 1218 of file particle_edit.c.
References CFRA, ParticleSystem::flag, ParticleEditSettings::flag, LOOP_POINTS, PE_apply_lengths(), PE_apply_mirror(), PE_AUTO_VELOCITY, pe_deflect_emitter(), PE_get_current(), PE_hide_keys_time(), pe_iterate_lengths(), PE_settings(), pe_x_mirror(), PEP_EDIT_RECALC, POINT_P, PTCacheEdit::psys, psys_cache_edit_paths(), PSYS_HAIR_UPDATED, update_velocities(), and update_world_cos().
Referenced by brush_edit_apply(), connect_hair(), disconnect_hair(), draw_update_ptcache_edit(), flushTransParticles(), PE_create_particle_edit(), rekey_exec(), and subdivide_exec().
Definition at line 1111 of file particle_edit.c.
References CFRA, HairKey::editflag, ParticleData::hair, KEY_K, LOOP_KEYS, LOOP_POINTS, p, ParticleSystem::particles, PE_get_current(), PEP_EDIT_RECALC, POINT_P, PTCacheEdit::psys, and psys_cache_edit_paths().
Referenced by hide_exec(), PE_border_select(), PE_circle_select(), PE_lasso_select(), PE_mouse_particles(), pe_select_all_exec(), reveal_exec(), select_less_exec(), select_linked_exec(), select_more_exec(), select_roots_exec(), and select_tips_exec().
static int pe_x_mirror | ( | Object * | ob | ) | [static] |
Definition at line 328 of file particle_edit.c.
References Object::data, ME_EDIT_MIRROR_X, OB_MESH, and Object::type.
Referenced by brush_add(), brush_edit_apply(), delete_exec(), PE_update_object(), and remove_tagged_keys().
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] |
Definition at line 3966 of file particle_edit.c.
References BLI_freelistN(), PTCacheEdit::curundo, ListBase::first, free_PTCacheUndo(), PTCacheUndo::next, NULL, and PTCacheEdit::undo.
Referenced by PE_create_particle_edit(), and PE_free_ptcache_edit().
static void recalc_emitter_field | ( | Object * | ob, |
ParticleSystem * | psys | ||
) | [static] |
Definition at line 1052 of file particle_edit.c.
References add_v3_v3v3(), BLI_kdtree_balance(), BLI_kdtree_free(), BLI_kdtree_insert(), BLI_kdtree_new(), CD_MFACE, CD_MVERT, MVert::co, copy_v3_v3(), ParticleSystemModifierData::dm, ParticleSystem::edit, PTCacheEdit::emitter_cosnos, PTCacheEdit::emitter_field, DerivedMesh::getFaceData, DerivedMesh::getNumFaces, DerivedMesh::getVertData, i, MEM_callocN(), MEM_freeN(), mul_v3_fl(), MVert::no, normalize_v3(), NULL, psys_get_modifier(), MFace::v1, MFace::v2, MFace::v3, MFace::v4, VECADD, and VECCOPY.
Referenced by particle_edit_toggle_exec(), and PE_create_particle_edit().
static void recalc_lengths | ( | PTCacheEdit * | edit | ) | [static] |
Definition at line 1036 of file particle_edit.c.
References KEY_K, len_v3v3(), LOOP_EDITED_POINTS, and POINT_P.
Referenced by brush_edit_apply(), delete_exec(), PE_create_particle_edit(), rekey_exec(), and subdivide_exec().
static int rekey_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1947 of file particle_edit.c.
References data, PEData::dval, PEData::edit, foreach_selected_point(), NA_EDITED, NC_OBJECT, ND_PARTICLE, PEData::ob, OPERATOR_FINISHED, PE_set_data(), PE_update_object(), wmOperator::ptr, recalc_lengths(), rekey_particle(), RNA_int_get(), PEData::scene, PEData::totrekey, and WM_event_add_notifier().
Referenced by PARTICLE_OT_rekey().
static void rekey_particle | ( | PEData * | data, |
int | pa_index | ||
) | [static] |
Definition at line 1885 of file particle_edit.c.
References PTCacheEditKey::co, ParticleKey::co, HairKey::co, copy_v3_v3(), PEData::edit, PTCacheEditPoint::flag, ParticleSystem::flag, PTCacheEditKey::flag, ParticleData::flag, ParticleData::hair, PTCacheEditPoint::keys, MEM_callocN(), MEM_freeN(), PEData::ob, ParticleSimulationData::ob, PARS_REKEY, ParticleSystem::particles, PEK_SELECT, PEK_USE_WCO, PEP_EDIT_RECALC, PTCacheEdit::points, ParticleSimulationData::psys, PTCacheEdit::psys, psys_get_particle_on_path(), PSYS_GLOBAL_HAIR, PEData::scene, ParticleSimulationData::scene, state, PTCacheEditKey::time, ParticleKey::time, HairKey::time, PTCacheEditPoint::totkey, ParticleData::totkey, and PEData::totrekey.
Referenced by rekey_exec().
static void rekey_particle_to_time | ( | Scene * | scene, |
Object * | ob, | ||
int | pa_index, | ||
float | path_time | ||
) | [static] |
Definition at line 1983 of file particle_edit.c.
References PTCacheEditKey::co, ParticleKey::co, HairKey::co, copy_v3_v3(), ParticleData::flag, ParticleData::hair, PTCacheEditPoint::keys, MEM_dupallocN(), MEM_freeN(), ParticleSimulationData::ob, PARS_REKEY, ParticleSystem::particles, PE_get_current(), PTCacheEdit::points, ParticleSimulationData::psys, PTCacheEdit::psys, psys_get_particle_on_path(), ParticleSimulationData::scene, state, HairKey::time, PTCacheEditKey::time, ParticleKey::time, and ParticleData::totkey.
Referenced by brush_cut().
static int remove_doubles_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 2311 of file particle_edit.c.
References BKE_reportf(), BLI_kdtree_balance(), BLI_kdtree_find_n_nearest(), BLI_kdtree_free(), BLI_kdtree_insert(), BLI_kdtree_new(), co, copy_v3_v3(), CTX_data_active_object(), CTX_data_scene(), DAG_id_tag_update(), ParticleSystemModifierData::dm, ParticleSystem::edit, ParticleSystem::flag, ParticleSettings::from, Object::id, LOOP_SELECTED_POINTS, mul_m4_v3(), NA_EDITED, NC_OBJECT, ND_PARTICLE, NULL, OB_RECALC_DATA, OPERATOR_CANCELLED, OPERATOR_FINISHED, p, ParticleSystem::part, ParticleSystem::particles, PE_get_current(), PEP_TAG, POINT_P, PTCacheEdit::psys, psys_get_modifier(), PSYS_GLOBAL_HAIR, psys_mat_hair_to_object(), wmOperator::ptr, remove_tagged_particles(), wmOperator::reports, RNA_float_get(), RPT_INFO, ParticleSystem::totpart, and WM_event_add_notifier().
Referenced by PARTICLE_OT_remove_doubles().
static void remove_tagged_keys | ( | Object * | ob, |
ParticleSystem * | psys | ||
) | [static] |
Definition at line 2109 of file particle_edit.c.
References PTCacheEditKey::co, HairKey::co, copy_v3_v3(), ParticleSystemModifierData::dm, ParticleSystem::edit, HairKey::editflag, PTCacheEditKey::flag, PTCacheEditKey::ftime, ParticleData::hair, KEY_K, PTCacheEditKey::length, LOOP_KEYS, LOOP_POINTS, LOOP_TAGGED_KEYS, MEM_callocN(), MEM_freeN(), NULL, p, ParticleSystem::particles, PE_mirror_particle(), pe_x_mirror(), PEK_TAG, PEP_EDIT_RECALC, PEP_TAG, POINT_P, psys_get_modifier(), remove_tagged_particles(), PTCacheEditKey::time, HairKey::time, ParticleData::totkey, HairKey::weight, and PTCacheEditKey::world_co.
Referenced by delete_exec().
static int remove_tagged_particles | ( | Object * | ob, |
ParticleSystem * | psys, | ||
int | mirror | ||
) | [static] |
Definition at line 2031 of file particle_edit.c.
References ParticleSystem::child, ParticleSystemModifierData::dm, ParticleSystem::edit, ELEM, i, LOOP_TAGGED_POINTS, MEM_callocN(), MEM_freeN(), PTCacheEdit::mirror_cache, NULL, p, ParticleSystem::particles, PE_mirror_particle(), PEP_TAG, POINT_P, PTCacheEdit::points, psys_get_modifier(), ParticleSystem::totchild, ParticleSystem::totpart, and PTCacheEdit::totpoint.
Referenced by brush_edit_apply(), delete_exec(), remove_doubles_exec(), and remove_tagged_keys().
static int reveal_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 1727 of file particle_edit.c.
References CTX_data_active_object(), CTX_data_scene(), KEY_K, LOOP_KEYS, LOOP_POINTS, NA_SELECTED, NC_OBJECT, ND_PARTICLE, OPERATOR_FINISHED, PE_get_current(), PE_update_selection(), PEK_SELECT, PEP_EDIT_RECALC, PEP_HIDE, POINT_P, and WM_event_add_notifier().
Referenced by PARTICLE_OT_reveal().
static void select_key | ( | PEData * | data, |
int | point_index, | ||
int | key_index | ||
) | [static] |
Definition at line 1265 of file particle_edit.c.
References PEData::edit, PTCacheEditPoint::flag, PTCacheEditKey::flag, PTCacheEditPoint::keys, PEK_SELECT, PEP_EDIT_RECALC, PTCacheEdit::points, and PEData::select.
Referenced by PE_border_select(), and PE_circle_select().
static void select_keys | ( | PEData * | data, |
int | point_index, | ||
int | UNUSEDkey_index | ||
) | [static] |
Definition at line 1279 of file particle_edit.c.
References PEData::edit, PTCacheEditPoint::flag, KEY_K, LOOP_KEYS, PEK_SELECT, PEP_EDIT_RECALC, PTCacheEdit::points, and PEData::select.
Referenced by select_linked_exec().
static int select_less_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 1795 of file particle_edit.c.
References data, foreach_point(), NA_SELECTED, NC_OBJECT, ND_PARTICLE, PEData::ob, OPERATOR_FINISHED, PE_set_data(), PE_update_selection(), PEData::scene, select_less_keys(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_select_less().
static void select_less_keys | ( | PEData * | data, |
int | point_index | ||
) | [static] |
Definition at line 1766 of file particle_edit.c.
References PEData::edit, PTCacheEditPoint::flag, KEY_K, LOOP_KEYS, LOOP_SELECTED_KEYS, PEK_SELECT, PEK_TAG, PEP_EDIT_RECALC, PTCacheEdit::points, and PTCacheEditPoint::totkey.
Referenced by select_less_exec().
static int select_linked_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1492 of file particle_edit.c.
References data, for_mouse_hit_keys(), PEData::mval, NA_SELECTED, NC_OBJECT, ND_PARTICLE, PEData::ob, OPERATOR_FINISHED, PE_set_view3d_data(), PE_update_selection(), wmOperator::ptr, PEData::rad, RNA_boolean_get(), RNA_int_get_array(), PEData::scene, PEData::select, select_keys(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_select_linked(), and select_linked_invoke().
static int select_linked_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 1514 of file particle_edit.c.
References wmEvent::mval, wmOperator::ptr, RNA_int_set_array(), and select_linked_exec().
Referenced by PARTICLE_OT_select_linked().
static int select_more_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 1856 of file particle_edit.c.
References data, foreach_point(), NA_SELECTED, NC_OBJECT, ND_PARTICLE, PEData::ob, OPERATOR_FINISHED, PE_set_data(), PE_update_selection(), PEData::scene, select_more_keys(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_select_more().
static void select_more_keys | ( | PEData * | data, |
int | point_index | ||
) | [static] |
Definition at line 1824 of file particle_edit.c.
References PEData::edit, PTCacheEditPoint::flag, KEY_K, LOOP_KEYS, PEK_SELECT, PEK_TAG, PEP_EDIT_RECALC, PTCacheEdit::points, and PTCacheEditPoint::totkey.
Referenced by select_more_exec().
static void select_root | ( | PEData * | data, |
int | point_index | ||
) | [static] |
Definition at line 1414 of file particle_edit.c.
References PEData::edit, PTCacheEditKey::flag, PTCacheEditPoint::flag, PTCacheEditPoint::keys, PEK_SELECT, PEP_EDIT_RECALC, PEP_HIDE, and PTCacheEdit::points.
Referenced by select_roots_exec().
static int select_roots_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 1423 of file particle_edit.c.
References data, foreach_point(), NA_SELECTED, NC_OBJECT, ND_PARTICLE, PEData::ob, OPERATOR_FINISHED, PE_set_data(), PE_update_selection(), PEData::scene, select_root(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_select_roots().
static void select_tip | ( | PEData * | data, |
int | point_index | ||
) | [static] |
Definition at line 1452 of file particle_edit.c.
References PEData::edit, PTCacheEditKey::flag, PTCacheEditPoint::flag, PTCacheEditPoint::keys, PEK_SELECT, PEP_EDIT_RECALC, PEP_HIDE, PTCacheEdit::points, and PTCacheEditPoint::totkey.
Referenced by select_tips_exec().
static int select_tips_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 1463 of file particle_edit.c.
References data, foreach_point(), NA_SELECTED, NC_OBJECT, ND_PARTICLE, PEData::ob, OPERATOR_FINISHED, PE_set_data(), PE_update_selection(), PEData::scene, select_tip(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_select_tips().
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] |
Definition at line 2505 of file particle_edit.c.
References PEData::edit, PTCacheEditKey::flag, PTCacheEditPoint::keys, PEK_TAG, and PTCacheEdit::points.
Referenced by delete_exec().
static int subdivide_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 2281 of file particle_edit.c.
References data, PEData::edit, foreach_point(), NA_EDITED, NC_OBJECT, ND_PARTICLE, PEData::ob, OPERATOR_FINISHED, PE_set_data(), PE_update_object(), recalc_lengths(), PEData::scene, subdivide_particle(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_subdivide().
static void subdivide_particle | ( | PEData * | data, |
int | pa_index | ||
) | [static] |
Definition at line 2200 of file particle_edit.c.
References ParticleKey::co, HairKey::co, PTCacheEditKey::co, copy_v3_v3(), PEData::edit, PTCacheEditPoint::flag, ParticleSystem::flag, ParticleData::flag, PTCacheEditKey::flag, ParticleData::hair, PTCacheEditPoint::keys, MEM_callocN(), MEM_freeN(), PEData::ob, ParticleSimulationData::ob, PARS_REKEY, ParticleSystem::particles, PEK_SELECT, PEK_USE_WCO, PEP_EDIT_RECALC, PTCacheEdit::points, ParticleSimulationData::psys, PTCacheEdit::psys, psys_get_particle_on_path(), PSYS_GLOBAL_HAIR, PEData::scene, ParticleSimulationData::scene, state, ParticleKey::time, PTCacheEditKey::time, HairKey::time, PTCacheEditPoint::totkey, and ParticleData::totkey.
Referenced by subdivide_exec().
static void toggle_key_select | ( | PEData * | data, |
int | point_index, | ||
int | key_index | ||
) | [static] |
Definition at line 1295 of file particle_edit.c.
References PEData::edit, PTCacheEditPoint::flag, PTCacheEditKey::flag, PTCacheEditPoint::keys, PEK_SELECT, PEP_EDIT_RECALC, and PTCacheEdit::points.
Referenced by PE_mouse_particles().
static void toggle_particle_cursor | ( | bContext * | C, |
int | enable | ||
) | [static] |
Definition at line 2477 of file particle_edit.c.
References brush_drawcursor(), CTX_data_scene(), CTX_wm_manager(), NULL, ParticleEditSettings::paintcursor, PE_poll_view3d(), PE_settings(), WM_paint_cursor_activate(), and WM_paint_cursor_end().
Referenced by particle_edit_toggle_exec().
static void update_velocities | ( | PTCacheEdit * | edit | ) | [static] |
Definition at line 1161 of file particle_edit.c.
References co, PTCacheID::flag, KEY_K, PTCacheEditPoint::keys, LOOP_EDITED_POINTS, LOOP_KEYS, madd_v3_v3fl(), mul_v3_fl(), PTCacheEdit::pid, POINT_P, PTCacheEdit::points, project_v3_v3v3(), PTCacheEdit::psys, PTCACHE_VEL_PER_SEC, sub_v3_v3v3(), and PTCacheEditKey::vel.
Referenced by PE_update_object().
static void update_world_cos | ( | Object * | ob, |
PTCacheEdit * | edit | ||
) | [static] |
Definition at line 1140 of file particle_edit.c.
References copy_v3_v3(), ParticleSystemModifierData::dm, ParticleSystem::edit, ParticleSystem::flag, ParticleSettings::from, KEY_K, LOOP_KEYS, LOOP_POINTS, mul_m4_v3(), NULL, p, ParticleSystem::part, ParticleSystem::particles, POINT_P, PTCacheEdit::psys, psys_get_modifier(), PSYS_GLOBAL_HAIR, and psys_mat_hair_to_global().
Referenced by brush_edit_apply(), mirror_exec(), PE_create_particle_edit(), and PE_update_object().
static int weight_set_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 2401 of file particle_edit.c.
References ParticleEditSettings::brush, ParticleEditSettings::brushtype, CTX_data_active_object(), CTX_data_scene(), DAG_id_tag_update(), ParticleSystem::edit, ParticleData::hair, Object::id, interpf(), KEY_K, LOOP_SELECTED_KEYS, LOOP_SELECTED_POINTS, NA_EDITED, NC_OBJECT, ND_PARTICLE, OB_RECALC_DATA, OPERATOR_FINISHED, p, ParticleSystem::particles, PE_get_current(), PE_settings(), POINT_P, PTCacheEdit::psys, wmOperator::ptr, RNA_float_get(), ParticleBrushData::strength, HairKey::weight, and WM_event_add_notifier().
Referenced by PARTICLE_OT_weight_set().
EnumPropertyItem delete_type_items[] [static] |
{ {DEL_PARTICLE, "PARTICLE", 0, "Particle", ""}, {DEL_KEY, "KEY", 0, "Key", ""}, {0, NULL, 0, NULL, NULL}}
Definition at line 2493 of file particle_edit.c.