Blender V5.3
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_c.hh"
19#include "BLI_rect.hh"
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
33namespace blender {
34
36{
37 PropertyRNA *prop;
38
39 prop = RNA_def_boolean(ot->srna, "confirm", true, "Confirm", "Prompt for confirmation");
41}
42
47 bContext * /*C*/, PointerRNA * /*ptr*/, PropertyRNA * /*prop*/, bool *r_free)
48{
49 EnumPropertyItem *items;
50 const EnumPropertyItem default_item = {
52 "DEFAULT",
53 0,
54 "Default",
55 "Automatically determine sort method for files",
56 };
57 int totitem = 0;
58
59 RNA_enum_item_add(&items, &totitem, &default_item);
61 RNA_enum_item_end(&items, &totitem);
62 *r_free = true;
63
64 return items;
65}
66
68 const int filter,
69 const short type,
70 const eFileSel_Action action,
71 const eFileSel_Flag flag,
72 const short display,
73 const short sort)
74{
75 PropertyRNA *prop;
76
77 static const EnumPropertyItem file_display_items[] = {
79 "DEFAULT",
80 0,
81 "Default",
82 "Automatically determine display type for files"},
84 "LIST_VERTICAL",
85 ICON_SHORTDISPLAY, /* Name of deprecated short list. */
86 "Short List",
87 "Display files as short list"},
89 "LIST_HORIZONTAL",
90 ICON_LONGDISPLAY, /* Name of deprecated long list. */
91 "Long List",
92 "Display files as a detailed list"},
93 {FILE_IMGDISPLAY, "THUMBNAIL", ICON_IMGDISPLAY, "Thumbnails", "Display files as thumbnails"},
94 {0, nullptr, 0, nullptr, nullptr},
95 };
96
97 if (flag & WM_FILESEL_FILEPATH) {
99 ot->srna, "filepath", nullptr, FILE_MAX, "File Path", "Path to file");
101 }
102
103 if (flag & WM_FILESEL_DIRECTORY) {
105 ot->srna, "directory", nullptr, FILE_MAX, "Directory", "Directory of the file");
107 }
108
109 if (flag & WM_FILESEL_FILENAME) {
111 ot->srna, "filename", nullptr, FILE_MAX, "File Name", "Name of the file");
113 }
114
115 if (flag & WM_FILESEL_FILES) {
116 prop = RNA_def_collection_runtime(ot->srna, "files", RNA_OperatorFileListElement, "Files", "");
118 }
119
120 if ((flag & WM_FILESEL_SHOW_PROPS) == 0) {
121 prop = RNA_def_boolean(ot->srna,
122 "hide_props_region",
123 true,
124 "Hide Operator Properties",
125 "Collapse the region displaying the operator settings");
127 }
128
129 /* NOTE: this is only used to check if we should highlight the filename area red when the
130 * filepath is an existing file. */
131 prop = RNA_def_boolean(ot->srna,
132 "check_existing",
133 action == FILE_SAVE,
134 "Check Existing",
135 "Check and warn on overwriting existing files");
137
138 prop = RNA_def_boolean(
139 ot->srna, "filter_blender", (filter & FILE_TYPE_BLENDER) != 0, "Filter .blend files", "");
141 prop = RNA_def_boolean(ot->srna,
142 "filter_backup",
144 "Filter backup .blend files",
145 "");
147 prop = RNA_def_boolean(
148 ot->srna, "filter_image", (filter & FILE_TYPE_IMAGE) != 0, "Filter image files", "");
150 prop = RNA_def_boolean(
151 ot->srna, "filter_movie", (filter & FILE_TYPE_MOVIE) != 0, "Filter movie files", "");
153 prop = RNA_def_boolean(
154 ot->srna, "filter_python", (filter & FILE_TYPE_PYSCRIPT) != 0, "Filter Python files", "");
156 prop = RNA_def_boolean(
157 ot->srna, "filter_font", (filter & FILE_TYPE_FTFONT) != 0, "Filter font files", "");
159 prop = RNA_def_boolean(
160 ot->srna, "filter_sound", (filter & FILE_TYPE_SOUND) != 0, "Filter sound files", "");
162 prop = RNA_def_boolean(
163 ot->srna, "filter_text", (filter & FILE_TYPE_TEXT) != 0, "Filter text files", "");
165 prop = RNA_def_boolean(
166 ot->srna, "filter_archive", (filter & FILE_TYPE_ARCHIVE) != 0, "Filter archive files", "");
168 prop = RNA_def_boolean(
169 ot->srna, "filter_btx", (filter & FILE_TYPE_BTX) != 0, "Filter btx files", "");
171 prop = RNA_def_boolean(
172 ot->srna, "filter_alembic", (filter & FILE_TYPE_ALEMBIC) != 0, "Filter Alembic files", "");
174 prop = RNA_def_boolean(
175 ot->srna, "filter_usd", (filter & FILE_TYPE_USD) != 0, "Filter USD files", "");
177 prop = RNA_def_boolean(
178 ot->srna, "filter_obj", (filter & FILE_TYPE_OBJECT_IO) != 0, "Filter OBJ files", "");
180 prop = RNA_def_boolean(ot->srna,
181 "filter_volume",
182 (filter & FILE_TYPE_VOLUME) != 0,
183 "Filter OpenVDB volume files",
184 "");
186 prop = RNA_def_boolean(
187 ot->srna, "filter_folder", (filter & FILE_TYPE_FOLDER) != 0, "Filter folders", "");
189 prop = RNA_def_boolean(
190 ot->srna, "filter_blenlib", (filter & FILE_TYPE_BLENDERLIB) != 0, "Filter Blender IDs", "");
192
193 /* TODO: asset only filter? */
194
195 prop = RNA_def_int(
196 ot->srna,
197 "filemode",
198 type,
201 "File Browser Mode",
202 "The setting for the file browser mode to load a .blend file, a library or a special file",
206
207 if (flag & WM_FILESEL_RELPATH) {
209 "relative_path",
210 true,
211 "Relative Path",
212 "Select the file relative to the blend file");
213 }
214
216 prop = RNA_def_boolean(ot->srna, "show_multiview", false, "Enable Multi-View", "");
218 prop = RNA_def_boolean(ot->srna, "use_multiview", false, "Use Multi-View", "");
220 }
221
222 prop = RNA_def_enum(ot->srna, "display_type", file_display_items, display, "Display Type", "");
224
225 prop = RNA_def_enum(
226 ot->srna, "sort_method", rna_enum_dummy_NULL_items, sort, "File sorting mode", "");
229}
230
232{
233 PropertyRNA *prop_session_uid = RNA_struct_find_property(ptr, "session_uid");
234 PropertyRNA *prop_name = RNA_struct_find_property(ptr, "name");
235
236 if (prop_session_uid) {
237 RNA_int_set(ptr, "session_uid", int(id->session_uid));
238 }
239 else if (prop_name) {
240 RNA_string_set(ptr, "name", id->name + 2);
241 }
242 else {
244 }
245}
246
248 PointerRNA *ptr,
249 const ID_Type type)
250{
251 PropertyRNA *prop_session_uid = RNA_struct_find_property(ptr, "session_uid");
252 if (prop_session_uid && RNA_property_is_set(ptr, prop_session_uid)) {
253 const uint32_t session_uid = uint32_t(RNA_property_int_get(ptr, prop_session_uid));
254 return BKE_libblock_find_session_uid(bmain, type, session_uid);
255 }
256
257 PropertyRNA *prop_name = RNA_struct_find_property(ptr, "name");
258 if (prop_name && RNA_property_is_set(ptr, prop_name)) {
259 char name[MAX_ID_NAME - 2];
260 RNA_property_string_get(ptr, prop_name, name);
261 return BKE_libblock_find_name(bmain, type, name);
262 }
263
264 return nullptr;
265}
266
268{
269 return RNA_struct_property_is_set(ptr, "session_uid") || RNA_struct_property_is_set(ptr, "name");
270}
271
272void WM_operator_properties_id_lookup(wmOperatorType *ot, const bool add_name_prop)
273{
274 PropertyRNA *prop;
275
276 if (add_name_prop) {
277 prop = RNA_def_string(ot->srna,
278 "name",
279 nullptr,
280 MAX_ID_NAME - 2,
281 "Name",
282 "Name of the data-block to use by the operator");
284 }
285
286 prop = RNA_def_int(ot->srna,
287 "session_uid",
288 0,
289 INT32_MIN,
290 INT32_MAX,
291 "Session UID",
292 "Session UID of the data-block to use by the operator",
293 INT32_MIN,
294 INT32_MAX);
296}
297
299 int default_action,
300 const EnumPropertyItem *select_actions,
301 bool hide_gui)
302{
303 PropertyRNA *prop;
304 prop = RNA_def_enum(
305 ot->srna, "action", select_actions, default_action, "Action", "Selection action to execute");
306
307 if (hide_gui) {
309 }
310}
311
312void WM_operator_properties_select_action(wmOperatorType *ot, int default_action, bool hide_gui)
313{
314 static const EnumPropertyItem select_actions[] = {
315 {SEL_TOGGLE, "TOGGLE", 0, "Toggle", "Toggle selection for all elements"},
316 {SEL_SELECT, "SELECT", 0, "Select", "Select all elements"},
317 {SEL_DESELECT, "DESELECT", 0, "Deselect", "Deselect all elements"},
318 {SEL_INVERT, "INVERT", 0, "Invert", "Invert selection of all elements"},
319 {0, nullptr, 0, nullptr, nullptr},
320 };
321
322 wm_operator_properties_select_action_ex(ot, default_action, select_actions, hide_gui);
323}
324
326 int default_action,
327 bool hide_gui)
328{
329 static const EnumPropertyItem select_actions[] = {
330 {SEL_SELECT, "SELECT", 0, "Select", "Select all elements"},
331 {SEL_DESELECT, "DESELECT", 0, "Deselect", "Deselect all elements"},
332 {0, nullptr, 0, nullptr, nullptr},
333 };
334
335 wm_operator_properties_select_action_ex(ot, default_action, select_actions, hide_gui);
336}
337
339{
341 "ratio",
342 0.5f,
343 0.0f,
344 1.0f,
345 "Ratio",
346 "Portion of items to select randomly",
347 0.0f,
348 1.0f);
349 RNA_def_int(ot->srna,
350 "seed",
351 0,
352 0,
353 INT_MAX,
354 "Random Seed",
355 "Seed for the random number generator",
356 0,
357 255);
358
360}
361
363{
364 PropertyRNA *prop = RNA_struct_find_property(op->ptr, "seed");
365 int value = RNA_property_int_get(op->ptr, prop);
366
367 if (op->flag & OP_IS_INVOKE) {
368 if (!RNA_property_is_set(op->ptr, prop)) {
369 value += 1;
370 RNA_property_int_set(op->ptr, prop, value);
371 }
372 }
373 return value;
374}
375
380
382{
383 PropertyRNA *prop;
384
385 prop = RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX);
387 prop = RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX);
389 prop = RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX);
391 prop = RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX);
393
394 prop = RNA_def_boolean(ot->srna, "wait_for_input", true, "Wait for Input", "");
396}
397
399{
400 r_rect->xmin = RNA_int_get(op->ptr, "xmin");
401 r_rect->ymin = RNA_int_get(op->ptr, "ymin");
402 r_rect->xmax = RNA_int_get(op->ptr, "xmax");
403 r_rect->ymax = RNA_int_get(op->ptr, "ymax");
404}
405
407{
408 rcti rect_i;
410 BLI_rctf_rcti_copy(r_rect, &rect_i);
411}
412
414{
415 return Bounds<int2>({RNA_int_get(op->ptr, "xmin"), RNA_int_get(op->ptr, "ymin")},
416 {RNA_int_get(op->ptr, "xmax"), RNA_int_get(op->ptr, "ymax")});
417}
418
419void WM_operator_properties_gesture_box_ex(wmOperatorType *ot, bool deselect, bool extend)
420{
421 PropertyRNA *prop;
422
424
425 if (deselect) {
426 prop = RNA_def_boolean(
427 ot->srna, "deselect", false, "Deselect", "Deselect rather than select items");
429 }
430 if (extend) {
431 prop = RNA_def_boolean(ot->srna,
432 "extend",
433 true,
434 "Extend",
435 "Extend selection instead of deselecting everything first");
437 }
438}
439
441{
442 PropertyRNA *prop = RNA_def_boolean(ot->srna,
443 "use_cursor_init",
444 true,
445 "Use Mouse Position",
446 "Allow the initial mouse position to be used");
448}
449
458
460{
461 static const EnumPropertyItem select_mode_items[] = {
462 {SEL_OP_SET, "SET", ICON_SELECT_SET, "Set", "Set a new selection"},
463 {SEL_OP_ADD, "ADD", ICON_SELECT_EXTEND, "Extend", "Extend existing selection"},
464 {SEL_OP_SUB, "SUB", ICON_SELECT_SUBTRACT, "Subtract", "Subtract existing selection"},
465 {SEL_OP_XOR, "XOR", ICON_SELECT_DIFFERENCE, "Difference", "Invert existing selection"},
466 {SEL_OP_AND, "AND", ICON_SELECT_INTERSECT, "Intersect", "Intersect existing selection"},
467 {0, nullptr, 0, nullptr, nullptr},
468 };
469 PropertyRNA *prop = RNA_def_enum(ot->srna, "mode", select_mode_items, SEL_OP_SET, "Mode", "");
471}
472
474{
475 static const EnumPropertyItem select_mode_items[] = {
476 {SEL_OP_SET, "SET", ICON_SELECT_SET, "Set", "Set a new selection"},
477 {SEL_OP_ADD, "ADD", ICON_SELECT_EXTEND, "Extend", "Extend existing selection"},
478 {SEL_OP_SUB, "SUB", ICON_SELECT_SUBTRACT, "Subtract", "Subtract existing selection"},
479 {0, nullptr, 0, nullptr, nullptr},
480 };
481 PropertyRNA *prop = RNA_def_enum(ot->srna, "mode", select_mode_items, SEL_OP_SET, "Mode", "");
483}
484
486{
487 static const EnumPropertyItem direction_items[] = {
488 {UI_SELECT_WALK_UP, "UP", 0, "Previous", ""},
489 {UI_SELECT_WALK_DOWN, "DOWN", 0, "Next", ""},
490 {UI_SELECT_WALK_LEFT, "LEFT", 0, "Left", ""},
491 {UI_SELECT_WALK_RIGHT, "RIGHT", 0, "Right", ""},
492 {0, nullptr, 0, nullptr, nullptr},
493 };
494 PropertyRNA *prop;
495 prop = RNA_def_enum(ot->srna,
496 "direction",
497 direction_items,
498 0,
499 "Walk Direction",
500 "Select/Deselect element in this direction");
502}
503
505{
506 /* On the initial mouse press, this is set by #WM_generic_select_modal() to let the select
507 * operator exec callback know that it should not __yet__ deselect other items when clicking on
508 * an already selected one. Instead should make sure the operator executes modal then (see
509 * #WM_generic_select_modal()), so that the exec callback can be called a second time on the
510 * mouse release event to do this part. */
512 ot->srna, "wait_to_deselect_others", false, "Wait to Deselect Others", "");
514
515 /* Force the selection to act on mouse click, not press.
516 * Necessary for some cases, but isn't used much. */
517 prop = RNA_def_boolean(ot->srna,
518 "use_select_on_click",
519 false,
520 "Act on Click",
521 "Instead of selecting on mouse press, wait to see if there's drag event. "
522 "Otherwise select on mouse release");
524
525 RNA_def_int(ot->srna, "mouse_x", 0, INT_MIN, INT_MAX, "Mouse X", "", INT_MIN, INT_MAX);
526 RNA_def_int(ot->srna, "mouse_y", 0, INT_MIN, INT_MAX, "Mouse Y", "", INT_MIN, INT_MAX);
527}
528
530{
532
533 PropertyRNA *prop;
534 prop = RNA_def_boolean(ot->srna, "zoom_out", false, "Zoom Out", "");
536}
537
539{
540 PropertyRNA *prop;
541 prop = RNA_def_collection_runtime(ot->srna, "path", RNA_OperatorMousePath, "Path", "");
543 prop = RNA_def_boolean(ot->srna,
544 "use_smooth_stroke",
545 false,
546 "Stabilize Stroke",
547 "Selection lags behind mouse and follows a smoother path");
548 prop = RNA_def_float(ot->srna,
549 "smooth_stroke_factor",
550 0.75f,
551 0.5f,
552 0.99f,
553 "Smooth Stroke Factor",
554 "Higher values give a smoother stroke",
555 0.5f,
556 0.99f);
557 prop = RNA_def_int(ot->srna,
558 "smooth_stroke_radius",
559 35,
560 10,
561 200,
562 "Smooth Stroke Radius",
563 "Minimum distance from last point before selection continues",
564 10,
565 200);
567}
568
570{
571 PropertyRNA *prop;
572 prop = RNA_def_collection_runtime(ot->srna, "path", RNA_OperatorMousePath, "Path", "");
574}
575
577{
578 PropertyRNA *prop;
579
580 prop = RNA_def_int(ot->srna, "xstart", 0, INT_MIN, INT_MAX, "X Start", "", INT_MIN, INT_MAX);
582 prop = RNA_def_int(ot->srna, "xend", 0, INT_MIN, INT_MAX, "X End", "", INT_MIN, INT_MAX);
584 prop = RNA_def_int(ot->srna, "ystart", 0, INT_MIN, INT_MAX, "Y Start", "", INT_MIN, INT_MAX);
586 prop = RNA_def_int(ot->srna, "yend", 0, INT_MIN, INT_MAX, "Y End", "", INT_MIN, INT_MAX);
588 prop = RNA_def_boolean(ot->srna, "flip", false, "Flip", "");
590
591 if (cursor) {
592 prop = RNA_def_int(ot->srna,
593 "cursor",
594 cursor,
595 0,
596 INT_MAX,
597 "Cursor",
598 "Mouse cursor style to use during the modal operator",
599 0,
600 INT_MAX);
602 }
603}
604
606{
607 PropertyRNA *prop;
608 const int radius_default = 25;
609
610 prop = RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX);
612 prop = RNA_def_int(ot->srna, "y", 0, INT_MIN, INT_MAX, "Y", "", INT_MIN, INT_MAX);
614 RNA_def_int(ot->srna, "radius", radius_default, 1, INT_MAX, "Radius", "", 1, INT_MAX);
615
616 prop = RNA_def_boolean(ot->srna, "wait_for_input", true, "Wait for Input", "");
618}
619
621{
622 PropertyRNA *prop;
623
624 prop = RNA_def_boolean(ot->srna,
625 "extend",
626 false,
627 "Extend",
628 "Extend selection instead of deselecting everything first");
630 prop = RNA_def_boolean(ot->srna, "deselect", false, "Deselect", "Remove from selection");
632 prop = RNA_def_boolean(ot->srna, "toggle", false, "Toggle Selection", "Toggle the selection");
634
635 prop = RNA_def_boolean(ot->srna,
636 "deselect_all",
637 false,
638 "Deselect On Nothing",
639 "Deselect all when nothing under the cursor");
641
642 /* TODO: currently only used for the 3D viewport. */
643 prop = RNA_def_boolean(ot->srna,
644 "select_passthrough",
645 false,
646 "Only Select Unselected",
647 "Ignore the select action when the element is already selected");
649}
650
652{
653 const int nth_default = nth_can_disable ? 0 : 1;
654 const int nth_min = min_ii(nth_default, 1);
655 RNA_def_int(ot->srna,
656 "skip",
657 nth_default,
658 nth_min,
659 INT_MAX,
660 "Deselected",
661 "Number of deselected elements in the repetitive sequence",
662 nth_min,
663 100);
664 RNA_def_int(ot->srna,
665 "nth",
666 1,
667 1,
668 INT_MAX,
669 "Selected",
670 "Number of selected elements in the repetitive sequence",
671 1,
672 100);
673 RNA_def_int(ot->srna,
674 "offset",
675 0,
676 INT_MIN,
677 INT_MAX,
678 "Offset",
679 "Offset from the starting point",
680 -100,
681 100);
682}
683
685 CheckerIntervalParams *op_params)
686{
687 const int nth = RNA_int_get(op->ptr, "nth");
688 const int skip = RNA_int_get(op->ptr, "skip");
689 int offset = RNA_int_get(op->ptr, "offset");
690
691 op_params->nth = nth;
692 op_params->skip = skip;
693
694 /* So input of offset zero ends up being (nth - 1). */
695 op_params->offset = mod_i(offset, nth + skip);
696}
697
699 int depth)
700{
701 return ((op_params->skip == 0) ||
702 ((op_params->offset + depth) % (op_params->skip + op_params->nth) >= op_params->skip));
703}
704
705} // namespace blender
#define INT32_MAX
#define INT32_MIN
#define FILE_MAX
#define MAX_ID_NAME
Definition DNA_ID.h:367
Enumerations for DNA_ID.h.
#define BLI_assert_unreachable()
void sort(btMatrix3x3 &U, btVector3 &sigma, btMatrix3x3 &V, int t)
Helper function of 3X3 SVD for sorting singular values.
#define INT_MAX
BMesh Iterators.
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
void WM_operator_properties_select_action_simple(wmOperatorType *ot, int default_action, bool hide_gui)
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)
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
MINLINE int mod_i(int i, int n)
void WM_operator_properties_gesture_circle(wmOperatorType *ot)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
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:1808
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void WM_operator_properties_select_random(wmOperatorType *ot)
void WM_operator_properties_id_lookup(wmOperatorType *ot, const bool add_name_prop)
void WM_operator_properties_gesture_box_ex(wmOperatorType *ot, bool deselect, bool extend)
ID * BKE_libblock_find_session_uid(Main *bmain, short type, uint32_t session_uid)
Definition lib_id.cc:1826
ID * WM_operator_properties_id_lookup_from_name_or_session_uid(Main *bmain, PointerRNA *ptr, const ID_Type type)
int WM_operator_properties_select_random_seed_increment_get(wmOperator *op)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
static void wm_operator_properties_select_action_ex(wmOperatorType *ot, int default_action, const EnumPropertyItem *select_actions, bool hide_gui)
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
@ FILE_HORIZONTALDISPLAY
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
void WM_operator_properties_border(wmOperatorType *ot)
std::string RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop)
void WM_operator_properties_gesture_box_select(wmOperatorType *ot)
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)
int RNA_int_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_collection_runtime(StructOrFunctionRNA *cont, const char *identifier, StructRNA *type, const char *ui_name, const char *ui_description)
void WM_operator_properties_checker_interval(wmOperatorType *ot, bool nth_can_disable)
const EnumPropertyItem rna_enum_fileselect_params_sort_items[]
Definition rna_space.cc:366
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 BLI_rctf_rcti_copy(struct rctf *dst, const struct rcti *src)
void WM_operator_properties_select_all(wmOperatorType *ot)
void WM_operator_properties_use_cursor_init(wmOperatorType *ot)
void WM_operator_properties_select_walk_direction(wmOperatorType *ot)
void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
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 WM_operator_properties_border_to_rctf(wmOperator *op, rctf *r_rect)
unsigned int uint32_t
Definition BKE_text.h:81
void WM_operator_properties_confirm_or_exec(wmOperatorType *ot)
void WM_operator_properties_select_action(wmOperatorType *ot, int default_action, bool hide_gui)
void RNA_enum_items_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
eFileSel_Flag
Definition WM_api.hh:1328
@ WM_FILESEL_DIRECTORY
Definition WM_api.hh:1330
@ WM_FILESEL_RELPATH
Definition WM_api.hh:1329
@ WM_FILESEL_SHOW_PROPS
Definition WM_api.hh:1335
@ WM_FILESEL_FILES
Definition WM_api.hh:1333
@ WM_FILESEL_FILENAME
Definition WM_api.hh:1331
@ WM_FILESEL_FILEPATH
Definition WM_api.hh:1332
bool WM_operator_properties_checker_interval_test(const CheckerIntervalParams *op_params, int depth)
void WM_operator_properties_id_lookup_set_from_id(PointerRNA *ptr, const ID *id)
void WM_operator_properties_gesture_straightline(wmOperatorType *ot, int cursor)
bool WM_operator_properties_id_lookup_is_set(PointerRNA *ptr)
void WM_operator_properties_border_to_rcti(wmOperator *op, rcti *r_rect)
void RNA_def_property_subtype(PropertyRNA *prop, PropertySubType subtype)
void WM_operator_properties_mouse_select(wmOperatorType *ot)
void WM_operator_properties_gesture_box_zoom(wmOperatorType *ot)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
void WM_operator_properties_gesture_box(wmOperatorType *ot)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
const EnumPropertyItem rna_enum_dummy_NULL_items[]
Definition rna_rna.cc:28
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
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)
eFileSel_Action
Definition WM_api.hh:1340
@ FILE_SAVE
Definition WM_api.hh:1342
static const EnumPropertyItem * wm_operator_properties_filesel_sort_items_itemf(bContext *, PointerRNA *, PropertyRNA *, bool *r_free)
@ PROP_SKIP_PRESET
Definition RNA_types.hh:543
@ PROP_SKIP_SAVE
Definition RNA_types.hh:414
@ PROP_HIDDEN
Definition RNA_types.hh:408
@ FILE_TYPE_BLENDER_BACKUP
void WM_operator_properties_select_operation_simple(wmOperatorType *ot)
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_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void WM_operator_properties_gesture_polyline(wmOperatorType *ot)
int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
MINLINE int min_ii(int a, int b)
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)
void WM_operator_properties_checker_interval_from_op(wmOperator *op, CheckerIntervalParams *op_params)
void WM_operator_properties_generic_select(wmOperatorType *ot)
void WM_operator_properties_select_operation(wmOperatorType *ot)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
void WM_operator_properties_gesture_lasso(wmOperatorType *ot)
Bounds< int2 > WM_operator_properties_border_to_bounds(wmOperator *op)
Bounds()=default