Blender  V2.93
editlattice_select.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
17  * All rights reserved.
18  */
19 
24 #include <stdlib.h>
25 
26 #include "MEM_guardedalloc.h"
27 
28 #include "BLI_bitmap.h"
29 #include "BLI_listbase.h"
30 #include "BLI_math.h"
31 #include "BLI_rand.h"
32 #include "BLI_utildefines.h"
33 
34 #include "DNA_curve_types.h"
35 #include "DNA_lattice_types.h"
36 #include "DNA_meshdata_types.h"
37 #include "DNA_object_types.h"
38 #include "DNA_scene_types.h"
39 
40 #include "RNA_access.h"
41 #include "RNA_define.h"
42 #include "RNA_enum_types.h"
43 
44 #include "BKE_context.h"
45 #include "BKE_lattice.h"
46 #include "BKE_layer.h"
47 #include "BKE_report.h"
48 
49 #include "ED_lattice.h"
50 #include "ED_object.h"
51 #include "ED_screen.h"
52 #include "ED_select_utils.h"
53 #include "ED_view3d.h"
54 
55 #include "WM_api.h"
56 #include "WM_types.h"
57 
58 #include "DEG_depsgraph.h"
59 
60 #include "lattice_intern.h"
61 
62 /* -------------------------------------------------------------------- */
66 static void bpoint_select_set(BPoint *bp, bool select)
67 {
68  if (select) {
69  if (!bp->hide) {
70  bp->f1 |= SELECT;
71  }
72  }
73  else {
74  bp->f1 &= ~SELECT;
75  }
76 }
77 
78 bool ED_lattice_deselect_all_multi_ex(struct Base **bases, const uint bases_len)
79 {
80  bool changed_multi = false;
81  for (uint base_index = 0; base_index < bases_len; base_index++) {
82  Base *base_iter = bases[base_index];
83  Object *ob_iter = base_iter->object;
84  changed_multi |= ED_lattice_flags_set(ob_iter, 0);
86  }
87  return changed_multi;
88 }
89 
91 {
93  ViewContext vc;
95  uint bases_len = 0;
97  vc.view_layer, vc.v3d, &bases_len);
98  bool changed_multi = ED_lattice_deselect_all_multi_ex(bases, bases_len);
99  MEM_freeN(bases);
100  return changed_multi;
101 }
102 
105 /* -------------------------------------------------------------------- */
110 {
111  const float randfac = RNA_float_get(op->ptr, "ratio");
113  const bool select = (RNA_enum_get(op->ptr, "action") == SEL_SELECT);
114 
115  ViewLayer *view_layer = CTX_data_view_layer(C);
116  uint objects_len = 0;
118  view_layer, CTX_wm_view3d(C), &objects_len);
119  for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
120  Object *obedit = objects[ob_index];
121  Lattice *lt = ((Lattice *)obedit->data)->editlatt->latt;
122 
123  RNG *rng = BLI_rng_new_srandom(seed);
124 
125  int tot;
126  BPoint *bp;
127 
128  tot = lt->pntsu * lt->pntsv * lt->pntsw;
129  bp = lt->def;
130  while (tot--) {
131  if (!bp->hide) {
132  if (BLI_rng_get_float(rng) < randfac) {
134  }
135  }
136  bp++;
137  }
138 
139  if (select == false) {
140  lt->actbp = LT_ACTBP_NONE;
141  }
142 
143  BLI_rng_free(rng);
144 
147  }
148  MEM_freeN(objects);
149 
150  return OPERATOR_FINISHED;
151 }
152 
154 {
155  /* identifiers */
156  ot->name = "Select Random";
157  ot->description = "Randomly select UVW control points";
158  ot->idname = "LATTICE_OT_select_random";
159 
160  /* api callbacks */
163 
164  /* flags */
166 
167  /* props */
169 }
170 
173 /* -------------------------------------------------------------------- */
177 static void ed_lattice_select_mirrored(Lattice *lt, const int axis, const bool extend)
178 {
179  const int tot = lt->pntsu * lt->pntsv * lt->pntsw;
180 
181  bool flip_uvw[3] = {false};
182  flip_uvw[axis] = true;
183 
184  /* we could flip this too */
185  if (!extend) {
186  lt->actbp = LT_ACTBP_NONE;
187  }
188 
189  /* store "original" selection */
190  BLI_bitmap *selpoints = BLI_BITMAP_NEW(tot, __func__);
191  BKE_lattice_bitmap_from_flag(lt, selpoints, SELECT, false, false);
192 
193  /* actual (de)selection */
194  for (int i = 0; i < tot; i++) {
195  const int i_flip = BKE_lattice_index_flip(lt, i, flip_uvw[0], flip_uvw[1], flip_uvw[2]);
196  BPoint *bp = &lt->def[i];
197  if (!bp->hide) {
198  if (BLI_BITMAP_TEST(selpoints, i_flip)) {
199  bp->f1 |= SELECT;
200  }
201  else {
202  if (!extend) {
203  bp->f1 &= ~SELECT;
204  }
205  }
206  }
207  }
208 
209  MEM_freeN(selpoints);
210 }
211 
213 {
214  const int axis_flag = RNA_enum_get(op->ptr, "axis");
215  const bool extend = RNA_boolean_get(op->ptr, "extend");
216 
217  ViewLayer *view_layer = CTX_data_view_layer(C);
218  uint objects_len = 0;
220  view_layer, CTX_wm_view3d(C), &objects_len);
221 
222  for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
223  Object *obedit = objects[ob_index];
224  Lattice *lt = ((Lattice *)obedit->data)->editlatt->latt;
225 
226  for (int axis = 0; axis < 3; axis++) {
227  if ((1 << axis) & axis_flag) {
228  ed_lattice_select_mirrored(lt, axis, extend);
229  }
230  }
231 
232  /* TODO, only notify changes */
235  }
236  MEM_freeN(objects);
237 
238  return OPERATOR_FINISHED;
239 }
240 
242 {
243  /* identifiers */
244  ot->name = "Select Mirror";
245  ot->description = "Select mirrored lattice points";
246  ot->idname = "LATTICE_OT_select_mirror";
247 
248  /* api callbacks */
251 
252  /* flags */
254 
255  /* props */
256  RNA_def_enum_flag(ot->srna, "axis", rna_enum_axis_flag_xyz_items, (1 << 0), "Axis", "");
257 
258  RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend the selection");
259 }
260 
263 /* -------------------------------------------------------------------- */
268  Lattice *lt, const BLI_bitmap *selpoints, int u, int v, int w, const bool selected)
269 {
270  if ((u < 0 || u >= lt->pntsu) || (v < 0 || v >= lt->pntsv) || (w < 0 || w >= lt->pntsw)) {
271  return false;
272  }
273 
274  int i = BKE_lattice_index_from_uvw(lt, u, v, w);
275  if (lt->def[i].hide == 0) {
276  return (BLI_BITMAP_TEST(selpoints, i) != 0) == selected;
277  }
278  return false;
279 }
280 
281 static int lattice_select_more_less(bContext *C, const bool select)
282 {
283  ViewLayer *view_layer = CTX_data_view_layer(C);
284  uint objects_len;
285  bool changed = false;
286 
288  view_layer, CTX_wm_view3d(C), &objects_len);
289  for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
290  Object *obedit = objects[ob_index];
291  Lattice *lt = ((Lattice *)obedit->data)->editlatt->latt;
292  BPoint *bp;
293  const int tot = lt->pntsu * lt->pntsv * lt->pntsw;
294  int u, v, w;
295  BLI_bitmap *selpoints;
296 
297  lt->actbp = LT_ACTBP_NONE;
298 
299  selpoints = BLI_BITMAP_NEW(tot, __func__);
300  BKE_lattice_bitmap_from_flag(lt, selpoints, SELECT, false, false);
301 
302  bp = lt->def;
303  for (w = 0; w < lt->pntsw; w++) {
304  for (v = 0; v < lt->pntsv; v++) {
305  for (u = 0; u < lt->pntsu; u++) {
306  if ((bp->hide == 0) && (((bp->f1 & SELECT) == 0) == select)) {
307  if (lattice_test_bitmap_uvw(lt, selpoints, u + 1, v, w, select) ||
308  lattice_test_bitmap_uvw(lt, selpoints, u - 1, v, w, select) ||
309  lattice_test_bitmap_uvw(lt, selpoints, u, v + 1, w, select) ||
310  lattice_test_bitmap_uvw(lt, selpoints, u, v - 1, w, select) ||
311  lattice_test_bitmap_uvw(lt, selpoints, u, v, w + 1, select) ||
312  lattice_test_bitmap_uvw(lt, selpoints, u, v, w - 1, select)) {
314  }
315  }
316  bp++;
317  }
318  }
319  }
320 
321  MEM_freeN(selpoints);
322 
323  changed = true;
326  }
327  MEM_freeN(objects);
328 
329  return changed ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
330 }
331 
333 {
334  return lattice_select_more_less(C, true);
335 }
336 
338 {
339  return lattice_select_more_less(C, false);
340 }
341 
343 {
344  /* identifiers */
345  ot->name = "Select More";
346  ot->description = "Select vertex directly linked to already selected ones";
347  ot->idname = "LATTICE_OT_select_more";
348 
349  /* api callbacks */
352 
353  /* flags */
355 }
356 
358 {
359  /* identifiers */
360  ot->name = "Select Less";
361  ot->description = "Deselect vertices at the boundary of each selection region";
362  ot->idname = "LATTICE_OT_select_less";
363 
364  /* api callbacks */
367 
368  /* flags */
370 }
371 
374 /* -------------------------------------------------------------------- */
378 bool ED_lattice_flags_set(Object *obedit, int flag)
379 {
380  Lattice *lt = obedit->data;
381  BPoint *bp;
382  int a;
383  bool changed = false;
384 
385  bp = lt->editlatt->latt->def;
386 
387  a = lt->editlatt->latt->pntsu * lt->editlatt->latt->pntsv * lt->editlatt->latt->pntsw;
388 
389  if (lt->editlatt->latt->actbp != LT_ACTBP_NONE) {
391  changed = true;
392  }
393 
394  while (a--) {
395  if (bp->hide == 0) {
396  if (bp->f1 != flag) {
397  bp->f1 = flag;
398  changed = true;
399  }
400  }
401  bp++;
402  }
403  return changed;
404 }
405 
407 {
408  ViewLayer *view_layer = CTX_data_view_layer(C);
409  int action = RNA_enum_get(op->ptr, "action");
410 
411  uint objects_len = 0;
413  view_layer, CTX_wm_view3d(C), &objects_len);
414 
415  if (action == SEL_TOGGLE) {
416  action = SEL_SELECT;
417  for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
418  Object *obedit = objects[ob_index];
419  Lattice *lt = obedit->data;
421  action = SEL_DESELECT;
422  break;
423  }
424  }
425  }
426 
427  bool changed_multi = false;
428  for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
429  Object *obedit = objects[ob_index];
430  Lattice *lt;
431  BPoint *bp;
432  int a;
433  bool changed = false;
434 
435  switch (action) {
436  case SEL_SELECT:
437  changed = ED_lattice_flags_set(obedit, 1);
438  break;
439  case SEL_DESELECT:
440  changed = ED_lattice_flags_set(obedit, 0);
441  break;
442  case SEL_INVERT:
443  lt = obedit->data;
444  bp = lt->editlatt->latt->def;
445  a = lt->editlatt->latt->pntsu * lt->editlatt->latt->pntsv * lt->editlatt->latt->pntsw;
447 
448  while (a--) {
449  if (bp->hide == 0) {
450  bp->f1 ^= SELECT;
451  changed = true;
452  }
453  bp++;
454  }
455  break;
456  }
457  if (changed) {
458  changed_multi = true;
461  }
462  }
463  MEM_freeN(objects);
464 
465  if (changed_multi) {
466  return OPERATOR_FINISHED;
467  }
468  return OPERATOR_CANCELLED;
469 }
470 
472 {
473  /* identifiers */
474  ot->name = "(De)select All";
475  ot->description = "Change selection of all UVW control points";
476  ot->idname = "LATTICE_OT_select_all";
477 
478  /* api callbacks */
481 
482  /* flags */
484 
486 }
487 
490 /* -------------------------------------------------------------------- */
495 {
496  ViewLayer *view_layer = CTX_data_view_layer(C);
497  uint objects_len;
498  const bool is_extend = RNA_boolean_get(op->ptr, "extend");
499  bool changed = false;
500 
502  view_layer, CTX_wm_view3d(C), &objects_len);
503  for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
504  Object *obedit = objects[ob_index];
505  Lattice *lt = ((Lattice *)obedit->data)->editlatt->latt;
506  MDeformVert *dv;
507  BPoint *bp;
508  int a, tot;
509 
510  if (BLI_listbase_is_empty(&obedit->defbase) || lt->dvert == NULL) {
511  continue;
512  }
513 
514  if (!is_extend) {
515  ED_lattice_flags_set(obedit, 0);
516  }
517 
518  dv = lt->dvert;
519  tot = lt->pntsu * lt->pntsv * lt->pntsw;
520 
521  for (a = 0, bp = lt->def; a < tot; a++, bp++, dv++) {
522  if (bp->hide == 0) {
523  if (dv->dw == NULL) {
524  bp->f1 |= SELECT;
525  }
526  }
527  }
528 
529  changed = true;
532  }
533  MEM_freeN(objects);
534 
535  if (!changed) {
536  BKE_report(op->reports,
537  RPT_ERROR,
538  objects_len > 1 ? "No weights/vertex groups on objects" :
539  "No weights/vertex groups on object");
540  return OPERATOR_CANCELLED;
541  }
542  return OPERATOR_FINISHED;
543 }
544 
546 {
547  /* identifiers */
548  ot->name = "Select Ungrouped";
549  ot->idname = "LATTICE_OT_select_ungrouped";
550  ot->description = "Select vertices without a group";
551 
552  /* api callbacks */
555 
556  /* flags */
558 
559  RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend the selection");
560 }
561 
564 /* -------------------------------------------------------------------- */
571 static void findnearestLattvert__doClosest(void *userData, BPoint *bp, const float screen_co[2])
572 {
573  struct {
574  BPoint *bp;
575  float dist;
576  int select;
577  float mval_fl[2];
578  bool is_changed;
579  } *data = userData;
580  float dist_test = len_manhattan_v2v2(data->mval_fl, screen_co);
581 
582  if ((bp->f1 & SELECT) && data->select) {
583  dist_test += 5.0f;
584  }
585 
586  if (dist_test < data->dist) {
587  data->dist = dist_test;
588  data->bp = bp;
589  data->is_changed = true;
590  }
591 }
592 
593 static BPoint *findnearestLattvert(ViewContext *vc, int sel, Base **r_base)
594 {
595  /* (sel == 1): selected gets a disadvantage */
596  /* in nurb and bezt or bp the nearest is written */
597  /* return 0 1 2: handlepunt */
598  struct {
599  BPoint *bp;
600  float dist;
601  int select;
602  float mval_fl[2];
603  bool is_changed;
604  } data = {NULL};
605 
607  data.select = sel;
608  data.mval_fl[0] = vc->mval[0];
609  data.mval_fl[1] = vc->mval[1];
610 
611  uint bases_len;
613  vc->view_layer, vc->v3d, &bases_len);
614  for (uint base_index = 0; base_index < bases_len; base_index++) {
615  Base *base = bases[base_index];
616  data.is_changed = false;
617 
622 
623  if (data.is_changed) {
624  *r_base = base;
625  }
626  }
627  MEM_freeN(bases);
628  return data.bp;
629 }
630 
632  bContext *C, const int mval[2], bool extend, bool deselect, bool toggle)
633 {
635  ViewContext vc;
636  BPoint *bp = NULL;
637  Base *basact = NULL;
638 
640  vc.mval[0] = mval[0];
641  vc.mval[1] = mval[1];
642 
643  bp = findnearestLattvert(&vc, true, &basact);
644  if (bp) {
646  Lattice *lt = ((Lattice *)vc.obedit->data)->editlatt->latt;
647 
648  if (!extend && !deselect && !toggle) {
649  uint objects_len = 0;
651  vc.view_layer, vc.v3d, &objects_len);
652  for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
653  Object *ob = objects[ob_index];
654  if (ED_lattice_flags_set(ob, 0)) {
657  }
658  }
659  MEM_freeN(objects);
660  }
661 
662  if (extend) {
663  bp->f1 |= SELECT;
664  }
665  else if (deselect) {
666  bp->f1 &= ~SELECT;
667  }
668  else if (toggle) {
669  bp->f1 ^= SELECT; /* swap */
670  }
671  else {
673  bp->f1 |= SELECT;
674  }
675 
676  if (bp->f1 & SELECT) {
677  lt->actbp = bp - lt->def;
678  }
679  else {
680  lt->actbp = LT_ACTBP_NONE;
681  }
682 
683  if (vc.view_layer->basact != basact) {
684  ED_object_base_activate(C, basact);
685  }
686 
689 
690  return true;
691  }
692 
693  return false;
694 }
695 
struct ViewLayer * CTX_data_view_layer(const bContext *C)
Definition: context.c:1044
struct Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
Definition: context.c:1424
struct View3D * CTX_wm_view3d(const bContext *C)
Definition: context.c:760
int BKE_lattice_index_flip(struct Lattice *lt, const int index, const bool flip_u, const bool flip_v, const bool flip_w)
Definition: lattice.c:232
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)
Definition: lattice.c:254
int BKE_lattice_index_from_uvw(struct Lattice *lt, const int u, const int v, const int w)
Definition: lattice.c:214
#define BKE_view_layer_array_from_objects_in_edit_mode_unique_data(view_layer, v3d, r_len)
Definition: BKE_layer.h:426
#define BKE_view_layer_array_from_bases_in_edit_mode_unique_data(view_layer, v3d, r_len)
Definition: BKE_layer.h:430
void BKE_report(ReportList *reports, ReportType type, const char *message)
Definition: report.c:104
#define BLI_BITMAP_TEST(_bitmap, _index)
Definition: BLI_bitmap.h:63
#define BLI_BITMAP_NEW(_tot, _alloc_string)
Definition: BLI_bitmap.h:50
unsigned int BLI_bitmap
Definition: BLI_bitmap.h:32
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
Definition: BLI_listbase.h:124
MINLINE float len_manhattan_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
Random number functions.
void BLI_rng_free(struct RNG *rng) ATTR_NONNULL(1)
Definition: rand.cc:76
struct RNG * BLI_rng_new_srandom(unsigned int seed)
Definition: rand.cc:64
float BLI_rng_get_float(struct RNG *rng) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
Definition: rand.cc:120
unsigned int uint
Definition: BLI_sys_types.h:83
#define UNUSED(x)
#define SET_FLAG_FROM_TEST(value, test, flag)
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:51
void DEG_id_tag_update(struct ID *id, int flag)
@ ID_RECALC_SELECT
Definition: DNA_ID.h:638
#define LT_ACTBP_NONE
Object is a sort of wrapper for general info.
@ OPERATOR_CANCELLED
@ OPERATOR_FINISHED
void ED_object_base_activate(struct bContext *C, struct Base *base)
bool ED_operator_editlattice(struct bContext *C)
Definition: screen_ops.c:598
@ SEL_SELECT
@ SEL_INVERT
@ SEL_DESELECT
@ SEL_TOGGLE
void ED_view3d_init_mats_rv3d(struct Object *ob, struct RegionView3D *rv3d)
Definition: space_view3d.c:190
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
Definition: ED_view3d.h:201
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.
#define C
Definition: RandGen.cpp:39
#define NC_GEOM
Definition: WM_types.h:294
@ OPTYPE_UNDO
Definition: WM_types.h:155
@ OPTYPE_REGISTER
Definition: WM_types.h:153
#define ND_SELECT
Definition: WM_types.h:407
ATTR_WARN_UNUSED_RESULT const BMVert * v
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
Definition: btQuadWord.h:119
static unsigned long seed
Definition: btSoftBody.h:39
#define SELECT
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)
Definition: mallocn.c:41
static unsigned a[3]
Definition: RandGen.cpp:92
float RNA_float_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:6355
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:6261
int RNA_enum_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:6402
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3481
PropertyRNA * RNA_def_enum_flag(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3795
const EnumPropertyItem rna_enum_axis_flag_xyz_items[]
Definition: rna_modifier.c:591
short hide
uint8_t f1
struct Object * object
struct Lattice * latt
struct MDeformVert * dvert
struct EditLatt * editlatt
struct BPoint * def
struct MDeformWeight * dw
ListBase defbase
void * data
Definition: rand.cc:48
int mval[2]
Definition: ED_view3d.h:85
struct ViewLayer * view_layer
Definition: ED_view3d.h:77
struct Object * obedit
Definition: ED_view3d.h:79
struct View3D * v3d
Definition: ED_view3d.h:81
struct RegionView3D * rv3d
Definition: ED_view3d.h:83
struct Base * basact
const char * name
Definition: WM_types.h:721
const char * idname
Definition: WM_types.h:723
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:776
struct StructRNA * srna
Definition: WM_types.h:802
const char * description
Definition: WM_types.h:726
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:736
struct ReportList * reports
struct PointerRNA * ptr
__forceinline const avxb select(const avxb &m, const avxb &t, const avxb &f)
Definition: util_avxb.h:167
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
wmOperatorType * ot
Definition: wm_files.c:3156
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)