Blender
V3.3
|
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_view3d_types.h"
#include "BLI_kdtree.h"
#include "BLI_lasso_2d.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_rand.h"
#include "BLI_rect.h"
#include "BLI_task.h"
#include "BLI_utildefines.h"
#include "BKE_bvhutils.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_mesh.h"
#include "BKE_mesh_legacy_convert.h"
#include "BKE_mesh_runtime.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "DEG_depsgraph.h"
#include "ED_mesh.h"
#include "ED_object.h"
#include "ED_particle.h"
#include "ED_physics.h"
#include "ED_screen.h"
#include "ED_select_utils.h"
#include "ED_view3d.h"
#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
#include "GPU_state.h"
#include "UI_resources.h"
#include "WM_api.h"
#include "WM_message.h"
#include "WM_toolsystem.h"
#include "WM_types.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "DEG_depsgraph_query.h"
#include "PIL_time_utildefines.h"
#include "physics_intern.h"
#include "particle_edit_utildefines.h"
Go to the source code of this file.
Classes | |
struct | PEData |
struct | KeyIterData |
struct | DeflectEmitterIter |
struct | ApplyLengthsIterData |
struct | IterateLengthsIterData |
struct | NearestParticleData |
struct | BrushAddCountIterData |
struct | BrushAddCountIterTLSData |
struct | BrushEdit |
struct | PointInsideBVH |
Select Random Operator | |
enum | { RAN_HAIR , RAN_POINTS } |
static const EnumPropertyItem | select_random_type_items [] |
static int | select_random_exec (bContext *C, wmOperator *op) |
void | PARTICLE_OT_select_random (wmOperatorType *ot) |
Delete Operator | |
enum | { DEL_PARTICLE , DEL_KEY } |
static const EnumPropertyItem | delete_type_items [] |
static void | set_delete_particle (PEData *data, int pa_index) |
static void | set_delete_particle_key (PEData *data, int pa_index, int key_index, bool UNUSED(is_inside)) |
static int | delete_exec (bContext *C, wmOperator *op) |
void | PARTICLE_OT_delete (wmOperatorType *ot) |
Common Struct Passed to Callbacks | |
typedef struct PEData | PEData |
static void | PE_set_data (bContext *C, PEData *data) |
static void | PE_set_view3d_data (bContext *C, PEData *data) |
static bool | PE_create_shape_tree (PEData *data, Object *shapeob) |
static void | PE_free_shape_tree (PEData *data) |
static void | PE_create_random_generator (PEData *data) |
static void | PE_free_random_generator (PEData *data) |
static void | PE_data_free (PEData *data) |
Brush Edit Callbacks | |
typedef struct BrushAddCountIterData | BrushAddCountIterData |
typedef struct BrushAddCountIterTLSData | BrushAddCountIterTLSData |
static void | brush_comb (PEData *data, float UNUSED(mat[4][4]), float imat[4][4], int point_index, int key_index, PTCacheEditKey *key, float mouse_distance) |
static void | brush_cut (PEData *data, int pa_index) |
static void | brush_length (PEData *data, int point_index, float UNUSED(mouse_distance)) |
static void | brush_puff (PEData *data, int point_index, float mouse_distance) |
static void | BKE_brush_weight_get (PEData *data, float UNUSED(mat[4][4]), float UNUSED(imat[4][4]), int point_index, int key_index, PTCacheEditKey *UNUSED(key), float UNUSED(mouse_distance)) |
static void | brush_smooth_get (PEData *data, float mat[4][4], float UNUSED(imat[4][4]), int UNUSED(point_index), int key_index, PTCacheEditKey *key, float UNUSED(mouse_distance)) |
static void | brush_smooth_do (PEData *data, float UNUSED(mat[4][4]), float imat[4][4], int point_index, int key_index, PTCacheEditKey *key, float UNUSED(mouse_distance)) |
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_mesh (Depsgraph *depsgraph, Scene *UNUSED(scene), Object *ob, Mesh *mesh, 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 | brush_add_count_iter (void *__restrict iter_data_v, const int iter, const TaskParallelTLS *__restrict tls_v) |
static void | brush_add_count_iter_reduce (const void *__restrict UNUSED(userdata), void *__restrict join_v, void *__restrict chunk_v) |
static void | brush_add_count_iter_free (const void *__restrict UNUSED(userdata_v), void *__restrict chunk_v) |
static int | brush_add (const bContext *C, PEData *data, short number) |
Brush Edit Operator | |
typedef struct BrushEdit | BrushEdit |
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, const wmEvent *event) |
static int | brush_edit_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
static int | brush_edit_modal (bContext *C, wmOperator *op, const wmEvent *event) |
static void | brush_edit_cancel (bContext *UNUSED(C), wmOperator *op) |
static bool | brush_edit_poll (bContext *C) |
void | PARTICLE_OT_brush_edit (wmOperatorType *ot) |
Cut Shape | |
typedef struct PointInsideBVH | PointInsideBVH |
static bool | shape_cut_poll (bContext *C) |
static void | point_inside_bvh_cb (void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit) |
static bool | shape_cut_test_point (PEData *data, ParticleEditSettings *pset, ParticleCacheKey *key) |
static void | shape_cut (PEData *data, int pa_index) |
static int | shape_cut_exec (bContext *C, wmOperator *UNUSED(op)) |
void | PARTICLE_OT_shape_cut (wmOperatorType *ot) |
typedef struct ApplyLengthsIterData ApplyLengthsIterData |
typedef struct BrushAddCountIterData BrushAddCountIterData |
typedef struct BrushAddCountIterTLSData BrushAddCountIterTLSData |
typedef struct DeflectEmitterIter DeflectEmitterIter |
typedef void(* ForHitKeyMatFunc) (PEData *data, float mat[4][4], float imat[4][4], int point_index, int key_index, PTCacheEditKey *key, float mouse_distance) |
Definition at line 703 of file particle_edit.c.
typedef void(* ForHitPointFunc) (PEData *data, int point_index, float mouse_distance) |
Definition at line 693 of file particle_edit.c.
Definition at line 695 of file particle_edit.c.
typedef void(* ForKeyMatFunc) (PEData *data, const float mat[4][4], const float imat[4][4], int point_index, int key_index, PTCacheEditKey *key) |
Definition at line 697 of file particle_edit.c.
typedef void(* ForPointFunc) (PEData *data, int point_index) |
Definition at line 692 of file particle_edit.c.
typedef struct IterateLengthsIterData IterateLengthsIterData |
typedef struct KeyIterData KeyIterData |
typedef struct PointInsideBVH PointInsideBVH |
anonymous enum |
Enumerator | |
---|---|
RAN_HAIR | |
RAN_POINTS |
Definition at line 2090 of file particle_edit.c.
anonymous enum |
Enumerator | |
---|---|
DEL_PARTICLE | |
DEL_KEY |
Definition at line 3430 of file particle_edit.c.
enum eParticleSelectFlag |
Enumerator | |
---|---|
PSEL_NEAREST | |
PSEL_ALL_KEYS |
Definition at line 711 of file particle_edit.c.
|
static |
Definition at line 1291 of file particle_edit.c.
References add_v3_v3v3(), PTCacheEditKey::co, ApplyLengthsIterData::edit, blender::math::length(), LOOP_KEYS, mul_v3_fl(), normalize_v3(), PEP_EDIT_RECALC, point, PTCacheEdit::points, and sub_v3_v3v3().
Referenced by PE_apply_lengths().
|
static |
Definition at line 4043 of file particle_edit.c.
References data, PEData::edit, ParticleData::hair, ParticleSystem::particles, PEP_EDIT_RECALC, point_index, PTCacheEdit::psys, and HairKey::weight.
Referenced by brush_edit_apply().
Definition at line 4393 of file particle_edit.c.
References BrushAddCountIterData::add_pars, add_v3_v3(), add_v3_v3v3(), BLI_assert, BLI_parallel_range_settings_defaults(), BLI_rng_free(), BLI_rng_new_srandom(), BLI_task_parallel_range(), ParticleEditSettings::brush, brush_add_count_iter(), brush_add_count_iter_free(), brush_add_count_iter_reduce(), C, PTCacheEditKey::co, HairKey::co, ParticleKey::co, copy_m4_m4(), CTX_data_depsgraph_pointer(), data, BrushAddCountIterData::data, Mesh_Runtime::deformed_only, ParticleSimulationData::depsgraph, depsgraph, BrushAddCountIterData::depsgraph, DMCACHE_NOTFOUND, PTCacheEditKey::flag, ParticleSystem::flag, ParticleEditSettings::flag, float(), ParticleData::foffset, ParticleSettings::from, TaskParallelSettings::func_free, TaskParallelSettings::func_reduce, ParticleData::fuv, ParticleData::hair, BrushAddCountIterData::imat, init_particle(), invert_m4_m4(), ParticleData::lifetime, madd_v3_v3v3fl(), MEM_callocN, MEM_freeN, MEM_SAFE_FREE, mesh, BrushAddCountIterData::mesh, ParticleSystemModifierData::mesh_final, ParticleSystemModifierData::mesh_original, MIN2, PTCacheEdit::mirror_cache, mul_m4_v3(), mul_v3_fl(), NULL, ParticleData::num, BrushAddCountIterTLSData::num_added, ParticleData::num_dmcache, BrushAddCountIterData::number, ParticleSimulationData::ob, BrushAddCountIterData::object, Object::obmat, ParticleSystem::part, ParticleSystem::particles, PE_BRUSH_ADD, PE_INTERPOLATE_ADDED, PE_settings(), pe_x_mirror(), PEK_USE_WCO, PEP_EDIT_RECALC, PEP_TAG, point, PTCacheEdit::points, pow(), ParticleSimulationData::psmd, PTCacheEdit::psmd_eval, ParticleSimulationData::psys, PTCacheEdit::psys, psys_get_particle_on_path(), psys_get_timestep(), PSYS_GLOBAL_HAIR, psys_mat_hair_to_global(), psys_particle_on_dm(), reset_particle(), Mesh::runtime, ParticleSimulationData::scene, scene, BrushAddCountIterData::scene, ParticleSystem::seed, size(), BrushAddCountIterData::size, ParticleData::size, ParticleBrushData::size, ParticleData::state, sub_v3_v3v3(), PTCacheEditKey::time, HairKey::time, ParticleKey::time, ParticleData::time, ParticleEditSettings::totaddkey, ParticleData::totkey, ParticleSystem::totpart, PTCacheEdit::totpoint, tree, ParticleSettings::use_modifier_stack, TaskParallelSettings::userdata_chunk, TaskParallelSettings::userdata_chunk_size, ParticleKey::vel, w(), and HairKey::weight.
Referenced by brush_edit_apply().
|
static |
Definition at line 4291 of file particle_edit.c.
References BrushAddCountIterData::add_pars, BLI_assert, BLI_rng_get_float(), BLI_rng_new_srandom(), BLI_task_parallel_thread_id(), data, BrushAddCountIterData::data, Mesh_Runtime::deformed_only, depsgraph, BrushAddCountIterData::depsgraph, DMCACHE_ISCHILD, DMCACHE_NOTFOUND, ED_view3d_win_to_segment_clipped(), ParticleData::fuv, BrushAddCountIterData::imat, BrushAddCountIterData::mesh, ParticleSystemModifierData::mesh_final, ParticleSystemModifierData::mesh_original, mul_m4_v3(), NULL, ParticleData::num, BrushAddCountIterTLSData::num_added, ParticleData::num_dmcache, BrushAddCountIterData::number, BrushAddCountIterData::object, ParticleSystem::part, particle_intersect_mesh(), PTCacheEdit::psmd_eval, PTCacheEdit::psys, psys_particle_dm_face_lookup(), BrushAddCountIterTLSData::rng, Mesh::runtime, BrushAddCountIterData::scene, ParticleSystem::seed, size(), BrushAddCountIterData::size, and ParticleSettings::use_modifier_stack.
Referenced by brush_add().
|
static |
Definition at line 4384 of file particle_edit.c.
References BLI_rng_free(), NULL, and BrushAddCountIterTLSData::rng.
Referenced by brush_add().
|
static |
Definition at line 4375 of file particle_edit.c.
References BrushAddCountIterTLSData::num_added.
Referenced by brush_add().
|
static |
Definition at line 3723 of file particle_edit.c.
References add_v3_v3(), PTCacheEditKey::co, copy_v3_v3(), data, ParticleEditSettings::flag, float(), mul_mat3_m4_v3(), mul_v3_fl(), PE_LOCK_FIRST, PE_settings(), PEP_EDIT_RECALC, point_index, and pow().
Referenced by brush_edit_apply().
Definition at line 3748 of file particle_edit.c.
References BLI_assert, BLI_rng_get_float(), ParticleCacheKey::co, data, ParticleEditSettings::draw_step, ED_view3d_project_int_global(), PEData::edit, PTCacheEditPoint::flag, float(), key_test_depth(), NULL, PEData::ob, PTCacheEdit::pathcache, PE_settings(), PEP_EDIT_RECALC, PEP_HIDE, PEP_TAG, PTCacheEdit::points, pow(), rekey_particle_to_time(), sqrtf, v1, V3D_PROJ_RET_OK, and V3D_PROJ_TEST_CLIP_NEAR.
Referenced by brush_edit_apply().
Definition at line 3380 of file particle_edit.c.
References ParticleEditSettings::brush, ParticleEditSettings::brushtype, C, CTX_data_scene(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_smooth(), GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), imm_draw_circle_wire_2d(), immBindBuiltinProgram(), immUnbindProgram(), immUniformColor4ub(), immVertexFormat(), pe_brush_size_get(), PE_settings(), pos, scene, WM_toolsystem_active_tool_is_brush(), x, and y.
Referenced by toggle_particle_cursor().
|
static |
Definition at line 4720 of file particle_edit.c.
References BKE_brush_weight_get(), BKE_particle_batch_cache_dirty_tag(), BKE_PARTICLE_BATCH_DIRTY_ALL, ParticleEditSettings::brush, brush_add(), brush_comb(), brush_cut(), brush_length(), brush_puff(), brush_smooth_do(), brush_smooth_get(), ParticleEditSettings::brushtype, C, ParticleBrushData::count, count_selected_keys(), CTX_data_depsgraph_pointer(), CTX_wm_region(), wmOperator::customdata, data, BrushEdit::data, DEG_id_tag_update(), depsgraph, ED_view3d_win_to_delta(), BrushEdit::edit, ELEM, fabsf, BrushEdit::first, ParticleSystem::flag, ParticleEditSettings::flag, float(), foreach_mouse_hit_key(), foreach_mouse_hit_point(), foreach_point(), foreach_selected_point(), ParticleSettings::from, Object::id, ID_RECALC_GEOMETRY, ID_RECALC_PSYS_REDO, Object::imat, ParticleBrushData::invert, invert_m4_m4(), BrushEdit::lastmouse, max_ff(), ParticleSystemModifierData::mesh_final, mul_v3_fl(), NA_EDITED, NC_OBJECT, ND_MODIFIER, ND_PARTICLE, NULL, BrushEdit::ob, 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_size_get(), 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::psmd_eval, PTCacheEdit::psys, psys_free_path_cache(), PSYS_GLOBAL_HAIR, recalc_lengths(), remove_tagged_particles(), RNA_boolean_get(), RNA_float_get_array(), scene, BrushEdit::scene, sqrtf, ParticleBrushData::step, ParticleBrushData::strength, update_world_cos(), view3d_operator_needs_opengl(), WM_event_add_notifier(), and BrushEdit::zfac.
Referenced by brush_edit_apply_event(), and brush_edit_exec().
|
static |
Definition at line 4979 of file particle_edit.c.
References brush_edit_apply(), C, copy_v2fl_v2i(), KM_SHIFT, wmEvent::modifier, wmEvent::mval, wmOperator::ptr, RNA_boolean_set(), RNA_collection_add(), and RNA_float_set_array().
Referenced by brush_edit_invoke(), and brush_edit_modal().
|
static |
Definition at line 5028 of file particle_edit.c.
References brush_edit_exit().
Referenced by PARTICLE_OT_brush_edit().
|
static |
Definition at line 4963 of file particle_edit.c.
References brush_edit_apply(), brush_edit_exit(), brush_edit_init(), C, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_BEGIN, and RNA_END.
Referenced by PARTICLE_OT_brush_edit().
|
static |
Definition at line 4955 of file particle_edit.c.
References wmOperator::customdata, BrushEdit::data, MEM_freeN, and PE_data_free().
Referenced by brush_edit_cancel(), brush_edit_exec(), and brush_edit_modal().
|
static |
Definition at line 4686 of file particle_edit.c.
References C, CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_region(), wmOperator::customdata, BrushEdit::data, depsgraph, ED_view3d_calc_zfac(), BrushEdit::edit, BrushEdit::first, INIT_MINMAX, max, MEM_callocN, mid_v3_v3v3(), min, BrushEdit::ob, PE_create_random_generator(), PE_get_current(), PE_minmax(), PE_set_view3d_data(), ARegion::regiondata, scene, BrushEdit::scene, BrushEdit::view_layer, and BrushEdit::zfac.
Referenced by brush_edit_exec(), and brush_edit_invoke().
|
static |
Definition at line 4996 of file particle_edit.c.
References brush_edit_apply_event(), brush_edit_init(), C, OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, and WM_event_add_modal_handler().
Referenced by PARTICLE_OT_brush_edit().
|
static |
Definition at line 5009 of file particle_edit.c.
References brush_edit_apply_event(), brush_edit_exit(), C, KM_RELEASE, LEFTMOUSE, MIDDLEMOUSE, MOUSEMOVE, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, RIGHTMOUSE, wmEvent::type, and wmEvent::val.
Referenced by PARTICLE_OT_brush_edit().
Definition at line 5033 of file particle_edit.c.
References C, PE_poll_view3d(), and WM_toolsystem_active_tool_is_brush().
Referenced by PARTICLE_OT_brush_edit().
Definition at line 3854 of file particle_edit.c.
References add_v3_v3v3(), copy_v3_v3(), data, PEData::dvec, PEData::edit, KEY_K, LOOP_KEYS, mul_v3_fl(), PEP_EDIT_RECALC, point, point_index, PTCacheEdit::points, and sub_v3_v3v3().
Referenced by brush_edit_apply().
Definition at line 3876 of file particle_edit.c.
References add_v3_v3(), ParticleEditSettings::brush, ParticleEditSettings::brushtype, copy_v3_v3(), cross_v3_v3v3(), data, dist_ensure_v3_v3fl(), PEData::edit, PTCacheEdit::emitter_cosnos, PTCacheEdit::emitter_field, ParticleSystem::flag, ParticleBrushData::flag, float(), ParticleSettings::from, invert_m4_m4(), is_zero_v3(), KEY_K, len_v3(), len_v3v3(), blender::math::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, ParticleSystem::part, ParticleSystem::particles, PE_BRUSH_DATA_PUFF_VOLUME, PE_settings(), PEK_HIDE, PEK_SELECT, PEP_EDIT_RECALC, point, point_index, PTCacheEdit::points, pow(), PTCacheEdit::psys, PSYS_GLOBAL_HAIR, psys_mat_hair_to_global(), sub_v3_v3v3(), unit_m4(), and zero_v3().
Referenced by brush_edit_apply().
|
static |
Definition at line 4081 of file particle_edit.c.
References add_v3_v3(), PTCacheEditKey::co, copy_v3_v3(), data, PEData::dvec, mul_mat3_m4_v3(), mul_v3_fl(), PEP_EDIT_RECALC, point_index, sub_v3_v3v3(), and PEData::vec.
Referenced by brush_edit_apply().
|
static |
Definition at line 4063 of file particle_edit.c.
References add_v3_v3(), PTCacheEditKey::co, data, PEData::dvec, mul_mat3_m4_v3(), and sub_v3_v3v3().
Referenced by brush_edit_apply().
|
static |
Definition at line 5608 of file particle_edit.c.
References calculate_point_length(), LOOP_SELECTED_POINTS, point, and POINT_P.
Referenced by unify_length_exec().
|
static |
Definition at line 5596 of file particle_edit.c.
References PTCacheEditKey::co, KEY_K, len_v3v3(), blender::math::length(), and LOOP_KEYS.
Referenced by calculate_average_length(), and scale_point_to_length().
|
static |
Definition at line 5542 of file particle_edit.c.
References BKE_particle_batch_cache_dirty_tag(), BKE_PARTICLE_BATCH_DIRTY_ALL, C, CTX_data_active_object(), DEG_id_tag_update(), ParticleSystem::edit, PTCacheEdit::edited, ParticleSystem::flag, ParticleSystem::free_edit, Object::id, ID_RECALC_GEOMETRY, ID_RECALC_PSYS_RESET, NA_EDITED, NC_OBJECT, ND_PARTICLE, NULL, OPERATOR_FINISHED, PE_free_ptcache_edit(), PSYS_EDITED, psys_get_current(), PSYS_GLOBAL_HAIR, psys_reset(), PSYS_RESET_DEPSGRAPH, ParticleSystem::recalc, and WM_event_add_notifier().
Referenced by PARTICLE_OT_edited_clear().
|
static |
Definition at line 937 of file particle_edit.c.
References KEY_K, LOOP_SELECTED_KEYS, LOOP_VISIBLE_POINTS, PE_settings(), PEK_SELECT, point, POINT_P, SCE_SELECT_END, SCE_SELECT_POINT, scene, and ParticleEditSettings::selectmode.
Referenced by brush_edit_apply(), and shape_cut_exec().
|
static |
Definition at line 1189 of file particle_edit.c.
References add_v3_v3(), PTCacheEditKey::co, copy_v3_v3(), DeflectEmitterIter::dist, blender::math::dot(), dot_v3v3(), DeflectEmitterIter::edit, PTCacheEdit::emitter_cosnos, PTCacheEdit::emitter_field, DeflectEmitterIter::emitterdist, ParticleSettings::from, invert_m4_m4(), len_v3v3(), LOOP_KEYS, ParticleSystemModifierData::mesh_final, mul_m4_v3(), mul_v3_fl(), nor, normalize_v3(), NULL, DeflectEmitterIter::object, ParticleSystem::part, ParticleSystem::particles, PEP_EDIT_RECALC, point, PTCacheEdit::points, PTCacheEdit::psmd_eval, DeflectEmitterIter::psys, psys_mat_hair_to_object(), and sub_v3_v3v3().
Referenced by pe_deflect_emitter().
|
static |
Definition at line 3455 of file particle_edit.c.
References BKE_particle_batch_cache_dirty_tag(), BKE_PARTICLE_BATCH_DIRTY_ALL, C, data, DEG_id_tag_update(), DEL_KEY, DEL_PARTICLE, foreach_selected_key(), foreach_selected_point(), ID_RECALC_GEOMETRY, NA_EDITED, NC_OBJECT, ND_PARTICLE, OPERATOR_FINISHED, PE_set_data(), pe_x_mirror(), wmOperator::ptr, recalc_lengths(), remove_tagged_keys(), remove_tagged_particles(), RNA_enum_get(), set_delete_particle(), set_delete_particle_key(), type, and WM_event_add_notifier().
Referenced by PARTICLE_OT_delete().
Definition at line 5467 of file particle_edit.c.
References C, CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), depsgraph, ED_object_particle_edit_mode_enter_ex(), and scene.
Definition at line 5438 of file particle_edit.c.
References BKE_modifiers_findby_name(), BKE_scene_graph_evaluated_ensure(), DEG_get_evaluated_object(), DEG_id_tag_update(), depsgraph, G_MAIN, Object::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_GEOMETRY, Object::mode, ParticleSystemModifierData::modifier, ModifierData::name, NC_SCENE, ND_MODE, NS_MODE_PARTICLE, NULL, OB_MODE_PARTICLE_EDIT, PE_create_current(), PTCacheEdit::psmd, PTCacheEdit::psmd_eval, PTCacheEdit::psys, recalc_emitter_field(), scene, toggle_particle_cursor(), and WM_main_add_notifier().
Referenced by ED_object_particle_edit_mode_enter(), particle_edit_toggle_exec(), and particle_undosys_step_decode().
Definition at line 5485 of file particle_edit.c.
References C, CTX_data_active_object(), CTX_data_scene(), ED_object_particle_edit_mode_exit_ex(), and scene.
Definition at line 5475 of file particle_edit.c.
References DEG_id_tag_update(), free_all_psys_edit(), Object::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_GEOMETRY, Object::mode, NC_SCENE, ND_MODE, NS_MODE_OBJECT, NULL, OB_MODE_PARTICLE_EDIT, scene, toggle_particle_cursor(), and WM_main_add_notifier().
Referenced by ed_object_mode_generic_exit_ex(), ED_object_particle_edit_mode_exit(), and particle_edit_toggle_exec().
Definition at line 5432 of file particle_edit.c.
References BKE_modifiers_findby_type(), eModifierType_Cloth, eModifierType_Softbody, ListBase::first, and Object::particlesystem.
Referenced by ED_object_mode_compat_test(), and particle_edit_toggle_poll().
|
static |
Definition at line 716 of file particle_edit.c.
References data, is_inside(), key_inside_circle(), key_inside_test(), KEY_K, KEY_WCO, LOOP_VISIBLE_KEYS, LOOP_VISIBLE_POINTS, PE_settings(), point, POINT_P, PSEL_ALL_KEYS, PSEL_NEAREST, SCE_SELECT_END, SCE_SELECT_PATH, and ParticleEditSettings::selectmode.
Referenced by PE_box_select(), PE_circle_select(), pe_nearest_point_and_key(), and select_linked_pick_exec().
|
static |
Definition at line 884 of file particle_edit.c.
References BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), data, KeyIterData::data, KeyIterData::edit, foreach_mouse_hit_key_iter(), KeyIterData::func, PE_settings(), SCE_SELECT_PATH, KeyIterData::selected, ParticleEditSettings::selectmode, and PTCacheEdit::totpoint.
Referenced by brush_edit_apply().
|
static |
Definition at line 828 of file particle_edit.c.
References data, KeyIterData::data, KeyIterData::edit, PTCacheEditKey::flag, ParticleSystem::flag, ParticleSettings::from, KeyIterData::func, invert_m4_m4(), key_inside_circle(), KEY_WCO, LOOP_VISIBLE_KEYS, ParticleSystemModifierData::mesh_final, ParticleSystem::part, ParticleSystem::particles, PE_settings(), PEK_SELECT, PEP_HIDE, point, PTCacheEdit::points, PTCacheEdit::psmd_eval, PTCacheEdit::psys, PSYS_GLOBAL_HAIR, psys_mat_hair_to_global(), SCE_SELECT_END, KeyIterData::selected, ParticleEditSettings::selectmode, and unit_m4().
Referenced by foreach_mouse_hit_key().
|
static |
Definition at line 780 of file particle_edit.c.
References data, key_inside_circle(), KEY_K, KEY_WCO, LOOP_VISIBLE_KEYS, LOOP_VISIBLE_POINTS, PE_settings(), PEK_SELECT, point, POINT_P, SCE_SELECT_END, SCE_SELECT_PATH, and ParticleEditSettings::selectmode.
Referenced by brush_edit_apply().
|
static |
Definition at line 927 of file particle_edit.c.
References data, LOOP_POINTS, and POINT_P.
Referenced by brush_edit_apply(), select_less_exec(), select_more_exec(), select_roots_exec(), select_tips_exec(), shape_cut_exec(), and subdivide_exec().
|
static |
Definition at line 914 of file particle_edit.c.
References data, KEY_K, LOOP_SELECTED_KEYS, LOOP_VISIBLE_POINTS, and POINT_P.
Referenced by delete_exec(), and select_linked_exec().
|
static |
Definition at line 904 of file particle_edit.c.
References data, LOOP_SELECTED_POINTS, and POINT_P.
Referenced by brush_edit_apply(), delete_exec(), rekey_exec(), and shape_cut_exec().
Definition at line 5420 of file particle_edit.c.
References BLI_assert, ListBase::first, NULL, and Object::particlesystem.
Referenced by ED_object_particle_edit_mode_exit_ex().
|
static |
Definition at line 2490 of file particle_edit.c.
References C, CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), depsgraph, PEData::edit, KEY_K, LOOP_KEYS, LOOP_SELECTED_POINTS, LOOP_UNSELECTED_POINTS, NA_SELECTED, NC_OBJECT, ND_PARTICLE, PEData::ob, OPERATOR_FINISHED, PE_get_current(), PE_update_selection(), PEK_SELECT, PEP_EDIT_RECALC, PEP_HIDE, point, POINT_P, wmOperator::ptr, RNA_boolean_get(), scene, and WM_event_add_notifier().
Referenced by PARTICLE_OT_hide().
|
static |
Definition at line 4107 of file particle_edit.c.
References copy_v3_v3(), interp_weights_poly_v3(), v1, v2, and w().
Referenced by particle_intersect_mesh().
|
static |
Definition at line 1340 of file particle_edit.c.
References add_v3_v3(), add_v3_v3v3(), PTCacheEditKey::co, IterateLengthsIterData::edit, ParticleEditSettings::flag, float(), if(), PTCacheEditKey::length, blender::math::length(), mul(), mul_v3_fl(), normalize_v3(), PE_LOCK_FIRST, PEP_EDIT_RECALC, point, PTCacheEdit::points, IterateLengthsIterData::pset, and sub_v3_v3v3().
Referenced by pe_iterate_lengths().
|
static |
Definition at line 616 of file particle_edit.c.
References data, blender::math::distance(), ED_view3d_project_int_global(), key_test_depth(), sqrtf, V3D_PROJ_RET_OK, and V3D_PROJ_TEST_CLIP_WIN.
Referenced by for_mouse_hit_keys(), foreach_mouse_hit_key_iter(), foreach_mouse_hit_point(), and key_inside_test().
Definition at line 646 of file particle_edit.c.
References data, ED_view3d_project_int_global(), key_test_depth(), V3D_PROJ_RET_OK, and V3D_PROJ_TEST_CLIP_WIN.
Referenced by key_inside_test().
Definition at line 663 of file particle_edit.c.
References data, key_inside_circle(), key_inside_rect(), and NULL.
Referenced by for_mouse_hit_keys().
|
static |
Definition at line 575 of file particle_edit.c.
References BLI_assert, data, ViewDepths::depths, ED_view3d_project_int_global(), ED_view3d_project_v3(), ViewDepths::h, V3D_PROJ_RET_OK, V3D_PROJ_TEST_CLIP_BB, V3D_PROJ_TEST_CLIP_NEAR, V3D_PROJ_TEST_CLIP_WIN, ViewDepths::w, and XRAY_ENABLED.
Referenced by brush_cut(), key_inside_circle(), key_inside_rect(), and PE_lasso_select().
|
static |
Definition at line 3668 of file particle_edit.c.
References BKE_particle_batch_cache_dirty_tag(), BKE_PARTICLE_BATCH_DIRTY_ALL, C, CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), DEG_id_tag_update(), depsgraph, PEData::edit, Object::id, ID_RECALC_GEOMETRY, NA_EDITED, NC_OBJECT, ND_PARTICLE, NULL, PEData::ob, OPERATOR_FINISHED, PE_get_current(), PE_mirror_x(), PTCacheEdit::psys, psys_free_path_cache(), scene, update_world_cos(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_mirror().
Definition at line 3687 of file particle_edit.c.
References C, CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), depsgraph, PEData::edit, ParticleSettings::from, PEData::ob, ParticleSystem::part, PART_FROM_FACE, PE_get_current(), PE_hair_poll(), PTCacheEdit::psys, and scene.
Referenced by PARTICLE_OT_mirror().
|
static |
Definition at line 1833 of file particle_edit.c.
References data, NearestParticleData::key, point, point_index, PTCacheEdit::points, and user_data.
Referenced by pe_nearest_point_and_key().
|
static |
Definition at line 5492 of file particle_edit.c.
References C, CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_wm_message_bus(), depsgraph, ED_object_mode_compat_set(), ED_object_particle_edit_mode_enter_ex(), ED_object_particle_edit_mode_exit_ex(), Object::id, Object::mode, OB_MODE_PARTICLE_EDIT, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, scene, WM_msg_publish_rna_prop, and WM_toolsystem_update_from_context_view3d().
Referenced by PARTICLE_OT_particle_edit_toggle().
Definition at line 5406 of file particle_edit.c.
References C, CTX_data_active_object(), Object::data, ED_object_particle_edit_mode_supported(), ID_IS_LINKED, ID_IS_OVERRIDE_LIBRARY, NULL, OB_MESH, and Object::type.
Referenced by PARTICLE_OT_edited_clear(), and PARTICLE_OT_particle_edit_toggle().
|
static |
Check intersection with an evaluated mesh.
Definition at line 4125 of file particle_edit.c.
References BKE_mesh_tessface_ensure(), CD_MASK_BAREMESH, MVert::co, copy_v3_v3(), DEG_get_evaluated_object(), DEG_get_evaluated_scene(), depsgraph, DO_MINMAX, INIT_MINMAX, intersect(), intersect_dm_quad_weights(), isect_aabb_aabb_v3(), isect_line_segment_tri_v3(), isect_sweeping_sphere_tri_v3(), max, mesh, mesh_get_eval_deform(), mesh_get_eval_final(), Mesh::mface, min, minmax_v3v3_v3(), Mesh::mvert, NULL, PEData::ob, psys_disable_all(), psys_enable_all(), Mesh::totface, v1, MFace::v1, v2, MFace::v2, MFace::v3, and MFace::v4.
Referenced by brush_add_count_iter().
void PARTICLE_OT_brush_edit | ( | wmOperatorType * | ot | ) |
Definition at line 5038 of file particle_edit.c.
References brush_edit_cancel(), brush_edit_exec(), brush_edit_invoke(), brush_edit_modal(), brush_edit_poll(), wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_collection_runtime(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by operatortypes_particle().
void PARTICLE_OT_delete | ( | wmOperatorType * | ot | ) |
Definition at line 3480 of file particle_edit.c.
References DEL_PARTICLE, delete_exec(), delete_type_items, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, 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 5575 of file particle_edit.c.
References clear_edited_exec(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, particle_edit_toggle_poll(), and wmOperatorType::poll.
Referenced by operatortypes_particle().
void PARTICLE_OT_hide | ( | wmOperatorType * | ot | ) |
Definition at line 2527 of file particle_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, hide_exec(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, PE_poll(), wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by operatortypes_particle().
void PARTICLE_OT_mirror | ( | wmOperatorType * | ot | ) |
Definition at line 3702 of file particle_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, mirror_exec(), mirror_poll(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by operatortypes_particle().
void PARTICLE_OT_particle_edit_toggle | ( | wmOperatorType * | ot | ) |
Definition at line 5521 of file particle_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, particle_edit_toggle_exec(), particle_edit_toggle_poll(), and wmOperatorType::poll.
Referenced by operatortypes_particle().
void PARTICLE_OT_rekey | ( | wmOperatorType * | ot | ) |
Definition at line 2824 of file particle_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, PE_hair_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 3290 of file particle_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, PE_hair_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 2578 of file particle_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, PE_poll(), wmOperatorType::poll, reveal_exec(), RNA_def_boolean(), and wmOperatorType::srna.
Referenced by operatortypes_particle().
void PARTICLE_OT_select_all | ( | wmOperatorType * | ot | ) |
Definition at line 1805 of file particle_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, 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 2648 of file particle_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, PE_poll(), wmOperatorType::poll, and select_less_exec().
Referenced by operatortypes_particle().
void PARTICLE_OT_select_linked | ( | wmOperatorType * | ot | ) |
Definition at line 2195 of file particle_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, PE_poll(), wmOperatorType::poll, and select_linked_exec().
Referenced by operatortypes_particle().
void PARTICLE_OT_select_linked_pick | ( | wmOperatorType * | ot | ) |
Definition at line 2241 of file particle_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, PE_poll_view3d(), wmOperatorType::poll, RNA_def_boolean(), RNA_def_int_vector(), select_linked_pick_exec(), select_linked_pick_invoke(), and wmOperatorType::srna.
Referenced by operatortypes_particle().
void PARTICLE_OT_select_more | ( | wmOperatorType * | ot | ) |
Definition at line 2720 of file particle_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, PE_poll(), wmOperatorType::poll, and select_more_exec().
Referenced by operatortypes_particle().
void PARTICLE_OT_select_random | ( | wmOperatorType * | ot | ) |
Definition at line 2151 of file particle_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, PE_poll(), wmOperatorType::poll, wmOperatorType::prop, RAN_HAIR, RNA_def_enum(), select_random_exec(), select_random_type_items, wmOperatorType::srna, and WM_operator_properties_select_random().
Referenced by operatortypes_particle().
void PARTICLE_OT_select_roots | ( | wmOperatorType * | ot | ) |
Definition at line 1991 of file particle_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, PE_poll(), wmOperatorType::poll, SEL_SELECT, select_roots_exec(), and WM_operator_properties_select_action().
Referenced by operatortypes_particle().
void PARTICLE_OT_select_tips | ( | wmOperatorType * | ot | ) |
Definition at line 2066 of file particle_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, PE_poll(), wmOperatorType::poll, SEL_SELECT, select_tips_exec(), and WM_operator_properties_select_action().
Referenced by operatortypes_particle().
void PARTICLE_OT_shape_cut | ( | wmOperatorType * | ot | ) |
Definition at line 5256 of file particle_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, shape_cut_exec(), and shape_cut_poll().
Referenced by operatortypes_particle().
void PARTICLE_OT_subdivide | ( | wmOperatorType * | ot | ) |
Definition at line 3192 of file particle_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, PE_hair_poll(), wmOperatorType::poll, and subdivide_exec().
Referenced by operatortypes_particle().
void PARTICLE_OT_unify_length | ( | struct wmOperatorType * | ot | ) |
Definition at line 5692 of file particle_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, PE_poll_view3d(), wmOperatorType::poll, and unify_length_exec().
Referenced by operatortypes_particle().
void PARTICLE_OT_weight_set | ( | wmOperatorType * | ot | ) |
Definition at line 3349 of file particle_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, PE_hair_poll(), wmOperatorType::poll, RNA_def_float(), wmOperatorType::srna, and weight_set_exec().
Referenced by operatortypes_particle().
|
static |
Definition at line 1315 of file particle_edit.c.
References apply_lengths_iter(), BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), ApplyLengthsIterData::edit, ParticleSystem::flag, ParticleEditSettings::flag, PE_KEEP_LENGTHS, PE_settings(), PTCacheEdit::psys, PSYS_GLOBAL_HAIR, scene, and PTCacheEdit::totpoint.
Referenced by PE_update_object().
|
static |
Definition at line 1129 of file particle_edit.c.
References ParticleSystem::edit, PTCacheEditPoint::flag, LOOP_POINTS, ParticleSystemModifierData::mesh_final, PTCacheEdit::mirror_cache, NULL, ParticleSystem::particles, PE_mirror_particle(), PE_update_mirror_cache(), PEP_EDIT_RECALC, point, POINT_P, PTCacheEdit::points, and PTCacheEdit::psmd_eval.
Referenced by PE_update_object().
Definition at line 2298 of file particle_edit.c.
References BLI_rcti_is_empty(), C, CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), data, depsgraph, for_mouse_hit_keys(), NA_SELECTED, NC_OBJECT, ND_PARTICLE, PE_data_free(), PE_deselect_all_visible_ex(), PE_get_current(), PE_set_view3d_data(), PE_start_edit(), PE_update_selection(), PSEL_ALL_KEYS, scene, SEL_OP_USE_PRE_DESELECT, select_key_op(), and WM_event_add_notifier().
|
static |
Definition at line 237 of file particle_edit.c.
References UnifiedPaintSettings::flag, scene, size(), ParticleBrushData::size, UnifiedPaintSettings::size, Scene::toolsettings, ToolSettings::unified_paint_settings, and UNIFIED_PAINT_SIZE.
Referenced by brush_drawcursor(), and brush_edit_apply().
bool PE_circle_select | ( | bContext * | C, |
wmGenericUserData * | wm_userdata, | ||
const int | sel_op, | ||
const int | mval[2], | ||
float | rad | ||
) |
Definition at line 2356 of file particle_edit.c.
References BLI_assert, C, CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), data, wmGenericUserData::data, depsgraph, PEData::edit, ELEM, for_mouse_hit_keys(), PEData::mval, NA_SELECTED, NC_OBJECT, ND_PARTICLE, NULL, PEData::ob, PE_deselect_all_visible_ex(), PE_get_current(), pe_select_cache_init_with_generic_userdata(), PE_start_edit(), PE_update_selection(), PEData::rad, scene, PEData::sel_op, SEL_OP_ADD, SEL_OP_SET, SEL_OP_SUB, SEL_OP_USE_PRE_DESELECT, select_key(), and WM_event_add_notifier().
Referenced by view3d_circle_select_exec().
PTCacheEdit* PE_create_current | ( | Depsgraph * | depsgraph, |
Scene * | scene, | ||
Object * | ob | ||
) |
Definition at line 397 of file particle_edit.c.
References depsgraph, pe_get_current(), and scene.
Referenced by drw_particle_update_ptcache(), ED_object_particle_edit_mode_enter_ex(), OVERLAY_edit_particle_cache_populate(), and PE_current_changed().
void PE_create_particle_edit | ( | struct Depsgraph * | depsgraph, |
struct Scene * | scene, | ||
struct Object * | ob, | ||
struct PointCache * | cache, | ||
struct ParticleSystem * | psys | ||
) |
Initialize needed data for bake edit.
Definition at line 5277 of file particle_edit.c.
References BKE_modifiers_findby_name(), BKE_ptcache_mem_pointers_incr(), BKE_ptcache_mem_pointers_seek(), BLI_listbase_clear(), BLI_listbase_is_empty(), BPHYS_DATA_LOCATION, BPHYS_DATA_ROTATION, BPHYS_DATA_VELOCITY, BPHYS_TOT_DATA, PTCacheEditKey::co, HairKey::co, DEG_get_evaluated_object(), depsgraph, ParticleSystem::edit, PointCache::edit, HairKey::editflag, ListBase::first, PTCacheEditKey::flag, ParticleSystem::flag, PointCache::flag, float(), PTCacheMem::frame, ParticleSystem::free_edit, PointCache::free_edit, PTCacheEditKey::ftime, ParticleData::hair, if(), KEY_K, LOOP_KEYS, LOOP_POINTS, PointCache::mem_cache, MEM_callocN, ParticleSystemModifierData::mesh_final, ParticleSystemModifierData::modifier, ModifierData::name, PTCacheMem::next, NULL, ParticleSystem::particles, PTCacheEdit::pathcache, PTCacheEdit::pathcachebufs, PE_free_ptcache_edit(), PE_update_object(), PEK_USE_WCO, PEP_EDIT_RECALC, point, POINT_P, PTCacheEdit::points, PTCacheEdit::psmd, PTCacheEdit::psmd_eval, PTCacheEdit::psys, psys_copy_particles(), PTCacheEdit::psys_eval, psys_eval_get(), psys_get_modifier(), PSYS_GLOBAL_HAIR, PTCACHE_DISK_CACHE, recalc_emitter_field(), recalc_lengths(), PTCacheEditKey::rot, scene, PTCacheEditKey::time, HairKey::time, ParticleData::totkey, ParticleSystem::totpart, PTCacheEdit::totpoint, update_world_cos(), and PTCacheEditKey::vel.
Referenced by pe_get_current().
Definition at line 543 of file particle_edit.c.
References BLI_rng_new(), data, PIL_check_seconds_timer_i(), POINTER_AS_UINT, and UINT_MAX.
Referenced by brush_edit_init().
Definition at line 524 of file particle_edit.c.
References BKE_bvhtree_from_mesh_get(), BKE_object_get_evaluated_mesh(), BVHTREE_FROM_LOOPTRI, data, DEG_get_evaluated_object(), mesh, and NULL.
Referenced by shape_cut_exec().
Definition at line 402 of file particle_edit.c.
References depsgraph, Object::mode, OB_MODE_PARTICLE_EDIT, PE_create_current(), and scene.
Definition at line 559 of file particle_edit.c.
References data, ED_view3d_depths_free(), NULL, PE_free_random_generator(), and PE_free_shape_tree().
Referenced by brush_edit_exit(), PE_box_select(), PE_lasso_select(), pe_nearest_point_and_key(), pe_select_cache_free_generic_userdata(), and select_linked_pick_exec().
|
static |
Definition at line 1258 of file particle_edit.c.
References BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), deflect_emitter_iter(), DeflectEmitterIter::dist, ED_view3d_select_dist_px(), DeflectEmitterIter::edit, DeflectEmitterIter::emitterdist, ParticleEditSettings::emitterdist, ParticleSystem::flag, ParticleEditSettings::flag, ParticleSystemModifierData::mesh_final, NULL, DeflectEmitterIter::object, PE_DEFLECT_EMITTER, PE_settings(), PTCacheEdit::psmd_eval, PTCacheEdit::psys, DeflectEmitterIter::psys, PSYS_GLOBAL_HAIR, scene, and PTCacheEdit::totpoint.
Referenced by PE_update_object().
Definition at line 2286 of file particle_edit.c.
References C, CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), depsgraph, PE_deselect_all_visible_ex(), PE_get_current(), PE_start_edit(), and scene.
bool PE_deselect_all_visible_ex | ( | PTCacheEdit * | edit | ) |
Definition at line 2268 of file particle_edit.c.
References PTCacheEditKey::flag, NearestParticleData::key, KEY_K, LOOP_SELECTED_KEYS, LOOP_VISIBLE_POINTS, PEK_SELECT, PEP_EDIT_RECALC, point, and POINT_P.
Referenced by PE_box_select(), PE_circle_select(), PE_deselect_all_visible(), PE_lasso_select(), and PE_mouse_particles().
void PE_free_ptcache_edit | ( | PTCacheEdit * | edit | ) |
Definition at line 131 of file particle_edit.c.
References PTCacheEdit::emitter_cosnos, PTCacheEdit::emitter_field, LOOP_POINTS, MEM_freeN, PTCacheEdit::mirror_cache, point, POINT_P, PTCacheEdit::points, PTCacheEdit::psys, and psys_free_path_cache().
Referenced by clear_edited_exec(), PE_create_particle_edit(), and ptcache_free_bake().
Definition at line 551 of file particle_edit.c.
References BLI_rng_free(), data, and NULL.
Referenced by PE_data_free().
Definition at line 538 of file particle_edit.c.
References data, and free_bvhtree_from_mesh().
Referenced by PE_data_free(), and shape_cut_exec().
PTCacheEdit* PE_get_current | ( | Depsgraph * | depsgraph, |
Scene * | scene, | ||
Object * | ob | ||
) |
Definition at line 392 of file particle_edit.c.
References depsgraph, pe_get_current(), and scene.
Referenced by brush_edit_init(), convert_type_get(), createTransParticleVerts(), ED_transform_calc_gizmo_stats(), flushTransParticles(), hide_exec(), mirror_exec(), mirror_poll(), particle_undosys_poll(), particle_undosys_step_decode(), particle_undosys_step_encode(), PE_box_select(), PE_circle_select(), PE_deselect_all_visible(), PE_hair_poll(), PE_lasso_select(), PE_minmax(), PE_mirror_x(), PE_mouse_particles(), PE_poll(), pe_select_all_exec(), PE_set_data(), PE_update_object(), PE_update_selection(), rekey_particle_to_time(), remove_doubles_exec(), reveal_exec(), select_random_exec(), shape_cut_exec(), unify_length_exec(), and weight_set_exec().
|
static |
Definition at line 290 of file particle_edit.c.
References BKE_ptcache_ids_from_object(), BLI_freelistN(), BLI_listbase_is_single(), PTCacheID::cache, PTCacheID::calldata, blender::bke::idprop::create(), DEG_is_active(), depsgraph, ParticleSystem::edit, PointCache::edit, ParticleEditSettings::edittype, ListBase::first, ParticleSystem::flag, PointCache::flag, ParticleEditSettings::flag, PTCacheEdit::flags, 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, pe_update_hair_particle_edit_pointers(), PTCacheEdit::pid, ParticleSystem::pointcache, PTCacheEdit::psys, psys_copy_particles(), PSYS_CURRENT, PTCacheEdit::psys_eval, PSYS_HAIR_DONE, PSYS_HAIR_DYNAMICS, PT_CACHE_EDIT_UPDATE_PARTICLE_FROM_EVAL, PTCACHE_BAKED, PTCACHE_TYPE_CLOTH, PTCACHE_TYPE_PARTICLES, PTCACHE_TYPE_SOFTBODY, scene, ParticleEditSettings::scene, PTCacheID::type, and ParticleSettings::type.
Referenced by PE_create_current(), and PE_get_current().
PTCacheEdit* PE_get_current_from_psys | ( | ParticleSystem * | psys | ) |
Definition at line 247 of file particle_edit.c.
References ParticleSystem::edit, PointCache::edit, ParticleSystem::flag, PointCache::flag, NULL, ParticleSystem::part, PART_HAIR, ParticleSystem::pointcache, PSYS_HAIR_DYNAMICS, PTCACHE_BAKED, and ParticleSettings::type.
Referenced by OVERLAY_edit_particle_cache_populate().
Definition at line 101 of file particle_edit.c.
References C, CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), depsgraph, ParticleSystemModifierData::mesh_final, Object::mode, NULL, OB_MODE_PARTICLE_EDIT, PE_get_current(), PTCacheEdit::psmd_eval, PTCacheEdit::psys, and scene.
Referenced by mirror_poll(), PARTICLE_OT_delete(), PARTICLE_OT_rekey(), PARTICLE_OT_remove_doubles(), PARTICLE_OT_subdivide(), PARTICLE_OT_weight_set(), and shape_cut_poll().
void PE_hide_keys_time | ( | Scene * | scene, |
PTCacheEdit * | edit, | ||
float | cfra | ||
) |
Definition at line 409 of file particle_edit.c.
References fabsf, ParticleEditSettings::fade_frames, ParticleEditSettings::flag, KEY_K, LOOP_KEYS, LOOP_POINTS, PE_FADE_TIME, PE_settings(), PEK_HIDE, POINT_P, SCE_SELECT_POINT, scene, and ParticleEditSettings::selectmode.
Referenced by PE_update_object().
|
static |
Definition at line 1390 of file particle_edit.c.
References BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), IterateLengthsIterData::edit, ParticleSystem::flag, ParticleEditSettings::flag, iterate_lengths_iter(), PE_KEEP_LENGTHS, PE_settings(), IterateLengthsIterData::pset, PTCacheEdit::psys, PSYS_GLOBAL_HAIR, scene, and PTCacheEdit::totpoint.
Referenced by PE_update_object().
int PE_lasso_select | ( | bContext * | C, |
const int | mcoords[][2], | ||
const int | mcoords_len, | ||
const int | sel_op | ||
) |
Definition at line 2396 of file particle_edit.c.
References BLI_lasso_is_point_inside(), C, copy_v3_v3(), CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_wm_region(), data, depsgraph, ED_select_op_action_deselected(), ED_view3d_project_int_global(), PEData::edit, ParticleSystem::flag, ParticleSettings::from, PEData::is_changed, IS_CLIPPED, is_inside(), KEY_K, key_test_depth(), LOOP_VISIBLE_KEYS, LOOP_VISIBLE_POINTS, ParticleSystemModifierData::mesh_final, mul_m4_v3(), NA_SELECTED, NC_OBJECT, ND_PARTICLE, PEData::ob, OPERATOR_CANCELLED, OPERATOR_FINISHED, ParticleSystem::part, ParticleSystem::particles, PE_data_free(), PE_deselect_all_visible_ex(), PE_get_current(), PE_set_view3d_data(), PE_settings(), PE_start_edit(), PE_update_selection(), PEK_SELECT, PEP_EDIT_RECALC, point, POINT_P, PTCacheEdit::psmd_eval, PTCacheEdit::psys, PSYS_GLOBAL_HAIR, psys_mat_hair_to_global(), SCE_SELECT_END, SCE_SELECT_POINT, scene, PEData::sel_op, SEL_OP_USE_PRE_DESELECT, ParticleEditSettings::selectmode, SET_FLAG_FROM_TEST, unit_m4(), V3D_PROJ_RET_OK, V3D_PROJ_TEST_CLIP_WIN, and WM_event_add_notifier().
Referenced by view3d_lasso_select().
int PE_minmax | ( | Depsgraph * | depsgraph, |
Scene * | scene, | ||
ViewLayer * | view_layer, | ||
float | min[3], | ||
float | max[3] | ||
) |
Definition at line 168 of file particle_edit.c.
References BKE_object_minmax(), copy_v3_v3(), depsgraph, DO_MINMAX, ParticleSettings::from, KEY_K, LOOP_SELECTED_KEYS, LOOP_VISIBLE_POINTS, max, ParticleSystemModifierData::mesh_final, min, mul_m4_v3(), NULL, OBACT, ParticleSystem::part, ParticleSystem::particles, PE_get_current(), POINT_P, PTCacheEdit::psmd_eval, PTCacheEdit::psys, psys_mat_hair_to_global(), scene, and unit_m4().
Referenced by brush_edit_init(), and viewselected_exec().
|
static |
Definition at line 1040 of file particle_edit.c.
References PTCacheEditKey::co, HairKey::co, copy_v3_v3(), ParticleSystem::edit, PTCacheEditKey::flag, PTCacheEditPoint::flag, ParticleSettings::from, ParticleData::hair, invert_m4_m4(), PTCacheEditPoint::keys, PTCacheEditKey::length, MEM_dupallocN, MEM_freeN, mesh, PTCacheEdit::mirror_cache, mul_m4_v3(), ParticleSystem::part, ParticleSystem::particles, PE_update_mirror_cache(), PEK_SELECT, PEK_TAG, PEP_EDIT_RECALC, PEP_TAG, point, 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 3510 of file particle_edit.c.
References BKE_mesh_tessface_ensure(), PTCacheEditKey::co, HairKey::co, Object::data, Mesh_Runtime::deformed_only, depsgraph, DMCACHE_ISCHILD, PEData::edit, ParticleSystem::flag, ParticleData::fuv, ParticleData::hair, KEY_K, PTCacheEditPoint::keys, LOOP_POINTS, LOOP_VISIBLE_POINTS, MEM_callocN, MEM_dupallocN, MEM_freeN, MEM_SAFE_FREE, ParticleSystemModifierData::mesh_final, mesh_get_x_mirror_faces(), ParticleSystemModifierData::mesh_original, Mesh::mface, PTCacheEdit::mirror_cache, NULL, ParticleData::num, ParticleData::num_dmcache, PEData::ob, ParticleSystem::part, ParticleSystem::particles, PE_get_current(), PE_mirror_particle(), PE_update_mirror_cache(), PEP_HIDE, PEP_TAG, point, point_is_selected(), POINT_P, PTCacheEdit::points, PTCacheEdit::psmd_eval, PTCacheEdit::psys, PSYS_GLOBAL_HAIR, psys_particle_dm_face_lookup(), Mesh::runtime, scene, SHIFT3, SHIFT4, HairKey::time, ParticleSystem::totpart, PTCacheEdit::totpoint, and ParticleSettings::use_modifier_stack.
Referenced by brush_edit_apply(), and mirror_exec().
bool PE_mouse_particles | ( | bContext * | C, |
const int | mval[2], | ||
const struct SelectPick_Params * | params | ||
) |
Definition at line 1867 of file particle_edit.c.
References BLI_assert_unreachable, C, CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), depsgraph, PTCacheEditKey::flag, NearestParticleData::key, NA_SELECTED, NC_OBJECT, ND_PARTICLE, params, PE_deselect_all_visible_ex(), PE_get_current(), pe_nearest_point_and_key(), PE_start_edit(), PE_update_selection(), PEK_SELECT, PEP_EDIT_RECALC, point, scene, SEL_OP_ADD, SEL_OP_AND, SEL_OP_SET, SEL_OP_SUB, SEL_OP_XOR, and WM_event_add_notifier().
Referenced by view3d_select_exec().
|
static |
Definition at line 1845 of file particle_edit.c.
References C, data, ED_view3d_select_dist_px(), for_mouse_hit_keys(), nearest_key_fn(), NULL, PE_data_free(), PE_set_view3d_data(), PSEL_NEAREST, and user_data.
Referenced by PE_mouse_particles().
Definition at line 80 of file particle_edit.c.
References C, CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), depsgraph, ParticleSystemModifierData::mesh_final, Object::mode, NULL, OB_MODE_PARTICLE_EDIT, PE_get_current(), PTCacheEdit::psmd_eval, and scene.
Referenced by buttons_context(), keymap_particle(), PARTICLE_OT_hide(), PARTICLE_OT_reveal(), PARTICLE_OT_select_all(), PARTICLE_OT_select_less(), PARTICLE_OT_select_linked(), PARTICLE_OT_select_more(), PARTICLE_OT_select_random(), PARTICLE_OT_select_roots(), PARTICLE_OT_select_tips(), and PE_poll_view3d().
Definition at line 122 of file particle_edit.c.
References blender::compositor::area(), C, CTX_wm_area(), CTX_wm_region(), PE_poll(), ARegion::regiontype, RGN_TYPE_WINDOW, and SPACE_VIEW3D.
Referenced by brush_edit_poll(), PARTICLE_OT_select_linked_pick(), PARTICLE_OT_unify_length(), and toggle_particle_cursor().
|
static |
Definition at line 1767 of file particle_edit.c.
References C, CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), depsgraph, 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(), point, POINT_P, wmOperator::ptr, RNA_enum_get(), scene, SEL_DESELECT, SEL_SELECT, SEL_TOGGLE, select_action_apply(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_select_all().
Definition at line 2341 of file particle_edit.c.
References data, MEM_freeN, and PE_data_free().
Referenced by pe_select_cache_init_with_generic_userdata().
|
static |
Definition at line 2347 of file particle_edit.c.
References C, data, wmGenericUserData::data, wmGenericUserData::free_fn, MEM_callocN, pe_select_cache_free_generic_userdata(), PE_set_view3d_data(), and wmGenericUserData::use_free.
Referenced by PE_circle_select().
Definition at line 495 of file particle_edit.c.
References C, CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), data, and PE_get_current().
Referenced by delete_exec(), PE_set_view3d_data(), rekey_exec(), select_less_exec(), select_linked_exec(), select_more_exec(), select_random_exec(), select_roots_exec(), select_tips_exec(), shape_cut_exec(), and subdivide_exec().
Definition at line 508 of file particle_edit.c.
References C, data, ED_view3d_depth_override(), ED_view3d_viewcontext_init(), PE_set_data(), V3D_DEPTH_OBJECT_ONLY, and XRAY_ENABLED.
Referenced by brush_edit_init(), PE_box_select(), PE_lasso_select(), pe_nearest_point_and_key(), pe_select_cache_init_with_generic_userdata(), and select_linked_pick_exec().
ParticleEditSettings* PE_settings | ( | Scene * | scene | ) |
Definition at line 232 of file particle_edit.c.
References NULL, ToolSettings::particle, scene, and Scene::toolsettings.
Referenced by brush_add(), brush_comb(), brush_cut(), brush_drawcursor(), brush_edit_apply(), brush_puff(), count_selected_keys(), createTransParticleVerts(), disconnect_hair(), for_mouse_hit_keys(), foreach_mouse_hit_key(), foreach_mouse_hit_key_iter(), foreach_mouse_hit_point(), OVERLAY_edit_particle_cache_init(), OVERLAY_particle_cache_init(), PE_apply_lengths(), pe_deflect_emitter(), pe_get_current(), PE_hide_keys_time(), pe_iterate_lengths(), PE_lasso_select(), PE_update_object(), shape_cut(), shape_cut_exec(), shape_cut_poll(), toggle_particle_cursor(), and weight_set_exec().
int PE_start_edit | ( | PTCacheEdit * | edit | ) |
Definition at line 219 of file particle_edit.c.
References PTCacheEdit::edited, ParticleSystem::flag, PTCacheEdit::psys, and PSYS_EDITED.
Referenced by brush_edit_apply(), convert_type_get(), PE_box_select(), PE_circle_select(), PE_deselect_all_visible(), PE_lasso_select(), PE_mouse_particles(), and shape_cut_exec().
|
static |
Definition at line 264 of file particle_edit.c.
References PTCacheEditKey::co, HairKey::co, HairKey::editflag, PTCacheEditKey::flag, ParticleSystem::flag, ParticleData::hair, ParticleSystem::particles, PEK_USE_WCO, point, PTCacheEdit::points, PTCacheEdit::psys, PSYS_GLOBAL_HAIR, PTCacheEditKey::time, HairKey::time, and PTCacheEdit::totpoint.
Referenced by pe_get_current().
|
static |
Definition at line 969 of file particle_edit.c.
References HairKey::co, copy_v3_v3(), ParticleSystem::edit, ParticleSettings::from, LOOP_PARTICLES, MEM_callocN, ParticleSystemModifierData::mesh_final, PTCacheEdit::mirror_cache, mul_m4_v3(), ParticleSystem::part, PARTICLE_P, PTCacheEdit::psmd_eval, psys_mat_hair_to_orco(), ParticleSystem::totpart, and tree.
Referenced by PE_apply_mirror(), PE_mirror_particle(), and PE_mirror_x().
Definition at line 1614 of file particle_edit.c.
References RenderData::cfra, depsgraph, ParticleSystem::flag, ParticleEditSettings::flag, G, LOOP_POINTS, ParticleSystem::part, PART_EMITTER, 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, POINT_P, PTCacheEdit::psys, psys_cache_edit_paths(), PSYS_HAIR_UPDATED, Scene::r, scene, ParticleSettings::type, update_velocities(), and update_world_cos().
Referenced by brush_edit_apply(), copy_particle_edit(), disconnect_hair(), drw_particle_update_ptcache_edit(), flushTransParticles(), PE_create_particle_edit(), rekey_exec(), remap_hair_emitter(), shape_cut_exec(), subdivide_exec(), and unify_length_exec().
|
static |
Definition at line 1490 of file particle_edit.c.
References RenderData::cfra, DEG_id_tag_update(), depsgraph, HairKey::editflag, G, ParticleData::hair, Object::id, ID_RECALC_SELECT, KEY_K, LOOP_KEYS, LOOP_POINTS, ParticleSystem::particles, PE_get_current(), PEP_EDIT_RECALC, point, POINT_P, PTCacheEdit::psys, psys_cache_edit_paths(), Scene::r, and scene.
Referenced by hide_exec(), PE_box_select(), PE_circle_select(), PE_lasso_select(), PE_mouse_particles(), pe_select_all_exec(), reveal_exec(), select_less_exec(), select_linked_exec(), select_linked_pick_exec(), select_more_exec(), select_random_exec(), select_roots_exec(), select_tips_exec(), and subdivide_exec().
|
static |
Definition at line 437 of file particle_edit.c.
References Object::data, ME_SYMMETRY_X, OB_MESH, and Object::type.
Referenced by brush_add(), brush_edit_apply(), delete_exec(), PE_update_object(), remove_tagged_keys(), and shape_cut_exec().
|
static |
Definition at line 5086 of file particle_edit.c.
References data, and BVHTreeRayHit::index.
Referenced by shape_cut_test_point().
|
static |
Definition at line 671 of file particle_edit.c.
References KEY_K, LOOP_SELECTED_KEYS, PEP_HIDE, and point.
Referenced by find_fcurve_segment(), and PE_mirror_x().
void recalc_emitter_field | ( | Depsgraph * | UNUSEDdepsgraph, |
Object * | UNUSEDob, | ||
ParticleSystem * | psys | ||
) |
Definition at line 1426 of file particle_edit.c.
References add_v3_v3(), add_v3_v3v3(), BKE_mesh_vertex_normals_ensure(), MVert::co, copy_v3_v3(), ParticleSystem::edit, PTCacheEdit::emitter_cosnos, PTCacheEdit::emitter_field, float(), MEM_callocN, MEM_freeN, mesh, ParticleSystemModifierData::mesh_final, Mesh::mface, mul_v3_fl(), Mesh::mvert, nor, normalize_v3(), PTCacheEdit::psmd_eval, Mesh::totface, MFace::v1, MFace::v2, MFace::v3, and MFace::v4.
Referenced by copy_particle_edit(), ED_object_particle_edit_mode_enter_ex(), and PE_create_particle_edit().
void recalc_lengths | ( | struct PTCacheEdit * | edit | ) |
Set current distances to be kept between neighboring keys.
Definition at line 1409 of file particle_edit.c.
References KEY_K, len_v3v3(), LOOP_EDITED_POINTS, point, and POINT_P.
Referenced by brush_edit_apply(), copy_particle_edit(), delete_exec(), PE_create_particle_edit(), rekey_exec(), scale_points_to_length(), shape_cut_exec(), and subdivide_exec().
|
static |
Definition at line 2806 of file particle_edit.c.
References C, data, float(), foreach_selected_point(), NA_EDITED, NC_OBJECT, ND_PARTICLE, OPERATOR_FINISHED, PE_set_data(), PE_update_object(), wmOperator::ptr, recalc_lengths(), rekey_particle(), RNA_int_get(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_rekey().
Definition at line 2741 of file particle_edit.c.
References PTCacheEditKey::co, HairKey::co, copy_v3_v3(), data, ParticleSimulationData::depsgraph, PEData::dval, PEData::edit, PTCacheEditKey::flag, ParticleData::flag, ParticleSystem::flag, float(), ParticleData::hair, MEM_callocN, MEM_freeN, ParticleSimulationData::ob, PARS_REKEY, ParticleSystem::particles, PEK_SELECT, PEK_USE_WCO, PEP_EDIT_RECALC, point, PTCacheEdit::points, ParticleSimulationData::psys, PTCacheEdit::psys, psys_get_particle_on_path(), PSYS_GLOBAL_HAIR, ParticleSimulationData::scene, state, PTCacheEditKey::time, time, HairKey::time, and ParticleData::totkey.
Referenced by rekey_exec().
|
static |
Definition at line 2843 of file particle_edit.c.
References C, PTCacheEditKey::co, HairKey::co, copy_v3_v3(), CTX_data_depsgraph_pointer(), ParticleSimulationData::depsgraph, depsgraph, PEData::edit, ParticleData::flag, float(), ParticleData::hair, PTCacheEditPoint::keys, MEM_dupallocN, MEM_freeN, ParticleSimulationData::ob, PEData::ob, PARS_REKEY, ParticleSystem::particles, PE_get_current(), PTCacheEdit::points, ParticleSimulationData::psys, PTCacheEdit::psys, psys_get_particle_on_path(), ParticleSimulationData::scene, scene, state, PTCacheEditKey::time, HairKey::time, and ParticleData::totkey.
Referenced by brush_cut(), and shape_cut().
|
static |
Definition at line 3213 of file particle_edit.c.
References BKE_reportf(), C, Particle::co, copy_v3_v3(), CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), DEG_id_tag_update(), depsgraph, PEData::edit, ParticleSystem::edit, ParticleSystem::flag, ParticleSettings::from, Object::id, ID_RECALC_GEOMETRY, LOOP_SELECTED_POINTS, ParticleSystemModifierData::mesh_final, mul_m4_v3(), NA_EDITED, NC_OBJECT, ND_PARTICLE, PEData::ob, OPERATOR_CANCELLED, OPERATOR_FINISHED, ParticleSystem::part, ParticleSystem::particles, PE_get_current(), PEP_TAG, point, POINT_P, PTCacheEdit::psmd_eval, PTCacheEdit::psys, PSYS_GLOBAL_HAIR, psys_mat_hair_to_object(), wmOperator::ptr, remove_tagged_particles(), wmOperator::reports, RNA_float_get(), RPT_INFO, scene, threshold, ParticleSystem::totpart, tree, and WM_event_add_notifier().
Referenced by PARTICLE_OT_remove_doubles().
|
static |
Definition at line 2986 of file particle_edit.c.
References BKE_modifier_get_evaluated(), PTCacheEditKey::co, HairKey::co, copy_v3_v3(), depsgraph, PEData::edit, 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, ParticleSystemModifierData::mesh_final, ParticleSystemModifierData::modifier, NULL, PEData::ob, ParticleSystem::particles, PE_mirror_particle(), pe_x_mirror(), PEK_TAG, PEP_EDIT_RECALC, PEP_TAG, point, 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 |
Definition at line 2902 of file particle_edit.c.
References ParticleSystem::child, PEData::edit, ParticleSystem::edit, ELEM, LOOP_TAGGED_POINTS, MEM_callocN, MEM_freeN, MEM_SAFE_FREE, ParticleSystemModifierData::mesh_final, PTCacheEdit::mirror_cache, NULL, PEData::ob, ParticleSystem::particles, PE_mirror_particle(), PEP_TAG, point, POINT_P, PTCacheEdit::points, PTCacheEdit::psmd_eval, ParticleSystem::totchild, ParticleSystem::totpart, and PTCacheEdit::totpoint.
Referenced by brush_edit_apply(), delete_exec(), remove_doubles_exec(), remove_tagged_keys(), and shape_cut_exec().
|
static |
Definition at line 2551 of file particle_edit.c.
References C, CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), depsgraph, PEData::edit, KEY_K, LOOP_KEYS, LOOP_POINTS, NA_SELECTED, NC_OBJECT, ND_PARTICLE, PEData::ob, OPERATOR_FINISHED, PE_get_current(), PE_update_selection(), PEK_SELECT, PEP_EDIT_RECALC, PEP_HIDE, point, POINT_P, wmOperator::ptr, RNA_boolean_get(), scene, select(), SET_FLAG_FROM_TEST, and WM_event_add_notifier().
Referenced by PARTICLE_OT_reveal().
|
static |
Definition at line 5623 of file particle_edit.c.
References add_v3_v3v3(), PTCacheEditKey::co, copy_v3_v3(), KEY_K, LOOP_KEYS, mul_v3_fl(), PEP_EDIT_RECALC, point, and sub_v3_v3v3().
Referenced by scale_point_to_length().
|
static |
Definition at line 5648 of file particle_edit.c.
References calculate_point_length(), blender::math::length(), point, and scale_point_factor().
Referenced by scale_points_to_length().
|
static |
Definition at line 5657 of file particle_edit.c.
References blender::math::length(), LOOP_SELECTED_POINTS, point, POINT_P, recalc_lengths(), and scale_point_to_length().
Referenced by unify_length_exec().
|
static |
Definition at line 1733 of file particle_edit.c.
References PTCacheEditKey::flag, PEK_SELECT, PEP_EDIT_RECALC, point, SEL_DESELECT, SEL_INVERT, and SEL_SELECT.
Referenced by pe_select_all_exec(), select_random_exec(), select_root(), and select_tip().
|
static |
Definition at line 1675 of file particle_edit.c.
References data, PTCacheEditKey::flag, PEK_SELECT, PEP_EDIT_RECALC, point, point_index, and PTCacheEdit::points.
Referenced by PE_circle_select().
Definition at line 1692 of file particle_edit.c.
References data, ED_select_op_action_deselected(), PTCacheEditKey::flag, is_inside(), PEK_SELECT, PEP_EDIT_RECALC, point, point_index, PTCacheEdit::points, and SET_FLAG_FROM_TEST.
Referenced by PE_box_select().
|
static |
Definition at line 1706 of file particle_edit.c.
References data, KEY_K, LOOP_KEYS, PEK_SELECT, PEP_EDIT_RECALC, point, point_index, and PTCacheEdit::points.
Referenced by select_linked_exec(), and select_linked_pick_exec().
|
static |
Definition at line 2635 of file particle_edit.c.
References C, data, foreach_point(), NA_SELECTED, NC_OBJECT, ND_PARTICLE, OPERATOR_FINISHED, PE_set_data(), PE_update_selection(), select_less_keys(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_select_less().
Definition at line 2602 of file particle_edit.c.
References data, PEData::edit, KEY_K, LOOP_KEYS, LOOP_SELECTED_KEYS, PEK_SELECT, PEK_TAG, PEP_EDIT_RECALC, point, point_index, and PTCacheEdit::points.
Referenced by select_less_exec().
|
static |
Definition at line 2181 of file particle_edit.c.
References C, data, foreach_selected_key(), NA_SELECTED, NC_OBJECT, ND_PARTICLE, OPERATOR_FINISHED, PE_set_data(), PE_update_selection(), select_keys(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_select_linked().
|
static |
Definition at line 2212 of file particle_edit.c.
References C, data, for_mouse_hit_keys(), NA_SELECTED, NC_OBJECT, ND_PARTICLE, OPERATOR_FINISHED, PE_data_free(), PE_set_view3d_data(), PE_update_selection(), PSEL_NEAREST, wmOperator::ptr, RNA_boolean_get(), RNA_int_get_array(), select_keys(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_select_linked_pick(), and select_linked_pick_invoke().
|
static |
Definition at line 2235 of file particle_edit.c.
References C, wmEvent::mval, wmOperator::ptr, RNA_int_set_array(), and select_linked_pick_exec().
Referenced by PARTICLE_OT_select_linked_pick().
|
static |
Definition at line 2707 of file particle_edit.c.
References C, data, foreach_point(), NA_SELECTED, NC_OBJECT, ND_PARTICLE, OPERATOR_FINISHED, PE_set_data(), PE_update_selection(), select_more_keys(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_select_more().
Definition at line 2669 of file particle_edit.c.
References data, PEData::edit, KEY_K, LOOP_KEYS, PEK_SELECT, PEK_TAG, PEP_EDIT_RECALC, point, point_index, and PTCacheEdit::points.
Referenced by select_more_exec().
|
static |
Definition at line 2098 of file particle_edit.c.
References BLI_rng_free(), BLI_rng_get_float(), BLI_rng_new_srandom(), C, data, NearestParticleData::key, LOOP_KEYS, LOOP_VISIBLE_KEYS, LOOP_VISIBLE_POINTS, NA_SELECTED, NC_OBJECT, ND_PARTICLE, OPERATOR_FINISHED, PE_get_current(), PE_set_data(), PE_update_selection(), point, wmOperator::ptr, RAN_HAIR, RAN_POINTS, RNA_enum_get(), RNA_float_get(), seed, SEL_DESELECT, SEL_SELECT, select(), select_action_apply(), type, WM_event_add_notifier(), and WM_operator_properties_select_random_seed_increment_get().
Referenced by PARTICLE_OT_select_random().
Definition at line 1948 of file particle_edit.c.
References data, PTCacheEditKey::flag, NearestParticleData::key, PEK_SELECT, PEP_HIDE, point, point_index, SEL_DESELECT, SEL_TOGGLE, and select_action_apply().
Referenced by select_roots_exec().
|
static |
Definition at line 1965 of file particle_edit.c.
References C, data, foreach_point(), NA_SELECTED, NC_OBJECT, ND_PARTICLE, OPERATOR_FINISHED, PE_set_data(), PE_update_selection(), wmOperator::ptr, RNA_enum_get(), SEL_SELECT, SEL_TOGGLE, select_root(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_select_roots().
Definition at line 2015 of file particle_edit.c.
References data, PTCacheEditKey::flag, NearestParticleData::key, PEK_SELECT, PEP_HIDE, point, point_index, SEL_DESELECT, SEL_TOGGLE, and select_action_apply().
Referenced by select_tips_exec().
|
static |
Definition at line 2038 of file particle_edit.c.
References C, data, foreach_point(), NA_SELECTED, NC_OBJECT, ND_PARTICLE, OPERATOR_CANCELLED, OPERATOR_FINISHED, PE_set_data(), PE_update_selection(), wmOperator::ptr, RNA_enum_get(), SEL_SELECT, SEL_TOGGLE, select_tip(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_select_tips().
Definition at line 3438 of file particle_edit.c.
References data, PEData::edit, PTCacheEditPoint::flag, PEP_TAG, and PTCacheEdit::points.
Referenced by delete_exec().
|
static |
Definition at line 3445 of file particle_edit.c.
References data, PEData::edit, PTCacheEditKey::flag, PTCacheEditPoint::keys, PEK_TAG, and PTCacheEdit::points.
Referenced by delete_exec().
Definition at line 5120 of file particle_edit.c.
References BLI_bvhtree_ray_cast(), ParticleCacheKey::co, data, BVHTreeRayHit::dist, ParticleEditSettings::draw_step, PTCacheEditPoint::flag, Object::imat, BVHTreeRayHit::index, mul_v3_m4v3(), normalize_v3(), PTCacheEdit::pathcache, PE_settings(), PEP_EDIT_RECALC, PEP_HIDE, PEP_TAG, PTCacheEdit::points, rekey_particle_to_time(), shape_cut_test_point(), ParticleEditSettings::shape_object, and sub_v3_v3v3().
Referenced by shape_cut_exec().
|
static |
Definition at line 5189 of file particle_edit.c.
References BKE_particle_batch_cache_dirty_tag(), BKE_PARTICLE_BATCH_DIRTY_ALL, C, count_selected_keys(), CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), data, DEG_id_tag_update(), depsgraph, ParticleSystem::flag, ParticleEditSettings::flag, foreach_point(), foreach_selected_point(), Object::id, ID_RECALC_GEOMETRY, ID_RECALC_PSYS_REDO, NA_EDITED, NC_OBJECT, ND_MODIFIER, ND_PARTICLE, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, PTCacheEdit::pathcache, PE_create_shape_tree(), PE_free_shape_tree(), PE_get_current(), PE_LOCK_FIRST, PE_set_data(), PE_settings(), PE_start_edit(), PE_update_object(), pe_x_mirror(), PTCacheEdit::psys, psys_free_path_cache(), PSYS_GLOBAL_HAIR, recalc_lengths(), remove_tagged_particles(), scene, shape_cut(), ParticleEditSettings::shape_object, update_world_cos(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_shape_cut().
Definition at line 5067 of file particle_edit.c.
References C, CTX_data_scene(), OB_MESH, PE_hair_poll(), PE_settings(), scene, ParticleEditSettings::shape_object, and Object::type.
Referenced by PARTICLE_OT_shape_cut().
|
static |
Definition at line 5101 of file particle_edit.c.
References BLI_bvhtree_ray_cast_all(), BVH_RAYCAST_DIST_MAX, PointInsideBVH::bvhdata, ParticleCacheKey::co, data, Object::imat, mul_v3_m4v3(), PointInsideBVH::num_hits, point_inside_bvh_cb(), ParticleEditSettings::shape_object, and BVHTreeFromMesh::tree.
Referenced by shape_cut().
|
static |
Definition at line 3176 of file particle_edit.c.
References C, data, DEG_id_tag_update(), foreach_point(), ID_RECALC_SELECT, NA_EDITED, NC_OBJECT, ND_PARTICLE, OPERATOR_FINISHED, PE_set_data(), PE_update_object(), PE_update_selection(), recalc_lengths(), subdivide_particle(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_subdivide().
Definition at line 3086 of file particle_edit.c.
References PTCacheEditKey::co, HairKey::co, copy_v3_v3(), data, ParticleSimulationData::depsgraph, PEData::edit, PTCacheEditKey::flag, ParticleData::flag, ParticleSystem::flag, ParticleData::hair, MEM_callocN, MEM_freeN, ParticleSimulationData::ob, PARS_REKEY, ParticleSystem::particles, PEK_SELECT, PEK_USE_WCO, PEP_EDIT_RECALC, point, PTCacheEdit::points, ParticleSimulationData::psys, PTCacheEdit::psys, psys_get_particle_on_path(), PSYS_GLOBAL_HAIR, ParticleSimulationData::scene, state, PTCacheEditKey::time, time, HairKey::time, and ParticleData::totkey.
Referenced by subdivide_exec().
Definition at line 3410 of file particle_edit.c.
References brush_drawcursor(), NULL, ParticleEditSettings::paintcursor, PE_poll_view3d(), PE_settings(), RGN_TYPE_WINDOW, scene, SPACE_VIEW3D, WM_paint_cursor_activate(), and WM_paint_cursor_end().
Referenced by ED_object_particle_edit_mode_enter_ex(), and ED_object_particle_edit_mode_exit_ex().
|
static |
Definition at line 5666 of file particle_edit.c.
References C, calculate_average_length(), CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), DEG_id_tag_update(), depsgraph, Object::id, ID_RECALC_GEOMETRY, NA_EDITED, NC_OBJECT, ND_MODIFIER, ND_PARTICLE, OPERATOR_CANCELLED, OPERATOR_FINISHED, PE_get_current(), PE_update_object(), PTCacheEdit::psys, scale_points_to_length(), scene, and WM_event_add_notifier().
Referenced by PARTICLE_OT_unify_length().
|
static |
Definition at line 1552 of file particle_edit.c.
References PTCacheID::flag, if(), KEY_K, PTCacheEditPoint::keys, LOOP_EDITED_POINTS, LOOP_KEYS, madd_v3_v3fl(), mul_v3_fl(), PTCacheEdit::pid, point, POINT_P, PTCacheEdit::points, project_v3_v3v3(), PTCacheEdit::psys, PTCACHE_VEL_PER_SEC, sub_v3_v3v3(), time, and PTCacheEditKey::vel.
Referenced by PE_update_object().
void update_world_cos | ( | Object * | ob, |
PTCacheEdit * | edit | ||
) |
Definition at line 1526 of file particle_edit.c.
References copy_v3_v3(), ParticleSystem::edit, ParticleSystem::flag, ParticleSettings::from, KEY_K, LOOP_KEYS, LOOP_POINTS, ParticleSystemModifierData::mesh_final, mul_m4_v3(), NULL, ParticleSystem::part, ParticleSystem::particles, POINT_P, PTCacheEdit::psmd_eval, PTCacheEdit::psys, PSYS_GLOBAL_HAIR, and psys_mat_hair_to_global().
Referenced by brush_edit_apply(), copy_particle_edit(), mirror_exec(), PE_create_particle_edit(), PE_update_object(), and shape_cut_exec().
|
static |
Definition at line 3316 of file particle_edit.c.
References ParticleEditSettings::brush, ParticleEditSettings::brushtype, C, CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), DEG_id_tag_update(), depsgraph, PEData::edit, ParticleSystem::edit, ParticleData::hair, Object::id, ID_RECALC_GEOMETRY, interpf(), KEY_K, LOOP_SELECTED_KEYS, LOOP_SELECTED_POINTS, NA_EDITED, NC_OBJECT, ND_PARTICLE, PEData::ob, OPERATOR_FINISHED, ParticleSystem::particles, PE_get_current(), PE_settings(), POINT_P, PTCacheEdit::psys, wmOperator::ptr, RNA_float_get(), scene, ParticleBrushData::strength, HairKey::weight, and WM_event_add_notifier().
Referenced by PARTICLE_OT_weight_set().
|
static |
Definition at line 3432 of file particle_edit.c.
Referenced by PARTICLE_OT_delete().
|
static |
Definition at line 2092 of file particle_edit.c.
Referenced by PARTICLE_OT_select_random().