415 ListBaseT<wmWindowManager>
wm = {};
628 const char *library_filepath,
641 const char *library_filepath,
642 const char *library_id_name,
660 const char *library_filepath,
661 const char *library_id_name,
675 const char *library_filepath,
676 const char *library_id_name,
684 const char *library_filepath,
685 const char *library_id_name);
692 const char *library_filepath,
693 const char *library_id_name);
697#define FOREACH_MAIN_LISTBASE_ID_BEGIN(_lb, _id) \
699 ID *_id_next = static_cast<ID *>((_lb)->first_); \
700 for ((_id) = _id_next; (_id) != nullptr; (_id) = _id_next) { \
701 _id_next = static_cast<ID *>((_id)->next);
703#define FOREACH_MAIN_LISTBASE_ID_END \
708#define FOREACH_MAIN_LISTBASE_BEGIN(_bmain, _lb) \
710 MainListsArray _lbarray = BKE_main_lists_get(*(_bmain)); \
711 size_t _i = _lbarray.size(); \
713 (_lb) = _lbarray[_i];
715#define FOREACH_MAIN_LISTBASE_END \
729#define FOREACH_MAIN_ID_BEGIN(_bmain, _id) \
731 ListBaseT<ID> *_lb; \
732 FOREACH_MAIN_LISTBASE_BEGIN ((_bmain), _lb) { \
733 FOREACH_MAIN_LISTBASE_ID_BEGIN (_lb, (_id))
735#define FOREACH_MAIN_ID_END \
736 FOREACH_MAIN_LISTBASE_ID_END; \
738 FOREACH_MAIN_LISTBASE_END; \
836 bool reverse_id_type_order_ =
false;
838 ID *curr_id_ =
nullptr;
844 curr_lbarray_index_ = lbarray_index_lower_bound();
849 : lbarray_(lbarray), reverse_id_type_order_(reverse_id_type_order)
851 curr_lbarray_index_ = lbarray_index_lower_bound();
858 curr_lbarray_index_ = lbarray_index_lower_bound();
864 int64_t lbarray_index_lower_bound()
const
866 return reverse_id_type_order_ ? -1 :
int64_t(lbarray_.size());
870 int64_t lbarray_index_upper_bound()
const
872 return reverse_id_type_order_ ?
int64_t(lbarray_.size()) : -1;
875 bool lbarray_index_is_valid()
const
877 return (curr_lbarray_index_ >= -1 && curr_lbarray_index_ <=
int64_t(lbarray_.size()));
880 void lbarray_index_step_next()
882 if (reverse_id_type_order_) {
883 curr_lbarray_index_++;
886 curr_lbarray_index_--;
890 void lbarray_index_step_prev()
892 if (reverse_id_type_order_) {
893 curr_lbarray_index_--;
896 curr_lbarray_index_++;
904 tmp.curr_lbarray_index_ = tmp.lbarray_index_lower_bound();
905 tmp.curr_id_ =
nullptr;
912 tmp.curr_lbarray_index_ = tmp.lbarray_index_upper_bound();
913 tmp.curr_id_ =
nullptr;
937 return a.curr_id_ ==
b.curr_id_ && a.curr_lbarray_index_ ==
b.curr_lbarray_index_;
949#define MAIN_VERSION_FILE_ATLEAST(main, ver, subver) \
950 ((main)->versionfile > (ver) || \
951 ((main)->versionfile == (ver) && (main)->subversionfile >= (subver)))
953#define MAIN_VERSION_FILE_OLDER(main, ver, subver) \
954 ((main)->versionfile < (ver) || \
955 ((main)->versionfile == (ver) && (main)->subversionfile < (subver)))
957#define MAIN_VERSION_FILE_OLDER_OR_EQUAL(main, ver, subver) \
958 ((main)->versionfile < (ver) || \
959 ((main)->versionfile == (ver) && (main)->subversionfile <= (subver)))
966#define LIBRARY_VERSION_FILE_ATLEAST(lib, ver, subver) \
967 ((lib)->runtime->versionfile == 0 || (lib)->runtime->versionfile > (ver) || \
968 ((lib)->runtime->versionfile == (ver) && (lib)->runtime->subversionfile >= (subver)))
977#define BLEN_THUMB_SIZE 128
979#define BLEN_THUMB_MEMSIZE(_x, _y) \
980 (sizeof(BlendThumbnail) + (size_t(_x) * size_t(_y)) * sizeof(int))
982#define BLEN_THUMB_MEMSIZE_IS_VALID(_x, _y) \
983 (((_x) > 0 && (_y) > 0) && ((uint64_t)(_x) * (uint64_t)(_y) < (SIZE_MAX / (sizeof(int) * 4))))
#define ATTR_NONNULL(...)
These structs are the foundation for all linked lists in the library system.
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
std::bidirectional_iterator_tag iterator_category
MainAllIDsIterator begin() const
friend bool operator==(const MainAllIDsIterator &a, const MainAllIDsIterator &b)
MainAllIDsIterator end() const
MainAllIDsIterator(MainListsArray &lbarray, const bool reverse_id_type_order=false)
MainAllIDsIterator(Main &bmain, const bool reverse_id_type_order=false)
MainAllIDsIterator operator++(int)
std::ptrdiff_t difference_type
MainAllIDsIterator operator--(int)
NonCopyable(const NonCopyable &other)=delete
NonMovable(NonMovable &&other)=delete
void BKE_main_relations_free(Main *bmain)
GPUAttachmentType & operator++(GPUAttachmentType &a)
std::array< ListBaseT< ID > *, INDEX_ID_MAX - 1 > MainListsArray
unsigned __int64 uint64_t
void BKE_main_library_weak_reference_add_item(MainLibraryWeakReferenceMap *library_weak_reference_mapping, const char *library_filepath, const char *library_id_name, ID *new_id) ATTR_NONNULL()
GPUAttachmentType & operator--(GPUAttachmentType &a)
ID * BKE_main_library_weak_reference_search_item(MainLibraryWeakReferenceMap *library_weak_reference_mapping, const char *library_filepath, const char *library_id_name) ATTR_NONNULL()
ImBuf * BKE_main_thumbnail_to_imbuf(Main *bmain, BlendThumbnail *data)
void BKE_main_library_weak_reference_add(ID *local_id, const char *library_filepath, const char *library_id_name)
void BKE_main_init_from_reference(Main &bmain, const Main &reference)
void BKE_main_thumbnail_create(Main *bmain)
const char * BKE_main_blendfile_path_from_global()
MainListsArray BKE_main_lists_get(Main &bmain)
void BKE_main_library_weak_reference_remove_item(MainLibraryWeakReferenceMap *library_weak_reference_mapping, const char *library_filepath, const char *library_id_name, ID *old_id) ATTR_NONNULL()
BlendThumbnail * BKE_main_thumbnail_from_imbuf(Main *bmain, ImBuf *img)
@ MAINIDRELATIONS_INCLUDE_UI
eMainIDRelationsEntryTags
@ MAINIDRELATIONS_ENTRY_TAGS_PROCESSED_TO
@ MAINIDRELATIONS_ENTRY_TAGS_DOIT
@ MAINIDRELATIONS_ENTRY_TAGS_INPROGRESS
@ MAINIDRELATIONS_ENTRY_TAGS_INPROGRESS_FROM
@ MAINIDRELATIONS_ENTRY_TAGS_PROCESSED_FROM
@ MAINIDRELATIONS_ENTRY_TAGS_INPROGRESS_TO
@ MAINIDRELATIONS_ENTRY_TAGS_PROCESSED
const char * BKE_main_blendfile_path(const Main *bmain) ATTR_NONNULL()
void BKE_main_library_weak_reference_destroy(MainLibraryWeakReferenceMap *library_weak_reference_mapping) ATTR_NONNULL()
bool BKE_main_needs_overwrite_confirm(const Main *bmain)
BlendThumbnail * BKE_main_thumbnail_from_buffer(Main *bmain, const uint8_t *rect, const int size[2])
BMesh const char void * data
void BKE_main_library_weak_reference_update_item(MainLibraryWeakReferenceMap *library_weak_reference_mapping, const char *library_filepath, const char *library_id_name, ID *old_id, ID *new_id) ATTR_NONNULL()
bool BKE_main_has_issues(const Main *bmain)
void BKE_main_merge_as_archive_library(Main &bmain_dst, Main *&r_bmain_src, Library &dst_external_library, MainMergeReport &reports)
void BKE_main_merge(Main *bmain_dst, Set< ID * > *force_merge_src_ids, Main **r_bmain_src, MainMergeReport &reports)
void BKE_main_relations_create(Main *bmain, short flag)
MatBase< float, 3, 3 > float3x3
void BKE_main_relations_tag_set(Main *bmain, eMainIDRelationsEntryTags tag, bool value)
void BKE_main_free(Main *bmain)
Set< const ID * > * BKE_main_set_create(Main *bmain, Set< const ID * > *set)
void BKE_main_unlock(Main *bmain)
ID * BKE_main_library_weak_reference_find(Main *bmain, const char *library_filepath, const char *library_id_name)
void BKE_main_lock(Main *bmain)
void BKE_main_clear(Main &bmain)
LibraryForeachIDCallbackFlag
bool BKE_main_is_empty(Main *bmain)
const char * BKE_main_blendfile_path_from_library(const Library &library)
ListBaseT< ID > * which_libbase(Main *bmain, short type)
MainLibraryWeakReferenceMap * BKE_main_library_weak_reference_create(Main *bmain) ATTR_NONNULL()
bool is_missing_opencolorio_config
float3x3 scene_linear_to_xyz
char scene_linear_name[64]
bool is_failed_opencolorio_config
LibraryForeachIDCallbackFlag usage_flag
MainIDRelationsEntryItem * next
union blender::MainIDRelationsEntryItem::@147225153336151171020043026201123101032025326304 id_pointer
MainIDRelationsEntryItem * from_ids
MainIDRelationsEntryItem * to_ids
Map< const ID *, MainIDRelationsEntry * > * relations_from_pointers
BLI_mempool * entry_items_pool
int num_remapped_libraries
ListBaseT< Key > shapekeys
ListBaseT< wmWindowManager > wm
ListBaseT< Collection > collections
ListBaseT< bArmature > armatures
bool is_action_slot_to_id_map_dirty
ListBaseT< bGPdata > gpencils
bool is_memfile_undo_flush_needed
MainIDRelations * relations
ListBaseT< Lattice > lattices
std::shared_ptr< VectorSet< Main * > > split_mains
ListBaseT< Palette > palettes
ListBaseT< bNodeTree > nodetrees
ListBaseT< Curves > hair_curves
ListBaseT< Camera > cameras
UniqueName_Map * name_map_global
ListBaseT< MetaBall > metaballs
ListBaseT< FreestyleLineStyle > linestyles
bool need_preview_render_restart
bool is_locked_for_linking
ListBaseT< Library > libraries
ListBaseT< Light > lights
ListBaseT< World > worlds
ListBaseT< PointCloud > pointclouds
ListBaseT< MovieClip > movieclips
ListBaseT< Brush > brushes
ListBaseT< Material > materials
ListBaseT< Object > objects
ListBaseT< CacheFile > cachefiles
ListBaseT< PaintCurve > paintcurves
ListBaseT< WorkSpace > workspaces
UniqueName_Map * name_map
ListBaseT< Speaker > speakers
bool is_updating_node_trees
bool is_memfile_undo_written
ListBaseT< bSound > sounds
std::atomic< int32_t > no_resync
ListBaseT< ParticleSettings > particles
bool has_forward_compatibility_issues
uint64_t build_commit_timestamp
ListBaseT< Image > images
ListBaseT< bAction > actions
ListBaseT< Scene > scenes
ListBaseT< GreasePencil > grease_pencils
ListBaseT< LightProbe > lightprobes
ListBaseT< Tex > textures
bool use_memfile_full_barrier
BlendThumbnail * blen_thumb
ListBaseT< Volume > volumes
ListBaseT< bScreen > screens