Blender V5.0
info_ops.cc File Reference
#include <cstring>
#include <fmt/format.h>
#include "DNA_space_types.h"
#include "DNA_windowmanager_types.h"
#include "MEM_guardedalloc.h"
#include "BLT_translation.hh"
#include "BKE_bpath.hh"
#include "BKE_context.hh"
#include "BKE_global.hh"
#include "BKE_image.hh"
#include "BKE_lib_id.hh"
#include "BKE_library.hh"
#include "BKE_main.hh"
#include "BKE_packedFile.hh"
#include "BKE_report.hh"
#include "BKE_screen.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "UI_interface.hh"
#include "UI_interface_layout.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "info_intern.hh"

Go to the source code of this file.

Functions

Pack Blend File Libraries Operator
static wmOperatorStatus pack_libraries_exec (bContext *C, wmOperator *op)
void FILE_OT_pack_libraries (wmOperatorType *ot)
static wmOperatorStatus unpack_libraries_exec (bContext *C, wmOperator *op)
Unpack Blend File Libraries Operator
static wmOperatorStatus unpack_libraries_invoke (bContext *C, wmOperator *op, const wmEvent *)
void FILE_OT_unpack_libraries (wmOperatorType *ot)
Toggle Auto-Pack Operator
static wmOperatorStatus autopack_toggle_exec (bContext *C, wmOperator *op)
void FILE_OT_autopack_toggle (wmOperatorType *ot)
Pack All Operator
static wmOperatorStatus pack_all_exec (bContext *C, wmOperator *op)
static wmOperatorStatus pack_all_invoke (bContext *C, wmOperator *op, const wmEvent *)
void FILE_OT_pack_all (wmOperatorType *ot)
Make Paths Relative Operator
static wmOperatorStatus make_paths_relative_exec (bContext *C, wmOperator *op)
void FILE_OT_make_paths_relative (wmOperatorType *ot)
Make Paths Absolute Operator
static wmOperatorStatus make_paths_absolute_exec (bContext *C, wmOperator *op)
void FILE_OT_make_paths_absolute (wmOperatorType *ot)
Report Missing Files Operator
static wmOperatorStatus report_missing_files_exec (bContext *C, wmOperator *op)
void FILE_OT_report_missing_files (wmOperatorType *ot)
Find Missing Files Operator
static wmOperatorStatus find_missing_files_exec (bContext *C, wmOperator *op)
static wmOperatorStatus find_missing_files_invoke (bContext *C, wmOperator *op, const wmEvent *)
void FILE_OT_find_missing_files (wmOperatorType *ot)

Report Box Operator

#define INFO_TIMEOUT   5.0f
#define ERROR_TIMEOUT   10.0f
#define FLASH_TIMEOUT   1.0f
#define COLLAPSE_TIMEOUT   0.25f
static wmOperatorStatus update_reports_display_invoke (bContext *C, wmOperator *, const wmEvent *event)
void INFO_OT_reports_display_update (wmOperatorType *ot)

Unpack All Operator

static const EnumPropertyItem unpack_all_method_items []
static wmOperatorStatus unpack_all_exec (bContext *C, wmOperator *op)
static wmOperatorStatus unpack_all_invoke (bContext *C, wmOperator *op, const wmEvent *)
void FILE_OT_unpack_all (wmOperatorType *ot)

Unpack Single Item Operator

static const EnumPropertyItem unpack_item_method_items []
static wmOperatorStatus unpack_item_exec (bContext *C, wmOperator *op)
static wmOperatorStatus unpack_item_invoke (bContext *C, wmOperator *op, const wmEvent *)
void FILE_OT_unpack_item (wmOperatorType *ot)

Macro Definition Documentation

◆ COLLAPSE_TIMEOUT

#define COLLAPSE_TIMEOUT   0.25f

Definition at line 596 of file info_ops.cc.

Referenced by update_reports_display_invoke().

◆ ERROR_TIMEOUT

#define ERROR_TIMEOUT   10.0f

Definition at line 594 of file info_ops.cc.

Referenced by update_reports_display_invoke().

◆ FLASH_TIMEOUT

#define FLASH_TIMEOUT   1.0f

Definition at line 595 of file info_ops.cc.

Referenced by update_reports_display_invoke().

◆ INFO_TIMEOUT

#define INFO_TIMEOUT   5.0f

Definition at line 593 of file info_ops.cc.

Referenced by update_reports_display_invoke().

Function Documentation

◆ autopack_toggle_exec()

wmOperatorStatus autopack_toggle_exec ( bContext * C,
wmOperator * op )
static

◆ FILE_OT_autopack_toggle()

void FILE_OT_autopack_toggle ( wmOperatorType * ot)

Definition at line 136 of file info_ops.cc.

References autopack_toggle_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.

Referenced by info_operatortypes().

◆ FILE_OT_find_missing_files()

◆ FILE_OT_make_paths_absolute()

void FILE_OT_make_paths_absolute ( wmOperatorType * ot)

Definition at line 477 of file info_ops.cc.

References make_paths_absolute_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.

Referenced by info_operatortypes().

◆ FILE_OT_make_paths_relative()

void FILE_OT_make_paths_relative ( wmOperatorType * ot)

Definition at line 437 of file info_ops.cc.

References make_paths_relative_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.

Referenced by info_operatortypes().

◆ FILE_OT_pack_all()

void FILE_OT_pack_all ( wmOperatorType * ot)

Definition at line 195 of file info_ops.cc.

References OPTYPE_REGISTER, OPTYPE_UNDO, ot, pack_all_exec(), and pack_all_invoke().

Referenced by info_operatortypes().

◆ FILE_OT_pack_libraries()

void FILE_OT_pack_libraries ( wmOperatorType * ot)

Definition at line 54 of file info_ops.cc.

References OPTYPE_REGISTER, OPTYPE_UNDO, ot, and pack_libraries_exec().

Referenced by info_operatortypes().

◆ FILE_OT_report_missing_files()

void FILE_OT_report_missing_files ( wmOperatorType * ot)

Definition at line 509 of file info_ops.cc.

References ot, and report_missing_files_exec().

Referenced by info_operatortypes().

◆ FILE_OT_unpack_all()

void FILE_OT_unpack_all ( wmOperatorType * ot)

◆ FILE_OT_unpack_item()

◆ FILE_OT_unpack_libraries()

void FILE_OT_unpack_libraries ( wmOperatorType * ot)

◆ find_missing_files_exec()

◆ find_missing_files_invoke()

wmOperatorStatus find_missing_files_invoke ( bContext * C,
wmOperator * op,
const wmEvent *  )
static

Definition at line 542 of file info_ops.cc.

References C, OPERATOR_RUNNING_MODAL, and WM_event_add_fileselect().

Referenced by FILE_OT_find_missing_files().

◆ INFO_OT_reports_display_update()

void INFO_OT_reports_display_update ( wmOperatorType * ot)

Definition at line 659 of file info_ops.cc.

References ot, and update_reports_display_invoke().

Referenced by info_operatortypes().

◆ make_paths_absolute_exec()

◆ make_paths_relative_exec()

◆ pack_all_exec()

◆ pack_all_invoke()

◆ pack_libraries_exec()

wmOperatorStatus pack_libraries_exec ( bContext * C,
wmOperator * op )
static

◆ report_missing_files_exec()

◆ unpack_all_exec()

◆ unpack_all_invoke()

◆ unpack_item_exec()

◆ unpack_item_invoke()

◆ unpack_libraries_exec()

wmOperatorStatus unpack_libraries_exec ( bContext * C,
wmOperator * op )
static

◆ unpack_libraries_invoke()

wmOperatorStatus unpack_libraries_invoke ( bContext * C,
wmOperator * op,
const wmEvent *  )
static

Definition at line 87 of file info_ops.cc.

References ALERT_ICON_INFO, C, IFACE_, and WM_operator_confirm_ex().

Referenced by FILE_OT_unpack_libraries().

◆ update_reports_display_invoke()

Variable Documentation

◆ unpack_all_method_items

const EnumPropertyItem unpack_all_method_items[]
static
Initial value:
= {
{PF_USE_LOCAL, "USE_LOCAL", 0, "Use files in current directory (create when necessary)", ""},
"WRITE_LOCAL",
0,
"Write files to current directory (overwrite existing files)",
""},
"USE_ORIGINAL",
0,
"Use files in original location (create when necessary)",
""},
"WRITE_ORIGINAL",
0,
"Write files to original location (overwrite existing files)",
""},
{PF_KEEP, "KEEP", 0, "Disable auto-pack, keep all packed files", ""},
{PF_REMOVE, "REMOVE", 0, "Remove Pack", ""},
{0, nullptr, 0, nullptr, nullptr},
}
@ PF_USE_ORIGINAL
@ PF_USE_LOCAL
@ PF_KEEP
@ PF_REMOVE
@ PF_WRITE_ORIGINAL
@ PF_WRITE_LOCAL

Definition at line 216 of file info_ops.cc.

Referenced by FILE_OT_unpack_all().

◆ unpack_item_method_items

const EnumPropertyItem unpack_item_method_items[]
static
Initial value:
= {
{PF_USE_LOCAL, "USE_LOCAL", 0, "Use file from current directory (create when necessary)", ""},
"WRITE_LOCAL",
0,
"Write file to current directory (overwrite existing file)",
""},
"USE_ORIGINAL",
0,
"Use file in original location (create when necessary)",
""},
"WRITE_ORIGINAL",
0,
"Write file to original location (overwrite existing file)",
""},
{0, nullptr, 0, nullptr, nullptr},
}

Definition at line 308 of file info_ops.cc.

Referenced by FILE_OT_unpack_item().