Blender V4.5
info_ops.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2008 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include <cstring>
10#include <fmt/format.h>
11
12#include "DNA_space_types.h"
14
15#include "MEM_guardedalloc.h"
16
17#include "BLT_translation.hh"
18
19#include "BKE_bpath.hh"
20#include "BKE_context.hh"
21#include "BKE_global.hh"
22#include "BKE_image.hh"
23#include "BKE_lib_id.hh"
24#include "BKE_library.hh"
25#include "BKE_main.hh"
26#include "BKE_packedFile.hh"
27#include "BKE_report.hh"
28#include "BKE_screen.hh"
29
30#include "WM_api.hh"
31#include "WM_types.hh"
32
33#include "UI_interface.hh"
34
35#include "RNA_access.hh"
36#include "RNA_define.hh"
37
38#include "info_intern.hh"
39
40/* -------------------------------------------------------------------- */
43
52
54{
55 /* identifiers */
56 ot->name = "Pack Linked Libraries";
57 ot->idname = "FILE_OT_pack_libraries";
58 ot->description =
59 "Store all data-blocks linked from other .blend files in the current .blend file. "
60 "Library references are preserved so the linked data-blocks can be unpacked again";
61
62 /* API callbacks. */
63 ot->exec = pack_libraries_exec;
64
65 /* flags */
67}
68
79
81
82/* -------------------------------------------------------------------- */
85
87 wmOperator *op,
88 const wmEvent * /*event*/)
89{
91 op,
92 IFACE_("Restore Packed Linked Data to Their Original Locations"),
93 IFACE_("Will create directories so that all paths are valid."),
94 IFACE_("Unpack"),
96 false);
97}
98
100{
101 /* identifiers */
102 ot->name = "Unpack Linked Libraries";
103 ot->idname = "FILE_OT_unpack_libraries";
104 ot->description = "Restore all packed linked data-blocks to their original locations";
105
106 /* API callbacks. */
107 ot->invoke = unpack_libraries_invoke;
109
110 /* flags */
112}
113
115
116/* -------------------------------------------------------------------- */
119
121{
122 Main *bmain = CTX_data_main(C);
123
124 if (G.fileflags & G_FILE_AUTOPACK) {
125 G.fileflags &= ~G_FILE_AUTOPACK;
126 }
127 else {
128 BKE_packedfile_pack_all(bmain, op->reports, true);
129 G.fileflags |= G_FILE_AUTOPACK;
130 }
131
132 return OPERATOR_FINISHED;
133}
134
136{
137 /* identifiers */
138 ot->name = "Automatically Pack Resources";
139 ot->idname = "FILE_OT_autopack_toggle";
140 ot->description = "Automatically pack all external files into the .blend file";
141
142 /* API callbacks. */
143 ot->exec = autopack_toggle_exec;
144
145 /* flags */
147}
148
150
151/* -------------------------------------------------------------------- */
154
156{
157 Main *bmain = CTX_data_main(C);
158
159 BKE_packedfile_pack_all(bmain, op->reports, true);
160
162
163 return OPERATOR_FINISHED;
164}
165
167{
168 Main *bmain = CTX_data_main(C);
169 Image *ima;
170
171 /* First check for dirty images. */
172 for (ima = static_cast<Image *>(bmain->images.first); ima;
173 ima = static_cast<Image *>(ima->id.next))
174 {
175 if (BKE_image_is_dirty(ima)) {
176 break;
177 }
178 }
179
180 if (ima) {
182 C,
183 op,
184 IFACE_("Pack all used external files into this .blend file"),
185 IFACE_("Warning: Some images are modified and these changes will be lost."),
186 IFACE_("Pack"),
188 false);
189 }
190
191 return pack_all_exec(C, op);
192}
193
195{
196 /* identifiers */
197 ot->name = "Pack Resources";
198 ot->idname = "FILE_OT_pack_all";
199 ot->description = "Pack all used external files into this .blend";
200
201 /* API callbacks. */
202 ot->exec = pack_all_exec;
203 ot->invoke = pack_all_invoke;
204
205 /* flags */
207}
208
210
211/* -------------------------------------------------------------------- */
214
216 {PF_USE_LOCAL, "USE_LOCAL", 0, "Use files in current directory (create when necessary)", ""},
218 "WRITE_LOCAL",
219 0,
220 "Write files to current directory (overwrite existing files)",
221 ""},
223 "USE_ORIGINAL",
224 0,
225 "Use files in original location (create when necessary)",
226 ""},
228 "WRITE_ORIGINAL",
229 0,
230 "Write files to original location (overwrite existing files)",
231 ""},
232 {PF_KEEP, "KEEP", 0, "Disable auto-pack, keep all packed files", ""},
233 {PF_REMOVE, "REMOVE", 0, "Remove Pack", ""},
234 /* {PF_ASK, "ASK", 0, "Ask for each file", ""}, */
235 {0, nullptr, 0, nullptr, nullptr},
236};
237
239{
240 Main *bmain = CTX_data_main(C);
241 ePF_FileStatus method = ePF_FileStatus(RNA_enum_get(op->ptr, "method"));
242
243 if (method != PF_KEEP) {
244 WM_cursor_wait(true);
245 BKE_packedfile_unpack_all(bmain, op->reports, method); /* XXX PF_ASK can't work here */
246 WM_cursor_wait(false);
247 }
248 G.fileflags &= ~G_FILE_AUTOPACK;
250
251 return OPERATOR_FINISHED;
252}
253
255{
256 Main *bmain = CTX_data_main(C);
257 uiPopupMenu *pup;
258 uiLayout *layout;
259
261
262 if (count.total() == 0) {
263 BKE_report(op->reports, RPT_WARNING, "No packed files to unpack");
264 G.fileflags &= ~G_FILE_AUTOPACK;
265 return OPERATOR_CANCELLED;
266 }
267
268 const std::string title = fmt::format(
269 fmt::runtime(IFACE_("Unpack - Files: {}, Bakes: {}")), count.individual_files, count.bakes);
270
271 pup = UI_popup_menu_begin(C, title.c_str(), ICON_NONE);
272 layout = UI_popup_menu_layout(pup);
273
275 uiItemsEnumO(layout, "FILE_OT_unpack_all", "method");
276
277 UI_popup_menu_end(C, pup);
278
279 return OPERATOR_INTERFACE;
280}
281
283{
284 /* identifiers */
285 ot->name = "Unpack Resources";
286 ot->idname = "FILE_OT_unpack_all";
287 ot->description = "Unpack all files packed into this .blend to external ones";
288
289 /* API callbacks. */
290 ot->exec = unpack_all_exec;
291 ot->invoke = unpack_all_invoke;
292
293 /* flags */
295
296 /* properties */
298 ot->srna, "method", unpack_all_method_items, PF_USE_LOCAL, "Method", "How to unpack");
299}
300
302
303/* -------------------------------------------------------------------- */
306
308 {PF_USE_LOCAL, "USE_LOCAL", 0, "Use file from current directory (create when necessary)", ""},
310 "WRITE_LOCAL",
311 0,
312 "Write file to current directory (overwrite existing file)",
313 ""},
315 "USE_ORIGINAL",
316 0,
317 "Use file in original location (create when necessary)",
318 ""},
320 "WRITE_ORIGINAL",
321 0,
322 "Write file to original location (overwrite existing file)",
323 ""},
324 /* {PF_ASK, "ASK", 0, "Ask for each file", ""}, */
325 {0, nullptr, 0, nullptr, nullptr},
326};
327
329{
330 Main *bmain = CTX_data_main(C);
331 ID *id;
332 char idname[MAX_ID_NAME - 2];
333 int type = RNA_int_get(op->ptr, "id_type");
334 ePF_FileStatus method = ePF_FileStatus(RNA_enum_get(op->ptr, "method"));
335
336 RNA_string_get(op->ptr, "id_name", idname);
337 id = BKE_libblock_find_name(bmain, type, idname);
338
339 if (id == nullptr) {
340 BKE_report(op->reports, RPT_WARNING, "No packed file");
341 return OPERATOR_CANCELLED;
342 }
343
344 if (!ID_IS_EDITABLE(id)) {
345 BKE_report(op->reports, RPT_WARNING, "Data-block using this packed file is not editable");
346 return OPERATOR_CANCELLED;
347 }
348
349 if (method != PF_KEEP) {
350 WM_cursor_wait(true);
351 BKE_packedfile_id_unpack(bmain, id, op->reports, method); /* XXX PF_ASK can't work here */
352 WM_cursor_wait(false);
353 }
354
355 G.fileflags &= ~G_FILE_AUTOPACK;
356
357 return OPERATOR_FINISHED;
358}
359
361{
362 uiPopupMenu *pup;
363 uiLayout *layout;
364
365 pup = UI_popup_menu_begin(C, IFACE_("Unpack"), ICON_NONE);
366 layout = UI_popup_menu_layout(pup);
367
369 uiItemsFullEnumO(layout,
370 op->type->idname,
371 "method",
372 static_cast<IDProperty *>(op->ptr->data),
375
376 UI_popup_menu_end(C, pup);
377
378 return OPERATOR_INTERFACE;
379}
380
382{
383 /* identifiers */
384 ot->name = "Unpack Item";
385 ot->idname = "FILE_OT_unpack_item";
386 ot->description = "Unpack this file to an external file";
387
388 /* API callbacks. */
389 ot->exec = unpack_item_exec;
390 ot->invoke = unpack_item_invoke;
391
392 /* flags */
393 ot->flag = OPTYPE_UNDO;
394
395 /* properties */
397 ot->srna, "method", unpack_item_method_items, PF_USE_LOCAL, "Method", "How to unpack");
399 ot->srna, "id_name", nullptr, BKE_ST_MAXNAME, "ID Name", "Name of ID block to unpack");
400 RNA_def_int(ot->srna,
401 "id_type",
402 ID_IM,
403 0,
404 INT_MAX,
405 "ID Type",
406 "Identifier type of ID block",
407 0,
408 INT_MAX);
409}
410
412
413/* -------------------------------------------------------------------- */
416
418{
419 Main *bmain = CTX_data_main(C);
420 const char *blendfile_path = BKE_main_blendfile_path(bmain);
421
422 if (blendfile_path[0] == '\0') {
423 BKE_report(op->reports, RPT_WARNING, "Cannot set relative paths with an unsaved blend file");
424 return OPERATOR_CANCELLED;
425 }
426
427 BPathSummary summary;
428 BKE_bpath_relative_convert(bmain, blendfile_path, op->reports, &summary);
429 BKE_bpath_summary_report(summary, op->reports);
430
431 /* redraw everything so any changed paths register */
433
434 return OPERATOR_FINISHED;
435}
436
438{
439 /* identifiers */
440 ot->name = "Make Paths Relative";
441 ot->idname = "FILE_OT_make_paths_relative";
442 ot->description = "Make all paths to external files relative to current .blend";
443
444 /* API callbacks. */
446
447 /* flags */
449}
450
452
453/* -------------------------------------------------------------------- */
456
458{
459 Main *bmain = CTX_data_main(C);
460 const char *blendfile_path = BKE_main_blendfile_path(bmain);
461
462 if (blendfile_path[0] == '\0') {
463 BKE_report(op->reports, RPT_WARNING, "Cannot set absolute paths with an unsaved blend file");
464 return OPERATOR_CANCELLED;
465 }
466
467 BPathSummary summary;
468 BKE_bpath_absolute_convert(bmain, blendfile_path, op->reports, &summary);
469 BKE_bpath_summary_report(summary, op->reports);
470
471 /* redraw everything so any changed paths register */
473
474 return OPERATOR_FINISHED;
475}
476
478{
479 /* identifiers */
480 ot->name = "Make Paths Absolute";
481 ot->idname = "FILE_OT_make_paths_absolute";
482 ot->description = "Make all paths to external files absolute";
483
484 /* API callbacks. */
486
487 /* flags */
489}
490
492
493/* -------------------------------------------------------------------- */
496
498{
499 Main *bmain = CTX_data_main(C);
500
501 /* run the missing file check */
503 /* Redraw sequencer since media presence cache might have changed. */
505
506 return OPERATOR_FINISHED;
507}
508
510{
511 /* identifiers */
512 ot->name = "Report Missing Files";
513 ot->idname = "FILE_OT_report_missing_files";
514 ot->description = "Report all missing external files";
515
516 /* API callbacks. */
518
519 /* flags */
520 ot->flag = 0; /* only reports so no need to undo/register */
521}
522
524
525/* -------------------------------------------------------------------- */
528
530{
531 Main *bmain = CTX_data_main(C);
532 const char *searchpath = RNA_string_get_alloc(op->ptr, "directory", nullptr, 0, nullptr);
533 const bool find_all = RNA_boolean_get(op->ptr, "find_all");
534
535 BKE_bpath_missing_files_find(bmain, searchpath, op->reports, find_all);
536 MEM_freeN(searchpath);
537 /* Redraw sequencer since media presence cache might have changed. */
539
540 return OPERATOR_FINISHED;
541}
542
544 wmOperator *op,
545 const wmEvent * /*event*/)
546{
547 /* XXX file open button text "Find Missing Files" */
550}
551
553{
554 /* identifiers */
555 ot->name = "Find Missing Files";
556 ot->idname = "FILE_OT_find_missing_files";
557 ot->description = "Try to find missing external files";
558
559 /* API callbacks. */
562
563 /* flags */
565
566 /* properties */
567 RNA_def_boolean(ot->srna,
568 "find_all",
569 false,
570 "Find All",
571 "Find all files in the search path (not just missing)");
572
574 0,
580}
581
583
584/* -------------------------------------------------------------------- */
587
588/* NOTE(@broken): Hard to decide whether to keep this as an operator,
589 * or turn it into a hard_coded UI control feature,
590 * handling TIMER events for all regions in `interface_handlers.cc`.
591 * Not sure how good that is to be accessing UI data from
592 * inactive regions, so use this for now. */
593
594#define INFO_TIMEOUT 5.0f
595#define ERROR_TIMEOUT 10.0f
596#define FLASH_TIMEOUT 1.0f
597#define COLLAPSE_TIMEOUT 0.25f
598
600 wmOperator * /*op*/,
601 const wmEvent *event)
602{
604 Report *report;
605
606 /* escape if not our timer */
607 if ((reports->reporttimer == nullptr) || (reports->reporttimer != event->customdata) ||
608 ((report = BKE_reports_last_displayable(reports)) == nullptr))
609 {
610 /* May have been deleted. */
612 }
613
615 ReportTimerInfo *rti = (ReportTimerInfo *)reports->reporttimer->customdata;
616 const float flash_timeout = FLASH_TIMEOUT;
617 bool send_notifier = false;
618
619 const float timeout = (report->type & RPT_ERROR_ALL) ? ERROR_TIMEOUT : INFO_TIMEOUT;
620 const float time_duration = float(reports->reporttimer->time_duration);
621
622 /* clear the report display after timeout */
623 if (time_duration > timeout) {
624 WM_event_timer_remove(wm, nullptr, reports->reporttimer);
625 reports->reporttimer = nullptr;
626
628
630 }
631
632 if (rti->widthfac == 0.0f) {
633 rti->widthfac = 1.0f;
634 }
635
636 const float progress = powf(time_duration / timeout, 2.0f);
637 const float flash_progress = powf(time_duration / flash_timeout, 2.0);
638
639 /* save us from too many draws */
640 if (flash_progress <= 1.0f) {
641 /* Flash report briefly according to progress through fade-out duration. */
642 send_notifier = true;
643 }
644 rti->flash_progress = flash_progress;
645
646 /* collapse report at end of timeout */
647 if (progress * timeout > timeout - COLLAPSE_TIMEOUT) {
648 rti->widthfac = (progress * timeout - (timeout - COLLAPSE_TIMEOUT)) / COLLAPSE_TIMEOUT;
649 rti->widthfac = 1.0f - rti->widthfac;
650 send_notifier = true;
651 }
652
653 if (send_notifier) {
655 }
656
658}
659
661{
662 /* identifiers */
663 ot->name = "Update Reports Display";
664 ot->idname = "INFO_OT_reports_display_update";
665 ot->description = "Update the display of reports in Blender UI (internal use)";
666
667 /* API callbacks. */
669
670 /* flags */
671 ot->flag = 0;
672
673 /* properties */
674}
675
676/* report operators */
677
void BKE_bpath_relative_convert(Main *bmain, const char *basedir, ReportList *reports, BPathSummary *r_summary=nullptr)
Definition bpath.cc:617
void BKE_bpath_absolute_convert(Main *bmain, const char *basedir, ReportList *reports, BPathSummary *r_summary=nullptr)
Definition bpath.cc:626
void BKE_bpath_summary_report(const BPathSummary &summary, ReportList *reports)
Definition bpath.cc:59
void BKE_bpath_missing_files_find(Main *bmain, const char *searchpath, ReportList *reports, bool find_all)
Definition bpath.cc:406
void BKE_bpath_missing_files_check(Main *bmain, ReportList *reports)
Definition bpath.cc:255
ReportList * CTX_wm_reports(const bContext *C)
Main * CTX_data_main(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
@ G_FILE_AUTOPACK
bool BKE_image_is_dirty(Image *image)
ID * BKE_libblock_find_name(Main *bmain, short type, const char *name, const std::optional< Library * > lib=std::nullopt) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Definition lib_id.cc:1679
const char * BKE_main_blendfile_path(const Main *bmain) ATTR_NONNULL()
Definition main.cc:872
int BKE_packedfile_unpack_all_libraries(Main *bmain, ReportList *reports)
PackedFileCount BKE_packedfile_count_all(Main *bmain)
void BKE_packedfile_unpack_all(Main *bmain, ReportList *reports, enum ePF_FileStatus how)
void BKE_packedfile_pack_all_libraries(Main *bmain, ReportList *reports)
ePF_FileStatus
@ PF_USE_ORIGINAL
@ PF_USE_LOCAL
@ PF_KEEP
@ PF_REMOVE
@ PF_WRITE_ORIGINAL
@ PF_WRITE_LOCAL
void BKE_packedfile_pack_all(Main *bmain, ReportList *reports, bool verbose)
void BKE_packedfile_id_unpack(Main *bmain, ID *id, ReportList *reports, enum ePF_FileStatus how)
Report * BKE_reports_last_displayable(ReportList *reports)
Definition report.cc:330
void BKE_report(ReportList *reports, eReportType type, const char *message)
Definition report.cc:126
#define BKE_ST_MAXNAME
Definition BKE_screen.hh:72
#define IFACE_(msgid)
@ ID_IM
@ FILE_SORT_DEFAULT
@ FILE_SPECIAL
@ FILE_DEFAULTDISPLAY
@ OPERATOR_CANCELLED
@ OPERATOR_INTERFACE
@ OPERATOR_FINISHED
@ OPERATOR_RUNNING_MODAL
@ OPERATOR_PASS_THROUGH
#define RPT_ERROR_ALL
Read Guarded memory(de)allocation.
#define C
Definition RandGen.cpp:29
void UI_popup_menu_end(bContext *C, uiPopupMenu *pup)
uiPopupMenu * UI_popup_menu_begin(bContext *C, const char *title, int icon) ATTR_NONNULL()
uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
@ ALERT_ICON_INFO
@ ALERT_ICON_WARNING
#define UI_ITEM_NONE
void uiItemsEnumO(uiLayout *layout, blender::StringRefNull opname, blender::StringRefNull propname)
void uiLayoutSetOperatorContext(uiLayout *layout, wmOperatorCallContext opcontext)
void uiItemsFullEnumO(uiLayout *layout, blender::StringRefNull opname, blender::StringRefNull propname, IDProperty *properties, wmOperatorCallContext context, eUI_Item_Flag flag, const int active=-1)
@ WM_FILESEL_DIRECTORY
Definition WM_api.hh:1073
@ FILE_OPENFILE
Definition WM_api.hh:1084
#define ND_SEQUENCER
Definition WM_types.hh:434
#define NC_WINDOW
Definition WM_types.hh:372
#define ND_SPACE_INFO
Definition WM_types.hh:518
@ OPTYPE_UNDO
Definition WM_types.hh:182
@ OPTYPE_REGISTER
Definition WM_types.hh:180
#define NC_SCENE
Definition WM_types.hh:375
ReportList * reports
Definition WM_types.hh:1025
@ WM_OP_EXEC_REGION_WIN
Definition WM_types.hh:246
@ WM_OP_EXEC_DEFAULT
Definition WM_types.hh:245
float progress
Definition WM_types.hh:1019
#define NC_SPACE
Definition WM_types.hh:389
#define powf(x, y)
#define MAX_ID_NAME
#define ID_IS_EDITABLE(_id)
#define INFO_TIMEOUT
Definition info_ops.cc:594
void FILE_OT_make_paths_absolute(wmOperatorType *ot)
Definition info_ops.cc:477
static wmOperatorStatus pack_all_exec(bContext *C, wmOperator *op)
Definition info_ops.cc:155
static wmOperatorStatus pack_all_invoke(bContext *C, wmOperator *op, const wmEvent *)
Definition info_ops.cc:166
static wmOperatorStatus pack_libraries_exec(bContext *C, wmOperator *op)
Definition info_ops.cc:44
void FILE_OT_unpack_all(wmOperatorType *ot)
Definition info_ops.cc:282
#define COLLAPSE_TIMEOUT
Definition info_ops.cc:597
void FILE_OT_unpack_item(wmOperatorType *ot)
Definition info_ops.cc:381
static wmOperatorStatus find_missing_files_exec(bContext *C, wmOperator *op)
Definition info_ops.cc:529
static wmOperatorStatus update_reports_display_invoke(bContext *C, wmOperator *, const wmEvent *event)
Definition info_ops.cc:599
static const EnumPropertyItem unpack_all_method_items[]
Definition info_ops.cc:215
void FILE_OT_pack_all(wmOperatorType *ot)
Definition info_ops.cc:194
static const EnumPropertyItem unpack_item_method_items[]
Definition info_ops.cc:307
static wmOperatorStatus make_paths_absolute_exec(bContext *C, wmOperator *op)
Definition info_ops.cc:457
static wmOperatorStatus make_paths_relative_exec(bContext *C, wmOperator *op)
Definition info_ops.cc:417
static wmOperatorStatus unpack_libraries_invoke(bContext *C, wmOperator *op, const wmEvent *)
Definition info_ops.cc:86
void FILE_OT_autopack_toggle(wmOperatorType *ot)
Definition info_ops.cc:135
void FILE_OT_report_missing_files(wmOperatorType *ot)
Definition info_ops.cc:509
static wmOperatorStatus autopack_toggle_exec(bContext *C, wmOperator *op)
Definition info_ops.cc:120
static wmOperatorStatus unpack_item_invoke(bContext *C, wmOperator *op, const wmEvent *)
Definition info_ops.cc:360
static wmOperatorStatus report_missing_files_exec(bContext *C, wmOperator *op)
Definition info_ops.cc:497
static wmOperatorStatus unpack_item_exec(bContext *C, wmOperator *op)
Definition info_ops.cc:328
#define FLASH_TIMEOUT
Definition info_ops.cc:596
void FILE_OT_pack_libraries(wmOperatorType *ot)
Definition info_ops.cc:53
static wmOperatorStatus unpack_libraries_exec(bContext *C, wmOperator *op)
Definition info_ops.cc:69
#define ERROR_TIMEOUT
Definition info_ops.cc:595
static wmOperatorStatus unpack_all_exec(bContext *C, wmOperator *op)
Definition info_ops.cc:238
static wmOperatorStatus find_missing_files_invoke(bContext *C, wmOperator *op, const wmEvent *)
Definition info_ops.cc:543
void FILE_OT_unpack_libraries(wmOperatorType *ot)
Definition info_ops.cc:99
void FILE_OT_make_paths_relative(wmOperatorType *ot)
Definition info_ops.cc:437
void FILE_OT_find_missing_files(wmOperatorType *ot)
Definition info_ops.cc:552
void INFO_OT_reports_display_update(wmOperatorType *ot)
Definition info_ops.cc:660
static wmOperatorStatus unpack_all_invoke(bContext *C, wmOperator *op, const wmEvent *)
Definition info_ops.cc:254
int count
void MEM_freeN(void *vmemh)
Definition mallocn.cc:113
#define G(x, y, z)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
int RNA_int_get(PointerRNA *ptr, const char *name)
char * RNA_string_get_alloc(PointerRNA *ptr, const char *name, char *fixedbuf, int fixedlen, int *r_len)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
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_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, 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)
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)
Definition DNA_ID.h:404
void * next
Definition DNA_ID.h:407
void * first
ListBase images
Definition BKE_main.hh:253
void * data
Definition RNA_types.hh:53
void * customdata
Definition WM_types.hh:804
const char * idname
Definition WM_types.hh:1032
struct ReportList * reports
struct wmOperatorType * type
struct PointerRNA * ptr
void WM_cursor_wait(bool val)
void WM_event_add_fileselect(bContext *C, wmOperator *op)
void WM_main_add_notifier(uint type, void *reference)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
wmOperatorType * ot
Definition wm_files.cc:4225
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)
wmOperatorStatus WM_operator_confirm_ex(bContext *C, wmOperator *op, const char *title, const char *message, const char *confirm_text, int icon, bool cancel_default)
void WM_event_timer_remove(wmWindowManager *wm, wmWindow *, wmTimer *timer)