80 bool changed_multi =
false;
81 for (
uint base_index = 0; base_index < bases_len; base_index++) {
82 Base *base_iter = bases[base_index];
100 return changed_multi;
116 uint objects_len = 0;
119 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
120 Object *obedit = objects[ob_index];
156 ot->
name =
"Select Random";
158 ot->
idname =
"LATTICE_OT_select_random";
181 bool flip_uvw[3] = {
false};
182 flip_uvw[axis] =
true;
194 for (
int i = 0; i < tot; i++) {
218 uint objects_len = 0;
222 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
223 Object *obedit = objects[ob_index];
226 for (
int axis = 0; axis < 3; axis++) {
227 if ((1 << axis) & axis_flag) {
244 ot->
name =
"Select Mirror";
246 ot->
idname =
"LATTICE_OT_select_mirror";
270 if ((u < 0 || u >= lt->
pntsu) || (v < 0 || v >= lt->
pntsv) || (w < 0 || w >= lt->
pntsw)) {
285 bool changed =
false;
289 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
290 Object *obedit = objects[ob_index];
305 for (u = 0; u < lt->
pntsu; u++) {
346 ot->
description =
"Select vertex directly linked to already selected ones";
347 ot->
idname =
"LATTICE_OT_select_more";
361 ot->
description =
"Deselect vertices at the boundary of each selection region";
362 ot->
idname =
"LATTICE_OT_select_less";
383 bool changed =
false;
396 if (bp->
f1 != flag) {
411 uint objects_len = 0;
417 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
418 Object *obedit = objects[ob_index];
427 bool changed_multi =
false;
428 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
429 Object *obedit = objects[ob_index];
433 bool changed =
false;
458 changed_multi =
true;
474 ot->
name =
"(De)select All";
475 ot->
description =
"Change selection of all UVW control points";
476 ot->
idname =
"LATTICE_OT_select_all";
499 bool changed =
false;
503 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
504 Object *obedit = objects[ob_index];
521 for (
a = 0, bp = lt->
def;
a < tot;
a++, bp++, dv++) {
538 objects_len > 1 ?
"No weights/vertex groups on objects" :
539 "No weights/vertex groups on object");
548 ot->
name =
"Select Ungrouped";
549 ot->
idname =
"LATTICE_OT_select_ungrouped";
586 if (dist_test < data->dist) {
587 data->dist = dist_test;
589 data->is_changed =
true;
614 for (
uint base_index = 0; base_index < bases_len; base_index++) {
615 Base *base = bases[base_index];
616 data.is_changed =
false;
623 if (
data.is_changed) {
632 bContext *
C,
const int mval[2],
bool extend,
bool deselect,
bool toggle)
640 vc.
mval[0] = mval[0];
641 vc.
mval[1] = mval[1];
648 if (!extend && !deselect && !toggle) {
649 uint objects_len = 0;
652 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
653 Object *ob = objects[ob_index];
struct ViewLayer * CTX_data_view_layer(const bContext *C)
struct Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
struct View3D * CTX_wm_view3d(const bContext *C)
int BKE_lattice_index_flip(struct Lattice *lt, const int index, const bool flip_u, const bool flip_v, const bool flip_w)
bool BKE_lattice_is_any_selected(const struct Lattice *lt)
void BKE_lattice_bitmap_from_flag(struct Lattice *lt, unsigned int *bitmap, const uint8_t flag, const bool clear, const bool respecthide)
int BKE_lattice_index_from_uvw(struct Lattice *lt, const int u, const int v, const int w)
#define BKE_view_layer_array_from_objects_in_edit_mode_unique_data(view_layer, v3d, r_len)
#define BKE_view_layer_array_from_bases_in_edit_mode_unique_data(view_layer, v3d, r_len)
void BKE_report(ReportList *reports, ReportType type, const char *message)
#define BLI_BITMAP_TEST(_bitmap, _index)
#define BLI_BITMAP_NEW(_tot, _alloc_string)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
MINLINE float len_manhattan_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
void BLI_rng_free(struct RNG *rng) ATTR_NONNULL(1)
struct RNG * BLI_rng_new_srandom(unsigned int seed)
float BLI_rng_get_float(struct RNG *rng) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define SET_FLAG_FROM_TEST(value, test, flag)
struct Depsgraph Depsgraph
void DEG_id_tag_update(struct ID *id, int flag)
Object is a sort of wrapper for general info.
void ED_object_base_activate(struct bContext *C, struct Base *base)
bool ED_operator_editlattice(struct bContext *C)
void ED_view3d_init_mats_rv3d(struct Object *ob, struct RegionView3D *rv3d)
void ED_view3d_viewcontext_init(struct bContext *C, struct ViewContext *vc, struct Depsgraph *depsgraph)
void ED_view3d_viewcontext_init_object(struct ViewContext *vc, struct Object *obact)
#define V3D_PROJ_TEST_CLIP_DEFAULT
void lattice_foreachScreenVert(struct ViewContext *vc, void(*func)(void *userData, struct BPoint *bp, const float screen_co[2]), void *userData, const eV3DProjTest clip_flag)
float ED_view3d_select_dist_px(void)
Read Guarded memory(de)allocation.
ATTR_WARN_UNUSED_RESULT const BMVert * v
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
static unsigned long seed
const Depsgraph * depsgraph
bool ED_lattice_select_pick(bContext *C, const int mval[2], bool extend, bool deselect, bool toggle)
static void findnearestLattvert__doClosest(void *userData, BPoint *bp, const float screen_co[2])
bool ED_lattice_deselect_all_multi_ex(struct Base **bases, const uint bases_len)
bool ED_lattice_deselect_all_multi(struct bContext *C)
static int lattice_select_less_exec(bContext *C, wmOperator *UNUSED(op))
void LATTICE_OT_select_all(wmOperatorType *ot)
static void bpoint_select_set(BPoint *bp, bool select)
void LATTICE_OT_select_random(wmOperatorType *ot)
static int lattice_select_random_exec(bContext *C, wmOperator *op)
void LATTICE_OT_select_more(wmOperatorType *ot)
static int lattice_select_more_less(bContext *C, const bool select)
static BPoint * findnearestLattvert(ViewContext *vc, int sel, Base **r_base)
void LATTICE_OT_select_ungrouped(wmOperatorType *ot)
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_all_exec(bContext *C, wmOperator *op)
void LATTICE_OT_select_mirror(wmOperatorType *ot)
static int lattice_select_more_exec(bContext *C, wmOperator *UNUSED(op))
static int lattice_select_ungrouped_exec(bContext *C, wmOperator *op)
bool ED_lattice_flags_set(Object *obedit, int flag)
static void ed_lattice_select_mirrored(Lattice *lt, const int axis, const bool extend)
void LATTICE_OT_select_less(wmOperatorType *ot)
static int lattice_select_mirror_exec(bContext *C, wmOperator *op)
void(* MEM_freeN)(void *vmemh)
float RNA_float_get(PointerRNA *ptr, const char *name)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_enum_flag(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
const EnumPropertyItem rna_enum_axis_flag_xyz_items[]
struct MDeformVert * dvert
struct EditLatt * editlatt
struct ViewLayer * view_layer
struct RegionView3D * rv3d
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
__forceinline const avxb select(const avxb &m, const avxb &t, const avxb &f)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
int WM_operator_properties_select_random_seed_increment_get(wmOperator *op)
void WM_operator_properties_select_random(wmOperatorType *ot)
void WM_operator_properties_select_all(wmOperatorType *ot)