Blender  V3.3
wm_operator_props.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2007 Blender Foundation. All rights reserved. */
3 
11 #include "DNA_ID_enums.h"
12 #include "DNA_space_types.h"
13 
14 #include "BKE_lib_id.h"
15 #include "BKE_main.h"
16 
17 #include "BLI_math_base.h"
18 #include "BLI_rect.h"
19 
20 #include "UI_resources.h"
21 
22 #include "RNA_access.h"
23 #include "RNA_define.h"
24 #include "RNA_enum_types.h"
25 #include "RNA_prototypes.h"
26 
27 #include "ED_select_utils.h"
28 
29 #include "WM_api.h"
30 #include "WM_types.h"
31 
33 {
34  PropertyRNA *prop;
35 
36  prop = RNA_def_boolean(ot->srna, "confirm", true, "Confirm", "Prompt for confirmation");
38 }
39 
44  struct bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
45 {
46  EnumPropertyItem *items;
47  const EnumPropertyItem default_item = {
49  "DEFAULT",
50  0,
51  "Default",
52  "Automatically determine sort method for files",
53  };
54  int totitem = 0;
55 
56  RNA_enum_item_add(&items, &totitem, &default_item);
58  RNA_enum_item_end(&items, &totitem);
59  *r_free = true;
60 
61  return items;
62 }
63 
65  const int filter,
66  const short type,
67  const eFileSel_Action action,
68  const eFileSel_Flag flag,
69  const short display,
70  const short sort)
71 {
72  PropertyRNA *prop;
73 
74  static const EnumPropertyItem file_display_items[] = {
76  "DEFAULT",
77  0,
78  "Default",
79  "Automatically determine display type for files"},
81  "LIST_VERTICAL",
82  ICON_SHORTDISPLAY, /* Name of deprecated short list */
83  "Short List",
84  "Display files as short list"},
86  "LIST_HORIZONTAL",
87  ICON_LONGDISPLAY, /* Name of deprecated long list */
88  "Long List",
89  "Display files as a detailed list"},
90  {FILE_IMGDISPLAY, "THUMBNAIL", ICON_IMGDISPLAY, "Thumbnails", "Display files as thumbnails"},
91  {0, NULL, 0, NULL, NULL},
92  };
93 
94  if (flag & WM_FILESEL_FILEPATH) {
95  RNA_def_string_file_path(ot->srna, "filepath", NULL, FILE_MAX, "File Path", "Path to file");
96  }
97 
98  if (flag & WM_FILESEL_DIRECTORY) {
100  ot->srna, "directory", NULL, FILE_MAX, "Directory", "Directory of the file");
101  }
102 
103  if (flag & WM_FILESEL_FILENAME) {
105  ot->srna, "filename", NULL, FILE_MAX, "File Name", "Name of the file");
106  }
107 
108  if (flag & WM_FILESEL_FILES) {
110  ot->srna, "files", &RNA_OperatorFileListElement, "Files", "");
112  }
113 
114  if ((flag & WM_FILESEL_SHOW_PROPS) == 0) {
115  prop = RNA_def_boolean(ot->srna,
116  "hide_props_region",
117  true,
118  "Hide Operator Properties",
119  "Collapse the region displaying the operator settings");
121  }
122 
123  if (action == FILE_SAVE) {
124  /* NOTE: this is only used to check if we should highlight the filename area red when the
125  * filepath is an existing file. */
126  prop = RNA_def_boolean(ot->srna,
127  "check_existing",
128  true,
129  "Check Existing",
130  "Check and warn on overwriting existing files");
132  }
133 
134  prop = RNA_def_boolean(
135  ot->srna, "filter_blender", (filter & FILE_TYPE_BLENDER) != 0, "Filter .blend files", "");
137  prop = RNA_def_boolean(ot->srna,
138  "filter_backup",
140  "Filter .blend files",
141  "");
143  prop = RNA_def_boolean(
144  ot->srna, "filter_image", (filter & FILE_TYPE_IMAGE) != 0, "Filter image files", "");
146  prop = RNA_def_boolean(
147  ot->srna, "filter_movie", (filter & FILE_TYPE_MOVIE) != 0, "Filter movie files", "");
149  prop = RNA_def_boolean(
150  ot->srna, "filter_python", (filter & FILE_TYPE_PYSCRIPT) != 0, "Filter python files", "");
152  prop = RNA_def_boolean(
153  ot->srna, "filter_font", (filter & FILE_TYPE_FTFONT) != 0, "Filter font files", "");
155  prop = RNA_def_boolean(
156  ot->srna, "filter_sound", (filter & FILE_TYPE_SOUND) != 0, "Filter sound files", "");
158  prop = RNA_def_boolean(
159  ot->srna, "filter_text", (filter & FILE_TYPE_TEXT) != 0, "Filter text files", "");
161  prop = RNA_def_boolean(
162  ot->srna, "filter_archive", (filter & FILE_TYPE_ARCHIVE) != 0, "Filter archive files", "");
164  prop = RNA_def_boolean(
165  ot->srna, "filter_btx", (filter & FILE_TYPE_BTX) != 0, "Filter btx files", "");
167  prop = RNA_def_boolean(
168  ot->srna, "filter_collada", (filter & FILE_TYPE_COLLADA) != 0, "Filter COLLADA files", "");
170  prop = RNA_def_boolean(
171  ot->srna, "filter_alembic", (filter & FILE_TYPE_ALEMBIC) != 0, "Filter Alembic files", "");
173  prop = RNA_def_boolean(
174  ot->srna, "filter_usd", (filter & FILE_TYPE_USD) != 0, "Filter USD files", "");
176  prop = RNA_def_boolean(
177  ot->srna, "filter_obj", (filter & FILE_TYPE_OBJECT_IO) != 0, "Filter OBJ files", "");
179  prop = RNA_def_boolean(ot->srna,
180  "filter_volume",
181  (filter & FILE_TYPE_VOLUME) != 0,
182  "Filter OpenVDB volume files",
183  "");
185  prop = RNA_def_boolean(
186  ot->srna, "filter_folder", (filter & FILE_TYPE_FOLDER) != 0, "Filter folders", "");
188  prop = RNA_def_boolean(
189  ot->srna, "filter_blenlib", (filter & FILE_TYPE_BLENDERLIB) != 0, "Filter Blender IDs", "");
191 
192  /* TODO: asset only filter? */
193 
194  prop = RNA_def_int(
195  ot->srna,
196  "filemode",
197  type,
198  FILE_LOADLIB,
199  FILE_SPECIAL,
200  "File Browser Mode",
201  "The setting for the file browser mode to load a .blend file, a library or a special file",
202  FILE_LOADLIB,
203  FILE_SPECIAL);
205 
206  if (flag & WM_FILESEL_RELPATH) {
208  "relative_path",
209  true,
210  "Relative Path",
211  "Select the file relative to the blend file");
212  }
213 
214  if ((filter & FILE_TYPE_IMAGE) || (filter & FILE_TYPE_MOVIE)) {
215  prop = RNA_def_boolean(ot->srna, "show_multiview", 0, "Enable Multi-View", "");
217  prop = RNA_def_boolean(ot->srna, "use_multiview", 0, "Use Multi-View", "");
219  }
220 
221  prop = RNA_def_enum(ot->srna, "display_type", file_display_items, display, "Display Type", "");
223 
224  prop = RNA_def_enum(ot->srna, "sort_method", DummyRNA_NULL_items, sort, "File sorting mode", "");
227 }
228 
230 {
231  PropertyRNA *prop_session_uuid = RNA_struct_find_property(ptr, "session_uuid");
232  PropertyRNA *prop_name = RNA_struct_find_property(ptr, "name");
233 
234  if (prop_session_uuid) {
235  RNA_int_set(ptr, "session_uuid", (int)id->session_uuid);
236  }
237  else if (prop_name) {
238  RNA_string_set(ptr, "name", id->name + 2);
239  }
240  else {
242  }
243 }
244 
246  PointerRNA *ptr,
247  const ID_Type type)
248 {
249  PropertyRNA *prop_session_uuid = RNA_struct_find_property(ptr, "session_uuid");
250  if (prop_session_uuid && RNA_property_is_set(ptr, prop_session_uuid)) {
251  const uint32_t session_uuid = (uint32_t)RNA_property_int_get(ptr, prop_session_uuid);
252  return BKE_libblock_find_session_uuid(bmain, type, session_uuid);
253  }
254 
255  PropertyRNA *prop_name = RNA_struct_find_property(ptr, "name");
256  if (prop_name && RNA_property_is_set(ptr, prop_name)) {
257  char name[MAX_ID_NAME - 2];
258  RNA_property_string_get(ptr, prop_name, name);
259  return BKE_libblock_find_name(bmain, type, name);
260  }
261 
262  return NULL;
263 }
264 
266 {
267  return RNA_struct_property_is_set(ptr, "session_uuid") ||
269 }
270 
271 void WM_operator_properties_id_lookup(wmOperatorType *ot, const bool add_name_prop)
272 {
273  PropertyRNA *prop;
274 
275  if (add_name_prop) {
276  prop = RNA_def_string(ot->srna,
277  "name",
278  NULL,
279  MAX_ID_NAME - 2,
280  "Name",
281  "Name of the data-block to use by the operator");
283  }
284 
285  prop = RNA_def_int(ot->srna,
286  "session_uuid",
287  0,
288  INT32_MIN,
289  INT32_MAX,
290  "Session UUID",
291  "Session UUID of the data-block to use by the operator",
292  INT32_MIN,
293  INT32_MAX);
295 }
296 
298  int default_action,
299  const EnumPropertyItem *select_actions,
300  bool hide_gui)
301 {
302  PropertyRNA *prop;
303  prop = RNA_def_enum(
304  ot->srna, "action", select_actions, default_action, "Action", "Selection action to execute");
305 
306  if (hide_gui) {
308  }
309 }
310 
311 void WM_operator_properties_select_action(wmOperatorType *ot, int default_action, bool hide_gui)
312 {
313  static const EnumPropertyItem select_actions[] = {
314  {SEL_TOGGLE, "TOGGLE", 0, "Toggle", "Toggle selection for all elements"},
315  {SEL_SELECT, "SELECT", 0, "Select", "Select all elements"},
316  {SEL_DESELECT, "DESELECT", 0, "Deselect", "Deselect all elements"},
317  {SEL_INVERT, "INVERT", 0, "Invert", "Invert selection of all elements"},
318  {0, NULL, 0, NULL, NULL},
319  };
320 
321  wm_operator_properties_select_action_ex(ot, default_action, select_actions, hide_gui);
322 }
323 
325  int default_action,
326  bool hide_gui)
327 {
328  static const EnumPropertyItem select_actions[] = {
329  {SEL_SELECT, "SELECT", 0, "Select", "Select all elements"},
330  {SEL_DESELECT, "DESELECT", 0, "Deselect", "Deselect all elements"},
331  {0, NULL, 0, NULL, NULL},
332  };
333 
334  wm_operator_properties_select_action_ex(ot, default_action, select_actions, hide_gui);
335 }
336 
338 {
340  "ratio",
341  0.5f,
342  0.0f,
343  1.0f,
344  "Ratio",
345  "Portion of items to select randomly",
346  0.0f,
347  1.0f);
349  "seed",
350  0,
351  0,
352  INT_MAX,
353  "Random Seed",
354  "Seed for the random number generator",
355  0,
356  255);
357 
359 }
360 
362 {
363  PropertyRNA *prop = RNA_struct_find_property(op->ptr, "seed");
364  int value = RNA_property_int_get(op->ptr, prop);
365 
366  if (op->flag & OP_IS_INVOKE) {
367  if (!RNA_property_is_set(op->ptr, prop)) {
368  value += 1;
369  RNA_property_int_set(op->ptr, prop, value);
370  }
371  }
372  return value;
373 }
374 
376 {
378 }
379 
381 {
382  PropertyRNA *prop;
383 
384  prop = RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX);
386  prop = RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX);
388  prop = RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX);
390  prop = RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX);
392 
393  prop = RNA_def_boolean(ot->srna, "wait_for_input", true, "Wait for Input", "");
395 }
396 
398 {
399  rect->xmin = RNA_int_get(op->ptr, "xmin");
400  rect->ymin = RNA_int_get(op->ptr, "ymin");
401  rect->xmax = RNA_int_get(op->ptr, "xmax");
402  rect->ymax = RNA_int_get(op->ptr, "ymax");
403 }
404 
406 {
407  rcti rect_i;
409  BLI_rctf_rcti_copy(rect, &rect_i);
410 }
411 
412 void WM_operator_properties_gesture_box_ex(wmOperatorType *ot, bool deselect, bool extend)
413 {
414  PropertyRNA *prop;
415 
417 
418  if (deselect) {
419  prop = RNA_def_boolean(
420  ot->srna, "deselect", false, "Deselect", "Deselect rather than select items");
422  }
423  if (extend) {
424  prop = RNA_def_boolean(ot->srna,
425  "extend",
426  true,
427  "Extend",
428  "Extend selection instead of deselecting everything first");
430  }
431 }
432 
434 {
436  "use_cursor_init",
437  true,
438  "Use Mouse Position",
439  "Allow the initial mouse position to be used");
441 }
442 
444 {
446 }
448 {
450 }
451 
453 {
454  static const EnumPropertyItem select_mode_items[] = {
455  {SEL_OP_SET, "SET", ICON_SELECT_SET, "Set", "Set a new selection"},
456  {SEL_OP_ADD, "ADD", ICON_SELECT_EXTEND, "Extend", "Extend existing selection"},
457  {SEL_OP_SUB, "SUB", ICON_SELECT_SUBTRACT, "Subtract", "Subtract existing selection"},
458  {SEL_OP_XOR, "XOR", ICON_SELECT_DIFFERENCE, "Difference", "Invert existing selection"},
459  {SEL_OP_AND, "AND", ICON_SELECT_INTERSECT, "Intersect", "Intersect existing selection"},
460  {0, NULL, 0, NULL, NULL},
461  };
462  PropertyRNA *prop = RNA_def_enum(ot->srna, "mode", select_mode_items, SEL_OP_SET, "Mode", "");
464 }
465 
467 {
468  static const EnumPropertyItem select_mode_items[] = {
469  {SEL_OP_SET, "SET", ICON_SELECT_SET, "Set", "Set a new selection"},
470  {SEL_OP_ADD, "ADD", ICON_SELECT_EXTEND, "Extend", "Extend existing selection"},
471  {SEL_OP_SUB, "SUB", ICON_SELECT_SUBTRACT, "Subtract", "Subtract existing selection"},
472  {0, NULL, 0, NULL, NULL},
473  };
474  PropertyRNA *prop = RNA_def_enum(ot->srna, "mode", select_mode_items, SEL_OP_SET, "Mode", "");
476 }
477 
479 {
480  static const EnumPropertyItem direction_items[] = {
481  {UI_SELECT_WALK_UP, "UP", 0, "Previous", ""},
482  {UI_SELECT_WALK_DOWN, "DOWN", 0, "Next", ""},
483  {UI_SELECT_WALK_LEFT, "LEFT", 0, "Left", ""},
484  {UI_SELECT_WALK_RIGHT, "RIGHT", 0, "Right", ""},
485  {0, NULL, 0, NULL, NULL},
486  };
487  PropertyRNA *prop;
488  prop = RNA_def_enum(ot->srna,
489  "direction",
490  direction_items,
491  0,
492  "Walk Direction",
493  "Select/Deselect element in this direction");
495 }
496 
498 {
499  /* On the initial mouse press, this is set by #WM_generic_select_modal() to let the select
500  * operator exec callback know that it should not __yet__ deselect other items when clicking on
501  * an already selected one. Instead should make sure the operator executes modal then (see
502  * #WM_generic_select_modal()), so that the exec callback can be called a second time on the
503  * mouse release event to do this part. */
505  ot->srna, "wait_to_deselect_others", false, "Wait to Deselect Others", "");
507 
508  RNA_def_int(ot->srna, "mouse_x", 0, INT_MIN, INT_MAX, "Mouse X", "", INT_MIN, INT_MAX);
509  RNA_def_int(ot->srna, "mouse_y", 0, INT_MIN, INT_MAX, "Mouse Y", "", INT_MIN, INT_MAX);
510 }
511 
513 {
515 
516  PropertyRNA *prop;
517  prop = RNA_def_boolean(ot->srna, "zoom_out", false, "Zoom Out", "");
519 }
520 
522 {
523  PropertyRNA *prop;
524  prop = RNA_def_collection_runtime(ot->srna, "path", &RNA_OperatorMousePath, "Path", "");
526 }
527 
529 {
530  PropertyRNA *prop;
531 
532  prop = RNA_def_int(ot->srna, "xstart", 0, INT_MIN, INT_MAX, "X Start", "", INT_MIN, INT_MAX);
534  prop = RNA_def_int(ot->srna, "xend", 0, INT_MIN, INT_MAX, "X End", "", INT_MIN, INT_MAX);
536  prop = RNA_def_int(ot->srna, "ystart", 0, INT_MIN, INT_MAX, "Y Start", "", INT_MIN, INT_MAX);
538  prop = RNA_def_int(ot->srna, "yend", 0, INT_MIN, INT_MAX, "Y End", "", INT_MIN, INT_MAX);
540  prop = RNA_def_boolean(ot->srna, "flip", false, "Flip", "");
542 
543  if (cursor) {
544  prop = RNA_def_int(ot->srna,
545  "cursor",
546  cursor,
547  0,
548  INT_MAX,
549  "Cursor",
550  "Mouse cursor style to use during the modal operator",
551  0,
552  INT_MAX);
554  }
555 }
556 
558 {
559  PropertyRNA *prop;
560  const int radius_default = 25;
561 
562  prop = RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX);
564  prop = RNA_def_int(ot->srna, "y", 0, INT_MIN, INT_MAX, "Y", "", INT_MIN, INT_MAX);
566  RNA_def_int(ot->srna, "radius", radius_default, 1, INT_MAX, "Radius", "", 1, INT_MAX);
567 
568  prop = RNA_def_boolean(ot->srna, "wait_for_input", true, "Wait for Input", "");
570 }
571 
573 {
574  PropertyRNA *prop;
575 
576  prop = RNA_def_boolean(ot->srna,
577  "extend",
578  false,
579  "Extend",
580  "Extend selection instead of deselecting everything first");
582  prop = RNA_def_boolean(ot->srna, "deselect", false, "Deselect", "Remove from selection");
584  prop = RNA_def_boolean(ot->srna, "toggle", false, "Toggle Selection", "Toggle the selection");
586 
587  prop = RNA_def_boolean(ot->srna,
588  "deselect_all",
589  false,
590  "Deselect On Nothing",
591  "Deselect all when nothing under the cursor");
593 
594  /* TODO: currently only used for the 3D viewport. */
595  prop = RNA_def_boolean(ot->srna,
596  "select_passthrough",
597  false,
598  "Only Select Unselected",
599  "Ignore the select action when the element is already selected");
601 }
602 
604 {
605  const int nth_default = nth_can_disable ? 0 : 1;
606  const int nth_min = min_ii(nth_default, 1);
608  "skip",
609  nth_default,
610  nth_min,
611  INT_MAX,
612  "Deselected",
613  "Number of deselected elements in the repetitive sequence",
614  nth_min,
615  100);
617  "nth",
618  1,
619  1,
620  INT_MAX,
621  "Selected",
622  "Number of selected elements in the repetitive sequence",
623  1,
624  100);
626  "offset",
627  0,
628  INT_MIN,
629  INT_MAX,
630  "Offset",
631  "Offset from the starting point",
632  -100,
633  100);
634 }
635 
637  struct CheckerIntervalParams *op_params)
638 {
639  const int nth = RNA_int_get(op->ptr, "nth");
640  const int skip = RNA_int_get(op->ptr, "skip");
641  int offset = RNA_int_get(op->ptr, "offset");
642 
643  op_params->nth = nth;
644  op_params->skip = skip;
645 
646  /* So input of offset zero ends up being (nth - 1). */
647  op_params->offset = mod_i(offset, nth + skip);
648 }
649 
651  int depth)
652 {
653  return ((op_params->skip == 0) ||
654  ((op_params->offset + depth) % (op_params->skip + op_params->nth) >= op_params->skip));
655 }
struct ID * BKE_libblock_find_session_uuid(struct Main *bmain, short type, uint32_t session_uuid)
Definition: lib_id.c:1304
struct ID * BKE_libblock_find_name(struct Main *bmain, short type, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Definition: lib_id.c:1297
#define BLI_assert_unreachable()
Definition: BLI_assert.h:93
MINLINE int min_ii(int a, int b)
MINLINE int mod_i(int i, int n)
#define FILE_MAX
void BLI_rctf_rcti_copy(struct rctf *dst, const struct rcti *src)
#define UNUSED(x)
#define MAX_ID_NAME
Definition: DNA_ID.h:337
Enumerations for DNA_ID.h.
ID_Type
Definition: DNA_ID_enums.h:44
@ FILE_SORT_DEFAULT
@ FILE_LOADLIB
@ FILE_SPECIAL
@ FILE_TYPE_BTX
@ FILE_TYPE_BLENDER
@ FILE_TYPE_ALEMBIC
@ FILE_TYPE_ARCHIVE
@ FILE_TYPE_TEXT
@ FILE_TYPE_COLLADA
@ FILE_TYPE_PYSCRIPT
@ FILE_TYPE_BLENDER_BACKUP
@ FILE_TYPE_VOLUME
@ FILE_TYPE_MOVIE
@ FILE_TYPE_SOUND
@ FILE_TYPE_OBJECT_IO
@ FILE_TYPE_FOLDER
@ FILE_TYPE_FTFONT
@ FILE_TYPE_BLENDERLIB
@ FILE_TYPE_USD
@ FILE_TYPE_IMAGE
@ FILE_VERTICALDISPLAY
@ FILE_IMGDISPLAY
@ FILE_HORIZONTALDISPLAY
@ FILE_DEFAULTDISPLAY
@ UI_SELECT_WALK_RIGHT
@ UI_SELECT_WALK_UP
@ UI_SELECT_WALK_LEFT
@ UI_SELECT_WALK_DOWN
@ SEL_SELECT
@ SEL_INVERT
@ SEL_DESELECT
@ SEL_TOGGLE
@ SEL_OP_ADD
@ SEL_OP_SUB
@ SEL_OP_SET
@ SEL_OP_AND
@ SEL_OP_XOR
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
PropertyFlag
Definition: RNA_types.h:183
@ PROP_SKIP_SAVE
Definition: RNA_types.h:218
@ PROP_HIDDEN
Definition: RNA_types.h:216
#define C
Definition: RandGen.cpp:25
eFileSel_Flag
Definition: WM_api.h:751
@ WM_FILESEL_FILES
Definition: WM_api.h:756
@ WM_FILESEL_DIRECTORY
Definition: WM_api.h:753
@ WM_FILESEL_RELPATH
Definition: WM_api.h:752
@ WM_FILESEL_SHOW_PROPS
Definition: WM_api.h:758
@ WM_FILESEL_FILEPATH
Definition: WM_api.h:755
@ WM_FILESEL_FILENAME
Definition: WM_api.h:754
eFileSel_Action
Definition: WM_api.h:763
@ FILE_SAVE
Definition: WM_api.h:765
void sort(btMatrix3x3 &U, btVector3 &sigma, btMatrix3x3 &V, int t)
Helper function of 3X3 SVD for sorting singular values.
DO_INLINE void filter(lfVector *V, fmatrix3x3 *S)
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
Definition: rna_access.c:2449
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
Definition: rna_access.c:5155
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
Definition: rna_access.c:5271
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
Definition: rna_access.c:4921
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
Definition: rna_access.c:717
int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
Definition: rna_access.c:2429
int RNA_int_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:4910
void RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop, char *value)
Definition: rna_access.c:3149
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
Definition: rna_access.c:5301
PropertyRNA * RNA_def_string_file_name(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3759
void RNA_enum_items_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
Definition: rna_define.c:4465
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3493
PropertyRNA * RNA_def_string_file_path(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3711
PropertyRNA * RNA_def_collection_runtime(StructOrFunctionRNA *cont_, const char *identifier, StructRNA *type, const char *ui_name, const char *ui_description)
Definition: rna_define.c:4221
PropertyRNA * RNA_def_float_factor(StructOrFunctionRNA *cont_, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
Definition: rna_define.c:4144
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
Definition: rna_define.c:4487
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
Definition: rna_define.c:4436
PropertyRNA * RNA_def_string_dir_path(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3735
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3687
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
Definition: rna_define.c:1490
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
Definition: rna_define.c:3597
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
Definition: rna_define.c:3830
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3783
const EnumPropertyItem DummyRNA_NULL_items[]
Definition: rna_rna.c:26
const EnumPropertyItem rna_enum_fileselect_params_sort_items[]
Definition: rna_space.c:345
#define INT32_MAX
Definition: stdint.h:137
unsigned int uint32_t
Definition: stdint.h:80
#define INT32_MIN
Definition: stdint.h:136
Definition: DNA_ID.h:368
unsigned int session_uuid
Definition: DNA_ID.h:407
char name[66]
Definition: DNA_ID.h:378
Definition: BKE_main.h:121
int ymin
Definition: DNA_vec_types.h:64
int ymax
Definition: DNA_vec_types.h:64
int xmin
Definition: DNA_vec_types.h:63
int xmax
Definition: DNA_vec_types.h:63
struct StructRNA * srna
Definition: WM_types.h:969
struct PointerRNA * ptr
PointerRNA * ptr
Definition: wm_files.c:3480
wmOperatorType * ot
Definition: wm_files.c:3479
static void wm_operator_properties_select_action_ex(wmOperatorType *ot, int default_action, const EnumPropertyItem *select_actions, bool hide_gui)
void WM_operator_properties_border_to_rcti(struct wmOperator *op, rcti *rect)
static const EnumPropertyItem * wm_operator_properties_filesel_sort_items_itemf(struct bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
int WM_operator_properties_select_random_seed_increment_get(wmOperator *op)
void WM_operator_properties_gesture_box(wmOperatorType *ot)
bool WM_operator_properties_checker_interval_test(const struct CheckerIntervalParams *op_params, int depth)
void WM_operator_properties_confirm_or_exec(wmOperatorType *ot)
ID * WM_operator_properties_id_lookup_from_name_or_session_uuid(Main *bmain, PointerRNA *ptr, const ID_Type type)
bool WM_operator_properties_id_lookup_is_set(PointerRNA *ptr)
void WM_operator_properties_select_operation_simple(wmOperatorType *ot)
void WM_operator_properties_select_operation(wmOperatorType *ot)
void WM_operator_properties_select_action(wmOperatorType *ot, int default_action, bool hide_gui)
void WM_operator_properties_generic_select(wmOperatorType *ot)
void WM_operator_properties_gesture_straightline(wmOperatorType *ot, int cursor)
void WM_operator_properties_border(wmOperatorType *ot)
void WM_operator_properties_gesture_lasso(wmOperatorType *ot)
void WM_operator_properties_select_walk_direction(wmOperatorType *ot)
void WM_operator_properties_select_random(wmOperatorType *ot)
void WM_operator_properties_filesel(wmOperatorType *ot, const int filter, const short type, const eFileSel_Action action, const eFileSel_Flag flag, const short display, const short sort)
void WM_operator_properties_gesture_box_select(wmOperatorType *ot)
void WM_operator_properties_gesture_circle(wmOperatorType *ot)
void WM_operator_properties_select_all(wmOperatorType *ot)
void WM_operator_properties_use_cursor_init(wmOperatorType *ot)
void WM_operator_properties_gesture_box_ex(wmOperatorType *ot, bool deselect, bool extend)
void WM_operator_properties_border_to_rctf(struct wmOperator *op, rctf *rect)
void WM_operator_properties_mouse_select(wmOperatorType *ot)
void WM_operator_properties_gesture_box_zoom(wmOperatorType *ot)
void WM_operator_properties_id_lookup(wmOperatorType *ot, const bool add_name_prop)
void WM_operator_properties_checker_interval_from_op(struct wmOperator *op, struct CheckerIntervalParams *op_params)
void WM_operator_properties_id_lookup_set_from_id(PointerRNA *ptr, const ID *id)
void WM_operator_properties_checker_interval(wmOperatorType *ot, bool nth_can_disable)
void WM_operator_properties_select_action_simple(wmOperatorType *ot, int default_action, bool hide_gui)