Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "DNA_cachefile_types.h"
#include "DNA_space_types.h"
#include "BLI_listbase.h"
#include "BLI_path_util.h"
#include "BLI_string.h"
#include "BKE_cachefile.h"
#include "BKE_context.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_report.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "DEG_depsgraph.h"
#include "UI_interface.h"
#include "WM_api.h"
#include "WM_types.h"
#include "io_cache.h"
Go to the source code of this file.
Functions | |
static void | reload_cachefile (bContext *C, CacheFile *cache_file) |
static void | cachefile_init (bContext *C, wmOperator *op) |
static int | cachefile_open_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
static void | open_cancel (bContext *UNUSED(C), wmOperator *op) |
static int | cachefile_open_exec (bContext *C, wmOperator *op) |
void | CACHEFILE_OT_open (wmOperatorType *ot) |
static int | cachefile_reload_exec (bContext *C, wmOperator *UNUSED(op)) |
void | CACHEFILE_OT_reload (wmOperatorType *ot) |
static int | cachefile_layer_open_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
static int | cachefile_layer_add_exec (bContext *C, wmOperator *op) |
void | CACHEFILE_OT_layer_add (wmOperatorType *ot) |
static int | cachefile_layer_remove_exec (bContext *C, wmOperator *UNUSED(op)) |
void | CACHEFILE_OT_layer_remove (wmOperatorType *ot) |
static int | cachefile_layer_move_exec (bContext *C, wmOperator *op) |
void | CACHEFILE_OT_layer_move (wmOperatorType *ot) |
/
Definition in file io_cache.c.
|
static |
Definition at line 41 of file io_cache.c.
References C, wmOperator::customdata, MEM_callocN, PropertyPointerRNA::prop, PropertyPointerRNA::ptr, and UI_context_active_but_prop_get_templateID().
Referenced by cachefile_open_invoke().
|
static |
Definition at line 182 of file io_cache.c.
References BKE_cachefile_add_layer(), BKE_report(), C, wmOperator::customdata, FILE_MAX, NC_OBJECT, ND_DRAW, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, reload_cachefile(), wmOperator::reports, RNA_string_get(), RNA_struct_property_is_set(), RPT_ERROR, WM_main_add_notifier(), and WM_report().
Referenced by CACHEFILE_OT_layer_add().
|
static |
Definition at line 262 of file io_cache.c.
References CacheFile::active_layer, BKE_cachefile_get_active_layer(), BLI_findindex(), BLI_listbase_link_move(), C, CTX_data_edit_cachefile(), CacheFile::layers, NC_OBJECT, ND_DRAW, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, reload_cachefile(), RNA_enum_get(), and WM_main_add_notifier().
Referenced by CACHEFILE_OT_layer_move().
|
static |
Definition at line 161 of file io_cache.c.
References BKE_main_blendfile_path(), BLI_path_extension_replace(), BLI_strncpy(), C, CTX_data_edit_cachefile(), CTX_data_main(), wmOperator::customdata, FILE_MAX, OPERATOR_RUNNING_MODAL, wmOperator::ptr, RNA_string_set(), RNA_struct_property_is_set(), UNUSED_VARS, and WM_event_add_fileselect().
Referenced by CACHEFILE_OT_layer_add().
|
static |
Definition at line 231 of file io_cache.c.
References BKE_cachefile_get_active_layer(), BKE_cachefile_remove_layer(), C, CTX_data_edit_cachefile(), NC_OBJECT, ND_DRAW, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, reload_cachefile(), and WM_main_add_notifier().
Referenced by CACHEFILE_OT_layer_remove().
|
static |
Definition at line 75 of file io_cache.c.
References BKE_libblock_alloc(), BKE_report(), BLI_path_basename(), BLI_strncpy(), C, CTX_data_main(), wmOperator::customdata, DEG_id_tag_update(), FILE_MAX, CacheFile::filepath, CacheFile::id, ID_CF, ID_RECALC_COPY_ON_WRITE, id_us_min(), MEM_freeN, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, PropertyPointerRNA::prop, wmOperator::ptr, PropertyPointerRNA::ptr, wmOperator::reports, RNA_id_pointer_create(), RNA_property_pointer_set(), RNA_property_update(), RNA_string_get(), RNA_struct_property_is_set(), and RPT_ERROR.
Referenced by CACHEFILE_OT_open().
|
static |
Definition at line 49 of file io_cache.c.
References BKE_main_blendfile_path(), BLI_path_extension_replace(), BLI_strncpy(), C, cachefile_init(), CTX_data_main(), FILE_MAX, OPERATOR_RUNNING_MODAL, wmOperator::ptr, RNA_string_set(), RNA_struct_property_is_set(), UNUSED_VARS, and WM_event_add_fileselect().
Referenced by CACHEFILE_OT_open().
void CACHEFILE_OT_layer_add | ( | wmOperatorType * | ot | ) |
Definition at line 210 of file io_cache.c.
References cachefile_layer_add_exec(), cachefile_layer_open_invoke(), wmOperatorType::description, wmOperatorType::exec, FILE_BLENDER, FILE_DEFAULTDISPLAY, FILE_OPENFILE, FILE_SORT_DEFAULT, FILE_TYPE_ALEMBIC, FILE_TYPE_FOLDER, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, ot, WM_FILESEL_FILEPATH, WM_FILESEL_RELPATH, and WM_operator_properties_filesel().
Referenced by ED_operatortypes_io().
void CACHEFILE_OT_layer_move | ( | wmOperatorType * | ot | ) |
Definition at line 288 of file io_cache.c.
References cachefile_layer_move_exec(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, RNA_def_enum(), and wmOperatorType::srna.
Referenced by ED_operatortypes_io().
void CACHEFILE_OT_layer_remove | ( | wmOperatorType * | ot | ) |
Definition at line 247 of file io_cache.c.
References cachefile_layer_remove_exec(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and ot.
Referenced by ED_operatortypes_io().
void CACHEFILE_OT_open | ( | wmOperatorType * | ot | ) |
Definition at line 112 of file io_cache.c.
References cachefile_open_exec(), cachefile_open_invoke(), wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, FILE_BLENDER, FILE_DEFAULTDISPLAY, FILE_OPENFILE, FILE_SORT_DEFAULT, FILE_TYPE_ALEMBIC, FILE_TYPE_FOLDER, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, open_cancel(), ot, WM_FILESEL_FILEPATH, WM_FILESEL_RELPATH, and WM_operator_properties_filesel().
Referenced by ED_operatortypes_io().
void CACHEFILE_OT_reload | ( | wmOperatorType * | ot | ) |
Definition at line 146 of file io_cache.c.
References cachefile_reload_exec(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and ot.
Referenced by ED_operatortypes_io().
|
static |
Definition at line 133 of file io_cache.c.
References C, CTX_data_edit_cachefile(), OPERATOR_CANCELLED, OPERATOR_FINISHED, and reload_cachefile().
Referenced by CACHEFILE_OT_reload().
|
static |
Definition at line 69 of file io_cache.c.
References wmOperator::customdata, MEM_freeN, and NULL.
Referenced by CACHEFILE_OT_open().
Definition at line 35 of file io_cache.c.
References BKE_cachefile_reload(), C, CTX_data_ensure_evaluated_depsgraph(), and depsgraph.
Referenced by cachefile_layer_add_exec(), cachefile_layer_move_exec(), cachefile_layer_remove_exec(), and cachefile_reload_exec().