|
Blender
V2.93
|
#include <stdlib.h>#include "MEM_guardedalloc.h"#include "BLI_bitmap.h"#include "BLI_listbase.h"#include "BLI_math.h"#include "BLI_rand.h"#include "BLI_utildefines.h"#include "DNA_curve_types.h"#include "DNA_lattice_types.h"#include "DNA_meshdata_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "RNA_access.h"#include "RNA_define.h"#include "RNA_enum_types.h"#include "BKE_context.h"#include "BKE_lattice.h"#include "BKE_layer.h"#include "BKE_report.h"#include "ED_lattice.h"#include "ED_object.h"#include "ED_screen.h"#include "ED_select_utils.h"#include "ED_view3d.h"#include "WM_api.h"#include "WM_types.h"#include "DEG_depsgraph.h"#include "lattice_intern.h"Go to the source code of this file.
Functions | |
Utility Functions | |
| static void | bpoint_select_set (BPoint *bp, bool select) |
| bool | ED_lattice_deselect_all_multi_ex (struct Base **bases, const uint bases_len) |
| bool | ED_lattice_deselect_all_multi (struct bContext *C) |
Select Random Operator | |
| static int | lattice_select_random_exec (bContext *C, wmOperator *op) |
| void | LATTICE_OT_select_random (wmOperatorType *ot) |
Select Mirror Operator | |
| static void | ed_lattice_select_mirrored (Lattice *lt, const int axis, const bool extend) |
| static int | lattice_select_mirror_exec (bContext *C, wmOperator *op) |
| void | LATTICE_OT_select_mirror (wmOperatorType *ot) |
Select More/Less Operator | |
| static bool | lattice_test_bitmap_uvw (Lattice *lt, const BLI_bitmap *selpoints, int u, int v, int w, const bool selected) |
| static int | lattice_select_more_less (bContext *C, const bool select) |
| static int | lattice_select_more_exec (bContext *C, wmOperator *UNUSED(op)) |
| static int | lattice_select_less_exec (bContext *C, wmOperator *UNUSED(op)) |
| void | LATTICE_OT_select_more (wmOperatorType *ot) |
| void | LATTICE_OT_select_less (wmOperatorType *ot) |
Select All Operator | |
| bool | ED_lattice_flags_set (Object *obedit, int flag) |
| static int | lattice_select_all_exec (bContext *C, wmOperator *op) |
| void | LATTICE_OT_select_all (wmOperatorType *ot) |
Select Ungrouped Verts Operator | |
| static int | lattice_select_ungrouped_exec (bContext *C, wmOperator *op) |
| void | LATTICE_OT_select_ungrouped (wmOperatorType *ot) |
Select Picking API | |
Here actual select happens, Gets called via generic mouse select operator. | |
| static void | findnearestLattvert__doClosest (void *userData, BPoint *bp, const float screen_co[2]) |
| static BPoint * | findnearestLattvert (ViewContext *vc, int sel, Base **r_base) |
| bool | ED_lattice_select_pick (bContext *C, const int mval[2], bool extend, bool deselect, bool toggle) |
|
static |
Definition at line 66 of file editlattice_select.c.
References BPoint::f1, BPoint::hide, select(), and SELECT.
Referenced by lattice_select_random_exec().
| bool ED_lattice_deselect_all_multi | ( | struct bContext * | C | ) |
Definition at line 90 of file editlattice_select.c.
References BKE_view_layer_array_from_bases_in_edit_mode_unique_data, C, CTX_data_ensure_evaluated_depsgraph(), depsgraph, ED_lattice_deselect_all_multi_ex(), ED_view3d_viewcontext_init(), MEM_freeN, ViewContext::v3d, and ViewContext::view_layer.
Referenced by view3d_select_exec().
Definition at line 78 of file editlattice_select.c.
References Object::data, DEG_id_tag_update(), ED_lattice_flags_set(), ID_RECALC_SELECT, and Base::object.
Referenced by ED_lattice_deselect_all_multi().
| bool ED_lattice_flags_set | ( | Object * | obedit, |
| int | flag | ||
| ) |
Definition at line 378 of file editlattice_select.c.
References Freestyle::a, Lattice::actbp, Object::data, Lattice::def, Lattice::editlatt, BPoint::f1, BPoint::hide, EditLatt::latt, LT_ACTBP_NONE, Lattice::pntsu, Lattice::pntsv, and Lattice::pntsw.
Referenced by do_lasso_select_lattice(), do_lattice_box_select(), ED_lattice_deselect_all_multi_ex(), ED_lattice_select_pick(), lattice_circle_select(), lattice_select_all_exec(), and lattice_select_ungrouped_exec().
|
static |
Definition at line 177 of file editlattice_select.c.
References Lattice::actbp, BKE_lattice_bitmap_from_flag(), BKE_lattice_index_flip(), BLI_BITMAP_NEW, BLI_BITMAP_TEST, Lattice::def, BPoint::f1, BPoint::hide, LT_ACTBP_NONE, MEM_freeN, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, and SELECT.
Referenced by lattice_select_mirror_exec().
| bool ED_lattice_select_pick | ( | bContext * | C, |
| const int | mval[2], | ||
| bool | extend, | ||
| bool | deselect, | ||
| bool | toggle | ||
| ) |
Definition at line 631 of file editlattice_select.c.
References Lattice::actbp, ViewLayer::basact, BKE_view_layer_array_from_objects_in_edit_mode_unique_data, C, CTX_data_ensure_evaluated_depsgraph(), Object::data, Lattice::def, DEG_id_tag_update(), depsgraph, ED_lattice_flags_set(), ED_object_base_activate(), ED_view3d_viewcontext_init(), ED_view3d_viewcontext_init_object(), Lattice::editlatt, BPoint::f1, findnearestLattvert(), ID_RECALC_SELECT, EditLatt::latt, LT_ACTBP_NONE, MEM_freeN, ViewContext::mval, NC_GEOM, ND_SELECT, NULL, ViewContext::obedit, Base::object, SELECT, ViewContext::v3d, ViewContext::view_layer, and WM_event_add_notifier().
Referenced by view3d_select_exec().
|
static |
Definition at line 593 of file editlattice_select.c.
References BKE_view_layer_array_from_bases_in_edit_mode_unique_data, data, ED_view3d_init_mats_rv3d(), ED_view3d_select_dist_px(), ED_view3d_viewcontext_init_object(), findnearestLattvert__doClosest(), lattice_foreachScreenVert(), MEM_freeN, ViewContext::mval, NULL, Base::object, ViewContext::rv3d, select(), ViewContext::v3d, V3D_PROJ_TEST_CLIP_DEFAULT, and ViewContext::view_layer.
Referenced by ED_lattice_select_pick().
|
static |
Definition at line 571 of file editlattice_select.c.
References data, BPoint::f1, len_manhattan_v2v2(), select(), and SELECT.
Referenced by findnearestLattvert().
| void LATTICE_OT_select_all | ( | wmOperatorType * | ot | ) |
Definition at line 471 of file editlattice_select.c.
References wmOperatorType::description, ED_operator_editlattice(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, lattice_select_all_exec(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and WM_operator_properties_select_all().
Referenced by ED_operatortypes_lattice().
| void LATTICE_OT_select_less | ( | wmOperatorType * | ot | ) |
Definition at line 357 of file editlattice_select.c.
References wmOperatorType::description, ED_operator_editlattice(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, lattice_select_less_exec(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_lattice().
| void LATTICE_OT_select_mirror | ( | wmOperatorType * | ot | ) |
Definition at line 241 of file editlattice_select.c.
References wmOperatorType::description, ED_operator_editlattice(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, lattice_select_mirror_exec(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), RNA_def_enum_flag(), rna_enum_axis_flag_xyz_items, and wmOperatorType::srna.
Referenced by ED_operatortypes_lattice().
| void LATTICE_OT_select_more | ( | wmOperatorType * | ot | ) |
Definition at line 342 of file editlattice_select.c.
References wmOperatorType::description, ED_operator_editlattice(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, lattice_select_more_exec(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_lattice().
| void LATTICE_OT_select_random | ( | wmOperatorType * | ot | ) |
Definition at line 153 of file editlattice_select.c.
References wmOperatorType::description, ED_operator_editlattice(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, lattice_select_random_exec(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and WM_operator_properties_select_random().
Referenced by ED_operatortypes_lattice().
| void LATTICE_OT_select_ungrouped | ( | wmOperatorType * | ot | ) |
Definition at line 545 of file editlattice_select.c.
References wmOperatorType::description, ED_operator_editlattice(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, lattice_select_ungrouped_exec(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_lattice().
|
static |
Definition at line 406 of file editlattice_select.c.
References Freestyle::a, Lattice::actbp, BKE_lattice_is_any_selected(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data, C, CTX_data_view_layer(), CTX_wm_view3d(), Object::data, Lattice::def, DEG_id_tag_update(), ED_lattice_flags_set(), Lattice::editlatt, BPoint::f1, BPoint::hide, ID_RECALC_SELECT, EditLatt::latt, LT_ACTBP_NONE, MEM_freeN, NC_GEOM, ND_SELECT, OPERATOR_CANCELLED, OPERATOR_FINISHED, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, wmOperator::ptr, RNA_enum_get(), SEL_DESELECT, SEL_INVERT, SEL_SELECT, SEL_TOGGLE, SELECT, and WM_event_add_notifier().
Referenced by LATTICE_OT_select_all().
|
static |
Definition at line 337 of file editlattice_select.c.
References C, and lattice_select_more_less().
Referenced by LATTICE_OT_select_less().
|
static |
Definition at line 212 of file editlattice_select.c.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data, C, CTX_data_view_layer(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), ed_lattice_select_mirrored(), Lattice::editlatt, ID_RECALC_SELECT, EditLatt::latt, MEM_freeN, NC_GEOM, ND_SELECT, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), RNA_enum_get(), and WM_event_add_notifier().
Referenced by LATTICE_OT_select_mirror().
|
static |
Definition at line 332 of file editlattice_select.c.
References C, and lattice_select_more_less().
Referenced by LATTICE_OT_select_more().
|
static |
Definition at line 281 of file editlattice_select.c.
References Lattice::actbp, BKE_lattice_bitmap_from_flag(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data, BLI_BITMAP_NEW, C, CTX_data_view_layer(), CTX_wm_view3d(), Object::data, Lattice::def, DEG_id_tag_update(), Lattice::editlatt, BPoint::f1, BPoint::hide, ID_RECALC_SELECT, EditLatt::latt, lattice_test_bitmap_uvw(), LT_ACTBP_NONE, MEM_freeN, NC_GEOM, ND_SELECT, OPERATOR_CANCELLED, OPERATOR_FINISHED, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, select(), SELECT, SET_FLAG_FROM_TEST, v, w(), and WM_event_add_notifier().
Referenced by lattice_select_less_exec(), and lattice_select_more_exec().
|
static |
Definition at line 109 of file editlattice_select.c.
References Lattice::actbp, BKE_view_layer_array_from_objects_in_edit_mode_unique_data, BLI_rng_free(), BLI_rng_get_float(), BLI_rng_new_srandom(), bpoint_select_set(), C, CTX_data_view_layer(), CTX_wm_view3d(), Object::data, Lattice::def, DEG_id_tag_update(), Lattice::editlatt, BPoint::hide, ID_RECALC_SELECT, EditLatt::latt, LT_ACTBP_NONE, MEM_freeN, NC_GEOM, ND_SELECT, OPERATOR_FINISHED, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, wmOperator::ptr, RNA_enum_get(), RNA_float_get(), seed, SEL_SELECT, select(), WM_event_add_notifier(), and WM_operator_properties_select_random_seed_increment_get().
Referenced by LATTICE_OT_select_random().
|
static |
Definition at line 494 of file editlattice_select.c.
References Freestyle::a, BKE_report(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data, BLI_listbase_is_empty(), C, CTX_data_view_layer(), CTX_wm_view3d(), Object::data, Lattice::def, Object::defbase, DEG_id_tag_update(), Lattice::dvert, MDeformVert::dw, ED_lattice_flags_set(), Lattice::editlatt, BPoint::f1, BPoint::hide, ID_RECALC_SELECT, EditLatt::latt, MEM_freeN, NC_GEOM, ND_SELECT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), RPT_ERROR, SELECT, and WM_event_add_notifier().
Referenced by LATTICE_OT_select_ungrouped().
|
static |
Definition at line 267 of file editlattice_select.c.
References BKE_lattice_index_from_uvw(), BLI_BITMAP_TEST, Lattice::def, BPoint::hide, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, v, and w().
Referenced by lattice_select_more_less().