Blender V5.3
buttons_ops.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2009 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include <cstdlib>
10#include <cstring>
11#include <string>
12
13#include "MEM_guardedalloc.h"
14
15#include "DNA_userdef_types.h"
16
17#include "BLI_fileops.hh"
18#include "BLI_path_utils.hh"
19#include "BLI_string.hh"
20#include "BLI_utildefines.hh"
21
22#include "BLT_translation.hh"
23
24#include "BKE_appdir.hh"
26#include "BKE_context.hh"
27#include "BKE_library.hh"
28#include "BKE_main.hh"
29#include "BKE_path_templates.hh"
30#include "BKE_report.hh"
31#include "BKE_screen.hh"
32
33#include "WM_api.hh"
34#include "WM_types.hh"
35
36#include "ED_screen.hh"
37#include "ED_undo.hh"
38
39#include "RNA_access.hh"
40#include "RNA_define.hh"
41#include "RNA_prototypes.hh"
42
43#include "UI_interface.hh"
45#include "UI_resources.hh"
46
47#include "buttons_intern.hh" /* own include */
48
49namespace blender {
50
51/* -------------------------------------------------------------------- */
56
58{
60 ScrArea *area = CTX_wm_area(C);
62
63 ED_region_activate_rna_prop(C, region, space, "search_filter");
64
65 return OPERATOR_FINISHED;
66}
67
69{
70 /* Identifiers. */
71 ot->name = "Filter";
72 ot->description = "Start entering filter text";
73 ot->idname = "BUTTONS_OT_start_filter";
74
75 /* Callbacks. */
78}
79
92
94{
95 /* Identifiers. */
96 ot->name = "Clear Filter";
97 ot->description = "Clear the search filter";
98 ot->idname = "BUTTONS_OT_clear_filter";
99
100 /* Callbacks. */
103}
104
106
107/* -------------------------------------------------------------------- */
110
112{
114
115 sbuts->flag ^= SB_PIN_CONTEXT;
116
117 /* Create the properties space pointer. */
118 bScreen *screen = CTX_wm_screen(C);
119 PointerRNA sbuts_ptr = RNA_pointer_create_discrete(&screen->id, RNA_SpaceProperties, sbuts);
120
121 /* Create the new ID pointer and set the pin ID with RNA
122 * so we can use the property's RNA update functionality. */
123 ID *new_id = (sbuts->flag & SB_PIN_CONTEXT) ? buttons_context_id_path(C) : nullptr;
124 PointerRNA new_id_ptr = RNA_id_pointer_create(new_id);
125 RNA_pointer_set(&sbuts_ptr, "pin_id", new_id_ptr);
126
128
129 return OPERATOR_FINISHED;
130}
131
133{
134 /* Identifiers. */
135 ot->name = "Toggle Pin ID";
136 ot->description = "Keep the current data-block displayed";
137 ot->idname = "BUTTONS_OT_toggle_pin";
138
139 /* Callbacks. */
140 ot->exec = toggle_pin_exec;
142}
143
145
146/* -------------------------------------------------------------------- */
149
151 wmOperator * /*op*/,
152 const wmEvent * /*event*/)
153{
154 ui::PopupMenu *pup = ui::popup_menu_begin(C, IFACE_("Context Menu"), ICON_NONE);
155 ui::Layout &layout = *popup_menu_layout(pup);
156
157 layout.menu("INFO_MT_area", std::nullopt, ICON_NONE);
158 popup_menu_end(C, pup);
159
160 return OPERATOR_INTERFACE;
161}
162
164{
165 /* Identifiers. */
166 ot->name = "Context Menu";
167 ot->description = "Display properties editor context_menu";
168 ot->idname = "BUTTONS_OT_context_menu";
169
170 /* Callbacks. */
173}
174
176
177/* -------------------------------------------------------------------- */
180
183 PropertyRNA *prop = nullptr;
184 bool is_undo = false;
185 bool is_userdef = false;
186};
187
189{
190 FileBrowseOp *fbo = static_cast<FileBrowseOp *>(op->customdata);
191 const PropertySubType subtype = RNA_property_subtype(fbo->prop);
192 if (ELEM(subtype, PROP_FILEPATH, PROP_DIRPATH)) {
193 const int flag = RNA_property_flag(fbo->prop);
194 if ((flag & PROP_PATH_SUPPORTS_BLEND_RELATIVE) == 0) {
195 return false;
196 }
197 }
198 return true;
199}
200
201static void file_browse_apply_path_templates(const Main *bmain,
202 PropertyRNA *prop,
203 std::string &path)
204{
206 return;
207 }
208
209 /* Store paths in project settings relative to the project root. */
211 const bool path_is_template = false;
213 return project ? BKE_blender_project_path_make_relative(path, path_is_template, *project) :
215 });
216 return;
217 }
218
219 /* Escape the path's curly braces. */
220 path = BKE_path_template_escape(path);
221}
222
224{
225 Main *bmain = CTX_data_main(C);
226 FileBrowseOp *fbo = static_cast<FileBrowseOp *>(op->customdata);
227 char *path;
228 const char *path_prop = RNA_struct_find_property(op->ptr, "directory") ? "directory" :
229 "filepath";
230
231 if (fbo == nullptr) {
232 return OPERATOR_CANCELLED;
233 }
234 if (RNA_struct_property_is_set(op->ptr, path_prop) == 0) {
235 MEM_delete(fbo);
236 return OPERATOR_CANCELLED;
237 }
238
239 path = RNA_string_get_alloc(op->ptr, path_prop, nullptr, 0, nullptr);
240
241 if (path[0]) {
242 /* Check relative paths are supported here as this option will be hidden
243 * when it's not supported. In this case the value may have been enabled
244 * by default or from the last-used setting.
245 * Either way, don't use the blend-file relative prefix when it's not supported. */
246 const PropertySubType prop_subtype = RNA_property_subtype(fbo->prop);
247 const bool is_relative = BLI_path_is_rel(path);
248 const bool make_relative = RNA_boolean_get(op->ptr, "relative_path") &&
250
251 /* Add slash for directories, important for some properties. */
252 if ((prop_subtype == PROP_DIRPATH) || (is_relative || make_relative)) {
253 char path_buf[FILE_MAX];
254 ID *id = fbo->ptr.owner_id;
255
256 STRNCPY(path_buf, path);
257 MEM_delete(path);
258
259 if (is_relative) {
260 BLI_path_abs(path_buf, id ? ID_BLEND_PATH(bmain, id) : BKE_main_blendfile_path(bmain));
261 }
262
263 if (prop_subtype == PROP_DIRPATH) {
264 BLI_path_slash_ensure(path_buf, sizeof(path_buf));
265 }
266
267 if (make_relative) {
268 BLI_path_rel(path_buf, BKE_main_blendfile_path(bmain));
269 }
270 path = BLI_strdup(path_buf);
271 }
272 }
273
274 std::string path_str = path;
275 MEM_delete(path);
276
277 file_browse_apply_path_templates(bmain, fbo->prop, path_str);
278
279 RNA_property_string_set(&fbo->ptr, fbo->prop, path_str.c_str());
280 RNA_property_update(C, &fbo->ptr, fbo->prop);
281
282 if (fbo->is_undo) {
283 const char *undostr = RNA_property_identifier(fbo->prop);
284 ED_undo_push(C, undostr);
285 }
286
287 /* Special annoying exception, filesel on redo panel #26618. */
288 {
290 if (redo_op) {
291 if (fbo->ptr.data == redo_op->ptr->data) {
292 ED_undo_operator_repeat(C, redo_op);
293 }
294 }
295 }
296
297 /* Tag user preferences as dirty. */
298 if (fbo->is_userdef) {
299 U.runtime.is_dirty = true;
300 }
301
302 BLI_assert(fbo == op->customdata);
303 MEM_delete(fbo);
304
305 return OPERATOR_FINISHED;
306}
307
308static void file_browse_cancel(bContext * /*C*/, wmOperator *op)
309{
310 FileBrowseOp *fbo = static_cast<FileBrowseOp *>(op->customdata);
311 MEM_delete(fbo);
312 op->customdata = nullptr;
313}
314
316{
317 PointerRNA ptr;
318 PropertyRNA *prop;
319 bool is_undo;
320 bool is_userdef;
321 char *path;
322
323 const SpaceFile *sfile = CTX_wm_space_file(C);
324 if (sfile && sfile->op) {
325 BKE_report(op->reports, RPT_ERROR, "Cannot activate a file selector dialog, one already open");
326 return OPERATOR_CANCELLED;
327 }
328
329 ui::context_active_but_prop_get_filebrowser(C, &ptr, &prop, &is_undo, &is_userdef);
330
331 if (!prop) {
332 return OPERATOR_CANCELLED;
333 }
334
335 path = RNA_property_string_get_alloc(&ptr, prop, nullptr, 0, nullptr);
336
338 const std::optional<bke::path_templates::VariableMap> variables =
340 BLI_assert(variables.has_value());
341
343 &path, FILE_MAX, *variables);
344
345 if (!errors.is_empty()) {
347 return OPERATOR_CANCELLED;
348 }
349 }
350
351 /* Alternative behaviors:
352 * - Shift+Click opens the file.
353 * - Alt+Click (or normal click for uneditable paths) opens the containing
354 * folder in the OS's browser.
355 */
356 if (event->modifier & (KM_SHIFT | KM_ALT) || !RNA_property_editable(&ptr, prop)) {
357 wmOperatorType *ot = WM_operatortype_find("WM_OT_path_open", true);
358
359 const bool do_open_directory = event->modifier & KM_ALT ||
360 (!(event->modifier & KM_SHIFT) &&
361 !RNA_property_editable(&ptr, prop));
362
363 /* We only do this for PROP_FILEPATH because PROP_DIRPATH properties are
364 * already a path to a directory. */
365 if (do_open_directory && RNA_property_subtype(prop) == PROP_FILEPATH) {
366 char *lslash = const_cast<char *>(BLI_path_slash_rfind(path));
367 if (lslash) {
368 *lslash = '\0';
369 }
370 }
371
373 RNA_string_set(&props_ptr, "filepath", path);
375 WM_operator_properties_free(&props_ptr);
376
377 MEM_delete(path);
378 return OPERATOR_CANCELLED;
379 }
380
381 PropertyRNA *prop_relpath;
382 const char *path_prop = RNA_struct_find_property(op->ptr, "directory") ? "directory" :
383 "filepath";
384 FileBrowseOp *fbo = MEM_new<FileBrowseOp>(__func__);
385 fbo->ptr = ptr;
386 fbo->prop = prop;
387 fbo->is_undo = is_undo;
388 fbo->is_userdef = is_userdef;
389
390 op->customdata = fbo;
391
392 /* NOTE(@ideasman42): Normally #ED_fileselect_get_params would handle this
393 * but we need to because of stupid user-preferences exception. */
394 if ((prop_relpath = RNA_struct_find_property(op->ptr, "relative_path"))) {
395 if (!RNA_property_is_set(op->ptr, prop_relpath)) {
396 bool is_relative = (U.flag & USER_RELPATHS) != 0;
397
398 /* While we want to follow the defaults,
399 * we better not switch existing paths relative/absolute state. */
400 if (path[0]) {
401 is_relative = BLI_path_is_rel(path);
402 }
403
404 if (ptr.data == &U || is_userdef) [[unlikely]] {
405 is_relative = false;
406 }
407
408 /* Annoying exception!, if we're dealing with the user preferences,
409 * default relative to be off. */
410 RNA_property_boolean_set(op->ptr, prop_relpath, is_relative);
411 }
412 }
413
414 const char *prop_id = RNA_property_identifier(prop);
415
416 /* NOTE: relying on built-in names isn't useful for add-on authors.
417 * The property itself should support this kind of meta-data. */
418 if (STR_ELEM(prop_id, "font_path_ui", "font_path_ui_mono", "font_directory")) {
419 RNA_boolean_set(op->ptr, "filter_font", true);
420 RNA_boolean_set(op->ptr, "filter_folder", true);
421 RNA_enum_set(op->ptr, "display_type", FILE_IMGDISPLAY);
422 RNA_enum_set(op->ptr, "sort_method", FILE_SORT_ALPHA);
423 if (!path[0]) {
424 char fonts_path[FILE_MAX] = {0};
425 if (U.fontdir[0]) {
426 STRNCPY(fonts_path, U.fontdir);
427 /* The file selector will expand the blend-file relative prefix. */
428 }
429 else if (!BKE_appdir_font_folder_default(fonts_path, ARRAY_SIZE(fonts_path))) {
431 }
432 BLI_path_slash_ensure(fonts_path, ARRAY_SIZE(fonts_path));
433 MEM_delete(path);
434 path = BLI_strdup(fonts_path);
435 }
436 }
437
438 if (!path[0]) {
439 /* Find a reasonable folder to start in if none found. */
440 char default_path[FILE_MAX] = {0};
442 BLI_path_slash_ensure(default_path, ARRAY_SIZE(default_path));
443 MEM_delete(path);
444 path = BLI_strdup(default_path);
445 }
446
447 RNA_string_set(op->ptr, path_prop, path);
448 MEM_delete(path);
449
450 PropertyRNA *prop_check_existing = RNA_struct_find_property(op->ptr, "check_existing");
451 if (!RNA_property_is_set(op->ptr, prop_check_existing)) {
452 const bool is_output_path = (RNA_property_flag(prop) & PROP_PATH_OUTPUT) != 0;
453 RNA_property_boolean_set(op->ptr, prop_check_existing, is_output_path);
454 }
455 if (std::optional<std::string> filter = RNA_property_string_path_filter(C, &ptr, prop)) {
456 RNA_string_set(op->ptr, "filter_glob", filter->c_str());
457 }
458
460
462}
463
464static bool file_browse_poll_property(const bContext * /*C*/,
465 wmOperator *op,
466 const PropertyRNA *prop)
467{
468 const char *prop_id = RNA_property_identifier(prop);
469 if (STREQ(prop_id, "relative_path")) {
471 return false;
472 }
473 }
474 return true;
475}
476
478{
479 /* Identifiers. */
480 ot->name = "Select File";
481 ot->description =
482 "Open a file browser, hold Shift to open the file, Alt to browse containing directory";
483 ot->idname = "BUTTONS_OT_file_browse";
484
485 /* Callbacks. */
490
491 /* Conditional undo based on button flag. */
492 ot->flag = 0;
493
494 /* Properties. */
496 0,
502
503 PropertyRNA *prop;
504
505 prop = RNA_def_string(ot->srna, "filter_glob", nullptr, 0, "Glob Filter", "Custom filter");
507}
508
510{
511 /* identifiers */
512 ot->name = "Select Directory";
513 ot->description =
514 "Open a directory browser, hold Shift to open the file, Alt to browse containing directory";
515 ot->idname = "BUTTONS_OT_directory_browse";
516
517 /* API callbacks. */
522
523 /* conditional undo based on button flag */
524 ot->flag = 0;
525
526 /* properties */
528 0,
534}
535
537
538} // namespace blender
Functions and classes for evaluating template expressions in filepaths.
File and directory operations.
#define FILE_MAX
#define STR_ELEM(...)
#define IFACE_(msgid)
#define ID_BLEND_PATH(_bmain, _id)
Definition DNA_ID.h:688
Read Blender memory allocation and freeing.
#define C
Definition RandGen.cpp:29
#define ELEM(...)
#define STREQ(a, b)
bool is_empty() const
void context_active_but_prop_get_filebrowser(const bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop, bool *r_is_undo, bool *r_is_userdef)
PopupMenu * popup_menu_begin(bContext *C, const char *title, int icon) ATTR_NONNULL()
BMesh Iterators.
static wmOperatorStatus buttons_start_filter_exec(bContext *C, wmOperator *)
static wmOperatorStatus buttons_clear_filter_exec(bContext *C, wmOperator *)
char * RNA_property_string_get_alloc(PointerRNA *ptr, PropertyRNA *prop, char *fixedbuf, int fixedlen, int *r_len)
UserDef U
Definition blender.cc:58
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
ScrArea * CTX_wm_area(const bContext *C)
char * STRNCPY(char(&dst)[N], const char *src)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
bool ED_undo_operator_repeat(bContext *C, wmOperator *op)
Definition ed_undo.cc:879
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
const char * BKE_appdir_folder_default_or_root() ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
Definition appdir.cc:165
static wmOperatorStatus context_menu_invoke(bContext *C, wmOperator *, const wmEvent *)
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
bool BLI_path_abs(char path[FILE_MAX], const char *basepath) ATTR_NONNULL(1
PointerRNA RNA_id_pointer_create(ID *id)
void WM_operator_properties_free(PointerRNA *ptr)
ID * buttons_context_id_path(const bContext *C)
const char * RNA_property_identifier(const PropertyRNA *prop)
bool ED_operator_buttons_active(bContext *C)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
static wmOperatorStatus file_browse_invoke(bContext *C, wmOperator *op, const wmEvent *event)
Vector< bke::path_templates::Error > BKE_path_apply_template_alloc(char **path, int path_maxncpy, const bke::path_templates::VariableMap &template_variables)
void BUTTONS_OT_file_browse(wmOperatorType *ot)
PointerRNA WM_operator_properties_create_ptr(wmOperatorType *ot)
void BKE_report_path_template_errors(ReportList *reports, eReportType report_type, StringRef path, Span< bke::path_templates::Error > errors)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
void ED_region_search_filter_update(const ScrArea *area, ARegion *region)
Definition area.cc:957
auto BKE_blender_project_read_callback(const Main *bmain, Fn lambda)
static wmOperatorStatus toggle_pin_exec(bContext *C, wmOperator *)
void BUTTONS_OT_start_filter(wmOperatorType *ot)
static void file_browse_apply_path_templates(const Main *bmain, PropertyRNA *prop, std::string &path)
static void file_browse_cancel(bContext *, wmOperator *op)
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)
char * RNA_string_get_alloc(PointerRNA *ptr, const char *name, char *fixedbuf, int fixedlen, int *r_len)
@ PROP_VARIABLES_PROJECT
Definition RNA_types.hh:577
static wmOperatorStatus file_browse_exec(bContext *C, wmOperator *op)
static bool file_browse_operator_relative_paths_supported(wmOperator *op)
const char * BKE_main_blendfile_path(const Main *bmain) ATTR_NONNULL()
Definition main.cc:1058
PropertyPathTemplateType RNA_property_path_template_type(PropertyRNA *prop)
void RNA_property_string_set(PointerRNA *ptr, PropertyRNA *prop, const char *value)
std::string BKE_path_template_escape(StringRef text)
void BUTTONS_OT_toggle_pin(wmOperatorType *ot)
void BKE_report(ReportList *reports, eReportType type, const char *message)
Definition report.cc:162
@ WM_FILESEL_DIRECTORY
Definition WM_api.hh:1330
@ WM_FILESEL_RELPATH
Definition WM_api.hh:1329
@ WM_FILESEL_FILEPATH
Definition WM_api.hh:1332
static bool file_browse_poll_property(const bContext *, wmOperator *op, const PropertyRNA *prop)
void ED_undo_push(bContext *C, const char *str, UndoEncodeHints hints=UndoEncodeHints(0))
Definition ed_undo.cc:103
std::optional< bke::path_templates::VariableMap > BKE_build_template_variables_for_prop(const bContext *C, PointerRNA *ptr, PropertyRNA *prop)
int RNA_property_flag(PropertyRNA *prop)
bool void BLI_path_rel(char path[FILE_MAX], const char *basepath) ATTR_NONNULL(1)
constexpr size_t ARRAY_SIZE(const T(&arg)[N]) noexcept
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int BLI_path_slash_ensure(char *path, size_t path_maxncpy) ATTR_NONNULL(1)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
std::optional< std::string > RNA_property_string_path_filter(const bContext *C, PointerRNA *ptr, PropertyRNA *prop)
ARegion * BKE_area_find_region_type(const ScrArea *area, int region_type)
Definition screen.cc:1024
PropertySubType RNA_property_subtype(PropertyRNA *prop)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
@ FILE_OPENFILE
Definition WM_api.hh:1341
Main * CTX_data_main(const bContext *C)
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC
bool BLI_path_is_rel(const char *path) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus WM_operator_name_call_ptr(bContext *C, wmOperatorType *ot, wm::OpCallContext context, PointerRNA *properties, const wmEvent *event)
void BUTTONS_OT_context_menu(wmOperatorType *ot)
@ PROP_PATH_OUTPUT
Definition RNA_types.hh:521
@ PROP_PATH_SUPPORTS_TEMPLATES
Definition RNA_types.hh:540
@ PROP_SKIP_SAVE
Definition RNA_types.hh:414
@ PROP_PATH_SUPPORTS_BLEND_RELATIVE
Definition RNA_types.hh:526
@ PROP_HIDDEN
Definition RNA_types.hh:408
bool BKE_appdir_font_folder_default(char *dir, size_t dir_maxncpy)
Definition appdir.cc:234
void BUTTONS_OT_directory_browse(wmOperatorType *ot)
wmOperator * WM_operator_last_redo(const bContext *C)
bool RNA_property_editable(const PointerRNA *ptr, PropertyRNA *prop)
SpaceFile * CTX_wm_space_file(const bContext *C)
void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, bool value)
bScreen * CTX_wm_screen(const bContext *C)
void RNA_pointer_set(PointerRNA *ptr, const char *name, PointerRNA ptr_value)
@ PROP_FILEPATH
Definition RNA_types.hh:284
@ PROP_DIRPATH
Definition RNA_types.hh:285
void ED_region_activate_rna_prop(bContext *C, ARegion *region, const void *data, StringRefNull prop_name)
Definition area.cc:696
void BUTTONS_OT_clear_filter(wmOperatorType *ot)
SpaceProperties * CTX_wm_space_properties(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
const char * BLI_path_slash_rfind(const char *path) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
void WM_event_add_fileselect(bContext *C, wmOperator *op)
std::string BKE_blender_project_path_make_relative(StringRef path, bool path_is_template, const bke::BlenderProject &project)
void ED_area_tag_redraw(ScrArea *area)
Definition area.cc:784
struct wmOperator * op
char search_string[UI_MAX_NAME_STR]
struct SpaceProperties_Runtime * runtime
eSpaceButtons_Flag flag
void menu(MenuType *mt, std::optional< StringRef > name, int icon)
wmEventModifierFlag modifier
Definition WM_types.hh:834
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
Definition WM_types.hh:1125
bool(*) poll_property(const bContext *C, wmOperator *op, const PropertyRNA *prop) ATTR_WARN_UNUSED_RESULT
Definition WM_types.hh:1171
const char * description
Definition WM_types.hh:1115
void(*) cancel(bContext *C, wmOperator *op)
Definition WM_types.hh:1149
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
Definition WM_types.hh:1165
wmOperatorStatus(*) invoke(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
Definition WM_types.hh:1141
struct ReportList * reports