Blender V5.3
BKE_lib_remap.hh File Reference
#include "BLI_compiler_attrs.hh"
#include "BLI_enum_flags.hh"
#include "BLI_function_ref.hh"
#include "BLI_map.hh"
#include "BLI_set.hh"
#include "BLI_span.hh"

Go to the source code of this file.

Classes

class  blender::bke::id::IDRemapper

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::bke
namespace  blender::bke::id

Typedefs

using blender::BKE_library_free_notifier_reference_cb = void (*)(const void *)
using blender::BKE_library_remap_editor_id_reference_cb = void (*)(const bke::id::IDRemapper &mappings)
using blender::IDRemapperIterFunction = void (*)(ID *old_id, ID *new_id, void *user_data)
using blender::IDTypeFilter = uint64_t

Enumerations

enum  {
  blender::ID_REMAP_SKIP_INDIRECT_USAGE = 1 << 0 , blender::ID_REMAP_SKIP_NEVER_NULL_USAGE = 1 << 1 , blender::ID_REMAP_STORE_NEVER_NULL_USAGE = 1 << 2 , blender::ID_REMAP_FORCE_NEVER_NULL_USAGE = 1 << 3 ,
  blender::ID_REMAP_SKIP_OVERRIDE_LIBRARY = 1 << 4 , blender::ID_REMAP_FORCE_INTERNAL_RUNTIME_POINTERS = 1 << 5 , blender::ID_REMAP_FORCE_UI_POINTERS = 1 << 6 , blender::ID_REMAP_FORCE_OBDATA_IN_EDITMODE = 1 << 7 ,
  blender::ID_REMAP_DO_LIBRARY_POINTERS = 1 << 8 , blender::ID_REMAP_ALLOW_IDTYPE_MISMATCH = 1 << 9 , blender::ID_REMAP_SKIP_USER_CLEAR = 1 << 16 , blender::ID_REMAP_FORCE_USER_REFCOUNT = 1 << 17 ,
  blender::ID_REMAP_SKIP_USER_REFCOUNT = 1 << 18 , blender::ID_REMAP_SKIP_UPDATE_TAGGING = 1 << 19 , blender::ID_REMAP_NO_ORIG_POINTERS_ACCESS = 1 << 20
}
enum  blender::eIDRemapType { blender::ID_REMAP_TYPE_REMAP = 0 , blender::ID_REMAP_TYPE_CLEANUP = 1 }
enum  blender::IDRemapperApplyResult { blender::ID_REMAP_RESULT_SOURCE_UNAVAILABLE , blender::ID_REMAP_RESULT_SOURCE_NOT_MAPPABLE , blender::ID_REMAP_RESULT_SOURCE_REMAPPED , blender::ID_REMAP_RESULT_SOURCE_UNASSIGNED }
enum  blender::IDRemapperApplyOptions { blender::ID_REMAP_APPLY_UPDATE_REFCOUNT = (1 << 0) , blender::ID_REMAP_APPLY_ENSURE_REAL = (1 << 1) , blender::ID_REMAP_APPLY_UNMAP_WHEN_REMAPPING_TO_SELF = (1 << 2) , blender::ID_REMAP_APPLY_DEFAULT = 0 }

Functions

void blender::BKE_libblock_remap_multiple_locked (Main *bmain, bke::id::IDRemapper &mappings, const int remap_flags)
void blender::BKE_libblock_remap_multiple (Main *bmain, bke::id::IDRemapper &mappings, const int remap_flags)
void blender::BKE_libblock_remap_multiple_raw (Main *bmain, bke::id::IDRemapper &mappings, const int remap_flags)
void blender::BKE_libblock_remap_locked (Main *bmain, void *old_idv, void *new_idv, int remap_flags) ATTR_NONNULL(1
void void blender::BKE_libblock_remap (Main *bmain, void *old_idv, void *new_idv, int remap_flags) ATTR_NONNULL(1
void void void blender::BKE_libblock_unlink (Main *bmain, void *idv, bool do_skip_indirect) ATTR_NONNULL()
void blender::BKE_libblock_relink_ex (Main *bmain, void *idv, void *old_idv, void *new_idv, int remap_flags) ATTR_NONNULL(2)
void blender::BKE_libblock_relink_multiple (Main *bmain, const Span< ID * > ids, eIDRemapType remap_type, bke::id::IDRemapper &id_remapper, int remap_flags)
void blender::BKE_libblock_relink_to_newid (Main *bmain, ID *id, int remap_flag) ATTR_NONNULL()
void blender::BKE_library_callback_free_notifier_reference_set (BKE_library_free_notifier_reference_cb func)
void blender::BKE_library_callback_remap_editor_id_reference_set (BKE_library_remap_editor_id_reference_cb func)

Detailed Description

API to perform remapping from one data-block pointer to another.

Note
BKE_lib_ files are for operations over data-blocks themselves, although they might alter Main as well (when creating/renaming/deleting an ID e.g.).

Names

Warning
Descriptions below is ideal goal, current status of naming does not yet fully follow it (this is WIP).
  • BKE_lib_remap_libblock_ should be used for functions performing remapping.
  • BKE_lib_remap_callback_ should be used for functions managing remapping callbacks.

Definition in file BKE_lib_remap.hh.