|
Blender V4.3
|
#include <algorithm>#include <cmath>#include <cstdlib>#include <cstring>#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.hh"#include "BLI_listbase.h"#include "BLI_math_matrix.h"#include "BLI_rand.h"#include "BLI_rect.h"#include "BLI_task.h"#include "BLI_time_utildefines.h"#include "BLI_utildefines.h"#include "BKE_bvhutils.hh"#include "BKE_context.hh"#include "BKE_customdata.hh"#include "BKE_global.hh"#include "BKE_layer.hh"#include "BKE_main.hh"#include "BKE_mesh.hh"#include "BKE_mesh_legacy_convert.hh"#include "BKE_mesh_runtime.hh"#include "BKE_modifier.hh"#include "BKE_object.hh"#include "BKE_particle.h"#include "BKE_pointcache.h"#include "BKE_report.hh"#include "BKE_scene.hh"#include "DEG_depsgraph.hh"#include "ED_mesh.hh"#include "ED_object.hh"#include "ED_particle.hh"#include "ED_physics.hh"#include "ED_screen.hh"#include "ED_select_utils.hh"#include "ED_view3d.hh"#include "GPU_immediate.hh"#include "GPU_immediate_util.hh"#include "GPU_state.hh"#include "UI_resources.hh"#include "WM_api.hh"#include "WM_message.hh"#include "WM_toolsystem.hh"#include "WM_types.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "DEG_depsgraph_query.hh"#include "physics_intern.hh"#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 |
Iterators | |
| enum | eParticleSelectFlag { PSEL_NEAREST = (1 << 0) , PSEL_ALL_KEYS = (1 << 1) } |
| using | ForPointFunc = void (*)(PEData *data, int point_index) |
| using | ForHitPointFunc = void (*)(PEData *data, int point_index, float mouse_distance) |
| using | ForKeyFunc = void (*)(PEData *data, int point_index, int key_index, bool is_inside) |
| using | ForKeyMatFunc |
| using | ForHitKeyMatFunc |
| static void | for_mouse_hit_keys (PEData *data, ForKeyFunc func, const enum eParticleSelectFlag flag) |
| static void | foreach_mouse_hit_point (PEData *data, ForHitPointFunc func, int selected) |
| static void | foreach_mouse_hit_key_iter (void *__restrict iter_data_v, const int iter, const TaskParallelTLS *__restrict) |
| static void | foreach_mouse_hit_key (PEData *data, ForHitKeyMatFunc 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) |
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) |
| static int | delete_exec (bContext *C, wmOperator *op) |
| void | PARTICLE_OT_delete (wmOperatorType *ot) |
| using ForHitKeyMatFunc |
Definition at line 715 of file particle_edit.cc.
| using ForHitPointFunc = void (*)(PEData *data, int point_index, float mouse_distance) |
Definition at line 705 of file particle_edit.cc.
| using ForKeyFunc = void (*)(PEData *data, int point_index, int key_index, bool is_inside) |
Definition at line 707 of file particle_edit.cc.
| using ForKeyMatFunc |
Definition at line 709 of file particle_edit.cc.
| using ForPointFunc = void (*)(PEData *data, int point_index) |
Definition at line 704 of file particle_edit.cc.
| anonymous enum |
| Enumerator | |
|---|---|
| RAN_HAIR | |
| RAN_POINTS | |
Definition at line 2099 of file particle_edit.cc.
| anonymous enum |
| Enumerator | |
|---|---|
| DEL_PARTICLE | |
| DEL_KEY | |
Definition at line 3454 of file particle_edit.cc.
| enum eParticleSelectFlag |
| Enumerator | |
|---|---|
| PSEL_NEAREST | |
| PSEL_ALL_KEYS | |
Definition at line 723 of file particle_edit.cc.
|
static |
Definition at line 1304 of file particle_edit.cc.
References add_v3_v3v3(), PTCacheEditKey::co, ApplyLengthsIterData::edit, LOOP_KEYS, mul_v3_fl(), normalize_v3(), PEP_EDIT_RECALC, PTCacheEdit::points, and sub_v3_v3v3().
Referenced by PE_apply_lengths().
|
static |
Definition at line 4073 of file particle_edit.cc.
References flag, ParticleData::hair, ParticleSystem::particles, PEP_EDIT_RECALC, PTCacheEdit::psys, and HairKey::weight.
Referenced by brush_edit_apply().
Definition at line 4423 of file particle_edit.cc.
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(), HairKey::co, ParticleKey::co, PTCacheEditKey::co, copy_m4_m4(), CTX_data_depsgraph_pointer(), BrushAddCountIterData::data, data, BrushAddCountIterData::depsgraph, depsgraph, ParticleSimulationData::depsgraph, DMCACHE_NOTFOUND, ParticleEditSettings::flag, ParticleSystem::flag, PTCacheEditKey::flag, float, ParticleData::foffset, ParticleSettings::from, ParticleData::fuv, ParticleData::hair, BrushAddCountIterData::imat, init_particle(), invert_m4_m4(), ParticleData::lifetime, madd_v3_v3v3fl(), MEM_callocN, MEM_freeN(), MEM_SAFE_FREE, BrushAddCountIterData::mesh, mesh, ParticleSystemModifierData::mesh_final, ParticleSystemModifierData::mesh_original, PTCacheEdit::mirror_cache, mul_m4_v3(), mul_v3_fl(), ParticleData::num, BrushAddCountIterTLSData::num_added, ParticleData::num_dmcache, BrushAddCountIterData::number, ParticleSimulationData::ob, BrushAddCountIterData::object, 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, BrushAddCountIterData::scene, ParticleSimulationData::scene, scene, ParticleSystem::seed, BrushAddCountIterData::size, ParticleBrushData::size, ParticleData::size, size(), ParticleData::state, sub_v3_v3v3(), HairKey::time, ParticleData::time, ParticleKey::time, PTCacheEditKey::time, ParticleEditSettings::totaddkey, ParticleData::totkey, ParticleSystem::totpart, PTCacheEdit::totpoint, tree, ParticleSettings::use_modifier_stack, ParticleKey::vel, w(), and HairKey::weight.
Referenced by brush_edit_apply().
|
static |
Definition at line 4320 of file particle_edit.cc.
References BrushAddCountIterData::add_pars, BLI_assert, BLI_rng_get_float(), BLI_rng_new_srandom(), BLI_task_parallel_thread_id(), BrushAddCountIterData::data, BrushAddCountIterData::depsgraph, 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(), 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, BrushAddCountIterData::size, size(), and ParticleSettings::use_modifier_stack.
Referenced by brush_add().
|
static |
Definition at line 4414 of file particle_edit.cc.
References BLI_rng_free(), and BrushAddCountIterTLSData::rng.
Referenced by brush_add().
|
static |
Definition at line 4405 of file particle_edit.cc.
References BrushAddCountIterTLSData::num_added.
Referenced by brush_add().
|
static |
Definition at line 3750 of file particle_edit.cc.
References add_v3_v3(), PTCacheEditKey::co, copy_v3_v3(), flag, ParticleEditSettings::flag, float, mul_mat3_m4_v3(), mul_v3_fl(), PE_LOCK_FIRST, PE_settings(), PEP_EDIT_RECALC, and pow().
Referenced by brush_edit_apply().
Definition at line 3775 of file particle_edit.cc.
References BLI_assert, BLI_rng_get_float(), ParticleCacheKey::co, ParticleEditSettings::draw_step, ED_view3d_project_int_global(), PTCacheEditPoint::flag, float, int, key_test_depth(), PTCacheEdit::pathcache, PE_settings(), PEP_EDIT_RECALC, PEP_HIDE, PEP_TAG, PTCacheEdit::points, pow(), rekey_particle_to_time(), sqrtf, V3D_PROJ_RET_OK, and V3D_PROJ_TEST_CLIP_NEAR.
Referenced by brush_edit_apply().
Definition at line 3404 of file particle_edit.cc.
References ParticleEditSettings::brush, ParticleEditSettings::brushtype, CTX_data_scene(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_smooth(), GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), imm_draw_circle_wire_2d(), immBindBuiltinProgram(), immUnbindProgram(), immUniformColor4ub(), immVertexFormat(), pe_brush_size_get(), PE_settings(), pos, and WM_toolsystem_active_tool_is_brush().
Referenced by toggle_particle_cursor().
|
static |
Definition at line 4753 of file particle_edit.cc.
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, PEData::context, ParticleBrushData::count, count_selected_keys(), CTX_data_depsgraph_pointer(), CTX_wm_region(), wmOperator::customdata, BrushEdit::data, DEG_id_tag_update(), depsgraph, ED_view3d_win_to_delta(), BrushEdit::edit, ELEM, fabsf, BrushEdit::first, ParticleEditSettings::flag, ParticleSystem::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, ParticleBrushData::invert, invert_m4_m4(), BrushEdit::lastmouse, max_ff(), ParticleSystemModifierData::mesh_final, mul_v3_fl(), NA_EDITED, NC_OBJECT, ND_MODIFIER, ND_PARTICLE, BrushEdit::ob, 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(), Object::runtime, 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 5013 of file particle_edit.cc.
References brush_edit_apply(), 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 5062 of file particle_edit.cc.
References brush_edit_exit().
Referenced by PARTICLE_OT_brush_edit().
|
static |
Definition at line 4997 of file particle_edit.cc.
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 |
Definition at line 4989 of file particle_edit.cc.
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 4719 of file particle_edit.cc.
References 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(), BrushEdit::scene, scene, BrushEdit::view_layer, and BrushEdit::zfac.
Referenced by brush_edit_exec(), and brush_edit_invoke().
|
static |
Definition at line 5030 of file particle_edit.cc.
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 |
Definition at line 5043 of file particle_edit.cc.
References brush_edit_apply_event(), brush_edit_exit(), KM_RELEASE, LEFTMOUSE, MIDDLEMOUSE, MOUSEMOVE, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, RIGHTMOUSE, wmEvent::type, and wmEvent::val.
Referenced by PARTICLE_OT_brush_edit().
|
static |
Definition at line 5067 of file particle_edit.cc.
References PE_poll_view3d(), and WM_toolsystem_active_tool_is_brush().
Referenced by PARTICLE_OT_brush_edit().
Definition at line 3883 of file particle_edit.cc.
References add_v3_v3v3(), copy_v3_v3(), KEY_K, LOOP_KEYS, mul_v3_fl(), PEP_EDIT_RECALC, PTCacheEdit::points, and sub_v3_v3v3().
Referenced by brush_edit_apply().
Definition at line 3905 of file particle_edit.cc.
References add_v3_v3(), ParticleEditSettings::brush, ParticleEditSettings::brushtype, copy_v3_v3(), cross_v3_v3v3(), dist_ensure_v3_v3fl(), PTCacheEdit::emitter_cosnos, PTCacheEdit::emitter_field, ParticleBrushData::flag, ParticleSystem::flag, float, ParticleSettings::from, invert_m4_m4(), is_zero_v3(), 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(), 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(), sub_v3_v3v3(), unit_m4(), and zero_v3().
Referenced by brush_edit_apply().
|
static |
Definition at line 4111 of file particle_edit.cc.
References add_v3_v3(), PTCacheEditKey::co, copy_v3_v3(), flag, mul_mat3_m4_v3(), mul_v3_fl(), PEP_EDIT_RECALC, and sub_v3_v3v3().
Referenced by brush_edit_apply().
|
static |
Definition at line 4093 of file particle_edit.cc.
References add_v3_v3(), PTCacheEditKey::co, mul_mat3_m4_v3(), and sub_v3_v3v3().
Referenced by brush_edit_apply().
|
static |
Definition at line 5647 of file particle_edit.cc.
References calculate_point_length(), LOOP_SELECTED_POINTS, and POINT_P.
Referenced by unify_length_exec().
|
static |
Definition at line 5635 of file particle_edit.cc.
References KEY_K, len_v3v3(), length(), and LOOP_KEYS.
Referenced by calculate_average_length(), and scale_point_to_length().
|
static |
Definition at line 5581 of file particle_edit.cc.
References BKE_particle_batch_cache_dirty_tag(), BKE_PARTICLE_BATCH_DIRTY_ALL, CTX_data_active_object(), DEG_id_tag_update(), ParticleSystem::edit, ParticleSystem::flag, ParticleSystem::free_edit, Object::id, ID_RECALC_GEOMETRY, ID_RECALC_PSYS_RESET, NA_EDITED, NC_OBJECT, ND_PARTICLE, OPERATOR_FINISHED, PE_free_ptcache_edit(), psys_get_current(), psys_reset(), PSYS_RESET_DEPSGRAPH, ParticleSystem::recalc, and WM_event_add_notifier().
Referenced by PARTICLE_OT_edited_clear().
|
static |
Definition at line 949 of file particle_edit.cc.
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(), and shape_cut_exec().
|
static |
Definition at line 1201 of file particle_edit.cc.
References add_v3_v3(), PTCacheEditKey::co, copy_v3_v3(), DeflectEmitterIter::dist, 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(), DeflectEmitterIter::object, ParticleSystem::part, ParticleSystem::particles, PEP_EDIT_RECALC, 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 3476 of file particle_edit.cc.
References BKE_particle_batch_cache_dirty_tag(), BKE_PARTICLE_BATCH_DIRTY_ALL, 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(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_delete().
| void ED_object_particle_edit_mode_enter | ( | bContext * | C | ) |
Definition at line 5506 of file particle_edit.cc.
References CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), depsgraph, and ED_object_particle_edit_mode_enter_ex().
Definition at line 5477 of file particle_edit.cc.
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_GEOMETRY, ID_RECALC_SYNC_TO_EVAL, Object::mode, ParticleSystemModifierData::modifier, ModifierData::name, NC_SCENE, ND_MODE, NS_MODE_PARTICLE, OB_MODE_PARTICLE_EDIT, PE_create_current(), PTCacheEdit::psmd, PTCacheEdit::psmd_eval, PTCacheEdit::psys, recalc_emitter_field(), 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().
| void ED_object_particle_edit_mode_exit | ( | bContext * | C | ) |
Definition at line 5524 of file particle_edit.cc.
References CTX_data_active_object(), CTX_data_scene(), and ED_object_particle_edit_mode_exit_ex().
Definition at line 5514 of file particle_edit.cc.
References DEG_id_tag_update(), free_all_psys_edit(), Object::id, ID_RECALC_GEOMETRY, ID_RECALC_SYNC_TO_EVAL, Object::mode, NC_SCENE, ND_MODE, NS_MODE_OBJECT, toggle_particle_cursor(), and WM_main_add_notifier().
Referenced by blender::ed::object::ed_object_mode_generic_exit_ex(), ED_object_particle_edit_mode_exit(), and particle_edit_toggle_exec().
| bool ED_object_particle_edit_mode_supported | ( | const Object * | ob | ) |
Definition at line 5471 of file particle_edit.cc.
References BKE_modifiers_findby_type(), eModifierType_Cloth, eModifierType_Softbody, ListBase::first, and Object::particlesystem.
Referenced by blender::ed::object::mode_compat_test(), and particle_edit_toggle_poll().
|
static |
Definition at line 728 of file particle_edit.cc.
References flag, is_inside(), key_inside_circle(), key_inside_test(), KEY_K, KEY_WCO, LOOP_VISIBLE_KEYS, LOOP_VISIBLE_POINTS, PE_settings(), 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 896 of file particle_edit.cc.
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 840 of file particle_edit.cc.
References KeyIterData::data, KeyIterData::edit, ParticleSystem::flag, PTCacheEditKey::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, 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 792 of file particle_edit.cc.
References key_inside_circle(), KEY_K, KEY_WCO, LOOP_VISIBLE_KEYS, LOOP_VISIBLE_POINTS, PE_settings(), PEK_SELECT, POINT_P, SCE_SELECT_END, SCE_SELECT_PATH, and ParticleEditSettings::selectmode.
Referenced by brush_edit_apply().
|
static |
Definition at line 939 of file particle_edit.cc.
References 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 926 of file particle_edit.cc.
References KEY_K, LOOP_SELECTED_KEYS, LOOP_VISIBLE_POINTS, and POINT_P.
Referenced by delete_exec(), and select_linked_exec().
|
static |
Definition at line 916 of file particle_edit.cc.
References LOOP_SELECTED_POINTS, and POINT_P.
Referenced by brush_edit_apply(), delete_exec(), rekey_exec(), and shape_cut_exec().
|
static |
Definition at line 5456 of file particle_edit.cc.
References BLI_assert.
Referenced by ED_object_particle_edit_mode_exit_ex().
|
static |
Definition at line 2507 of file particle_edit.cc.
References CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), depsgraph, KEY_K, LOOP_KEYS, LOOP_SELECTED_POINTS, LOOP_UNSELECTED_POINTS, NA_SELECTED, NC_OBJECT, ND_PARTICLE, OPERATOR_FINISHED, PE_get_current(), PE_update_selection(), PEP_EDIT_RECALC, PEP_HIDE, POINT_P, wmOperator::ptr, RNA_boolean_get(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_hide().
|
static |
Definition at line 4137 of file particle_edit.cc.
References copy_v3_v3(), interp_weights_poly_v3(), v2, and w().
Referenced by particle_intersect_mesh().
|
static |
Definition at line 1353 of file particle_edit.cc.
References add_v3_v3(), add_v3_v3v3(), PTCacheEditKey::co, IterateLengthsIterData::edit, ParticleEditSettings::flag, float, PTCacheEditKey::length, mul(), mul_v3_fl(), normalize_v3(), PE_LOCK_FIRST, PEP_EDIT_RECALC, PTCacheEdit::points, IterateLengthsIterData::pset, and sub_v3_v3v3().
Referenced by pe_iterate_lengths().
|
static |
Definition at line 625 of file particle_edit.cc.
References 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 656 of file particle_edit.cc.
References 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 675 of file particle_edit.cc.
References key_inside_circle(), and key_inside_rect().
Referenced by for_mouse_hit_keys().
|
static |
Definition at line 583 of file particle_edit.cc.
References BLI_assert, 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 3695 of file particle_edit.cc.
References BKE_particle_batch_cache_dirty_tag(), BKE_PARTICLE_BATCH_DIRTY_ALL, 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_PARTICLE, OPERATOR_FINISHED, PE_get_current(), PE_mirror_x(), PTCacheEdit::psys, psys_free_path_cache(), update_world_cos(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_mirror().
|
static |
Definition at line 3714 of file particle_edit.cc.
References CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), depsgraph, ParticleSettings::from, ParticleSystem::part, PART_FROM_FACE, PE_get_current(), PE_hair_poll(), and PTCacheEdit::psys.
Referenced by PARTICLE_OT_mirror().
Definition at line 1842 of file particle_edit.cc.
References NearestParticleData::key, NearestParticleData::point, point, and PTCacheEdit::points.
Referenced by pe_nearest_point_and_key().
|
static |
Definition at line 5531 of file particle_edit.cc.
References CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_wm_message_bus(), depsgraph, ED_object_particle_edit_mode_enter_ex(), ED_object_particle_edit_mode_exit_ex(), Object::id, Object::mode, blender::ed::object::mode_compat_set(), OB_MODE_PARTICLE_EDIT, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, WM_msg_publish_rna_prop, and WM_toolsystem_update_from_context_view3d().
Referenced by PARTICLE_OT_particle_edit_toggle().
|
static |
Definition at line 5442 of file particle_edit.cc.
References CTX_data_active_object(), Object::data, ED_object_particle_edit_mode_supported(), ID_IS_EDITABLE, ID_IS_OVERRIDE_LIBRARY, 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 4155 of file particle_edit.cc.
References BKE_mesh_tessface_ensure(), BKE_object_get_evaluated_mesh(), CD_MFACE, copy_v3_v3(), CustomData_get_layer(), DEG_get_evaluated_object(), depsgraph, INIT_MINMAX, intersect(), intersect_dm_quad_weights(), isect_aabb_aabb_v3(), isect_line_segment_tri_v3(), isect_sweeping_sphere_tri_v3(), max, min, blender::math::min_max(), minmax_v3v3_v3(), psys_disable_all(), psys_enable_all(), MFace::v1, MFace::v2, v2, MFace::v3, and MFace::v4.
Referenced by brush_add_count_iter().
| void PARTICLE_OT_brush_edit | ( | wmOperatorType * | ot | ) |
Definition at line 5072 of file particle_edit.cc.
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 3501 of file particle_edit.cc.
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 5614 of file particle_edit.cc.
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 2544 of file particle_edit.cc.
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 3729 of file particle_edit.cc.
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 5560 of file particle_edit.cc.
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 2844 of file particle_edit.cc.
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 3314 of file particle_edit.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, FLT_MAX, 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 2596 of file particle_edit.cc.
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 1814 of file particle_edit.cc.
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 2666 of file particle_edit.cc.
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 2204 of file particle_edit.cc.
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 2250 of file particle_edit.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, 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 2738 of file particle_edit.cc.
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 2160 of file particle_edit.cc.
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 2000 of file particle_edit.cc.
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 2075 of file particle_edit.cc.
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 5290 of file particle_edit.cc.
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 3216 of file particle_edit.cc.
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 | ( | wmOperatorType * | ot | ) |
Definition at line 5731 of file particle_edit.cc.
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 3373 of file particle_edit.cc.
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 1328 of file particle_edit.cc.
References apply_lengths_iter(), BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), ApplyLengthsIterData::edit, ParticleEditSettings::flag, ParticleSystem::flag, PE_KEEP_LENGTHS, PE_settings(), PTCacheEdit::psys, PSYS_GLOBAL_HAIR, and PTCacheEdit::totpoint.
Referenced by PE_update_object().
|
static |
Definition at line 1141 of file particle_edit.cc.
References ParticleSystem::edit, PTCacheEditPoint::flag, LOOP_POINTS, ParticleSystemModifierData::mesh_final, PTCacheEdit::mirror_cache, ParticleSystem::particles, PE_mirror_particle(), PE_update_mirror_cache(), PEP_EDIT_RECALC, POINT_P, PTCacheEdit::points, and PTCacheEdit::psmd_eval.
Referenced by PE_update_object().
Definition at line 2307 of file particle_edit.cc.
References BLI_rcti_is_empty(), 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, SEL_OP_USE_PRE_DESELECT, select_key_op(), and WM_event_add_notifier().
Referenced by view3d_box_select_exec().
|
static |
Definition at line 244 of file particle_edit.cc.
References UnifiedPaintSettings::flag, ParticleBrushData::size, UnifiedPaintSettings::size, 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 2365 of file particle_edit.cc.
References BLI_assert, CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), wmGenericUserData::data, depsgraph, ELEM, for_mouse_hit_keys(), PEData::mval, NA_SELECTED, NC_OBJECT, ND_PARTICLE, PE_deselect_all_visible_ex(), PE_get_current(), pe_select_cache_init_with_generic_userdata(), PE_start_edit(), PE_update_selection(), 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 404 of file particle_edit.cc.
References depsgraph, and pe_get_current().
Referenced by blender::draw::drw_particle_update_ptcache(), ED_object_particle_edit_mode_enter_ex(), blender::draw::overlay::Particles::edit_object_sync(), OVERLAY_edit_particle_cache_populate(), and PE_current_changed().
| void PE_create_particle_edit | ( | Depsgraph * | depsgraph, |
| Scene * | scene, | ||
| Object * | ob, | ||
| PointCache * | cache, | ||
| ParticleSystem * | psys ) |
Initialize needed data for bake edit.
Definition at line 5311 of file particle_edit.cc.
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, HairKey::co, DEG_get_evaluated_object(), depsgraph, ParticleSystem::edit, PointCache::edit, HairKey::editflag, ListBase::first, ParticleSystem::flag, PointCache::flag, PTCacheEditKey::flag, float, ParticleSystem::free_edit, PointCache::free_edit, ParticleData::hair, int, KEY_K, LISTBASE_FOREACH, LOOP_KEYS, LOOP_POINTS, PointCache::mem_cache, MEM_callocN, ParticleSystemModifierData::mesh_final, ParticleSystemModifierData::modifier, ModifierData::name, ParticleSystem::particles, PTCacheEdit::pathcache, PTCacheEdit::pathcachebufs, PE_free_ptcache_edit(), PE_update_object(), PEK_USE_WCO, PEP_EDIT_RECALC, 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(), HairKey::time, ParticleData::totkey, ParticleSystem::totpart, PTCacheEdit::totpoint, and update_world_cos().
Referenced by pe_get_current().
|
static |
Definition at line 551 of file particle_edit.cc.
References BLI_rng_new(), BLI_time_now_seconds_i(), POINTER_AS_UINT, and UINT_MAX.
Referenced by brush_edit_init().
Definition at line 531 of file particle_edit.cc.
References BKE_bvhtree_from_mesh_get(), BKE_object_get_evaluated_mesh(), BVHTREE_FROM_CORNER_TRIS, and DEG_get_evaluated_object().
Referenced by shape_cut_exec().
Definition at line 409 of file particle_edit.cc.
References depsgraph, Object::mode, OB_MODE_PARTICLE_EDIT, and PE_create_current().
|
static |
Definition at line 567 of file particle_edit.cc.
References ED_view3d_depths_free(), 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 1270 of file particle_edit.cc.
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, ParticleEditSettings::flag, ParticleSystem::flag, ParticleSystemModifierData::mesh_final, DeflectEmitterIter::object, PE_DEFLECT_EMITTER, PE_settings(), PTCacheEdit::psmd_eval, DeflectEmitterIter::psys, PTCacheEdit::psys, PSYS_GLOBAL_HAIR, and PTCacheEdit::totpoint.
Referenced by PE_update_object().
| bool PE_deselect_all_visible | ( | bContext * | C | ) |
Definition at line 2295 of file particle_edit.cc.
References CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), depsgraph, PE_deselect_all_visible_ex(), PE_get_current(), and PE_start_edit().
| bool PE_deselect_all_visible_ex | ( | PTCacheEdit * | edit | ) |
Definition at line 2277 of file particle_edit.cc.
References KEY_K, LOOP_SELECTED_KEYS, LOOP_VISIBLE_POINTS, PEK_SELECT, PEP_EDIT_RECALC, 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 134 of file particle_edit.cc.
References PTCacheEdit::emitter_cosnos, PTCacheEdit::emitter_field, LOOP_POINTS, MEM_freeN(), PTCacheEdit::mirror_cache, POINT_P, PTCacheEdit::points, PTCacheEdit::psys, and psys_free_path_cache().
Referenced by clear_edited_exec(), PE_create_particle_edit(), and ptcache_free_bake().
|
static |
Definition at line 559 of file particle_edit.cc.
References BLI_rng_free().
Referenced by PE_data_free().
|
static |
Definition at line 546 of file particle_edit.cc.
References 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 399 of file particle_edit.cc.
References depsgraph, and pe_get_current().
Referenced by brush_edit_init(), convert_type_get(), createTransParticleVerts(), flushTransParticles(), gizmo_3d_foreach_selected(), 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 297 of file particle_edit.cc.
References BKE_ptcache_ids_from_object(), BLI_freelistN(), BLI_listbase_is_single(), PTCacheID::cache, PTCacheID::calldata, DEG_is_active(), depsgraph, ParticleSystem::edit, PointCache::edit, ParticleEditSettings::edittype, ListBase::first, ParticleEditSettings::flag, ParticleSystem::flag, PointCache::flag, PTCacheEdit::flags, PTCacheID::next, 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, ParticleEditSettings::scene, scene, ParticleSettings::type, and PTCacheID::type.
Referenced by PE_create_current(), and PE_get_current().
| PTCacheEdit * PE_get_current_from_psys | ( | ParticleSystem * | psys | ) |
Definition at line 254 of file particle_edit.cc.
References ParticleSystem::edit, PointCache::edit, ParticleSystem::flag, PointCache::flag, ParticleSystem::part, PART_HAIR, ParticleSystem::pointcache, PSYS_HAIR_DYNAMICS, PTCACHE_BAKED, and ParticleSettings::type.
Referenced by blender::draw::overlay::Particles::edit_object_sync(), and OVERLAY_edit_particle_cache_populate().
| bool PE_hair_poll | ( | bContext * | C | ) |
Definition at line 104 of file particle_edit.cc.
References CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), depsgraph, ParticleSystemModifierData::mesh_final, Object::mode, OB_MODE_PARTICLE_EDIT, PE_get_current(), PTCacheEdit::psmd_eval, and PTCacheEdit::psys.
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 416 of file particle_edit.cc.
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, and ParticleEditSettings::selectmode.
Referenced by PE_update_object().
|
static |
Definition at line 1403 of file particle_edit.cc.
References BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), IterateLengthsIterData::edit, ParticleEditSettings::flag, ParticleSystem::flag, iterate_lengths_iter(), PE_KEEP_LENGTHS, PE_settings(), IterateLengthsIterData::pset, PTCacheEdit::psys, PSYS_GLOBAL_HAIR, 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 2405 of file particle_edit.cc.
References BLI_lasso_is_point_inside(), 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(), ParticleSystem::flag, ParticleSettings::from, 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, 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_P, PTCacheEdit::psmd_eval, PTCacheEdit::psys, PSYS_GLOBAL_HAIR, psys_mat_hair_to_global(), SCE_SELECT_END, SCE_SELECT_POINT, 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, | ||
| blender::float3 & | min, | ||
| blender::float3 & | max ) |
Definition at line 171 of file particle_edit.cc.
References BKE_object_minmax(), BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), copy_v3_v3(), depsgraph, ParticleSettings::from, KEY_K, LOOP_SELECTED_KEYS, LOOP_VISIBLE_POINTS, ParticleSystemModifierData::mesh_final, min, blender::math::min_max(), mul_m4_v3(), ParticleSystem::part, ParticleSystem::particles, PE_get_current(), POINT_P, PTCacheEdit::psmd_eval, PTCacheEdit::psys, psys_mat_hair_to_global(), and unit_m4().
Referenced by brush_edit_init(), and viewselected_exec().
|
static |
Definition at line 1052 of file particle_edit.cc.
References HairKey::co, PTCacheEditKey::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(), PTCacheEdit::mirror_cache, mul_m4_v3(), ParticleSystem::part, ParticleSystem::particles, PE_update_mirror_cache(), PEK_TAG, PEP_EDIT_RECALC, PEP_TAG, point, PTCacheEdit::points, psys_mat_hair_to_orco(), HairKey::time, ParticleData::totkey, and PTCacheEditPoint::totkey.
Referenced by PE_apply_mirror(), PE_mirror_x(), remove_tagged_keys(), and remove_tagged_particles().
Definition at line 3531 of file particle_edit.cc.
References BKE_mesh_tessface_ensure(), CD_MFACE, PTCacheEditKey::co, CustomData_get_layer(), Object::data, depsgraph, DMCACHE_ISCHILD, Mesh::fdata_legacy, ParticleSystem::flag, PTCacheEditPoint::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, PTCacheEdit::mirror_cache, ParticleData::num, ParticleData::num_dmcache, 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, SHIFT3, SHIFT4, ParticleData::totkey, 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 SelectPick_Params * | params ) |
Definition at line 1876 of file particle_edit.cc.
References BLI_assert_unreachable, CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), depsgraph, PTCacheEditKey::flag, 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, 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 1854 of file particle_edit.cc.
References data, ED_view3d_select_dist_px(), for_mouse_hit_keys(), NearestParticleData::key, nearest_key_fn(), PE_data_free(), PE_set_view3d_data(), NearestParticleData::point, and PSEL_NEAREST.
Referenced by PE_mouse_particles().
| bool PE_poll | ( | bContext * | C | ) |
Definition at line 83 of file particle_edit.cc.
References CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), depsgraph, ParticleSystemModifierData::mesh_final, Object::mode, OB_MODE_PARTICLE_EDIT, PE_get_current(), and PTCacheEdit::psmd_eval.
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().
| bool PE_poll_view3d | ( | bContext * | C | ) |
Definition at line 125 of file particle_edit.cc.
References CTX_wm_area(), CTX_wm_region(), PE_poll(), 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 1776 of file particle_edit.cc.
References 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_P, wmOperator::ptr, RNA_enum_get(), SEL_DESELECT, SEL_SELECT, SEL_TOGGLE, select_action_apply(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_select_all().
|
static |
Definition at line 2350 of file particle_edit.cc.
References MEM_freeN(), and PE_data_free().
Referenced by pe_select_cache_init_with_generic_userdata().
|
static |
Definition at line 2356 of file particle_edit.cc.
References 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 502 of file particle_edit.cc.
References C, CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), 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 515 of file particle_edit.cc.
References 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 239 of file particle_edit.cc.
Referenced by blender::draw::overlay::Particles::begin_sync(), 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 226 of file particle_edit.cc.
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 271 of file particle_edit.cc.
References HairKey::co, PTCacheEditKey::co, HairKey::editflag, ParticleSystem::flag, PTCacheEditKey::flag, ParticleData::hair, ParticleSystem::particles, PEK_USE_WCO, PTCacheEdit::points, PTCacheEdit::psys, PSYS_GLOBAL_HAIR, HairKey::time, PTCacheEditKey::time, and PTCacheEdit::totpoint.
Referenced by pe_get_current().
|
static |
Definition at line 981 of file particle_edit.cc.
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 1626 of file particle_edit.cc.
References depsgraph, ParticleEditSettings::flag, ParticleSystem::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_P, PTCacheEdit::psys, psys_cache_edit_paths(), ParticleSettings::type, update_velocities(), and update_world_cos().
Referenced by brush_edit_apply(), copy_particle_edit(), disconnect_hair(), blender::draw::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 1500 of file particle_edit.cc.
References 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_P, PTCacheEdit::psys, and psys_cache_edit_paths().
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().
Definition at line 444 of file particle_edit.cc.
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 5120 of file particle_edit.cc.
References PointInsideBVH::bvhdata, and BVHTreeFromMesh::raycast_callback.
Referenced by shape_cut_test_point().
|
static |
Definition at line 683 of file particle_edit.cc.
References KEY_K, LOOP_SELECTED_KEYS, and PEP_HIDE.
Referenced by find_fcurve_segment(), and PE_mirror_x().
| void recalc_emitter_field | ( | Depsgraph * | depsgraph, |
| Object * | ob, | ||
| ParticleSystem * | psys ) |
Calculate a tree for finding nearest emitter's vertices.
Definition at line 1439 of file particle_edit.cc.
References add_v3_v3(), add_v3_v3v3(), CD_MFACE, copy_v3_v3(), CustomData_get_layer(), ParticleSystem::edit, PTCacheEdit::emitter_cosnos, PTCacheEdit::emitter_field, MEM_callocN, MEM_freeN(), ParticleSystemModifierData::mesh_final, mul_v3_fl(), nor, normalize_v3(), PTCacheEdit::psmd_eval, 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 | ( | PTCacheEdit * | edit | ) |
Set current distances to be kept between neighboring keys.
Definition at line 1422 of file particle_edit.cc.
References KEY_K, len_v3v3(), LOOP_EDITED_POINTS, 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 2826 of file particle_edit.cc.
References 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 2759 of file particle_edit.cc.
References HairKey::co, PTCacheEditKey::co, copy_v3_v3(), ParticleSimulationData::depsgraph, ParticleData::flag, ParticleSystem::flag, PTCacheEditKey::flag, float, ParticleData::hair, MEM_callocN, MEM_freeN(), 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, ParticleSimulationData::scene, state, HairKey::time, PTCacheEditKey::time, and ParticleData::totkey.
Referenced by rekey_exec().
|
static |
Definition at line 2863 of file particle_edit.cc.
References HairKey::co, PTCacheEditKey::co, copy_v3_v3(), CTX_data_depsgraph_pointer(), depsgraph, ParticleSimulationData::depsgraph, ParticleData::flag, float, 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, scene, state, HairKey::time, PTCacheEditKey::time, and ParticleData::totkey.
Referenced by brush_cut(), and shape_cut().
|
static |
Definition at line 3237 of file particle_edit.cc.
References BKE_reportf(), copy_v3_v3(), CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), DEG_id_tag_update(), depsgraph, 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, OPERATOR_CANCELLED, OPERATOR_FINISHED, ParticleSystem::part, ParticleSystem::particles, PE_get_current(), PEP_TAG, 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, ParticleSystem::totpart, tree, and WM_event_add_notifier().
Referenced by PARTICLE_OT_remove_doubles().
|
static |
Definition at line 3008 of file particle_edit.cc.
References BKE_modifier_get_evaluated(), HairKey::co, PTCacheEditKey::co, copy_v3_v3(), depsgraph, 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, ParticleSystem::particles, PE_mirror_particle(), pe_x_mirror(), PEK_TAG, PEP_EDIT_RECALC, PEP_TAG, POINT_P, psys_get_modifier(), remove_tagged_particles(), HairKey::time, PTCacheEditKey::time, ParticleData::totkey, HairKey::weight, and PTCacheEditKey::world_co.
Referenced by delete_exec().
|
static |
Definition at line 2923 of file particle_edit.cc.
References ParticleSystem::child, ParticleSystem::edit, ELEM, LOOP_TAGGED_POINTS, MEM_callocN, MEM_freeN(), MEM_SAFE_FREE, ParticleSystemModifierData::mesh_final, PTCacheEdit::mirror_cache, ParticleSystem::particles, PE_mirror_particle(), PEP_TAG, 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 2569 of file particle_edit.cc.
References CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), depsgraph, 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, wmOperator::ptr, RNA_boolean_get(), select(), SET_FLAG_FROM_TEST, and WM_event_add_notifier().
Referenced by PARTICLE_OT_reveal().
|
static |
Definition at line 5662 of file particle_edit.cc.
References add_v3_v3v3(), copy_v3_v3(), KEY_K, LOOP_KEYS, mul_v3_fl(), PEP_EDIT_RECALC, and sub_v3_v3v3().
Referenced by scale_point_to_length().
|
static |
Definition at line 5687 of file particle_edit.cc.
References calculate_point_length(), and scale_point_factor().
Referenced by scale_points_to_length().
|
static |
Definition at line 5696 of file particle_edit.cc.
References LOOP_SELECTED_POINTS, POINT_P, recalc_lengths(), and scale_point_to_length().
Referenced by unify_length_exec().
|
static |
Definition at line 1742 of file particle_edit.cc.
References PTCacheEditKey::flag, PEK_SELECT, PEP_EDIT_RECALC, SEL_DESELECT, SEL_INVERT, and SEL_SELECT.
Referenced by pe_select_all_exec(), select_random_exec(), select_root(), and select_tip().
Definition at line 1687 of file particle_edit.cc.
References PTCacheEditKey::flag, PEK_SELECT, PEP_EDIT_RECALC, and PTCacheEdit::points.
Referenced by PE_circle_select().
Definition at line 1704 of file particle_edit.cc.
References ED_select_op_action_deselected(), PTCacheEditKey::flag, is_inside(), PEK_SELECT, PEP_EDIT_RECALC, PTCacheEdit::points, and SET_FLAG_FROM_TEST.
Referenced by PE_box_select().
Definition at line 1718 of file particle_edit.cc.
References PTCacheEditPoint::flag, KEY_K, LOOP_KEYS, PEK_SELECT, PEP_EDIT_RECALC, and PTCacheEdit::points.
Referenced by select_linked_exec(), and select_linked_pick_exec().
|
static |
Definition at line 2653 of file particle_edit.cc.
References 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 blender::ed::curves::CURVES_OT_select_less(), blender::ed::greasepencil::GREASE_PENCIL_OT_select_less(), and PARTICLE_OT_select_less().
Definition at line 2620 of file particle_edit.cc.
References flag, PTCacheEditPoint::flag, KEY_K, LOOP_KEYS, LOOP_SELECTED_KEYS, PEK_SELECT, PEK_TAG, PEP_EDIT_RECALC, and PTCacheEdit::points.
Referenced by select_less_exec().
|
static |
Definition at line 2190 of file particle_edit.cc.
References 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 2221 of file particle_edit.cc.
References 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 2244 of file particle_edit.cc.
References wmEvent::mval, wmOperator::ptr, RNA_int_set_array(), and select_linked_pick_exec().
Referenced by PARTICLE_OT_select_linked_pick().
|
static |
Definition at line 2725 of file particle_edit.cc.
References 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 blender::ed::curves::CURVES_OT_select_more(), blender::ed::greasepencil::GREASE_PENCIL_OT_select_more(), and PARTICLE_OT_select_more().
Definition at line 2687 of file particle_edit.cc.
References flag, PTCacheEditPoint::flag, KEY_K, LOOP_KEYS, PEK_SELECT, PEK_TAG, PEP_EDIT_RECALC, and PTCacheEdit::points.
Referenced by select_more_exec().
|
static |
Definition at line 2107 of file particle_edit.cc.
References BLI_rng_free(), BLI_rng_get_float(), BLI_rng_new_srandom(), data, flag, 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(), WM_event_add_notifier(), and WM_operator_properties_select_random_seed_increment_get().
Referenced by blender::ed::curves::CURVES_OT_select_random(), blender::ed::greasepencil::GREASE_PENCIL_OT_select_random(), and PARTICLE_OT_select_random().
Definition at line 1957 of file particle_edit.cc.
References PTCacheEditKey::flag, PEK_SELECT, PEP_HIDE, SEL_DESELECT, SEL_TOGGLE, and select_action_apply().
Referenced by select_roots_exec().
|
static |
Definition at line 1974 of file particle_edit.cc.
References 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 2024 of file particle_edit.cc.
References PTCacheEditKey::flag, PEK_SELECT, PEP_HIDE, SEL_DESELECT, SEL_TOGGLE, and select_action_apply().
Referenced by select_tips_exec().
|
static |
Definition at line 2047 of file particle_edit.cc.
References 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 3462 of file particle_edit.cc.
References PTCacheEditPoint::flag, PEP_TAG, and PTCacheEdit::points.
Referenced by delete_exec().
Definition at line 3469 of file particle_edit.cc.
References PTCacheEditKey::flag, PTCacheEditPoint::keys, PEK_TAG, and PTCacheEdit::points.
Referenced by delete_exec().
Definition at line 5154 of file particle_edit.cc.
References BLI_bvhtree_ray_cast(), ParticleCacheKey::co, ParticleEditSettings::draw_step, PTCacheEditPoint::flag, 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 5223 of file particle_edit.cc.
References BKE_particle_batch_cache_dirty_tag(), BKE_PARTICLE_BATCH_DIRTY_ALL, count_selected_keys(), CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), data, DEG_id_tag_update(), depsgraph, ParticleEditSettings::flag, ParticleSystem::flag, foreach_point(), foreach_selected_point(), Object::id, ID_RECALC_GEOMETRY, ID_RECALC_PSYS_REDO, NA_EDITED, NC_OBJECT, ND_MODIFIER, ND_PARTICLE, 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(), shape_cut(), ParticleEditSettings::shape_object, update_world_cos(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_shape_cut().
|
static |
Definition at line 5101 of file particle_edit.cc.
References CTX_data_scene(), OB_MESH, PE_hair_poll(), PE_settings(), ParticleEditSettings::shape_object, and Object::type.
Referenced by PARTICLE_OT_shape_cut().
|
static |
Definition at line 5135 of file particle_edit.cc.
References BLI_bvhtree_ray_cast_all(), BVH_RAYCAST_DIST_MAX, PointInsideBVH::bvhdata, ParticleCacheKey::co, mul_v3_m4v3(), PointInsideBVH::num_hits, point_inside_bvh_cb(), ParticleEditSettings::shape_object, and BVHTreeFromMesh::tree.
Referenced by shape_cut().
|
static |
Definition at line 3200 of file particle_edit.cc.
References 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 3110 of file particle_edit.cc.
References HairKey::co, PTCacheEditKey::co, copy_v3_v3(), ParticleSimulationData::depsgraph, ParticleData::flag, ParticleSystem::flag, PTCacheEditKey::flag, ParticleData::hair, MEM_callocN, MEM_freeN(), 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, ParticleSimulationData::scene, state, HairKey::time, PTCacheEditKey::time, and ParticleData::totkey.
Referenced by subdivide_exec().
|
static |
Definition at line 3434 of file particle_edit.cc.
References brush_drawcursor(), ParticleEditSettings::paintcursor, PE_poll_view3d(), PE_settings(), RGN_TYPE_WINDOW, 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 5705 of file particle_edit.cc.
References 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(), and WM_event_add_notifier().
Referenced by PARTICLE_OT_unify_length().
|
static |
Definition at line 1564 of file particle_edit.cc.
References 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().
| void update_world_cos | ( | Object * | ob, |
| PTCacheEdit * | edit ) |
Definition at line 1536 of file particle_edit.cc.
References copy_v3_v3(), ParticleSystem::edit, ParticleSystem::flag, ParticleSettings::from, KEY_K, LOOP_KEYS, LOOP_POINTS, ParticleSystemModifierData::mesh_final, mul_m4_v3(), 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 3340 of file particle_edit.cc.
References ParticleEditSettings::brush, ParticleEditSettings::brushtype, CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), DEG_id_tag_update(), depsgraph, ParticleSystem::edit, ParticleData::hair, Object::id, ID_RECALC_GEOMETRY, interpf(), KEY_K, LOOP_SELECTED_KEYS, LOOP_SELECTED_POINTS, NA_EDITED, NC_OBJECT, ND_PARTICLE, OPERATOR_FINISHED, 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().
|
static |
Definition at line 3456 of file particle_edit.cc.
Referenced by PARTICLE_OT_delete().
|
static |
Definition at line 2101 of file particle_edit.cc.
Referenced by PARTICLE_OT_select_random().