Blender  V3.3
info_ops.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2008 Blender Foundation. All rights reserved. */
3 
8 #include <stdio.h>
9 #include <string.h>
10 
11 #include "DNA_space_types.h"
13 
14 #include "MEM_guardedalloc.h"
15 
16 #include "BLI_blenlib.h"
17 #include "BLI_math.h"
18 #include "BLI_utildefines.h"
19 
20 #include "BLT_translation.h"
21 
22 #include "BKE_bpath.h"
23 #include "BKE_context.h"
24 #include "BKE_global.h"
25 #include "BKE_image.h"
26 #include "BKE_lib_id.h"
27 #include "BKE_main.h"
28 #include "BKE_packedFile.h"
29 #include "BKE_report.h"
30 #include "BKE_screen.h"
31 
32 #include "WM_api.h"
33 #include "WM_types.h"
34 
35 #include "UI_interface.h"
36 #include "UI_resources.h"
37 
38 #include "RNA_access.h"
39 #include "RNA_define.h"
40 
41 #include "info_intern.h"
42 
43 /* -------------------------------------------------------------------- */
48 {
49  Main *bmain = CTX_data_main(C);
50 
52 
53  return OPERATOR_FINISHED;
54 }
55 
57 {
58  /* identifiers */
59  ot->name = "Pack Linked Libraries";
60  ot->idname = "FILE_OT_pack_libraries";
61  ot->description =
62  "Store all data-blocks linked from other .blend files in the current .blend file. "
63  "Library references are preserved so the linked data-blocks can be unpacked again";
64 
65  /* api callbacks */
67 
68  /* flags */
70 }
71 
73 {
74  Main *bmain = CTX_data_main(C);
75 
77 
78  return OPERATOR_FINISHED;
79 }
80 
83 /* -------------------------------------------------------------------- */
87 static int unpack_libraries_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
88 {
90  C, op, "Unpack Linked Libraries - creates directories, all new paths should work");
91 }
92 
94 {
95  /* identifiers */
96  ot->name = "Unpack Linked Libraries";
97  ot->idname = "FILE_OT_unpack_libraries";
98  ot->description = "Restore all packed linked data-blocks to their original locations";
99 
100  /* api callbacks */
103 
104  /* flags */
106 }
107 
110 /* -------------------------------------------------------------------- */
115 {
116  Main *bmain = CTX_data_main(C);
117 
118  if (G.fileflags & G_FILE_AUTOPACK) {
119  G.fileflags &= ~G_FILE_AUTOPACK;
120  }
121  else {
122  BKE_packedfile_pack_all(bmain, op->reports, true);
123  G.fileflags |= G_FILE_AUTOPACK;
124  }
125 
126  return OPERATOR_FINISHED;
127 }
128 
130 {
131  /* identifiers */
132  ot->name = "Automatically Pack Resources";
133  ot->idname = "FILE_OT_autopack_toggle";
134  ot->description = "Automatically pack all external files into the .blend file";
135 
136  /* api callbacks */
138 
139  /* flags */
141 }
142 
145 /* -------------------------------------------------------------------- */
150 {
151  Main *bmain = CTX_data_main(C);
152 
153  BKE_packedfile_pack_all(bmain, op->reports, true);
154 
155  return OPERATOR_FINISHED;
156 }
157 
158 static int pack_all_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
159 {
160  Main *bmain = CTX_data_main(C);
161  Image *ima;
162 
163  /* First check for dirty images. */
164  for (ima = bmain->images.first; ima; ima = ima->id.next) {
165  if (BKE_image_is_dirty(ima)) {
166  break;
167  }
168  }
169 
170  if (ima) {
172  C, op, "Some images are painted on. These changes will be lost. Continue?");
173  }
174 
175  return pack_all_exec(C, op);
176 }
177 
179 {
180  /* identifiers */
181  ot->name = "Pack Resources";
182  ot->idname = "FILE_OT_pack_all";
183  ot->description = "Pack all used external files into this .blend";
184 
185  /* api callbacks */
186  ot->exec = pack_all_exec;
188 
189  /* flags */
191 }
192 
195 /* -------------------------------------------------------------------- */
200  {PF_USE_LOCAL, "USE_LOCAL", 0, "Use files in current directory (create when necessary)", ""},
202  "WRITE_LOCAL",
203  0,
204  "Write files to current directory (overwrite existing files)",
205  ""},
207  "USE_ORIGINAL",
208  0,
209  "Use files in original location (create when necessary)",
210  ""},
212  "WRITE_ORIGINAL",
213  0,
214  "Write files to original location (overwrite existing files)",
215  ""},
216  {PF_KEEP, "KEEP", 0, "Disable auto-pack, keep all packed files", ""},
217  {PF_REMOVE, "REMOVE", 0, "Remove Pack", ""},
218  /* {PF_ASK, "ASK", 0, "Ask for each file", ""}, */
219  {0, NULL, 0, NULL, NULL},
220 };
221 
223 {
224  Main *bmain = CTX_data_main(C);
225  int method = RNA_enum_get(op->ptr, "method");
226 
227  if (method != PF_KEEP) {
228  BKE_packedfile_unpack_all(bmain, op->reports, method); /* XXX PF_ASK can't work here */
229  }
230  G.fileflags &= ~G_FILE_AUTOPACK;
231 
232  return OPERATOR_FINISHED;
233 }
234 
235 static int unpack_all_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
236 {
237  Main *bmain = CTX_data_main(C);
238  uiPopupMenu *pup;
239  uiLayout *layout;
240  char title[64];
241  int count = 0;
242 
244 
245  if (!count) {
246  BKE_report(op->reports, RPT_WARNING, "No packed files to unpack");
247  G.fileflags &= ~G_FILE_AUTOPACK;
248  return OPERATOR_CANCELLED;
249  }
250 
251  if (count == 1) {
252  BLI_strncpy(title, IFACE_("Unpack 1 File"), sizeof(title));
253  }
254  else {
255  BLI_snprintf(title, sizeof(title), IFACE_("Unpack %d Files"), count);
256  }
257 
258  pup = UI_popup_menu_begin(C, title, ICON_NONE);
259  layout = UI_popup_menu_layout(pup);
260 
262  uiItemsEnumO(layout, "FILE_OT_unpack_all", "method");
263 
264  UI_popup_menu_end(C, pup);
265 
266  return OPERATOR_INTERFACE;
267 }
268 
270 {
271  /* identifiers */
272  ot->name = "Unpack Resources";
273  ot->idname = "FILE_OT_unpack_all";
274  ot->description = "Unpack all files packed into this .blend to external ones";
275 
276  /* api callbacks */
279 
280  /* flags */
282 
283  /* properties */
284  RNA_def_enum(
285  ot->srna, "method", unpack_all_method_items, PF_USE_LOCAL, "Method", "How to unpack");
286 }
287 
290 /* -------------------------------------------------------------------- */
295  {PF_USE_LOCAL, "USE_LOCAL", 0, "Use file from current directory (create when necessary)", ""},
297  "WRITE_LOCAL",
298  0,
299  "Write file to current directory (overwrite existing file)",
300  ""},
302  "USE_ORIGINAL",
303  0,
304  "Use file in original location (create when necessary)",
305  ""},
307  "WRITE_ORIGINAL",
308  0,
309  "Write file to original location (overwrite existing file)",
310  ""},
311  /* {PF_ASK, "ASK", 0, "Ask for each file", ""}, */
312  {0, NULL, 0, NULL, NULL},
313 };
314 
316 {
317  Main *bmain = CTX_data_main(C);
318  ID *id;
319  char idname[MAX_ID_NAME - 2];
320  int type = RNA_int_get(op->ptr, "id_type");
321  int method = RNA_enum_get(op->ptr, "method");
322 
323  RNA_string_get(op->ptr, "id_name", idname);
324  id = BKE_libblock_find_name(bmain, type, idname);
325 
326  if (id == NULL) {
327  BKE_report(op->reports, RPT_WARNING, "No packed file");
328  return OPERATOR_CANCELLED;
329  }
330 
331  if (method != PF_KEEP) {
332  BKE_packedfile_id_unpack(bmain, id, op->reports, method); /* XXX PF_ASK can't work here */
333  }
334 
335  G.fileflags &= ~G_FILE_AUTOPACK;
336 
337  return OPERATOR_FINISHED;
338 }
339 
340 static int unpack_item_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
341 {
342  uiPopupMenu *pup;
343  uiLayout *layout;
344 
345  pup = UI_popup_menu_begin(C, IFACE_("Unpack"), ICON_NONE);
346  layout = UI_popup_menu_layout(pup);
347 
349  uiItemsFullEnumO(layout, op->type->idname, "method", op->ptr->data, WM_OP_EXEC_REGION_WIN, 0);
350 
351  UI_popup_menu_end(C, pup);
352 
353  return OPERATOR_INTERFACE;
354 }
355 
357 {
358  /* identifiers */
359  ot->name = "Unpack Item";
360  ot->idname = "FILE_OT_unpack_item";
361  ot->description = "Unpack this file to an external file";
362 
363  /* api callbacks */
366 
367  /* flags */
368  ot->flag = OPTYPE_UNDO;
369 
370  /* properties */
371  RNA_def_enum(
372  ot->srna, "method", unpack_item_method_items, PF_USE_LOCAL, "Method", "How to unpack");
374  ot->srna, "id_name", NULL, BKE_ST_MAXNAME, "ID Name", "Name of ID block to unpack");
376  "id_type",
377  ID_IM,
378  0,
379  INT_MAX,
380  "ID Type",
381  "Identifier type of ID block",
382  0,
383  INT_MAX);
384 }
385 
388 /* -------------------------------------------------------------------- */
393 {
394  Main *bmain = CTX_data_main(C);
395  const char *blendfile_path = BKE_main_blendfile_path(bmain);
396 
397  if (blendfile_path[0] == '\0') {
398  BKE_report(op->reports, RPT_WARNING, "Cannot set relative paths with an unsaved blend file");
399  return OPERATOR_CANCELLED;
400  }
401 
402  BKE_bpath_relative_convert(bmain, blendfile_path, op->reports);
403 
404  /* redraw everything so any changed paths register */
406 
407  return OPERATOR_FINISHED;
408 }
409 
411 {
412  /* identifiers */
413  ot->name = "Make Paths Relative";
414  ot->idname = "FILE_OT_make_paths_relative";
415  ot->description = "Make all paths to external files relative to current .blend";
416 
417  /* api callbacks */
419 
420  /* flags */
422 }
423 
426 /* -------------------------------------------------------------------- */
431 {
432  Main *bmain = CTX_data_main(C);
433  const char *blendfile_path = BKE_main_blendfile_path(bmain);
434 
435  if (blendfile_path[0] == '\0') {
436  BKE_report(op->reports, RPT_WARNING, "Cannot set absolute paths with an unsaved blend file");
437  return OPERATOR_CANCELLED;
438  }
439 
440  BKE_bpath_absolute_convert(bmain, blendfile_path, op->reports);
441 
442  /* redraw everything so any changed paths register */
444 
445  return OPERATOR_FINISHED;
446 }
447 
449 {
450  /* identifiers */
451  ot->name = "Make Paths Absolute";
452  ot->idname = "FILE_OT_make_paths_absolute";
453  ot->description = "Make all paths to external files absolute";
454 
455  /* api callbacks */
457 
458  /* flags */
460 }
461 
464 /* -------------------------------------------------------------------- */
469 {
470  Main *bmain = CTX_data_main(C);
471 
472  /* run the missing file check */
474 
475  return OPERATOR_FINISHED;
476 }
477 
479 {
480  /* identifiers */
481  ot->name = "Report Missing Files";
482  ot->idname = "FILE_OT_report_missing_files";
483  ot->description = "Report all missing external files";
484 
485  /* api callbacks */
487 
488  /* flags */
489  ot->flag = 0; /* only reports so no need to undo/register */
490 }
491 
494 /* -------------------------------------------------------------------- */
499 {
500  Main *bmain = CTX_data_main(C);
501  const char *searchpath = RNA_string_get_alloc(op->ptr, "directory", NULL, 0, NULL);
502  const bool find_all = RNA_boolean_get(op->ptr, "find_all");
503 
504  BKE_bpath_missing_files_find(bmain, searchpath, op->reports, find_all);
505  MEM_freeN((void *)searchpath);
506 
507  return OPERATOR_FINISHED;
508 }
509 
511 {
512  /* XXX file open button text "Find Missing Files" */
514  return OPERATOR_RUNNING_MODAL;
515 }
516 
518 {
519  /* identifiers */
520  ot->name = "Find Missing Files";
521  ot->idname = "FILE_OT_find_missing_files";
522  ot->description = "Try to find missing external files";
523 
524  /* api callbacks */
527 
528  /* flags */
530 
531  /* properties */
533  "find_all",
534  false,
535  "Find All",
536  "Find all files in the search path (not just missing)");
537 
539  0,
540  FILE_SPECIAL,
545 }
546 
549 /* -------------------------------------------------------------------- */
553 /* NOTE(@broken): Hard to decide whether to keep this as an operator,
554  * or turn it into a hard_coded UI control feature,
555  * handling TIMER events for all regions in `interface_handlers.c`.
556  * Not sure how good that is to be accessing UI data from
557  * inactive regions, so use this for now. */
558 
559 #define INFO_TIMEOUT 5.0f
560 #define ERROR_TIMEOUT 10.0f
561 #define FLASH_TIMEOUT 1.0f
562 #define COLLAPSE_TIMEOUT 0.25f
563 #define BRIGHTEN_AMOUNT 0.1f
565 {
567  ReportList *reports = CTX_wm_reports(C);
568  Report *report;
569  ReportTimerInfo *rti;
570  float target_col[4] = {0.0f, 0.0f, 0.0f, 0.0f};
571  float progress = 0.0, flash_progress = 0.0;
572  float timeout = 0.0, flash_timeout = FLASH_TIMEOUT;
573  int send_note = 0;
574 
575  /* escape if not our timer */
576  if ((reports->reporttimer == NULL) || (reports->reporttimer != event->customdata) ||
577  ((report = BKE_reports_last_displayable(reports)) == NULL)
578  /* may have been deleted */
579  ) {
580  return OPERATOR_PASS_THROUGH;
581  }
582 
583  rti = (ReportTimerInfo *)reports->reporttimer->customdata;
584 
585  timeout = (report->type & RPT_ERROR_ALL) ? ERROR_TIMEOUT : INFO_TIMEOUT;
586 
587  /* clear the report display after timeout */
588  if ((float)reports->reporttimer->duration > timeout) {
589  WM_event_remove_timer(wm, NULL, reports->reporttimer);
590  reports->reporttimer = NULL;
591 
593 
595  }
596 
597  /* set target color based on report type */
599  target_col[3] = 0.65f;
600 
601  if (rti->widthfac == 0.0f) {
602  /* initialize color to a brighter shade of the target color */
603  rti->col[0] = target_col[0] + BRIGHTEN_AMOUNT;
604  rti->col[1] = target_col[1] + BRIGHTEN_AMOUNT;
605  rti->col[2] = target_col[2] + BRIGHTEN_AMOUNT;
606  rti->col[3] = 1.0f;
607 
608  CLAMP3(rti->col, 0.0, 1.0);
609 
610  rti->widthfac = 1.0f;
611  }
612 
613  progress = powf((float)reports->reporttimer->duration / timeout, 2.0f);
614  flash_progress = powf((float)reports->reporttimer->duration / flash_timeout, 2.0);
615 
616  /* save us from too many draws */
617  if (flash_progress <= 1.0f) {
618  send_note = 1;
619 
620  /* flash report briefly according to progress through fade-out duration */
621  interp_v4_v4v4(rti->col, rti->col, target_col, flash_progress);
622  }
623 
624  /* collapse report at end of timeout */
625  if (progress * timeout > timeout - COLLAPSE_TIMEOUT) {
626  rti->widthfac = (progress * timeout - (timeout - COLLAPSE_TIMEOUT)) / COLLAPSE_TIMEOUT;
627  rti->widthfac = 1.0f - rti->widthfac;
628  send_note = 1;
629  }
630 
631  if (send_note) {
633  }
634 
636 }
637 
639 {
640  /* identifiers */
641  ot->name = "Update Reports Display";
642  ot->idname = "INFO_OT_reports_display_update";
643  ot->description = "Update the display of reports in Blender UI (internal use)";
644 
645  /* api callbacks */
647 
648  /* flags */
649  ot->flag = 0;
650 
651  /* properties */
652 }
653 
654 /* report operators */
655 
void BKE_bpath_relative_convert(struct Main *bmain, const char *basedir, struct ReportList *reports)
Definition: bpath.c:559
void BKE_bpath_missing_files_find(struct Main *bmain, const char *searchpath, struct ReportList *reports, bool find_all)
Definition: bpath.c:368
void BKE_bpath_missing_files_check(struct Main *bmain, struct ReportList *reports)
Definition: bpath.c:220
void BKE_bpath_absolute_convert(struct Main *bmain, const char *basedir, struct ReportList *reports)
Definition: bpath.c:564
struct wmWindowManager * CTX_wm_manager(const bContext *C)
Definition: context.c:713
struct ReportList * CTX_wm_reports(const bContext *C)
Definition: context.c:775
struct Main * CTX_data_main(const bContext *C)
Definition: context.c:1074
@ G_FILE_AUTOPACK
Definition: BKE_global.h:209
bool BKE_image_is_dirty(struct Image *image)
struct ID * BKE_libblock_find_name(struct Main *bmain, short type, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Definition: lib_id.c:1297
const char * BKE_main_blendfile_path(const struct Main *bmain) ATTR_NONNULL()
void BKE_packedfile_id_unpack(struct Main *bmain, struct ID *id, struct ReportList *reports, enum ePF_FileStatus how)
Definition: packedFile.c:814
void BKE_packedfile_pack_all(struct Main *bmain, struct ReportList *reports, bool verbose)
Definition: packedFile.c:230
void BKE_packedfile_unpack_all(struct Main *bmain, struct ReportList *reports, enum ePF_FileStatus how)
Definition: packedFile.c:753
void BKE_packedfile_pack_all_libraries(struct Main *bmain, struct ReportList *reports)
Definition: packedFile.c:730
int BKE_packedfile_unpack_all_libraries(struct Main *bmain, struct ReportList *reports)
Definition: packedFile.c:699
@ PF_USE_ORIGINAL
@ PF_USE_LOCAL
@ PF_KEEP
@ PF_REMOVE
@ PF_WRITE_ORIGINAL
@ PF_WRITE_LOCAL
int BKE_packedfile_count_all(struct Main *bmain)
Definition: packedFile.c:104
Report * BKE_reports_last_displayable(ReportList *reports)
Definition: report.c:280
void BKE_report(ReportList *reports, eReportType type, const char *message)
Definition: report.c:83
#define BKE_ST_MAXNAME
Definition: BKE_screen.h:53
void interp_v4_v4v4(float r[4], const float a[4], const float b[4], float t)
Definition: math_vector.c:38
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
Definition: string.c:64
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
#define UNUSED(x)
#define CLAMP3(vec, b, c)
#define IFACE_(msgid)
#define MAX_ID_NAME
Definition: DNA_ID.h:337
@ ID_IM
Definition: DNA_ID_enums.h:53
@ FILE_SORT_DEFAULT
@ FILE_SPECIAL
@ SPACE_INFO
@ FILE_DEFAULTDISPLAY
@ OPERATOR_CANCELLED
@ OPERATOR_INTERFACE
@ OPERATOR_FINISHED
@ OPERATOR_RUNNING_MODAL
@ OPERATOR_PASS_THROUGH
#define RPT_ERROR_ALL
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Read Guarded memory(de)allocation.
#define C
Definition: RandGen.cpp:25
int UI_icon_colorid_from_report_type(int type)
struct uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
void uiItemsEnumO(uiLayout *layout, const char *opname, const char *propname)
void UI_popup_menu_end(struct bContext *C, struct uiPopupMenu *pup)
void uiLayoutSetOperatorContext(uiLayout *layout, wmOperatorCallContext opcontext)
void uiItemsFullEnumO(uiLayout *layout, const char *opname, const char *propname, struct IDProperty *properties, wmOperatorCallContext context, int flag)
uiPopupMenu * UI_popup_menu_begin(struct bContext *C, const char *title, int icon) ATTR_NONNULL()
void UI_GetThemeColorType3fv(int colorid, int spacetype, float col[3])
Definition: resources.c:1361
@ WM_FILESEL_DIRECTORY
Definition: WM_api.h:753
@ FILE_OPENFILE
Definition: WM_api.h:764
@ OPTYPE_UNDO
Definition: WM_types.h:148
@ OPTYPE_REGISTER
Definition: WM_types.h:146
#define NC_WINDOW
Definition: WM_types.h:325
#define ND_SPACE_INFO
Definition: WM_types.h:464
@ WM_OP_EXEC_REGION_WIN
Definition: WM_types.h:209
@ WM_OP_EXEC_DEFAULT
Definition: WM_types.h:208
#define NC_SPACE
Definition: WM_types.h:342
#define powf(x, y)
Definition: cuda/compat.h:103
#define INFO_TIMEOUT
Definition: info_ops.c:559
static int unpack_all_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
Definition: info_ops.c:235
void FILE_OT_make_paths_absolute(wmOperatorType *ot)
Definition: info_ops.c:448
static int unpack_item_exec(bContext *C, wmOperator *op)
Definition: info_ops.c:315
void FILE_OT_unpack_all(wmOperatorType *ot)
Definition: info_ops.c:269
#define COLLAPSE_TIMEOUT
Definition: info_ops.c:562
void FILE_OT_unpack_item(wmOperatorType *ot)
Definition: info_ops.c:356
static int report_missing_files_exec(bContext *C, wmOperator *op)
Definition: info_ops.c:468
static int autopack_toggle_exec(bContext *C, wmOperator *op)
Definition: info_ops.c:114
static const EnumPropertyItem unpack_all_method_items[]
Definition: info_ops.c:199
static int make_paths_absolute_exec(bContext *C, wmOperator *op)
Definition: info_ops.c:430
static int find_missing_files_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
Definition: info_ops.c:510
void FILE_OT_pack_all(wmOperatorType *ot)
Definition: info_ops.c:178
static const EnumPropertyItem unpack_item_method_items[]
Definition: info_ops.c:294
void FILE_OT_autopack_toggle(wmOperatorType *ot)
Definition: info_ops.c:129
static int make_paths_relative_exec(bContext *C, wmOperator *op)
Definition: info_ops.c:392
void FILE_OT_report_missing_files(wmOperatorType *ot)
Definition: info_ops.c:478
static int unpack_all_exec(bContext *C, wmOperator *op)
Definition: info_ops.c:222
static int unpack_libraries_exec(bContext *C, wmOperator *op)
Definition: info_ops.c:72
static int pack_all_exec(bContext *C, wmOperator *op)
Definition: info_ops.c:149
static int unpack_libraries_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
Definition: info_ops.c:87
static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
Definition: info_ops.c:564
#define BRIGHTEN_AMOUNT
Definition: info_ops.c:563
#define FLASH_TIMEOUT
Definition: info_ops.c:561
void FILE_OT_pack_libraries(wmOperatorType *ot)
Definition: info_ops.c:56
static int pack_all_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
Definition: info_ops.c:158
#define ERROR_TIMEOUT
Definition: info_ops.c:560
static int unpack_item_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
Definition: info_ops.c:340
static int find_missing_files_exec(bContext *C, wmOperator *op)
Definition: info_ops.c:498
void FILE_OT_unpack_libraries(wmOperatorType *ot)
Definition: info_ops.c:93
void FILE_OT_make_paths_relative(wmOperatorType *ot)
Definition: info_ops.c:410
void FILE_OT_find_missing_files(wmOperatorType *ot)
Definition: info_ops.c:517
void INFO_OT_reports_display_update(wmOperatorType *ot)
Definition: info_ops.c:638
static int pack_libraries_exec(bContext *C, wmOperator *op)
Definition: info_ops.c:47
int count
void(* MEM_freeN)(void *vmemh)
Definition: mallocn.c:27
#define G(x, y, z)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
Definition: rna_access.c:5116
int RNA_int_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:4910
char * RNA_string_get_alloc(PointerRNA *ptr, const char *name, char *fixedbuf, int fixedlen, int *r_len)
Definition: rna_access.c:5129
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:4863
int RNA_enum_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:5004
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3493
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3687
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
Definition: rna_define.c:3597
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3783
Definition: DNA_ID.h:368
void * next
Definition: DNA_ID.h:369
void * first
Definition: DNA_listBase.h:31
Definition: BKE_main.h:121
ListBase images
Definition: BKE_main.h:176
void * data
Definition: RNA_types.h:38
struct wmTimer * reporttimer
void * customdata
Definition: WM_types.h:715
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:919
const char * name
Definition: WM_types.h:888
const char * idname
Definition: WM_types.h:890
struct StructRNA * srna
Definition: WM_types.h:969
const char * description
Definition: WM_types.h:893
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:903
struct ReportList * reports
struct wmOperatorType * type
struct PointerRNA * ptr
void * customdata
Definition: WM_types.h:869
double duration
Definition: WM_types.h:872
void WM_main_add_notifier(unsigned int type, void *reference)
void WM_event_add_fileselect(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
wmOperatorType * ot
Definition: wm_files.c:3479
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)
int WM_operator_confirm_message(bContext *C, wmOperator *op, const char *message)
void WM_event_remove_timer(wmWindowManager *wm, wmWindow *UNUSED(win), wmTimer *timer)
Definition: wm_window.c:1682