Blender V4.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
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",
142 (filter & FILE_TYPE_BLENDER_BACKUP) != 0,
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) {
211 "relative_path",
212 true,
213 "Relative Path",
214 "Select the file relative to the blend file");
215 }
216
217 if ((filter & FILE_TYPE_IMAGE) || (filter & FILE_TYPE_MOVIE)) {
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);
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 PropertyRNA *prop;
418
420
421 if (deselect) {
422 prop = RNA_def_boolean(
423 ot->srna, "deselect", false, "Deselect", "Deselect rather than select items");
425 }
426 if (extend) {
427 prop = RNA_def_boolean(ot->srna,
428 "extend",
429 true,
430 "Extend",
431 "Extend selection instead of deselecting everything first");
433 }
434}
435
437{
439 "use_cursor_init",
440 true,
441 "Use Mouse Position",
442 "Allow the initial mouse position to be used");
444}
445
454
456{
457 static const EnumPropertyItem select_mode_items[] = {
458 {SEL_OP_SET, "SET", ICON_SELECT_SET, "Set", "Set a new selection"},
459 {SEL_OP_ADD, "ADD", ICON_SELECT_EXTEND, "Extend", "Extend existing selection"},
460 {SEL_OP_SUB, "SUB", ICON_SELECT_SUBTRACT, "Subtract", "Subtract existing selection"},
461 {SEL_OP_XOR, "XOR", ICON_SELECT_DIFFERENCE, "Difference", "Invert existing selection"},
462 {SEL_OP_AND, "AND", ICON_SELECT_INTERSECT, "Intersect", "Intersect existing selection"},
463 {0, nullptr, 0, nullptr, nullptr},
464 };
465 PropertyRNA *prop = RNA_def_enum(ot->srna, "mode", select_mode_items, SEL_OP_SET, "Mode", "");
467}
468
470{
471 static const EnumPropertyItem select_mode_items[] = {
472 {SEL_OP_SET, "SET", ICON_SELECT_SET, "Set", "Set a new selection"},
473 {SEL_OP_ADD, "ADD", ICON_SELECT_EXTEND, "Extend", "Extend existing selection"},
474 {SEL_OP_SUB, "SUB", ICON_SELECT_SUBTRACT, "Subtract", "Subtract existing selection"},
475 {0, nullptr, 0, nullptr, nullptr},
476 };
477 PropertyRNA *prop = RNA_def_enum(ot->srna, "mode", select_mode_items, SEL_OP_SET, "Mode", "");
479}
480
482{
483 static const EnumPropertyItem direction_items[] = {
484 {UI_SELECT_WALK_UP, "UP", 0, "Previous", ""},
485 {UI_SELECT_WALK_DOWN, "DOWN", 0, "Next", ""},
486 {UI_SELECT_WALK_LEFT, "LEFT", 0, "Left", ""},
487 {UI_SELECT_WALK_RIGHT, "RIGHT", 0, "Right", ""},
488 {0, nullptr, 0, nullptr, nullptr},
489 };
490 PropertyRNA *prop;
491 prop = RNA_def_enum(ot->srna,
492 "direction",
493 direction_items,
494 0,
495 "Walk Direction",
496 "Select/Deselect element in this direction");
498}
499
501{
502 /* On the initial mouse press, this is set by #WM_generic_select_modal() to let the select
503 * operator exec callback know that it should not __yet__ deselect other items when clicking on
504 * an already selected one. Instead should make sure the operator executes modal then (see
505 * #WM_generic_select_modal()), so that the exec callback can be called a second time on the
506 * mouse release event to do this part. */
508 ot->srna, "wait_to_deselect_others", false, "Wait to Deselect Others", "");
510
511 RNA_def_int(ot->srna, "mouse_x", 0, INT_MIN, INT_MAX, "Mouse X", "", INT_MIN, INT_MAX);
512 RNA_def_int(ot->srna, "mouse_y", 0, INT_MIN, INT_MAX, "Mouse Y", "", INT_MIN, INT_MAX);
513}
514
516{
518
519 PropertyRNA *prop;
520 prop = RNA_def_boolean(ot->srna, "zoom_out", false, "Zoom Out", "");
522}
523
525{
526 PropertyRNA *prop;
527 prop = RNA_def_collection_runtime(ot->srna, "path", &RNA_OperatorMousePath, "Path", "");
529 prop = RNA_def_boolean(ot->srna,
530 "use_smooth_stroke",
531 false,
532 "Stabilize Stroke",
533 "Selection lags behind mouse and follows a smoother path");
534 prop = RNA_def_float(ot->srna,
535 "smooth_stroke_factor",
536 0.75f,
537 0.5f,
538 0.99f,
539 "Smooth Stroke Factor",
540 "Higher values gives a smoother stroke",
541 0.5f,
542 0.99f);
543 prop = RNA_def_int(ot->srna,
544 "smooth_stroke_radius",
545 35,
546 10,
547 200,
548 "Smooth Stroke Radius",
549 "Minimum distance from last point before selection continues",
550 10,
551 200);
553}
554
556{
557 PropertyRNA *prop;
558 prop = RNA_def_collection_runtime(ot->srna, "path", &RNA_OperatorMousePath, "Path", "");
560}
561
563{
564 PropertyRNA *prop;
565
566 prop = RNA_def_int(ot->srna, "xstart", 0, INT_MIN, INT_MAX, "X Start", "", INT_MIN, INT_MAX);
568 prop = RNA_def_int(ot->srna, "xend", 0, INT_MIN, INT_MAX, "X End", "", INT_MIN, INT_MAX);
570 prop = RNA_def_int(ot->srna, "ystart", 0, INT_MIN, INT_MAX, "Y Start", "", INT_MIN, INT_MAX);
572 prop = RNA_def_int(ot->srna, "yend", 0, INT_MIN, INT_MAX, "Y End", "", INT_MIN, INT_MAX);
574 prop = RNA_def_boolean(ot->srna, "flip", false, "Flip", "");
576
577 if (cursor) {
578 prop = RNA_def_int(ot->srna,
579 "cursor",
580 cursor,
581 0,
582 INT_MAX,
583 "Cursor",
584 "Mouse cursor style to use during the modal operator",
585 0,
586 INT_MAX);
588 }
589}
590
592{
593 PropertyRNA *prop;
594 const int radius_default = 25;
595
596 prop = RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX);
598 prop = RNA_def_int(ot->srna, "y", 0, INT_MIN, INT_MAX, "Y", "", INT_MIN, INT_MAX);
600 RNA_def_int(ot->srna, "radius", radius_default, 1, INT_MAX, "Radius", "", 1, INT_MAX);
601
602 prop = RNA_def_boolean(ot->srna, "wait_for_input", true, "Wait for Input", "");
604}
605
607{
608 PropertyRNA *prop;
609
610 prop = RNA_def_boolean(ot->srna,
611 "extend",
612 false,
613 "Extend",
614 "Extend selection instead of deselecting everything first");
616 prop = RNA_def_boolean(ot->srna, "deselect", false, "Deselect", "Remove from selection");
618 prop = RNA_def_boolean(ot->srna, "toggle", false, "Toggle Selection", "Toggle the selection");
620
621 prop = RNA_def_boolean(ot->srna,
622 "deselect_all",
623 false,
624 "Deselect On Nothing",
625 "Deselect all when nothing under the cursor");
627
628 /* TODO: currently only used for the 3D viewport. */
629 prop = RNA_def_boolean(ot->srna,
630 "select_passthrough",
631 false,
632 "Only Select Unselected",
633 "Ignore the select action when the element is already selected");
635}
636
638{
639 const int nth_default = nth_can_disable ? 0 : 1;
640 const int nth_min = min_ii(nth_default, 1);
642 "skip",
643 nth_default,
644 nth_min,
645 INT_MAX,
646 "Deselected",
647 "Number of deselected elements in the repetitive sequence",
648 nth_min,
649 100);
651 "nth",
652 1,
653 1,
654 INT_MAX,
655 "Selected",
656 "Number of selected elements in the repetitive sequence",
657 1,
658 100);
660 "offset",
661 0,
662 INT_MIN,
663 INT_MAX,
664 "Offset",
665 "Offset from the starting point",
666 -100,
667 100);
668}
669
671 CheckerIntervalParams *op_params)
672{
673 const int nth = RNA_int_get(op->ptr, "nth");
674 const int skip = RNA_int_get(op->ptr, "skip");
675 int offset = RNA_int_get(op->ptr, "offset");
676
677 op_params->nth = nth;
678 op_params->skip = skip;
679
680 /* So input of offset zero ends up being (nth - 1). */
681 op_params->offset = mod_i(offset, nth + skip);
682}
683
685 int depth)
686{
687 return ((op_params->skip == 0) ||
688 ((op_params->offset + depth) % (op_params->skip + op_params->nth) >= op_params->skip));
689}
ID * BKE_libblock_find_session_uid(Main *bmain, short type, uint32_t session_uid)
Definition lib_id.cc:1675
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:1657
#define BLI_assert_unreachable()
Definition BLI_assert.h:97
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 MAX_ID_NAME
Definition DNA_ID.h:377
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
@ 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
PropertyFlag
Definition RNA_types.hh:201
@ PROP_SKIP_SAVE
Definition RNA_types.hh:245
@ PROP_SKIP_PRESET
Definition RNA_types.hh:343
@ PROP_HIDDEN
Definition RNA_types.hh:239
@ PROP_PIXEL
Definition RNA_types.hh:151
eFileSel_Flag
Definition WM_api.hh:932
@ WM_FILESEL_FILES
Definition WM_api.hh:937
@ WM_FILESEL_DIRECTORY
Definition WM_api.hh:934
@ WM_FILESEL_RELPATH
Definition WM_api.hh:933
@ WM_FILESEL_SHOW_PROPS
Definition WM_api.hh:939
@ WM_FILESEL_FILEPATH
Definition WM_api.hh:936
@ WM_FILESEL_FILENAME
Definition WM_api.hh:935
eFileSel_Action
Definition WM_api.hh:944
@ FILE_SAVE
Definition WM_api.hh:946
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:29
const EnumPropertyItem rna_enum_fileselect_params_sort_items[]
Definition rna_space.cc:358
#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:413
int ymin
int ymax
int xmin
int xmax
StructRNA * srna
Definition WM_types.hh:1080
struct PointerRNA * ptr
PointerRNA * ptr
Definition wm_files.cc:4126
wmOperatorType * ot
Definition wm_files.cc:4125
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)
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:138