Blender  V2.93
info_ops.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2008 Blender Foundation.
17  * All rights reserved.
18  */
19 
24 #include <stdio.h>
25 #include <string.h>
26 
27 #include "DNA_space_types.h"
29 
30 #include "MEM_guardedalloc.h"
31 
32 #include "BLI_blenlib.h"
33 #include "BLI_math.h"
34 #include "BLI_utildefines.h"
35 
36 #include "BLT_translation.h"
37 
38 #include "BKE_bpath.h"
39 #include "BKE_context.h"
40 #include "BKE_global.h"
41 #include "BKE_image.h"
42 #include "BKE_lib_id.h"
43 #include "BKE_main.h"
44 #include "BKE_packedFile.h"
45 #include "BKE_report.h"
46 #include "BKE_screen.h"
47 
48 #include "WM_api.h"
49 #include "WM_types.h"
50 
51 #include "UI_interface.h"
52 #include "UI_resources.h"
53 
54 #include "RNA_access.h"
55 #include "RNA_define.h"
56 
57 #include "info_intern.h"
58 
59 /********************* pack blend file libraries operator *********************/
60 
62 {
63  Main *bmain = CTX_data_main(C);
64 
66 
67  return OPERATOR_FINISHED;
68 }
69 
71 {
72  /* identifiers */
73  ot->name = "Pack Blender Libraries";
74  ot->idname = "FILE_OT_pack_libraries";
75  ot->description = "Pack all used Blender library files into the current .blend";
76 
77  /* api callbacks */
79 
80  /* flags */
82 }
83 
85 {
86  Main *bmain = CTX_data_main(C);
87 
89 
90  return OPERATOR_FINISHED;
91 }
92 
93 static int unpack_libraries_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
94 {
96  C, op, "Unpack Blender Libraries - creates directories, all new paths should work");
97 }
98 
100 {
101  /* identifiers */
102  ot->name = "Unpack Blender Libraries";
103  ot->idname = "FILE_OT_unpack_libraries";
104  ot->description = "Unpack all used Blender library files from this .blend file";
105 
106  /* api callbacks */
109 
110  /* flags */
112 }
113 
114 /********************* toggle auto-pack operator *********************/
115 
117 {
118  Main *bmain = CTX_data_main(C);
119 
120  if (G.fileflags & G_FILE_AUTOPACK) {
121  G.fileflags &= ~G_FILE_AUTOPACK;
122  }
123  else {
124  BKE_packedfile_pack_all(bmain, op->reports, true);
125  G.fileflags |= G_FILE_AUTOPACK;
126  }
127 
128  return OPERATOR_FINISHED;
129 }
130 
132 {
133  /* identifiers */
134  ot->name = "Automatically Pack Into .blend";
135  ot->idname = "FILE_OT_autopack_toggle";
136  ot->description = "Automatically pack all external files into the .blend file";
137 
138  /* api callbacks */
140 
141  /* flags */
143 }
144 
145 /********************* pack all operator *********************/
146 
148 {
149  Main *bmain = CTX_data_main(C);
150 
151  BKE_packedfile_pack_all(bmain, op->reports, true);
152 
153  return OPERATOR_FINISHED;
154 }
155 
156 static int pack_all_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
157 {
158  Main *bmain = CTX_data_main(C);
159  Image *ima;
160 
161  /* First check for dirty images. */
162  for (ima = bmain->images.first; ima; ima = ima->id.next) {
163  if (BKE_image_is_dirty(ima)) {
164  break;
165  }
166  }
167 
168  if (ima) {
170  C, op, "Some images are painted on. These changes will be lost. Continue?");
171  }
172 
173  return pack_all_exec(C, op);
174 }
175 
177 {
178  /* identifiers */
179  ot->name = "Pack All Into .blend";
180  ot->idname = "FILE_OT_pack_all";
181  ot->description = "Pack all used external files into the .blend";
182 
183  /* api callbacks */
184  ot->exec = pack_all_exec;
186 
187  /* flags */
189 }
190 
191 /********************* unpack all operator *********************/
192 
194  {PF_USE_LOCAL, "USE_LOCAL", 0, "Use files in current directory (create when necessary)", ""},
196  "WRITE_LOCAL",
197  0,
198  "Write files to current directory (overwrite existing files)",
199  ""},
201  "USE_ORIGINAL",
202  0,
203  "Use files in original location (create when necessary)",
204  ""},
206  "WRITE_ORIGINAL",
207  0,
208  "Write files to original location (overwrite existing files)",
209  ""},
210  {PF_KEEP, "KEEP", 0, "Disable auto-pack, keep all packed files", ""},
211  {PF_REMOVE, "REMOVE", 0, "Remove Pack", ""},
212  /* {PF_ASK, "ASK", 0, "Ask for each file", ""}, */
213  {0, NULL, 0, NULL, NULL},
214 };
215 
217 {
218  Main *bmain = CTX_data_main(C);
219  int method = RNA_enum_get(op->ptr, "method");
220 
221  if (method != PF_KEEP) {
222  BKE_packedfile_unpack_all(bmain, op->reports, method); /* XXX PF_ASK can't work here */
223  }
224  G.fileflags &= ~G_FILE_AUTOPACK;
225 
226  return OPERATOR_FINISHED;
227 }
228 
229 static int unpack_all_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
230 {
231  Main *bmain = CTX_data_main(C);
232  uiPopupMenu *pup;
233  uiLayout *layout;
234  char title[64];
235  int count = 0;
236 
238 
239  if (!count) {
240  BKE_report(op->reports, RPT_WARNING, "No packed files to unpack");
241  G.fileflags &= ~G_FILE_AUTOPACK;
242  return OPERATOR_CANCELLED;
243  }
244 
245  if (count == 1) {
246  BLI_strncpy(title, IFACE_("Unpack 1 File"), sizeof(title));
247  }
248  else {
249  BLI_snprintf(title, sizeof(title), IFACE_("Unpack %d Files"), count);
250  }
251 
252  pup = UI_popup_menu_begin(C, title, ICON_NONE);
253  layout = UI_popup_menu_layout(pup);
254 
256  uiItemsEnumO(layout, "FILE_OT_unpack_all", "method");
257 
258  UI_popup_menu_end(C, pup);
259 
260  return OPERATOR_INTERFACE;
261 }
262 
264 {
265  /* identifiers */
266  ot->name = "Unpack All Into Files";
267  ot->idname = "FILE_OT_unpack_all";
268  ot->description = "Unpack all files packed into this .blend to external ones";
269 
270  /* api callbacks */
273 
274  /* flags */
276 
277  /* properties */
278  RNA_def_enum(
279  ot->srna, "method", unpack_all_method_items, PF_USE_LOCAL, "Method", "How to unpack");
280 }
281 
282 /********************* unpack single item operator *********************/
283 
285  {PF_USE_LOCAL, "USE_LOCAL", 0, "Use file from current directory (create when necessary)", ""},
287  "WRITE_LOCAL",
288  0,
289  "Write file to current directory (overwrite existing file)",
290  ""},
292  "USE_ORIGINAL",
293  0,
294  "Use file in original location (create when necessary)",
295  ""},
297  "WRITE_ORIGINAL",
298  0,
299  "Write file to original location (overwrite existing file)",
300  ""},
301  /* {PF_ASK, "ASK", 0, "Ask for each file", ""}, */
302  {0, NULL, 0, NULL, NULL},
303 };
304 
306 {
307  Main *bmain = CTX_data_main(C);
308  ID *id;
309  char idname[MAX_ID_NAME - 2];
310  int type = RNA_int_get(op->ptr, "id_type");
311  int method = RNA_enum_get(op->ptr, "method");
312 
313  RNA_string_get(op->ptr, "id_name", idname);
314  id = BKE_libblock_find_name(bmain, type, idname);
315 
316  if (id == NULL) {
317  BKE_report(op->reports, RPT_WARNING, "No packed file");
318  return OPERATOR_CANCELLED;
319  }
320 
321  if (method != PF_KEEP) {
322  BKE_packedfile_id_unpack(bmain, id, op->reports, method); /* XXX PF_ASK can't work here */
323  }
324 
325  G.fileflags &= ~G_FILE_AUTOPACK;
326 
327  return OPERATOR_FINISHED;
328 }
329 
330 static int unpack_item_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
331 {
332  uiPopupMenu *pup;
333  uiLayout *layout;
334 
335  pup = UI_popup_menu_begin(C, IFACE_("Unpack"), ICON_NONE);
336  layout = UI_popup_menu_layout(pup);
337 
339  uiItemsFullEnumO(layout, op->type->idname, "method", op->ptr->data, WM_OP_EXEC_REGION_WIN, 0);
340 
341  UI_popup_menu_end(C, pup);
342 
343  return OPERATOR_INTERFACE;
344 }
345 
347 {
348  /* identifiers */
349  ot->name = "Unpack Item";
350  ot->idname = "FILE_OT_unpack_item";
351  ot->description = "Unpack this file to an external file";
352 
353  /* api callbacks */
356 
357  /* flags */
358  ot->flag = OPTYPE_UNDO;
359 
360  /* properties */
361  RNA_def_enum(
362  ot->srna, "method", unpack_item_method_items, PF_USE_LOCAL, "Method", "How to unpack");
364  ot->srna, "id_name", NULL, BKE_ST_MAXNAME, "ID Name", "Name of ID block to unpack");
366  "id_type",
367  ID_IM,
368  0,
369  INT_MAX,
370  "ID Type",
371  "Identifier type of ID block",
372  0,
373  INT_MAX);
374 }
375 
376 /********************* make paths relative operator *********************/
377 
379 {
380  Main *bmain = CTX_data_main(C);
381 
382  if (!G.relbase_valid) {
383  BKE_report(op->reports, RPT_WARNING, "Cannot set relative paths with an unsaved blend file");
384  return OPERATOR_CANCELLED;
385  }
386 
388 
389  /* redraw everything so any changed paths register */
391 
392  return OPERATOR_FINISHED;
393 }
394 
396 {
397  /* identifiers */
398  ot->name = "Make All Paths Relative";
399  ot->idname = "FILE_OT_make_paths_relative";
400  ot->description = "Make all paths to external files relative to current .blend";
401 
402  /* api callbacks */
404 
405  /* flags */
407 }
408 
409 /********************* make paths absolute operator *********************/
410 
412 {
413  Main *bmain = CTX_data_main(C);
414 
415  if (!G.relbase_valid) {
416  BKE_report(op->reports, RPT_WARNING, "Cannot set absolute paths with an unsaved blend file");
417  return OPERATOR_CANCELLED;
418  }
419 
421 
422  /* redraw everything so any changed paths register */
424 
425  return OPERATOR_FINISHED;
426 }
427 
429 {
430  /* identifiers */
431  ot->name = "Make All Paths Absolute";
432  ot->idname = "FILE_OT_make_paths_absolute";
433  ot->description = "Make all paths to external files absolute";
434 
435  /* api callbacks */
437 
438  /* flags */
440 }
441 
442 /********************* report missing files operator *********************/
443 
445 {
446  Main *bmain = CTX_data_main(C);
447 
448  /* run the missing file check */
450 
451  return OPERATOR_FINISHED;
452 }
453 
455 {
456  /* identifiers */
457  ot->name = "Report Missing Files";
458  ot->idname = "FILE_OT_report_missing_files";
459  ot->description = "Report all missing external files";
460 
461  /* api callbacks */
463 
464  /* flags */
465  ot->flag = 0; /* only reports so no need to undo/register */
466 }
467 
468 /********************* find missing files operator *********************/
469 
471 {
472  Main *bmain = CTX_data_main(C);
473  const char *searchpath = RNA_string_get_alloc(op->ptr, "directory", NULL, 0);
474  const bool find_all = RNA_boolean_get(op->ptr, "find_all");
475 
476  BKE_bpath_missing_files_find(bmain, searchpath, op->reports, find_all);
477  MEM_freeN((void *)searchpath);
478 
479  return OPERATOR_FINISHED;
480 }
481 
483 {
484  /* XXX file open button text "Find Missing Files" */
486  return OPERATOR_RUNNING_MODAL;
487 }
488 
490 {
491  /* identifiers */
492  ot->name = "Find Missing Files";
493  ot->idname = "FILE_OT_find_missing_files";
494  ot->description = "Try to find missing external files";
495 
496  /* api callbacks */
499 
500  /* flags */
502 
503  /* properties */
505  "find_all",
506  false,
507  "Find All",
508  "Find all files in the search path (not just missing)");
509 
511  0,
512  FILE_SPECIAL,
517 }
518 
519 /********************* report box operator *********************/
520 
521 /* Hard to decide whether to keep this as an operator,
522  * or turn it into a hardcoded ui control feature,
523  * handling TIMER events for all regions in interface_handlers.c
524  * Not sure how good that is to be accessing UI data from
525  * inactive regions, so use this for now. --matt
526  */
527 
528 #define INFO_TIMEOUT 5.0f
529 #define ERROR_TIMEOUT 10.0f
530 #define FLASH_TIMEOUT 1.0f
531 #define COLLAPSE_TIMEOUT 0.25f
532 #define BRIGHTEN_AMOUNT 0.1f
534 {
536  ReportList *reports = CTX_wm_reports(C);
537  Report *report;
538  ReportTimerInfo *rti;
539  float target_col[4] = {0.0f, 0.0f, 0.0f, 0.0f};
540  float progress = 0.0, flash_progress = 0.0;
541  float timeout = 0.0, flash_timeout = FLASH_TIMEOUT;
542  int send_note = 0;
543 
544  /* escape if not our timer */
545  if ((reports->reporttimer == NULL) || (reports->reporttimer != event->customdata) ||
546  ((report = BKE_reports_last_displayable(reports)) == NULL)
547  /* may have been deleted */
548  ) {
549  return OPERATOR_PASS_THROUGH;
550  }
551 
552  rti = (ReportTimerInfo *)reports->reporttimer->customdata;
553 
554  timeout = (report->type & RPT_ERROR_ALL) ? ERROR_TIMEOUT : INFO_TIMEOUT;
555 
556  /* clear the report display after timeout */
557  if ((float)reports->reporttimer->duration > timeout) {
558  WM_event_remove_timer(wm, NULL, reports->reporttimer);
559  reports->reporttimer = NULL;
560 
562 
564  }
565 
566  /* set target color based on report type */
568  target_col[3] = 0.65f;
569 
570  if (rti->widthfac == 0.0f) {
571  /* initialize color to a brighter shade of the target color */
572  rti->col[0] = target_col[0] + BRIGHTEN_AMOUNT;
573  rti->col[1] = target_col[1] + BRIGHTEN_AMOUNT;
574  rti->col[2] = target_col[2] + BRIGHTEN_AMOUNT;
575  rti->col[3] = 1.0f;
576 
577  CLAMP3(rti->col, 0.0, 1.0);
578 
579  rti->widthfac = 1.0f;
580  }
581 
582  progress = powf((float)reports->reporttimer->duration / timeout, 2.0f);
583  flash_progress = powf((float)reports->reporttimer->duration / flash_timeout, 2.0);
584 
585  /* save us from too many draws */
586  if (flash_progress <= 1.0f) {
587  send_note = 1;
588 
589  /* flash report briefly according to progress through fade-out duration */
590  interp_v4_v4v4(rti->col, rti->col, target_col, flash_progress);
591  }
592 
593  /* collapse report at end of timeout */
594  if (progress * timeout > timeout - COLLAPSE_TIMEOUT) {
595  rti->widthfac = (progress * timeout - (timeout - COLLAPSE_TIMEOUT)) / COLLAPSE_TIMEOUT;
596  rti->widthfac = 1.0f - rti->widthfac;
597  send_note = 1;
598  }
599 
600  if (send_note) {
602  }
603 
605 }
606 
608 {
609  /* identifiers */
610  ot->name = "Update Reports Display";
611  ot->idname = "INFO_OT_reports_display_update";
612  ot->description = "Update the display of reports in Blender UI (internal use)";
613 
614  /* api callbacks */
616 
617  /* flags */
618  ot->flag = 0;
619 
620  /* properties */
621 }
622 
623 /* report operators */
void BKE_bpath_relative_convert(struct Main *bmain, const char *basedir, struct ReportList *reports)
Definition: bpath.c:224
void BKE_bpath_missing_files_find(struct Main *bmain, const char *searchpath, struct ReportList *reports, const bool find_all)
Definition: bpath.c:430
void BKE_bpath_missing_files_check(struct Main *bmain, struct ReportList *reports)
Definition: bpath.c:107
void BKE_bpath_absolute_convert(struct Main *bmain, const char *basedir, struct ReportList *reports)
Definition: bpath.c:276
struct wmWindowManager * CTX_wm_manager(const bContext *C)
Definition: context.c:689
struct ReportList * CTX_wm_reports(const bContext *C)
Definition: context.c:751
struct Main * CTX_data_main(const bContext *C)
Definition: context.c:1018
@ G_FILE_AUTOPACK
Definition: BKE_global.h:166
bool BKE_image_is_dirty(struct Image *image)
Definition: image.c:5681
struct ID * BKE_libblock_find_name(struct Main *bmain, const short type, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Definition: lib_id.c:1333
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:835
void BKE_packedfile_pack_all(struct Main *bmain, struct ReportList *reports, bool verbose)
Definition: packedFile.c:246
void BKE_packedfile_unpack_all(struct Main *bmain, struct ReportList *reports, enum ePF_FileStatus how)
Definition: packedFile.c:772
void BKE_packedfile_pack_all_libraries(struct Main *bmain, struct ReportList *reports)
Definition: packedFile.c:749
int BKE_packedfile_unpack_all_libraries(struct Main *bmain, struct ReportList *reports)
Definition: packedFile.c:718
@ 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:119
Report * BKE_reports_last_displayable(ReportList *reports)
Definition: report.c:295
void BKE_report(ReportList *reports, ReportType type, const char *message)
Definition: report.c:104
#define BKE_ST_MAXNAME
Definition: BKE_screen.h:68
void interp_v4_v4v4(float r[4], const float a[4], const float b[4], const float t)
Definition: math_vector.c:58
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
Definition: string.c:108
#define UNUSED(x)
#define CLAMP3(vec, b, c)
#define IFACE_(msgid)
#define MAX_ID_NAME
Definition: DNA_ID.h:269
@ ID_IM
Definition: DNA_ID_enums.h:65
@ FILE_SORT_DEFAULT
@ FILE_SPECIAL
@ SPACE_INFO
@ FILE_OPENFILE
@ 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:39
void uiItemsFullEnumO(uiLayout *layout, const char *opname, const char *propname, struct IDProperty *properties, int context, int flag)
void uiLayoutSetOperatorContext(uiLayout *layout, int opcontext)
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)
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:1390
#define WM_FILESEL_DIRECTORY
Definition: WM_api.h:535
#define NC_WINDOW
Definition: WM_types.h:277
#define ND_SPACE_INFO
Definition: WM_types.h:416
@ OPTYPE_UNDO
Definition: WM_types.h:155
@ OPTYPE_REGISTER
Definition: WM_types.h:153
@ WM_OP_EXEC_REGION_WIN
Definition: WM_types.h:205
@ WM_OP_EXEC_DEFAULT
Definition: WM_types.h:204
#define NC_SPACE
Definition: WM_types.h:293
#define INFO_TIMEOUT
Definition: info_ops.c:528
static int unpack_all_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
Definition: info_ops.c:229
void FILE_OT_make_paths_absolute(wmOperatorType *ot)
Definition: info_ops.c:428
static int unpack_item_exec(bContext *C, wmOperator *op)
Definition: info_ops.c:305
void FILE_OT_unpack_all(wmOperatorType *ot)
Definition: info_ops.c:263
#define COLLAPSE_TIMEOUT
Definition: info_ops.c:531
void FILE_OT_unpack_item(wmOperatorType *ot)
Definition: info_ops.c:346
static int report_missing_files_exec(bContext *C, wmOperator *op)
Definition: info_ops.c:444
static int autopack_toggle_exec(bContext *C, wmOperator *op)
Definition: info_ops.c:116
static const EnumPropertyItem unpack_all_method_items[]
Definition: info_ops.c:193
static int make_paths_absolute_exec(bContext *C, wmOperator *op)
Definition: info_ops.c:411
static int find_missing_files_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
Definition: info_ops.c:482
void FILE_OT_pack_all(wmOperatorType *ot)
Definition: info_ops.c:176
static const EnumPropertyItem unpack_item_method_items[]
Definition: info_ops.c:284
void FILE_OT_autopack_toggle(wmOperatorType *ot)
Definition: info_ops.c:131
static int make_paths_relative_exec(bContext *C, wmOperator *op)
Definition: info_ops.c:378
void FILE_OT_report_missing_files(wmOperatorType *ot)
Definition: info_ops.c:454
static int unpack_all_exec(bContext *C, wmOperator *op)
Definition: info_ops.c:216
static int unpack_libraries_exec(bContext *C, wmOperator *op)
Definition: info_ops.c:84
static int pack_all_exec(bContext *C, wmOperator *op)
Definition: info_ops.c:147
static int unpack_libraries_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
Definition: info_ops.c:93
static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
Definition: info_ops.c:533
#define BRIGHTEN_AMOUNT
Definition: info_ops.c:532
#define FLASH_TIMEOUT
Definition: info_ops.c:530
void FILE_OT_pack_libraries(wmOperatorType *ot)
Definition: info_ops.c:70
static int pack_all_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
Definition: info_ops.c:156
#define ERROR_TIMEOUT
Definition: info_ops.c:529
static int unpack_item_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
Definition: info_ops.c:330
static int find_missing_files_exec(bContext *C, wmOperator *op)
Definition: info_ops.c:470
void FILE_OT_unpack_libraries(wmOperatorType *ot)
Definition: info_ops.c:99
void FILE_OT_make_paths_relative(wmOperatorType *ot)
Definition: info_ops.c:395
void FILE_OT_find_missing_files(wmOperatorType *ot)
Definition: info_ops.c:489
void INFO_OT_reports_display_update(wmOperatorType *ot)
Definition: info_ops.c:607
static int pack_libraries_exec(bContext *C, wmOperator *op)
Definition: info_ops.c:61
int count
#define powf(x, y)
void(* MEM_freeN)(void *vmemh)
Definition: mallocn.c:41
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
Definition: rna_access.c:6514
int RNA_int_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:6308
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:6261
int RNA_enum_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:6402
char * RNA_string_get_alloc(PointerRNA *ptr, const char *name, char *fixedbuf, int fixedlen)
Definition: rna_access.c:6527
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3481
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:3675
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:3585
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:3771
Definition: DNA_ID.h:273
void * next
Definition: DNA_ID.h:274
void * first
Definition: DNA_listBase.h:47
Definition: BKE_main.h:116
ListBase images
Definition: BKE_main.h:154
void * data
Definition: RNA_types.h:52
struct wmTimer * reporttimer
void * customdata
Definition: WM_types.h:631
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:752
const char * name
Definition: WM_types.h:721
const char * idname
Definition: WM_types.h:723
struct StructRNA * srna
Definition: WM_types.h:802
const char * description
Definition: WM_types.h:726
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:736
struct ReportList * reports
struct wmOperatorType * type
struct PointerRNA * ptr
void * customdata
Definition: WM_types.h:702
double duration
Definition: WM_types.h:705
#define G(x, y, z)
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:3156
void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type, short action, short flag, short display, 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:1669