Blender V5.0
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_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,
200 "File Browser Mode",
201 "The setting for the file browser mode to load a .blend file, a library or a special file",
205
206 if (flag & WM_FILESEL_RELPATH) {
207 RNA_def_boolean(ot->srna,
208 "relative_path",
209 true,
210 "Relative Path",
211 "Select the file relative to the blend file");
212 }
213
215 prop = RNA_def_boolean(ot->srna, "show_multiview", false, "Enable Multi-View", "");
217 prop = RNA_def_boolean(ot->srna, "use_multiview", false, "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(
225 ot->srna, "sort_method", rna_enum_dummy_NULL_items, sort, "File sorting mode", "");
228}
229
231{
232 PropertyRNA *prop_session_uid = RNA_struct_find_property(ptr, "session_uid");
233 PropertyRNA *prop_name = RNA_struct_find_property(ptr, "name");
234
235 if (prop_session_uid) {
236 RNA_int_set(ptr, "session_uid", int(id->session_uid));
237 }
238 else if (prop_name) {
239 RNA_string_set(ptr, "name", id->name + 2);
240 }
241 else {
243 }
244}
245
248 const ID_Type type)
249{
250 PropertyRNA *prop_session_uid = RNA_struct_find_property(ptr, "session_uid");
251 if (prop_session_uid && RNA_property_is_set(ptr, prop_session_uid)) {
252 const uint32_t session_uid = uint32_t(RNA_property_int_get(ptr, prop_session_uid));
253 return BKE_libblock_find_session_uid(bmain, type, session_uid);
254 }
255
256 PropertyRNA *prop_name = RNA_struct_find_property(ptr, "name");
257 if (prop_name && RNA_property_is_set(ptr, prop_name)) {
258 char name[MAX_ID_NAME - 2];
259 RNA_property_string_get(ptr, prop_name, name);
260 return BKE_libblock_find_name(bmain, type, name);
261 }
262
263 return nullptr;
264}
265
270
271void 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 nullptr,
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_uid",
287 0,
288 INT32_MIN,
289 INT32_MAX,
290 "Session UID",
291 "Session UID 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
311void 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, nullptr, 0, nullptr, nullptr},
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, nullptr, 0, nullptr, nullptr},
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);
348 RNA_def_int(ot->srna,
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
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 r_rect->xmin = RNA_int_get(op->ptr, "xmin");
400 r_rect->ymin = RNA_int_get(op->ptr, "ymin");
401 r_rect->xmax = RNA_int_get(op->ptr, "xmax");
402 r_rect->ymax = RNA_int_get(op->ptr, "ymax");
403}
404
406{
407 rcti rect_i;
409 BLI_rctf_rcti_copy(r_rect, &rect_i);
410}
411
413{
414 using namespace blender;
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
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. Necessary for some cases, but isn't used
516 * 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 gives 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}
ID * BKE_libblock_find_session_uid(Main *bmain, short type, uint32_t session_uid)
Definition lib_id.cc:1728
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:1710
#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 MAX_ID_NAME
Definition DNA_ID.h:373
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_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
@ SEL_SELECT
@ SEL_INVERT
@ SEL_DESELECT
@ SEL_TOGGLE
@ UI_SELECT_WALK_RIGHT
@ UI_SELECT_WALK_UP
@ UI_SELECT_WALK_LEFT
@ UI_SELECT_WALK_DOWN
@ PROP_SKIP_SAVE
Definition RNA_types.hh:344
@ PROP_SKIP_PRESET
Definition RNA_types.hh:473
@ PROP_HIDDEN
Definition RNA_types.hh:338
@ PROP_PIXEL
Definition RNA_types.hh:248
eFileSel_Flag
Definition WM_api.hh:1120
@ WM_FILESEL_FILES
Definition WM_api.hh:1125
@ WM_FILESEL_DIRECTORY
Definition WM_api.hh:1122
@ WM_FILESEL_RELPATH
Definition WM_api.hh:1121
@ WM_FILESEL_SHOW_PROPS
Definition WM_api.hh:1127
@ WM_FILESEL_FILEPATH
Definition WM_api.hh:1124
@ WM_FILESEL_FILENAME
Definition WM_api.hh:1123
eFileSel_Action
Definition WM_api.hh:1132
@ FILE_SAVE
Definition WM_api.hh:1134
static DBVT_INLINE btDbvtNode * sort(btDbvtNode *n, btDbvtNode *&r)
Definition btDbvt.cpp:418
#define INT32_MAX
#define INT32_MIN
#define filter
const char * 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:343
Definition DNA_ID.h:414
char name[258]
Definition DNA_ID.h:432
unsigned int session_uid
Definition DNA_ID.h:462
int ymin
int ymax
int xmin
int xmax
struct PointerRNA * ptr
PointerRNA * ptr
Definition wm_files.cc:4238
wmOperatorType * ot
Definition wm_files.cc:4237
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:145