Blender V4.5
wm_operator_props.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2007 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
11
12#include "DNA_ID_enums.h"
13#include "DNA_space_types.h"
14
15#include "BKE_lib_id.hh"
16#include "BKE_main.hh"
17
18#include "BLI_math_base.h"
19#include "BLI_rect.h"
20
21#include "UI_resources.hh"
22
23#include "RNA_access.hh"
24#include "RNA_define.hh"
25#include "RNA_enum_types.hh"
26#include "RNA_prototypes.hh"
27
28#include "ED_select_utils.hh"
29
30#include "WM_api.hh"
31#include "WM_types.hh"
32
34{
35 PropertyRNA *prop;
36
37 prop = RNA_def_boolean(ot->srna, "confirm", true, "Confirm", "Prompt for confirmation");
39}
40
45 bContext * /*C*/, PointerRNA * /*ptr*/, PropertyRNA * /*prop*/, bool *r_free)
46{
47 EnumPropertyItem *items;
48 const EnumPropertyItem default_item = {
50 "DEFAULT",
51 0,
52 "Default",
53 "Automatically determine sort method for files",
54 };
55 int totitem = 0;
56
57 RNA_enum_item_add(&items, &totitem, &default_item);
59 RNA_enum_item_end(&items, &totitem);
60 *r_free = true;
61
62 return items;
63}
64
66 const int filter,
67 const short type,
68 const eFileSel_Action action,
69 const eFileSel_Flag flag,
70 const short display,
71 const short sort)
72{
73 PropertyRNA *prop;
74
75 static const EnumPropertyItem file_display_items[] = {
77 "DEFAULT",
78 0,
79 "Default",
80 "Automatically determine display type for files"},
82 "LIST_VERTICAL",
83 ICON_SHORTDISPLAY, /* Name of deprecated short list. */
84 "Short List",
85 "Display files as short list"},
87 "LIST_HORIZONTAL",
88 ICON_LONGDISPLAY, /* Name of deprecated long list. */
89 "Long List",
90 "Display files as a detailed list"},
91 {FILE_IMGDISPLAY, "THUMBNAIL", ICON_IMGDISPLAY, "Thumbnails", "Display files as thumbnails"},
92 {0, nullptr, 0, nullptr, nullptr},
93 };
94
97 ot->srna, "filepath", nullptr, FILE_MAX, "File Path", "Path to file");
99 }
100
103 ot->srna, "directory", nullptr, FILE_MAX, "Directory", "Directory of the file");
105 }
106
109 ot->srna, "filename", nullptr, FILE_MAX, "File Name", "Name of the file");
111 }
112
113 if (flag & WM_FILESEL_FILES) {
115 ot->srna, "files", &RNA_OperatorFileListElement, "Files", "");
117 }
118
119 if ((flag & WM_FILESEL_SHOW_PROPS) == 0) {
120 prop = RNA_def_boolean(ot->srna,
121 "hide_props_region",
122 true,
123 "Hide Operator Properties",
124 "Collapse the region displaying the operator settings");
126 }
127
128 /* NOTE: this is only used to check if we should highlight the filename area red when the
129 * filepath is an existing file. */
130 prop = RNA_def_boolean(ot->srna,
131 "check_existing",
132 action == FILE_SAVE,
133 "Check Existing",
134 "Check and warn on overwriting existing files");
136
137 prop = RNA_def_boolean(
138 ot->srna, "filter_blender", (filter & FILE_TYPE_BLENDER) != 0, "Filter .blend files", "");
140 prop = RNA_def_boolean(ot->srna,
141 "filter_backup",
143 "Filter .blend files",
144 "");
146 prop = RNA_def_boolean(
147 ot->srna, "filter_image", (filter & FILE_TYPE_IMAGE) != 0, "Filter image files", "");
149 prop = RNA_def_boolean(
150 ot->srna, "filter_movie", (filter & FILE_TYPE_MOVIE) != 0, "Filter movie files", "");
152 prop = RNA_def_boolean(
153 ot->srna, "filter_python", (filter & FILE_TYPE_PYSCRIPT) != 0, "Filter Python files", "");
155 prop = RNA_def_boolean(
156 ot->srna, "filter_font", (filter & FILE_TYPE_FTFONT) != 0, "Filter font files", "");
158 prop = RNA_def_boolean(
159 ot->srna, "filter_sound", (filter & FILE_TYPE_SOUND) != 0, "Filter sound files", "");
161 prop = RNA_def_boolean(
162 ot->srna, "filter_text", (filter & FILE_TYPE_TEXT) != 0, "Filter text files", "");
164 prop = RNA_def_boolean(
165 ot->srna, "filter_archive", (filter & FILE_TYPE_ARCHIVE) != 0, "Filter archive files", "");
167 prop = RNA_def_boolean(
168 ot->srna, "filter_btx", (filter & FILE_TYPE_BTX) != 0, "Filter btx files", "");
170 prop = RNA_def_boolean(
171 ot->srna, "filter_collada", (filter & FILE_TYPE_COLLADA) != 0, "Filter COLLADA files", "");
173 prop = RNA_def_boolean(
174 ot->srna, "filter_alembic", (filter & FILE_TYPE_ALEMBIC) != 0, "Filter Alembic files", "");
176 prop = RNA_def_boolean(
177 ot->srna, "filter_usd", (filter & FILE_TYPE_USD) != 0, "Filter USD files", "");
179 prop = RNA_def_boolean(
180 ot->srna, "filter_obj", (filter & FILE_TYPE_OBJECT_IO) != 0, "Filter OBJ files", "");
182 prop = RNA_def_boolean(ot->srna,
183 "filter_volume",
184 (filter & FILE_TYPE_VOLUME) != 0,
185 "Filter OpenVDB volume files",
186 "");
188 prop = RNA_def_boolean(
189 ot->srna, "filter_folder", (filter & FILE_TYPE_FOLDER) != 0, "Filter folders", "");
191 prop = RNA_def_boolean(
192 ot->srna, "filter_blenlib", (filter & FILE_TYPE_BLENDERLIB) != 0, "Filter Blender IDs", "");
194
195 /* TODO: asset only filter? */
196
197 prop = RNA_def_int(
198 ot->srna,
199 "filemode",
200 type,
203 "File Browser Mode",
204 "The setting for the file browser mode to load a .blend file, a library or a special file",
208
209 if (flag & WM_FILESEL_RELPATH) {
210 RNA_def_boolean(ot->srna,
211 "relative_path",
212 true,
213 "Relative Path",
214 "Select the file relative to the blend file");
215 }
216
218 prop = RNA_def_boolean(ot->srna, "show_multiview", false, "Enable Multi-View", "");
220 prop = RNA_def_boolean(ot->srna, "use_multiview", false, "Use Multi-View", "");
222 }
223
224 prop = RNA_def_enum(ot->srna, "display_type", file_display_items, display, "Display Type", "");
226
227 prop = RNA_def_enum(
228 ot->srna, "sort_method", rna_enum_dummy_NULL_items, sort, "File sorting mode", "");
231}
232
234{
235 PropertyRNA *prop_session_uid = RNA_struct_find_property(ptr, "session_uid");
236 PropertyRNA *prop_name = RNA_struct_find_property(ptr, "name");
237
238 if (prop_session_uid) {
239 RNA_int_set(ptr, "session_uid", int(id->session_uid));
240 }
241 else if (prop_name) {
242 RNA_string_set(ptr, "name", id->name + 2);
243 }
244 else {
246 }
247}
248
251 const ID_Type type)
252{
253 PropertyRNA *prop_session_uid = RNA_struct_find_property(ptr, "session_uid");
254 if (prop_session_uid && RNA_property_is_set(ptr, prop_session_uid)) {
255 const uint32_t session_uid = uint32_t(RNA_property_int_get(ptr, prop_session_uid));
256 return BKE_libblock_find_session_uid(bmain, type, session_uid);
257 }
258
259 PropertyRNA *prop_name = RNA_struct_find_property(ptr, "name");
260 if (prop_name && RNA_property_is_set(ptr, prop_name)) {
261 char name[MAX_ID_NAME - 2];
262 RNA_property_string_get(ptr, prop_name, name);
263 return BKE_libblock_find_name(bmain, type, name);
264 }
265
266 return nullptr;
267}
268
273
274void WM_operator_properties_id_lookup(wmOperatorType *ot, const bool add_name_prop)
275{
276 PropertyRNA *prop;
277
278 if (add_name_prop) {
279 prop = RNA_def_string(ot->srna,
280 "name",
281 nullptr,
282 MAX_ID_NAME - 2,
283 "Name",
284 "Name of the data-block to use by the operator");
286 }
287
288 prop = RNA_def_int(ot->srna,
289 "session_uid",
290 0,
291 INT32_MIN,
292 INT32_MAX,
293 "Session UID",
294 "Session UID of the data-block to use by the operator",
295 INT32_MIN,
296 INT32_MAX);
298}
299
301 int default_action,
302 const EnumPropertyItem *select_actions,
303 bool hide_gui)
304{
305 PropertyRNA *prop;
306 prop = RNA_def_enum(
307 ot->srna, "action", select_actions, default_action, "Action", "Selection action to execute");
308
309 if (hide_gui) {
311 }
312}
313
314void WM_operator_properties_select_action(wmOperatorType *ot, int default_action, bool hide_gui)
315{
316 static const EnumPropertyItem select_actions[] = {
317 {SEL_TOGGLE, "TOGGLE", 0, "Toggle", "Toggle selection for all elements"},
318 {SEL_SELECT, "SELECT", 0, "Select", "Select all elements"},
319 {SEL_DESELECT, "DESELECT", 0, "Deselect", "Deselect all elements"},
320 {SEL_INVERT, "INVERT", 0, "Invert", "Invert selection of all elements"},
321 {0, nullptr, 0, nullptr, nullptr},
322 };
323
324 wm_operator_properties_select_action_ex(ot, default_action, select_actions, hide_gui);
325}
326
328 int default_action,
329 bool hide_gui)
330{
331 static const EnumPropertyItem select_actions[] = {
332 {SEL_SELECT, "SELECT", 0, "Select", "Select all elements"},
333 {SEL_DESELECT, "DESELECT", 0, "Deselect", "Deselect all elements"},
334 {0, nullptr, 0, nullptr, nullptr},
335 };
336
337 wm_operator_properties_select_action_ex(ot, default_action, select_actions, hide_gui);
338}
339
341{
343 "ratio",
344 0.5f,
345 0.0f,
346 1.0f,
347 "Ratio",
348 "Portion of items to select randomly",
349 0.0f,
350 1.0f);
351 RNA_def_int(ot->srna,
352 "seed",
353 0,
354 0,
355 INT_MAX,
356 "Random Seed",
357 "Seed for the random number generator",
358 0,
359 255);
360
362}
363
365{
366 PropertyRNA *prop = RNA_struct_find_property(op->ptr, "seed");
367 int value = RNA_property_int_get(op->ptr, prop);
368
369 if (op->flag & OP_IS_INVOKE) {
370 if (!RNA_property_is_set(op->ptr, prop)) {
371 value += 1;
372 RNA_property_int_set(op->ptr, prop, value);
373 }
374 }
375 return value;
376}
377
382
384{
385 PropertyRNA *prop;
386
387 prop = RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX);
389 prop = RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX);
391 prop = RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX);
393 prop = RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX);
395
396 prop = RNA_def_boolean(ot->srna, "wait_for_input", true, "Wait for Input", "");
398}
399
401{
402 r_rect->xmin = RNA_int_get(op->ptr, "xmin");
403 r_rect->ymin = RNA_int_get(op->ptr, "ymin");
404 r_rect->xmax = RNA_int_get(op->ptr, "xmax");
405 r_rect->ymax = RNA_int_get(op->ptr, "ymax");
406}
407
409{
410 rcti rect_i;
412 BLI_rctf_rcti_copy(r_rect, &rect_i);
413}
414
416{
417 using namespace blender;
418 return Bounds<int2>({RNA_int_get(op->ptr, "xmin"), RNA_int_get(op->ptr, "ymin")},
419 {RNA_int_get(op->ptr, "xmax"), RNA_int_get(op->ptr, "ymax")});
420}
421
423{
424 PropertyRNA *prop;
425
427
428 if (deselect) {
429 prop = RNA_def_boolean(
430 ot->srna, "deselect", false, "Deselect", "Deselect rather than select items");
432 }
433 if (extend) {
434 prop = RNA_def_boolean(ot->srna,
435 "extend",
436 true,
437 "Extend",
438 "Extend selection instead of deselecting everything first");
440 }
441}
442
444{
445 PropertyRNA *prop = RNA_def_boolean(ot->srna,
446 "use_cursor_init",
447 true,
448 "Use Mouse Position",
449 "Allow the initial mouse position to be used");
451}
452
461
463{
464 static const EnumPropertyItem select_mode_items[] = {
465 {SEL_OP_SET, "SET", ICON_SELECT_SET, "Set", "Set a new selection"},
466 {SEL_OP_ADD, "ADD", ICON_SELECT_EXTEND, "Extend", "Extend existing selection"},
467 {SEL_OP_SUB, "SUB", ICON_SELECT_SUBTRACT, "Subtract", "Subtract existing selection"},
468 {SEL_OP_XOR, "XOR", ICON_SELECT_DIFFERENCE, "Difference", "Invert existing selection"},
469 {SEL_OP_AND, "AND", ICON_SELECT_INTERSECT, "Intersect", "Intersect existing selection"},
470 {0, nullptr, 0, nullptr, nullptr},
471 };
472 PropertyRNA *prop = RNA_def_enum(ot->srna, "mode", select_mode_items, SEL_OP_SET, "Mode", "");
474}
475
477{
478 static const EnumPropertyItem select_mode_items[] = {
479 {SEL_OP_SET, "SET", ICON_SELECT_SET, "Set", "Set a new selection"},
480 {SEL_OP_ADD, "ADD", ICON_SELECT_EXTEND, "Extend", "Extend existing selection"},
481 {SEL_OP_SUB, "SUB", ICON_SELECT_SUBTRACT, "Subtract", "Subtract existing selection"},
482 {0, nullptr, 0, nullptr, nullptr},
483 };
484 PropertyRNA *prop = RNA_def_enum(ot->srna, "mode", select_mode_items, SEL_OP_SET, "Mode", "");
486}
487
489{
490 static const EnumPropertyItem direction_items[] = {
491 {UI_SELECT_WALK_UP, "UP", 0, "Previous", ""},
492 {UI_SELECT_WALK_DOWN, "DOWN", 0, "Next", ""},
493 {UI_SELECT_WALK_LEFT, "LEFT", 0, "Left", ""},
494 {UI_SELECT_WALK_RIGHT, "RIGHT", 0, "Right", ""},
495 {0, nullptr, 0, nullptr, nullptr},
496 };
497 PropertyRNA *prop;
498 prop = RNA_def_enum(ot->srna,
499 "direction",
500 direction_items,
501 0,
502 "Walk Direction",
503 "Select/Deselect element in this direction");
505}
506
508{
509 /* On the initial mouse press, this is set by #WM_generic_select_modal() to let the select
510 * operator exec callback know that it should not __yet__ deselect other items when clicking on
511 * an already selected one. Instead should make sure the operator executes modal then (see
512 * #WM_generic_select_modal()), so that the exec callback can be called a second time on the
513 * mouse release event to do this part. */
515 ot->srna, "wait_to_deselect_others", false, "Wait to Deselect Others", "");
517
518 RNA_def_int(ot->srna, "mouse_x", 0, INT_MIN, INT_MAX, "Mouse X", "", INT_MIN, INT_MAX);
519 RNA_def_int(ot->srna, "mouse_y", 0, INT_MIN, INT_MAX, "Mouse Y", "", INT_MIN, INT_MAX);
520}
521
523{
525
526 PropertyRNA *prop;
527 prop = RNA_def_boolean(ot->srna, "zoom_out", false, "Zoom Out", "");
529}
530
532{
533 PropertyRNA *prop;
534 prop = RNA_def_collection_runtime(ot->srna, "path", &RNA_OperatorMousePath, "Path", "");
536 prop = RNA_def_boolean(ot->srna,
537 "use_smooth_stroke",
538 false,
539 "Stabilize Stroke",
540 "Selection lags behind mouse and follows a smoother path");
541 prop = RNA_def_float(ot->srna,
542 "smooth_stroke_factor",
543 0.75f,
544 0.5f,
545 0.99f,
546 "Smooth Stroke Factor",
547 "Higher values gives a smoother stroke",
548 0.5f,
549 0.99f);
550 prop = RNA_def_int(ot->srna,
551 "smooth_stroke_radius",
552 35,
553 10,
554 200,
555 "Smooth Stroke Radius",
556 "Minimum distance from last point before selection continues",
557 10,
558 200);
560}
561
563{
564 PropertyRNA *prop;
565 prop = RNA_def_collection_runtime(ot->srna, "path", &RNA_OperatorMousePath, "Path", "");
567}
568
570{
571 PropertyRNA *prop;
572
573 prop = RNA_def_int(ot->srna, "xstart", 0, INT_MIN, INT_MAX, "X Start", "", INT_MIN, INT_MAX);
575 prop = RNA_def_int(ot->srna, "xend", 0, INT_MIN, INT_MAX, "X End", "", INT_MIN, INT_MAX);
577 prop = RNA_def_int(ot->srna, "ystart", 0, INT_MIN, INT_MAX, "Y Start", "", INT_MIN, INT_MAX);
579 prop = RNA_def_int(ot->srna, "yend", 0, INT_MIN, INT_MAX, "Y End", "", INT_MIN, INT_MAX);
581 prop = RNA_def_boolean(ot->srna, "flip", false, "Flip", "");
583
584 if (cursor) {
585 prop = RNA_def_int(ot->srna,
586 "cursor",
587 cursor,
588 0,
589 INT_MAX,
590 "Cursor",
591 "Mouse cursor style to use during the modal operator",
592 0,
593 INT_MAX);
595 }
596}
597
599{
600 PropertyRNA *prop;
601 const int radius_default = 25;
602
603 prop = RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX);
605 prop = RNA_def_int(ot->srna, "y", 0, INT_MIN, INT_MAX, "Y", "", INT_MIN, INT_MAX);
607 RNA_def_int(ot->srna, "radius", radius_default, 1, INT_MAX, "Radius", "", 1, INT_MAX);
608
609 prop = RNA_def_boolean(ot->srna, "wait_for_input", true, "Wait for Input", "");
611}
612
614{
615 PropertyRNA *prop;
616
617 prop = RNA_def_boolean(ot->srna,
618 "extend",
619 false,
620 "Extend",
621 "Extend selection instead of deselecting everything first");
623 prop = RNA_def_boolean(ot->srna, "deselect", false, "Deselect", "Remove from selection");
625 prop = RNA_def_boolean(ot->srna, "toggle", false, "Toggle Selection", "Toggle the selection");
627
628 prop = RNA_def_boolean(ot->srna,
629 "deselect_all",
630 false,
631 "Deselect On Nothing",
632 "Deselect all when nothing under the cursor");
634
635 /* TODO: currently only used for the 3D viewport. */
636 prop = RNA_def_boolean(ot->srna,
637 "select_passthrough",
638 false,
639 "Only Select Unselected",
640 "Ignore the select action when the element is already selected");
642}
643
645{
646 const int nth_default = nth_can_disable ? 0 : 1;
647 const int nth_min = min_ii(nth_default, 1);
648 RNA_def_int(ot->srna,
649 "skip",
650 nth_default,
651 nth_min,
652 INT_MAX,
653 "Deselected",
654 "Number of deselected elements in the repetitive sequence",
655 nth_min,
656 100);
657 RNA_def_int(ot->srna,
658 "nth",
659 1,
660 1,
661 INT_MAX,
662 "Selected",
663 "Number of selected elements in the repetitive sequence",
664 1,
665 100);
666 RNA_def_int(ot->srna,
667 "offset",
668 0,
669 INT_MIN,
670 INT_MAX,
671 "Offset",
672 "Offset from the starting point",
673 -100,
674 100);
675}
676
678 CheckerIntervalParams *op_params)
679{
680 const int nth = RNA_int_get(op->ptr, "nth");
681 const int skip = RNA_int_get(op->ptr, "skip");
682 int offset = RNA_int_get(op->ptr, "offset");
683
684 op_params->nth = nth;
685 op_params->skip = skip;
686
687 /* So input of offset zero ends up being (nth - 1). */
688 op_params->offset = mod_i(offset, nth + skip);
689}
690
692 int depth)
693{
694 return ((op_params->skip == 0) ||
695 ((op_params->offset + depth) % (op_params->skip + op_params->nth) >= op_params->skip));
696}
ID * BKE_libblock_find_session_uid(Main *bmain, short type, uint32_t session_uid)
Definition lib_id.cc:1697
ID * BKE_libblock_find_name(Main *bmain, short type, const char *name, const std::optional< Library * > lib=std::nullopt) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Definition lib_id.cc:1679
#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)
Enumerations for DNA_ID.h.
ID_Type
@ 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
@ SEL_OP_ADD
@ SEL_OP_SUB
@ SEL_OP_SET
@ SEL_OP_AND
@ SEL_OP_XOR
@ UI_SELECT_WALK_RIGHT
@ UI_SELECT_WALK_UP
@ UI_SELECT_WALK_LEFT
@ UI_SELECT_WALK_DOWN
@ SEL_SELECT
@ SEL_INVERT
@ SEL_DESELECT
@ SEL_TOGGLE
@ PROP_SKIP_SAVE
Definition RNA_types.hh:330
@ PROP_SKIP_PRESET
Definition RNA_types.hh:446
@ PROP_HIDDEN
Definition RNA_types.hh:324
@ PROP_PIXEL
Definition RNA_types.hh:236
eFileSel_Flag
Definition WM_api.hh:1071
@ WM_FILESEL_FILES
Definition WM_api.hh:1076
@ WM_FILESEL_DIRECTORY
Definition WM_api.hh:1073
@ WM_FILESEL_RELPATH
Definition WM_api.hh:1072
@ WM_FILESEL_SHOW_PROPS
Definition WM_api.hh:1078
@ WM_FILESEL_FILEPATH
Definition WM_api.hh:1075
@ WM_FILESEL_FILENAME
Definition WM_api.hh:1074
eFileSel_Action
Definition WM_api.hh:1083
@ FILE_SAVE
Definition WM_api.hh:1085
static DBVT_INLINE btDbvtNode * sort(btDbvtNode *n, btDbvtNode *&r)
Definition btDbvt.cpp:418
#define INT32_MAX
#define INT32_MIN
#define filter
#define MAX_ID_NAME
void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
int RNA_int_get(PointerRNA *ptr, const char *name)
std::string RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
PropertyRNA * RNA_def_float_factor(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
void RNA_enum_items_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_string_file_name(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_collection_runtime(StructOrFunctionRNA *cont_, const char *identifier, StructRNA *type, const char *ui_name, const char *ui_description)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
PropertyRNA * RNA_def_string_file_path(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
PropertyRNA * RNA_def_string_dir_path(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_property_subtype(PropertyRNA *prop, PropertySubType subtype)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
const EnumPropertyItem rna_enum_dummy_NULL_items[]
Definition rna_rna.cc:26
const EnumPropertyItem rna_enum_fileselect_params_sort_items[]
Definition rna_space.cc:337
Definition DNA_ID.h:404
char name[66]
Definition DNA_ID.h:415
unsigned int session_uid
Definition DNA_ID.h:444
int ymin
int ymax
int xmin
int xmax
struct PointerRNA * ptr
PointerRNA * ptr
Definition wm_files.cc:4226
wmOperatorType * ot
Definition wm_files.cc:4225
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(wmOperator *op, rcti *r_rect)
void WM_operator_properties_checker_interval_from_op(wmOperator *op, CheckerIntervalParams *op_params)
int WM_operator_properties_select_random_seed_increment_get(wmOperator *op)
void WM_operator_properties_gesture_box(wmOperatorType *ot)
void WM_operator_properties_confirm_or_exec(wmOperatorType *ot)
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_border_to_rctf(wmOperator *op, rctf *r_rect)
void WM_operator_properties_generic_select(wmOperatorType *ot)
void WM_operator_properties_gesture_straightline(wmOperatorType *ot, int cursor)
ID * WM_operator_properties_id_lookup_from_name_or_session_uid(Main *bmain, PointerRNA *ptr, const ID_Type type)
blender::Bounds< blender::int2 > WM_operator_properties_border_to_bounds(wmOperator *op)
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_polyline(wmOperatorType *ot)
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_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_id_lookup_set_from_id(PointerRNA *ptr, const ID *id)
void WM_operator_properties_checker_interval(wmOperatorType *ot, bool nth_can_disable)
bool WM_operator_properties_checker_interval_test(const CheckerIntervalParams *op_params, int depth)
static const EnumPropertyItem * wm_operator_properties_filesel_sort_items_itemf(bContext *, PointerRNA *, PropertyRNA *, bool *r_free)
void WM_operator_properties_select_action_simple(wmOperatorType *ot, int default_action, bool hide_gui)
uint8_t flag
Definition wm_window.cc:139