|
Blender V4.3
|
#include <cstdlib>#include <cstring>#include <iostream>#include <map>#include <queue>#include "CLG_log.h"#include "MEM_guardedalloc.h"#include "DNA_ID.h"#include "DNA_collection_types.h"#include "DNA_key_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "DEG_depsgraph.hh"#include "DEG_depsgraph_build.hh"#include "BKE_anim_data.hh"#include "BKE_armature.hh"#include "BKE_blender.hh"#include "BKE_collection.hh"#include "BKE_fcurve.hh"#include "BKE_global.hh"#include "BKE_idtype.hh"#include "BKE_key.hh"#include "BKE_layer.hh"#include "BKE_lib_id.hh"#include "BKE_lib_override.hh"#include "BKE_lib_query.hh"#include "BKE_lib_remap.hh"#include "BKE_main.hh"#include "BKE_main_namemap.hh"#include "BKE_node.hh"#include "BKE_report.hh"#include "BKE_scene.hh"#include "BLO_readfile.hh"#include "BLI_ghash.h"#include "BLI_linklist.h"#include "BLI_listbase.h"#include "BLI_memarena.h"#include "BLI_set.hh"#include "BLI_string.h"#include "BLI_task.h"#include "BLI_time.h"#include "BLI_utildefines.h"#include "BLI_vector.hh"#include "RNA_access.hh"#include "RNA_path.hh"#include "RNA_prototypes.hh"#include "RNA_types.hh"#include "atomic_ops.h"#include "lib_intern.hh"Go to the source code of this file.
Classes | |
| struct | LibOverrideGroupTagData |
| struct | LibOverrideOpCreateData |
Macros | |
| #define | HIERARCHY_BREAKING_ID_TYPES ID_SCE, ID_LI, ID_SCR, ID_WM, ID_WS |
| #define | OVERRIDE_RESYNC_RESIDUAL_STORAGE_NAME "OVERRIDE_RESYNC_LEFTOVERS" |
Typedefs | |
| using | LibOverrideMissingIDsData_Key = const std::pair<std::string, Library *> |
| using | LibOverrideMissingIDsData_Value = std::deque<ID *> |
| using | LibOverrideMissingIDsData |
Variables | |
| static CLG_LogRef | LOG = {"bke.liboverride"} |
| static CLG_LogRef | LOG_RESYNC = {"bke.liboverride_resync"} |
Referenced by lib_override_hierarchy_dependencies_skip_check().
| #define OVERRIDE_RESYNC_RESIDUAL_STORAGE_NAME "OVERRIDE_RESYNC_LEFTOVERS" |
Referenced by BKE_lib_override_library_main_resync().
Definition at line 2043 of file lib_override.cc.
| using LibOverrideMissingIDsData_Key = const std::pair<std::string, Library *> |
Mapping to find suitable missing linked liboverrides to replace by the newly generated linked liboverrides during resync process.
OBCube.001, OBCube.002, etc.), this mapping system will find the correct one, for the following reasons:OBCube.001 is always 're-used' before OBCube.002.In case linked data keep being modified, these conditions may fail and the mapping may start to return 'wrong' results. However, this is considered as an acceptable limitation here, since this is mainly a 'best effort' to recover from situations that should not be happening in the first place.
Definition at line 2041 of file lib_override.cc.
| using LibOverrideMissingIDsData_Value = std::deque<ID *> |
Definition at line 2042 of file lib_override.cc.
| void BKE_lib_override_debug_print | ( | IDOverrideLibrary * | liboverride, |
| const char * | intro_txt ) |
Debugging helper to show content of given liboverride data.
Definition at line 5162 of file lib_override.cc.
References LIBOVERRIDE_OP_FLAG_IDPOINTER_MATCH_REFERENCE, LIBOVERRIDE_PROP_OP_TAG_UNUSED, LISTBASE_FOREACH, and IDOverrideLibrary::properties.
| void BKE_lib_override_id_tag_on_deg_tag_from_user | ( | ID * | id | ) |
Tag the liboverride ID for auto-refresh when it gets tagged for depsgraph update.
NOTE: This should only handle direct user editing, it is assumed that indirect updates should never require an update of the liboverride diffing info.
Definition at line 409 of file lib_override.cc.
References ID_IS_LINKED, ID_IS_OVERRIDE_LIBRARY, and ID_TAG_LIBOVERRIDE_AUTOREFRESH.
Referenced by blender::deg::id_tag_update().
| void BKE_lib_override_library_clear | ( | IDOverrideLibrary * | liboverride, |
| bool | do_id_user ) |
Clear any overriding data from given liboverride.
Definition at line 214 of file lib_override.cc.
References BLI_assert, BLI_freelistN(), BLI_ghash_clear(), ELEM, id_us_min(), lib_override_library_property_clear(), LISTBASE_FOREACH, IDOverrideLibrary::properties, IDOverrideLibrary::reference, IDOverrideLibraryRuntime::rna_path_to_override_properties, and IDOverrideLibrary::runtime.
Referenced by BKE_lib_override_library_copy(), and BKE_lib_override_library_free().
Shallow or deep copy of a whole override from src_id to dst_id.
Definition at line 170 of file lib_override.cc.
References BKE_lib_override_library_clear(), BKE_lib_override_library_free(), BKE_lib_override_library_init(), BLI_assert, BLI_duplicatelist(), ListBase::first, IDOverrideLibrary::flag, IDOverrideLibrary::hierarchy_root, ID_IS_OVERRIDE_LIBRARY, id_us_plus(), lib_override_library_property_copy(), ID::override_library, IDOverrideLibrary::properties, IDOverrideLibrary::reference, and ID::tag.
Referenced by BKE_libblock_copy_in_lib().
| bool BKE_lib_override_library_create | ( | Main * | bmain, |
| Scene * | scene, | ||
| ViewLayer * | view_layer, | ||
| Library * | owner_library, | ||
| ID * | id_root_reference, | ||
| ID * | id_hierarchy_root_reference, | ||
| ID * | id_instance_hint, | ||
| ID ** | r_id_root_override, | ||
| const bool | do_fully_editable ) |
Advanced 'smart' function to create fully functional overrides.
| view_layer | the active view layer to search instantiated collections in, can be NULL (in which case scene's master collection children hierarchy is used instead). |
| owner_library | the library in which the overrides should be created. Besides versioning and resync code path, this should always be NULL (i.e. the local .blend file). |
| id_root_reference | The linked root ID to create an override from. May be a sub-root of the overall hierarchy, in which case calling code is expected to have already tagged required 'path' of IDs leading from the given id_hierarchy_root to the given id_root. |
| id_hierarchy_root_reference | The ID to be used a hierarchy root of the overrides to be created. Can be either the linked root ID of the whole override hierarchy, (typically the same as id_root, unless a sub-part only of the hierarchy is overridden), or the already existing override hierarchy root if part of the hierarchy is already overridden. |
| id_instance_hint | Some ID used as hint/reference to do some post-processing after overrides have been created, may be NULL. Typically, the Empty object instantiating the linked collection we override, currently. |
| r_id_root_override | if not NULL, the override generated for the given id_root. |
| do_fully_editable | if true, tag all created overrides as user-editable by default. |
Definition at line 1633 of file lib_override.cc.
References BKE_lib_override_library_main_operations_create(), BKE_main_id_newptr_and_tag_clear(), BKE_main_id_tag_all(), BKE_main_view_layers_synced_ensure(), BKE_view_layer_active_object_get(), ID_TAG_DOIT, lib_override_library_create_do(), lib_override_library_create_post_process(), and ID::newid.
Referenced by BKE_lib_override_library_proxy_convert(), blender::ed::outliner::id_override_library_create_hierarchy(), blender::ed::object::make_override_library_exec(), and ui_template_id_liboverride_hierarchy_make().
| ID * BKE_lib_override_library_create_from_id | ( | Main * | bmain, |
| ID * | reference_id, | ||
| bool | do_tagged_remap ) |
Create an overridden local copy of linked reference.
Definition at line 422 of file lib_override.cc.
References BKE_key_from_id(), BKE_libblock_relink_ex(), BKE_main_namemap_destroy(), BLI_assert, IDOverrideLibrary::flag, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, IDOverrideLibrary::hierarchy_root, Key::id, ID_IS_LINKED, ID_REMAP_SKIP_INDIRECT_USAGE, ID_REMAP_SKIP_OVERRIDE_LIBRARY, ID_TAG_DOIT, lib_override_library_create_from(), LIBOVERRIDE_FLAG_NO_HIERARCHY, Main::name_map_global, ID::override_library, and ID::tag.
Referenced by BKE_blendfile_override(), and blender::ed::outliner::id_override_library_create_hierarchy().
| bool BKE_lib_override_library_create_from_tag | ( | Main * | bmain, |
| Library * | owner_library, | ||
| const ID * | id_root_reference, | ||
| ID * | id_hierarchy_root, | ||
| const ID * | id_hierarchy_root_reference, | ||
| bool | do_no_main, | ||
| const bool | do_fully_editable ) |
Create overridden local copies of all tagged data-blocks in given Main.
id->newid of overridden libraries with newly created overrides, caller is responsible to clean those pointers before/after usage as needed.| owner_library | the library in which the overrides should be created. Besides versioning and resync code path, this should always be NULL (i.e. the local .blend file). |
| id_root_reference | the linked ID that is considered as the root of the overridden hierarchy. |
| id_hierarchy_root | the override ID that is the root of the hierarchy. May be NULL, in which case it is assumed that the given id_root_reference is tagged for override, and its newly created override will be used as hierarchy root. Must be NULL if id_hierarchy_root_reference is not NULL. |
| id_hierarchy_root_reference | the linked ID that is the root of the hierarchy. Must be tagged for override. May be NULL, in which case it is assumed that the given id_root_reference is tagged for override, and its newly created override will be used as hierarchy root. Must be NULL if id_hierarchy_root is not NULL. |
| do_no_main | Create the new override data outside of Main database. Used for resyncing of linked overrides. |
| do_fully_editable | if true, tag all created overrides as user-editable by default. |
Definition at line 514 of file lib_override.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BKE_id_delete(), BKE_idtype_idcode_is_linkable(), BKE_key_from_id(), BKE_lib_override_library_get(), BKE_libblock_relink_multiple(), BLI_addtail(), BLI_assert, BLI_freelistN(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), LinkData::data, ELEM, ListBase::first, IDOverrideLibrary::flag, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, GS, IDOverrideLibrary::hierarchy_root, Key::id, ID_IS_LINKED, ID_IS_OVERRIDE_LIBRARY_REAL, ID_REMAP_FORCE_USER_REFCOUNT, ID_REMAP_SKIP_OVERRIDE_LIBRARY, ID_REMAP_TYPE_REMAP, ID_TAG_DOIT, ID::lib, LIB_ID_CREATE_NO_MAIN, lib_override_library_create_from(), lib_override_prefill_newid_from_existing_overrides(), lib_override_remapper_overrides_add(), ID::name, ID::newid, LinkData::next, ID::override_library, IDOverrideLibrary::reference, and ID::tag.
Referenced by lib_override_library_create_do(), and lib_override_library_resync().
Advanced 'smart' function to delete library overrides (including their existing override hierarchy) and remap their usages to their linked reference IDs.
| id_root | The root liboverride ID to delete. |
Definition at line 3774 of file lib_override.cc.
References BKE_id_multi_tagged_delete(), BKE_libblock_remap(), BKE_main_id_tag_all(), BKE_main_relations_create(), BKE_main_relations_free(), BLI_assert, LibOverrideGroupTagData::bmain, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, IDOverrideLibrary::hierarchy_root, ID_IS_OVERRIDE_LIBRARY_REAL, ID_REMAP_SKIP_INDIRECT_USAGE, ID_TAG_DOIT, ID_TAG_MISSING, lib_override_group_tag_data_object_to_collection_init(), lib_override_overrides_group_tag(), ID::override_library, and IDOverrideLibrary::reference.
Referenced by blender::ed::outliner::id_override_library_delete_hierarchy_process().
| void BKE_lib_override_library_free | ( | IDOverrideLibrary ** | liboverride, |
| bool | do_id_user ) |
Free given liboverride.
Definition at line 234 of file lib_override.cc.
References BKE_lib_override_library_clear(), BLI_assert, BLI_ghash_free(), MEM_freeN(), and MEM_SAFE_FREE.
Referenced by BKE_lib_override_library_copy(), BKE_lib_override_library_make_local(), BKE_libblock_free_data(), and reuse_bmain_data_invalid_local_usages_fix().
| BLI_INLINE const IDOverrideLibrary * BKE_lib_override_library_get | ( | const Main * | , |
| const ID * | id, | ||
| const ID * | , | ||
| const ID ** | r_owner_id ) |
Get override data for a given ID. Needed because of our beloved shape keys snowflake.
Definition at line 116 of file lib_override.cc.
References BKE_id_owner_get(), BLI_assert_msg, ID_FLAG_EMBEDDED_DATA_LIB_OVERRIDE, and ID::override_library.
Referenced by BKE_lib_override_library_create_from_tag(), BKE_lib_override_library_get(), BKE_lib_override_library_is_system_defined(), BKE_lib_override_library_validate(), lib_override_cleanup_after_resync(), lib_override_library_resync(), lib_override_overrides_group_tag_recursive(), lib_override_resync_tagging_finalize_recurse(), and lib_override_root_find().
| IDOverrideLibrary * BKE_lib_override_library_get | ( | Main * | bmain, |
| ID * | id, | ||
| ID * | owner_id_hint, | ||
| ID ** | r_owner_id ) |
Return the actual IDOverrideLibrary data 'controlling' the given id, and the actual ID owning it.
id is a non-real override (e.g. embedded ID like a master collection or root node tree, or a shape key).| owner_id_hint | If not NULL, a potential owner for the given override-embedded id. |
| r_owner_id | If given, will be set with the actual ID owning the return liboverride data. |
Definition at line 136 of file lib_override.cc.
References BKE_lib_override_library_get().
Referenced by blender::ed::outliner::id_is_in_override_hierarchy(), RNA_property_driver_editable(), and ui_template_id_liboverride_hierarchy_make().
| void BKE_lib_override_library_id_hierarchy_reset | ( | Main * | bmain, |
| ID * | id_root, | ||
| bool | do_reset_system_override ) |
Reset all overrides in given id_root and its dependencies, while preserving ID relations.
| do_reset_system_override | If true, reset the given ID and all of its descendants in the override hierarchy as system override ones (i.e. non-editable). |
Definition at line 4848 of file lib_override.cc.
References BKE_lib_override_library_update(), BKE_main_relations_create(), BKE_main_relations_free(), FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, ID_IS_OVERRIDE_LIBRARY_REAL, lib_override_library_id_hierarchy_recursive_reset(), and LIBOVERRIDE_TAG_NEEDS_RELOAD.
Referenced by blender::ed::outliner::id_override_library_reset().
In case an ID is used by another liboverride ID, user may not be allowed to delete it.
Definition at line 5142 of file lib_override.cc.
References BKE_collection_has_object(), Main::collections, GS, ID_IS_OVERRIDE_LIBRARY, ID_OB, and LISTBASE_FOREACH.
Referenced by blender::ed::object::base_free_and_unlink(), blender::ed::object::join_shapes_exec(), blender::ed::object::object_delete_exec(), and blender::ed::object::object_join_exec().
| void BKE_lib_override_library_id_reset | ( | Main * | bmain, |
| ID * | id_root, | ||
| bool | do_reset_system_override ) |
Reset all overrides in given id_root, while preserving ID relations.
| do_reset_system_override | If true, reset the given ID as a system override one (i.e. non-editable). |
Definition at line 4787 of file lib_override.cc.
References BKE_lib_override_library_update(), ID_IS_OVERRIDE_LIBRARY_REAL, lib_override_library_id_reset_do(), LIBOVERRIDE_TAG_NEEDS_RELOAD, ID::override_library, IDOverrideLibrary::runtime, and IDOverrideLibraryRuntime::tag.
Referenced by blender::ed::object::clear_override_library_exec(), blender::ed::outliner::id_override_library_clear_single_process(), blender::ed::outliner::id_override_library_reset(), lib_id_override_editable_toggle_exec(), override_idtemplate_clear_exec(), override_idtemplate_reset_exec(), blender::ed::object::reset_override_library_exec(), and ui_template_id_liboverride_hierarchy_make().
| void BKE_lib_override_library_id_unused_cleanup | ( | ID * | local | ) |
Remove all tagged-as-unused properties and operations from that ID override data.
Definition at line 4919 of file lib_override.cc.
References BKE_lib_override_library_property_delete(), BKE_lib_override_library_property_operation_delete(), BLI_listbase_is_empty(), ID_IS_OVERRIDE_LIBRARY_REAL, LIBOVERRIDE_PROP_OP_TAG_UNUSED, and LISTBASE_FOREACH_MUTABLE.
Referenced by BKE_lib_override_library_main_unused_cleanup().
| IDOverrideLibrary * BKE_lib_override_library_init | ( | ID * | local_id, |
| ID * | reference_id ) |
Initialize empty overriding of reference_id by local_id.
Definition at line 150 of file lib_override.cc.
References BLI_assert, IDOverrideLibrary::flag, ID_IS_LINKED, id_us_plus(), LIBOVERRIDE_FLAG_SYSTEM_DEFINED, ID::override_library, IDOverrideLibrary::reference, and ID::tag.
Referenced by BKE_lib_override_library_copy(), BKE_lib_override_library_proxy_convert(), and lib_override_library_create_from().
Check if given ID is a leaf in its liboverride hierarchy (i.e. if it does not use any other override ID).
NOTE: Embedded IDs of override IDs are not considered as leaves.
Definition at line 397 of file lib_override.cc.
References BKE_library_foreach_ID_link(), foreachid_is_hierarchy_leaf_fn(), ID_IS_OVERRIDE_LIBRARY_REAL, IDWALK_READONLY, and is_leaf().
Referenced by blender::ed::object::clear_override_library_exec(), blender::ed::outliner::id_override_library_clear_single_process(), and override_idtemplate_clear_exec().
Check if given ID is a system override.
Definition at line 339 of file lib_override.cc.
References BKE_lib_override_library_get(), IDOverrideLibrary::flag, ID_IS_OVERRIDE_LIBRARY, LIBOVERRIDE_FLAG_SYSTEM_DEFINED, and ID::override_library.
Referenced by active_bone_collection_poll(), ANIM_armature_bonecoll_is_editable(), BKE_id_is_editable(), bone_collection_add_poll(), bone_collection_assign_poll(), bone_collection_create_and_assign_poll(), lib_id_override_editable_toggle_exec(), move_to_collection_poll(), blender::ed::outliner::outliner_draw_overrides_restrictbuts(), and rna_property_editable_do().
| bool BKE_lib_override_library_is_user_edited | ( | const ID * | id | ) |
Check if given ID has some override rules that actually indicate the user edited it.
Definition at line 307 of file lib_override.cc.
References ID_IS_OVERRIDE_LIBRARY, ID_IS_OVERRIDE_LIBRARY_REAL, LIBOVERRIDE_OP_FLAG_IDPOINTER_MATCH_REFERENCE, LIBOVERRIDE_OP_NOOP, and LISTBASE_FOREACH.
Referenced by blo_do_versions_300(), lib_override_library_main_resync_on_library_indirect_level(), and lib_override_library_resync().
| void BKE_lib_override_library_main_hierarchy_root_ensure | ( | Main * | bmain | ) |
Find and set the 'hierarchy root' ID pointer of all library overrides in given bmain.
NOTE: Cannot be called from do_versions_after_linking as this code needs a single complete Main database, not a split-by-libraries one.
Definition at line 1893 of file lib_override.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), BKE_main_relations_create(), BKE_main_relations_free(), BKE_main_relations_tag_set(), BLI_assert, CLOG_ERROR, CLOG_WARN, ELEM, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, IDOverrideLibrary::hierarchy_root, ID_IS_OVERRIDE_LIBRARY_REAL, lib_override_root_find(), lib_override_root_hierarchy_set(), LOG, MAINIDRELATIONS_ENTRY_TAGS_INPROGRESS, MAINIDRELATIONS_ENTRY_TAGS_PROCESSED, ID::name, and ID::override_library.
Referenced by BKE_lib_override_library_make_local(), BKE_library_make_local(), do_versions_after_setup(), and lib_override_library_main_resync_on_library_indirect_level().
| void BKE_lib_override_library_main_operations_create | ( | Main * | bmain, |
| bool | force_auto, | ||
| int * | r_report_flags ) |
Check all overrides from given bmain and create/update overriding operations as needed.
| r_report_flags | eRNAOverrideMatchResult flags giving info about the result of this call. |
Definition at line 4587 of file lib_override.cc.
References BKE_key_from_id(), BKE_lib_override_library_main_operations_create(), BKE_lib_override_library_main_operations_restore(), BKE_lib_override_library_main_tag(), BKE_lib_override_library_main_unused_cleanup(), BKE_lib_override_library_properties_tag(), BKE_pose_ensure(), BLI_assert, BLI_task_pool_create(), BLI_task_pool_free(), BLI_task_pool_push(), BLI_task_pool_work_and_wait(), LibOverrideOpCreateData::bmain, Object::data, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, GS, ID_IS_LINKED, ID_IS_OVERRIDE_LIBRARY_REAL, ID_OB, ID_SCE, ID_TAG_LIBOVERRIDE_AUTOREFRESH, ID_TAG_MISSING, lib_override_library_operations_create_cb(), LIBOVERRIDE_PROP_OP_TAG_UNUSED, LISTBASE_FOREACH, blender::bke::node_tree_from_id(), OB_ARMATURE, Main::objects, RNA_OVERRIDE_MATCH_RESULT_INIT, RNA_OVERRIDE_MATCH_RESULT_RESTORE_TAGGED, task_pool, TASK_PRIORITY_HIGH, TIMEIT_END_AVERAGED, TIMEIT_START_AVERAGED, and Object::type.
Referenced by BKE_blendfile_library_relocate(), BKE_lib_override_library_create(), BKE_lib_override_library_main_operations_create(), BKE_undosys_step_push_with_type(), setup_app_data(), and wm_file_write().
Restore forbidden modified override properties to the values of their matching properties in the linked reference ID, for all liboverride IDs tagged as needing such process in given bmain.
| r_report_flags | eRNAOverrideMatchResult flags giving info about the result of this call. |
Definition at line 4701 of file lib_override.cc.
References BKE_lib_override_library_operations_restore(), FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, ID_IS_LINKED, ID_IS_OVERRIDE_LIBRARY_REAL, ID_TAG_MISSING, and LIBOVERRIDE_TAG_NEEDS_RESTORE.
Referenced by BKE_lib_override_library_main_operations_create().
| void BKE_lib_override_library_main_resync | ( | Main * | bmain, |
| Scene * | scene, | ||
| ViewLayer * | view_layer, | ||
| BlendFileReadReport * | reports ) |
Detect and handle required resync of overrides data, when relations between reference linked IDs have changed.
This is a fairly complex and costly operation, typically it should be called after BKE_lib_override_library_main_update, which would already detect and tag a lot of cases.
This function will first detect the remaining cases requiring a resync (namely, either when an existing linked ID that did not require to be overridden before now would be, or when new IDs are added to the hierarchy).
Then it will handle the resync of necessary IDs (through calls to BKE_lib_override_library_resync).
| view_layer | the active view layer to search instantiated collections in, can be NULL (in which case scene's master collection children hierarchy is used instead). |
Definition at line 3667 of file lib_override.cc.
References BKE_collection_add(), BKE_collection_delete(), BKE_collection_is_empty(), BKE_layer_collection_resync_allow(), BKE_layer_collection_resync_forbid(), BKE_main_namemap_destroy(), BKE_main_namemap_validate(), BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), BLI_assert, BLI_findstring(), CLOG_INFO, CLOG_WARN, COLLECTION_HIDE_RENDER, COLLECTION_HIDE_VIEWPORT, Main::collections, Collection::flag, ID_IS_LINKED, lib_override_cleanup_after_resync(), lib_override_libraries_index_define(), lib_override_library_create_post_process(), lib_override_library_main_resync_on_library_indirect_level(), Main::libraries, LIBRARY_TAG_RESYNC_REQUIRED, LISTBASE_FOREACH, LOG_RESYNC, Main::name_map_global, offsetof, and OVERRIDE_RESYNC_RESIDUAL_STORAGE_NAME.
Referenced by BKE_blendfile_library_relocate(), and setup_app_data().
| void BKE_lib_override_library_main_tag | ( | Main * | bmain, |
| short | tag, | ||
| bool | do_set ) |
Set or clear given tag in all properties and operations in that Main's ID override data.
Definition at line 4907 of file lib_override.cc.
References BKE_lib_override_library_properties_tag(), FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, and ID_IS_OVERRIDE_LIBRARY.
Referenced by BKE_lib_override_library_main_operations_create().
| void BKE_lib_override_library_main_unused_cleanup | ( | Main * | bmain | ) |
Remove all tagged-as-unused properties and operations from that Main's ID override data.
Definition at line 4942 of file lib_override.cc.
References BKE_lib_override_library_id_unused_cleanup(), FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, and ID_IS_OVERRIDE_LIBRARY.
Referenced by BKE_lib_override_library_main_operations_create().
| void BKE_lib_override_library_main_update | ( | Main * | bmain | ) |
Update all overrides from given bmain.
Definition at line 5117 of file lib_override.cc.
References BKE_blender_globals_main_swap(), BKE_lib_override_library_update(), BKE_main_namemap_validate(), BLI_assert, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, and UNUSED_VARS_NDEBUG.
Referenced by blo_read_file_internal(), and library_link_end().
| void BKE_lib_override_library_main_validate | ( | Main * | bmain, |
| ReportList * | reports ) |
Check against potential bmain.
Definition at line 4344 of file lib_override.cc.
References BKE_lib_override_library_validate(), FOREACH_MAIN_ID_BEGIN, and FOREACH_MAIN_ID_END.
Referenced by blo_read_file_internal(), and library_link_end().
Make given ID fully local.
| bmain | If given, all liboverrides hierarchy roots will be re-validated/generated after clearing the liboverride data from given id. If nullptr, caller is responsible to perform this action (call BKE_lib_override_library_main_hierarchy_root_ensure) itself. |
Definition at line 3817 of file lib_override.cc.
References BKE_key_from_id(), BKE_lib_override_library_free(), BKE_lib_override_library_main_hierarchy_root_ensure(), BLI_assert_unreachable, ID::flag, GS, Collection::id, Key::id, ID_IS_OVERRIDE_LIBRARY, ID_IS_OVERRIDE_LIBRARY_VIRTUAL, ID_SCE, node_tree, and blender::bke::node_tree_from_id().
Referenced by BKE_lib_id_make_local_generic(), BKE_lib_override_library_validate(), BKE_library_make_local(), blender::ed::outliner::id_local_fn(), and template_id_cb().
Compare local and reference data-blocks and create new override operations as needed, or reset to reference values if overriding is not allowed.
| r_report_flags | eRNAOverrideMatchResult flags giving info about the result of this call. |
.blend file on disk (not for undo!). Knowing that info at runtime is only useful for UI/UX feedback.Definition at line 4514 of file lib_override.cc.
References lib_override_library_operations_create(), RNA_OVERRIDE_COMPARE_CREATE, and RNA_OVERRIDE_COMPARE_RESTORE.
Referenced by BKE_lib_override_library_operations_store_start().
Restore forbidden modified override properties to the values of their matching properties in the linked reference ID.
| r_report_flags | eRNAOverrideMatchResult flags giving info about the result of this call. |
Definition at line 4523 of file lib_override.cc.
References BKE_lib_override_library_operations_tag(), BKE_lib_override_library_property_delete(), BKE_lib_override_library_property_operation_delete(), BLI_listbase_is_empty(), ID_IS_OVERRIDE_LIBRARY_REAL, LIBOVERRIDE_PROP_TAG_NEEDS_RETORE, LIBOVERRIDE_TAG_NEEDS_RESTORE, LISTBASE_FOREACH_MUTABLE, RNA_id_pointer_create(), RNA_OVERRIDE_APPLY_FLAG_RESTORE_ONLY, RNA_OVERRIDE_APPLY_FLAG_SKIP_RESYNC_CHECK, RNA_OVERRIDE_MATCH_RESULT_RESTORED, and RNA_struct_override_apply().
Referenced by BKE_lib_override_library_main_operations_restore().
| void BKE_lib_override_library_operations_store_end | ( | OverrideLibraryStorage * | liboverride_storage, |
| ID * | local ) |
Restore given ID modified by BKE_lib_override_library_operations_store_start, to its original state.
Definition at line 5283 of file lib_override.cc.
References BLI_assert, and ID_IS_OVERRIDE_LIBRARY_REAL.
Referenced by write_file_handle().
| void BKE_lib_override_library_operations_store_finalize | ( | OverrideLibraryStorage * | liboverride_storage | ) |
Definition at line 5293 of file lib_override.cc.
References BKE_id_free_ex(), BKE_main_free(), FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, and LIB_ID_FREE_NO_UI_USER.
Referenced by write_file_handle().
| OverrideLibraryStorage * BKE_lib_override_library_operations_store_init | ( | ) |
Storage (how to store overriding data into .blend files).
Basically: 1) Only 'differential' overrides needs special handling here. All others (replacing values or inserting/removing items from a collection) can be handled with simply storing current content of local data-block. 2) We store the differential value into a second 'ghost' data-block, which is an empty ID of same type as the local one, where we only define values that need differential data.
This avoids us having to modify 'real' data-block at write time (and restoring it afterwards), which is inefficient, and potentially dangerous (in case of concurrent access...), while not using much extra memory in typical cases. It also ensures stored data-block always contains exact same data as "desired" ones (kind of "baked" data-blocks).
Definition at line 5215 of file lib_override.cc.
References BKE_main_new().
Referenced by write_file_handle().
| ID * BKE_lib_override_library_operations_store_start | ( | Main * | bmain, |
| OverrideLibraryStorage * | liboverride_storage, | ||
| ID * | local ) |
Generate suitable 'write' data (this only affects differential override operations).
Note that local ID is no more modified by this call, all extra data are stored in its temp storage_id copy.
Definition at line 5220 of file lib_override.cc.
References BKE_id_copy(), BKE_id_free_ex(), BKE_lib_override_library_operations_create(), BKE_lib_override_library_operations_store_start(), BLI_assert, ID_IS_OVERRIDE_LIBRARY_REAL, ID_IS_OVERRIDE_LIBRARY_VIRTUAL, LIB_ID_FREE_NO_UI_USER, ID::override_library, RNA_id_pointer_create(), RNA_struct_override_store(), IDOverrideLibrary::storage, TIMEIT_END_AVERAGED, TIMEIT_START_AVERAGED, and UNUSED_VARS_NDEBUG.
Referenced by BKE_lib_override_library_operations_store_start(), and write_file_handle().
| void BKE_lib_override_library_operations_tag | ( | IDOverrideLibraryProperty * | liboverride_property, |
| short | tag, | ||
| bool | do_set ) |
Set or clear given tag in all operations in that override property data.
Definition at line 4871 of file lib_override.cc.
References LISTBASE_FOREACH, IDOverrideLibraryProperty::operations, and IDOverrideLibraryProperty::tag.
Referenced by BKE_lib_override_library_operations_restore(), BKE_lib_override_library_properties_tag(), and RNA_struct_override_matches().
| void BKE_lib_override_library_properties_tag | ( | IDOverrideLibrary * | liboverride, |
| short | tag, | ||
| bool | do_set ) |
Set or clear given tag in all properties and operations in that override data.
Definition at line 4896 of file lib_override.cc.
References BKE_lib_override_library_operations_tag(), LISTBASE_FOREACH, and IDOverrideLibrary::properties.
Referenced by BKE_lib_override_library_main_operations_create(), and BKE_lib_override_library_main_tag().
| void BKE_lib_override_library_property_delete | ( | IDOverrideLibrary * | liboverride, |
| IDOverrideLibraryProperty * | liboverride_property ) |
Remove and free given liboverride_property from given ID liboverride.
Definition at line 4002 of file lib_override.cc.
References lib_override_library_property_delete().
Referenced by BKE_lib_override_library_id_unused_cleanup(), BKE_lib_override_library_operations_restore(), lib_override_library_id_reset_do(), lib_override_library_resync(), and override_remove_button_exec().
| IDOverrideLibraryProperty * BKE_lib_override_library_property_find | ( | IDOverrideLibrary * | liboverride, |
| const char * | rna_path ) |
Find override property from given RNA path, if it exists.
Definition at line 3875 of file lib_override.cc.
References BLI_ghash_lookup(), and override_library_rna_path_mapping_ensure().
Referenced by BKE_lib_override_library_property_get(), RNA_property_overridden(), RNA_property_override_property_find(), RNA_struct_override_matches(), version_liboverride_rnacollections_insertion_animdata(), and version_liboverride_rnacollections_insertion_object().
| IDOverrideLibraryProperty * BKE_lib_override_library_property_get | ( | IDOverrideLibrary * | liboverride, |
| const char * | rna_path, | ||
| bool * | r_created ) |
Find override property from given RNA path, or create it if it does not exist.
Definition at line 3882 of file lib_override.cc.
References BKE_lib_override_library_property_find(), BLI_addtail(), BLI_ghash_insert(), BLI_strdup(), override_library_rna_path_mapping_ensure(), IDOverrideLibrary::properties, and IDOverrideLibraryProperty::rna_path.
Referenced by RNA_property_override_property_get(), and RNA_struct_override_matches().
| bool BKE_lib_override_library_property_is_animated | ( | const ID * | id, |
| const IDOverrideLibraryProperty * | liboverride_prop, | ||
| const PropertyRNA * | override_rna_prop, | ||
| const int | rnaprop_index ) |
Check if given Override Property for given ID is animated (through a F-Curve in an Action, or from a driver).
| liboverride_rna_prop | if not NULL, the RNA property matching the given path in the liboverride_prop. |
| rnaprop_index | Array in the RNA property, 0 if unknown or irrelevant. |
Definition at line 349 of file lib_override.cc.
References BKE_animadata_fcurve_find_by_rna_path(), BKE_animdata_from_id(), IDOverrideLibraryProperty::rna_path, and RNA_path_array_index_token_find().
Referenced by blender::ed::outliner::iterate_properties_to_display().
| void BKE_lib_override_library_property_operation_delete | ( | IDOverrideLibraryProperty * | liboverride_property, |
| IDOverrideLibraryPropertyOperation * | liboverride_property_operation ) |
Remove and free given liboverride_property_operation from given ID liboverride_property.
Definition at line 4230 of file lib_override.cc.
References BLI_freelinkN(), lib_override_library_property_operation_clear(), and IDOverrideLibraryProperty::operations.
Referenced by BKE_lib_override_library_id_unused_cleanup(), BKE_lib_override_library_operations_restore(), override_remove_button_exec(), version_liboverride_rnacollections_insertion_object(), and version_liboverride_rnacollections_insertion_object_constraints().
| IDOverrideLibraryPropertyOperation * BKE_lib_override_library_property_operation_find | ( | IDOverrideLibraryProperty * | liboverride_property, |
| const char * | subitem_refname, | ||
| const char * | subitem_locname, | ||
| const std::optional< const ID * > & | subitem_refid, | ||
| const std::optional< const ID * > & | subitem_locid, | ||
| int | subitem_refindex, | ||
| int | subitem_locindex, | ||
| bool | strict, | ||
| bool * | r_strict ) |
Find override property operation from given sub-item(s), if it exists.
| subitem_refid | |
| subitem_locid | Only for RNA collections of ID pointers, the ID pointers referenced by the given names. Note that both must be set, or left unset. |
Definition at line 4062 of file lib_override.cc.
References BLI_assert, BLI_listbase_bytes_find(), ELEM, liboverride_opop_find_name_lib_iterative(), offsetof, IDOverrideLibraryProperty::operations, IDOverrideLibraryPropertyOperation::subitem_local_index, and IDOverrideLibraryPropertyOperation::subitem_reference_index.
Referenced by BKE_lib_override_library_property_operation_get(), override_remove_button_exec(), and RNA_property_override_property_operation_find().
| IDOverrideLibraryPropertyOperation * BKE_lib_override_library_property_operation_get | ( | IDOverrideLibraryProperty * | liboverride_property, |
| short | operation, | ||
| const char * | subitem_refname, | ||
| const char * | subitem_locname, | ||
| const std::optional< ID * > & | subitem_refid, | ||
| const std::optional< ID * > & | subitem_locid, | ||
| int | subitem_refindex, | ||
| int | subitem_locindex, | ||
| bool | strict, | ||
| bool * | r_strict, | ||
| bool * | r_created ) |
Find override property operation from given sub-item(s), or create it if it does not exist.
Definition at line 4152 of file lib_override.cc.
References BKE_lib_override_library_property_operation_find(), BLI_addtail(), BLI_assert, BLI_strdup(), IDOverrideLibraryPropertyOperation::flag, LIBOVERRIDE_OP_FLAG_IDPOINTER_ITEM_USE_ID, IDOverrideLibraryPropertyOperation::operation, IDOverrideLibraryProperty::operations, IDOverrideLibraryPropertyOperation::subitem_local_id, IDOverrideLibraryPropertyOperation::subitem_local_index, IDOverrideLibraryPropertyOperation::subitem_local_name, IDOverrideLibraryPropertyOperation::subitem_reference_id, IDOverrideLibraryPropertyOperation::subitem_reference_index, and IDOverrideLibraryPropertyOperation::subitem_reference_name.
Referenced by override_remove_button_exec(), RNA_property_override_property_operation_get(), and RNA_struct_override_matches().
| bool BKE_lib_override_library_property_operation_operands_validate | ( | IDOverrideLibraryPropertyOperation * | liboverride_property_operation, |
| PointerRNA * | ptr_dst, | ||
| PointerRNA * | ptr_src, | ||
| PointerRNA * | ptr_storage, | ||
| PropertyRNA * | prop_dst, | ||
| PropertyRNA * | prop_src, | ||
| PropertyRNA * | prop_storage ) |
Validate that required data for a given operation are available.
Definition at line 4238 of file lib_override.cc.
References ATTR_FALLTHROUGH, BLI_assert_msg, PointerRNA::data, LIBOVERRIDE_OP_ADD, LIBOVERRIDE_OP_INSERT_AFTER, LIBOVERRIDE_OP_INSERT_BEFORE, LIBOVERRIDE_OP_MULTIPLY, LIBOVERRIDE_OP_NOOP, LIBOVERRIDE_OP_REPLACE, LIBOVERRIDE_OP_SUBTRACT, and IDOverrideLibraryPropertyOperation::operation.
Referenced by rna_property_override_operation_apply().
| bool BKE_lib_override_library_property_rna_path_change | ( | IDOverrideLibrary * | liboverride, |
| const char * | old_rna_path, | ||
| const char * | new_rna_path ) |
Change the RNA path of a library override on a property.
No-op if the property override cannot be found.
| from_rna_path | The RNA path of the property to change. |
| to_rna_path | The new RNA path. The library override system will copy the string to its own memory; the caller will retain ownership of the passed pointer. |
Definition at line 3946 of file lib_override.cc.
References BLI_ghash_insert(), BLI_ghash_popkey(), BLI_strdup(), MEM_SAFE_FREE, override_library_rna_path_mapping_ensure(), and IDOverrideLibraryProperty::rna_path.
Referenced by version_liboverride_nla_strip_frame_start_end().
| bool BKE_lib_override_library_property_search_and_delete | ( | IDOverrideLibrary * | liboverride, |
| const char * | rna_path ) |
Delete a property override from the given ID liboverride, if it exists.
Definition at line 3985 of file lib_override.cc.
References BLI_ghash_popkey(), lib_override_library_property_delete(), and override_library_rna_path_mapping_ensure().
Referenced by version_liboverride_nla_strip_frame_start_end().
| bool BKE_lib_override_library_resync | ( | Main * | bmain, |
| Scene * | scene, | ||
| ViewLayer * | view_layer, | ||
| ID * | id_root, | ||
| Collection * | override_resync_residual_storage, | ||
| bool | do_hierarchy_enforce, | ||
| BlendFileReadReport * | reports ) |
Advanced 'smart' function to resync, re-create fully functional overrides up-to-date with linked data, from an existing override hierarchy.
| view_layer | the active view layer to search instantiated collections in, can be NULL (in which case scene's master collection children hierarchy is used instead). |
| id_root | The root liboverride ID to resync from. |
| do_hierarchy_enforce | If true, enforce the liboverride hierarchy of dependencies to match the one from the reference linked data (i.e. if some manually override were applied to some ID pointers, they will be reset to the default reference value). |
Definition at line 2765 of file lib_override.cc.
References BKE_id_free(), BKE_main_namemap_destroy(), lib_override_cleanup_after_resync(), lib_override_library_resync(), LinkNode::link, LISTBASE_FOREACH_MUTABLE, Main::name_map_global, and ID::next.
Referenced by blender::ed::outliner::id_override_library_resync_hierarchy_process().
Check that status of local data-block is still valid against current reference one.
It means that all overridable, but not overridden, properties' local values must be equal to reference ones. Clears ID_TAG_LIBOVERRIDE_REFOK if they do not.
This is typically used to detect whether some property has been changed in local and a new #IDOverrideProperty (of #IDOverridePropertyOperation) has to be added.
Definition at line 4354 of file lib_override.cc.
References BKE_pose_ensure(), BLI_assert, Object::data, GS, ID_IS_OVERRIDE_LIBRARY_REAL, ID_OB, OB_ARMATURE, ID::override_library, IDOverrideLibrary::reference, RNA_id_pointer_create(), RNA_OVERRIDE_COMPARE_IGNORE_NON_OVERRIDABLE, RNA_OVERRIDE_COMPARE_IGNORE_OVERRIDDEN, RNA_struct_override_matches(), and Object::type.
Check that status of reference data-block is still valid against current local one.
It means that all non-overridden properties' local values must be equal to reference ones. Clears ID_TAG_LIBOVERRIDE_REFOK if they do not.
This is typically used to detect whether some reference has changed and local needs to be updated against it.
Definition at line 4400 of file lib_override.cc.
References BKE_lib_override_library_status_check_reference(), BKE_pose_ensure(), BLI_assert, Object::data, GS, ID_IS_OVERRIDE_LIBRARY_REAL, ID_OB, ID_TAG_LIBOVERRIDE_REFOK, OB_ARMATURE, ID::override_library, IDOverrideLibrary::reference, RNA_id_pointer_create(), RNA_OVERRIDE_COMPARE_IGNORE_OVERRIDDEN, RNA_struct_override_matches(), and Object::type.
Referenced by BKE_lib_override_library_status_check_reference().
Update given override from its reference (re-applying overridden properties).
Definition at line 4972 of file lib_override.cc.
References BKE_animdata_liboverride_post_process(), BKE_id_copy_ex(), BKE_id_free_ex(), BKE_key_from_id(), BKE_key_from_id_p(), BKE_lib_override_library_update(), BKE_main_namemap_remove_name(), BKE_pose_clear_pointers(), BLI_assert, DEG_id_tag_update_ex(), DEG_relations_tag_update(), ID::flag, Key::from, GS, Key::id, ID_AR, ID_FLAG_EMBEDDED_DATA_LIB_OVERRIDE, ID_IS_OVERRIDE_LIBRARY_REAL, ID_MISSING, ID_RECALC_ALL, ID_TAG_LIBOVERRIDE_REFOK, ID::lib, LIB_ID_COPY_DEFAULT, LIB_ID_COPY_NO_LIB_OVERRIDE_LOCAL_DATA_FLAG, LIB_ID_FREE_NO_NAMEMAP_REMOVE, LIB_ID_FREE_NO_UI_USER, lib_override_id_swap(), lib_override_object_posemode_transfer(), LISTBASE_FOREACH, ID::name, OB_ARMATURE, Main::objects, POSE_RECALC, RNA_id_pointer_create(), RNA_OVERRIDE_APPLY_FLAG_NOP, RNA_struct_override_apply(), and STRNCPY.
Referenced by BKE_blendfile_library_relocate(), BKE_lib_override_library_id_hierarchy_reset(), BKE_lib_override_library_id_reset(), BKE_lib_override_library_main_update(), and BKE_lib_override_library_update().
| void BKE_lib_override_library_validate | ( | Main * | bmain, |
| ID * | id, | ||
| ReportList * | reports ) |
Check against potential bmain.
Definition at line 4313 of file lib_override.cc.
References BKE_lib_override_library_get(), BKE_lib_override_library_make_local(), BLI_assert, ID_IS_OVERRIDE_LIBRARY_VIRTUAL, and override_library_is_valid().
Referenced by BKE_lib_override_library_main_validate().
| bool BKE_lib_override_rna_property_find | ( | PointerRNA * | idpoin, |
| const IDOverrideLibraryProperty * | library_prop, | ||
| PointerRNA * | r_override_poin, | ||
| PropertyRNA ** | r_override_prop, | ||
| int * | r_index ) |
Get the RNA-property matching the library_prop override property. Used for UI to query additional data about the overridden property (e.g. UI name).
| idpoin | Pointer to the override ID. |
| library_prop | The library override property to find the matching RNA property for. |
| r_index | The RNA array flat index (i.e. flattened index in case of multi-dimensional array properties). See RNA_path_resolve_full family of functions for details. |
Definition at line 3907 of file lib_override.cc.
References BLI_assert, PointerRNA::data, ID_IS_OVERRIDE_LIBRARY, IDOverrideLibraryProperty::rna_path, RNA_path_resolve_property_full(), RNA_struct_is_ID(), and PointerRNA::type.
Referenced by blender::ed::outliner::iterate_properties_to_display().
|
static |
Definition at line 378 of file lib_override.cc.
References LibraryIDLinkCallbackData::cb_flag, IDOverrideLibrary::hierarchy_root, ID_IS_OVERRIDE_LIBRARY_REAL, LibraryIDLinkCallbackData::id_pointer, IDWALK_CB_LOOPBACK, IDWALK_RET_NOP, IDWALK_RET_STOP_ITER, is_leaf(), ID::override_library, LibraryIDLinkCallbackData::owner_id, and LibraryIDLinkCallbackData::user_data.
Referenced by BKE_lib_override_library_is_hierarchy_leaf().
|
static |
Cleanup: Remove unused 'place holder' linked IDs.
Definition at line 2716 of file lib_override.cc.
References BKE_id_multi_tagged_delete(), BKE_lib_override_library_get(), BKE_lib_query_unused_ids_tag(), CLOG_INFO, LibQueryUnusedIDsData::do_local_ids, IDOverrideLibrary::hierarchy_root, ID_IS_LINKED, ID_IS_OVERRIDE_LIBRARY, ID_TAG_DOIT, ID_TAG_MISSING, INDEX_ID_NULL, LOG_RESYNC, ID::override_library, parameters, IDOverrideLibrary::reference, and ID::tag.
Referenced by BKE_lib_override_library_main_resync(), and BKE_lib_override_library_resync().
|
static |
Definition at line 865 of file lib_override.cc.
References BLI_ghash_new(), BLI_ghashutil_ptrcmp(), BLI_ghashutil_ptrhash(), BLI_memarena_new(), BLI_MEMARENA_STD_BUFSIZE, lib_override_group_tag_data_object_to_collection_init_collection_process(), and LISTBASE_FOREACH.
Referenced by BKE_lib_override_library_delete(), lib_override_library_create_do(), lib_override_library_main_resync_on_library_indirect_level(), and lib_override_library_resync().
|
static |
Definition at line 839 of file lib_override.cc.
References BLI_ghash_ensure_p(), BLI_linklist_append_arena(), BLI_memarena_calloc(), ID_IS_LINKED, and LISTBASE_FOREACH.
Referenced by lib_override_group_tag_data_object_to_collection_init().
|
static |
Definition at line 980 of file lib_override.cc.
References BLI_assert, BLI_ghash_lookup(), lib_override_hierarchy_dependencies_recursive_tag(), lib_override_hierarchy_dependencies_recursive_tag_from(), lib_override_hierarchy_dependencies_relationship_skip_check(), lib_override_hierarchy_dependencies_skip_check(), MAINIDRELATIONS_ENTRY_TAGS_PROCESSED_TO, Main::relations, MainIDRelations::relations_from_pointers, ID::tag, MainIDRelationsEntry::tags, and MainIDRelationsEntry::to_ids.
Referenced by lib_override_hierarchy_dependencies_recursive_tag(), lib_override_library_create_do(), lib_override_library_main_resync_on_library_indirect_level(), and lib_override_library_resync().
|
static |
Definition at line 933 of file lib_override.cc.
References BLI_assert, BLI_ghash_lookup(), MainIDRelationsEntry::from_ids, lib_override_hierarchy_dependencies_recursive_tag_from(), lib_override_hierarchy_dependencies_relationship_skip_check(), lib_override_hierarchy_dependencies_skip_check(), MAINIDRELATIONS_ENTRY_TAGS_PROCESSED_FROM, Main::relations, MainIDRelations::relations_from_pointers, ID::tag, and MainIDRelationsEntry::tags.
Referenced by lib_override_hierarchy_dependencies_recursive_tag(), and lib_override_hierarchy_dependencies_recursive_tag_from().
|
static |
Definition at line 882 of file lib_override.cc.
References IDWALK_CB_OVERRIDE_LIBRARY_NOT_OVERRIDABLE, and MainIDRelationsEntryItem::usage_flag.
Referenced by lib_override_hierarchy_dependencies_recursive_tag(), lib_override_hierarchy_dependencies_recursive_tag_from(), lib_override_library_id_hierarchy_recursive_reset(), lib_override_library_main_resync_on_library_indirect_level(), lib_override_linked_group_tag_recursive(), lib_override_overrides_group_tag_recursive(), lib_override_resync_tagging_finalize_recurse(), lib_override_resync_tagging_finalize_recursive_check_from(), lib_override_root_find(), and lib_override_root_hierarchy_set().
|
static |
Definition at line 894 of file lib_override.cc.
References BLI_assert_msg, ELEM, GS, HIERARCHY_BREAKING_ID_TYPES, ID_IS_OVERRIDE_LIBRARY, ID::lib, and ID::name.
Referenced by lib_override_hierarchy_dependencies_recursive_tag(), lib_override_hierarchy_dependencies_recursive_tag_from(), lib_override_linked_group_tag_recursive(), lib_override_overrides_group_tag_recursive(), lib_override_resync_tagging_finalize_recurse(), lib_override_root_find(), and lib_override_root_hierarchy_set().
Definition at line 4954 of file lib_override.cc.
References BKE_layer_collection_resync_allow(), BKE_layer_collection_resync_forbid(), BKE_lib_id_swap(), BKE_scene_view_layers_synced_ensure(), GS, ID_SCE, ID_TAG_LIBOVERRIDE_NEED_RESYNC, ID::name, and ID::tag.
Referenced by BKE_lib_override_library_update().
Define the temp_index of libraries from their highest level of indirect usage.
E.g. if lib_a uses lib_b, lib_c and lib_d, and lib_b also uses lib_d, then lib_a has an index of 1, lib_b and lib_c an index of 2, and lib_d an index of 3.
Definition at line 3638 of file lib_override.cc.
References BKE_library_foreach_ID_link(), FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, IDWALK_READONLY, lib_override_sort_libraries_func(), Main::libraries, and LISTBASE_FOREACH.
Referenced by BKE_lib_override_library_main_resync().
|
static |
Definition at line 1372 of file lib_override.cc.
References BKE_lib_override_library_create_from_tag(), BKE_main_namemap_destroy(), BKE_main_relations_create(), BKE_main_relations_free(), BKE_main_relations_tag_set(), BLI_assert, LibOverrideGroupTagData::bmain, ID_IS_OVERRIDE_LIBRARY_REAL, ID_TAG_DOIT, ID_TAG_MISSING, ID::lib, lib_override_group_tag_data_object_to_collection_init(), lib_override_hierarchy_dependencies_recursive_tag(), lib_override_linked_group_tag(), lib_override_overrides_group_tag(), MAINIDRELATIONS_ENTRY_TAGS_PROCESSED, Main::name_map_global, ID::override_library, IDOverrideLibrary::reference, and scene.
Referenced by BKE_lib_override_library_create().
|
static |
Definition at line 250 of file lib_override.cc.
References BKE_id_copy_in_lib(), BKE_key_from_id(), BKE_lib_override_library_init(), BKE_main_namemap_get_name(), BLI_assert, BLI_strncpy(), ID::flag, GS, Key::id, ID_FLAG_EMBEDDED_DATA_LIB_OVERRIDE, ID_IS_LINKED, id_sort_by_name(), id_us_min(), ID::lib, LIB_ID_COPY_DEFAULT, lib_id_copy_ensure_local(), LIB_ID_COPY_NO_LIB_OVERRIDE, LIB_ID_CREATE_NO_MAIN, MAX_ID_NAME, ID::name, STREQ, and which_libbase().
Referenced by BKE_lib_override_library_create_from_id(), and BKE_lib_override_library_create_from_tag().
|
static |
Definition at line 1442 of file lib_override.cc.
References ViewLayer::basact, BKE_collection_add_from_collection(), BKE_collection_add_from_object(), BKE_collection_has_collection(), BKE_collection_has_object(), BKE_collection_is_in_scene(), BKE_collection_object_add(), BKE_collection_object_add_from(), BKE_id_new(), BKE_main_collection_sync_remap(), BKE_scene_objects_as_gset(), BKE_scene_view_layers_synced_ensure(), BKE_view_layer_base_find(), BKE_view_layer_has_collection(), BKE_view_layer_synced_ensure(), BLI_assert, BLI_gset_free(), BLI_gset_lookup(), COLLECTION_HIDE_RENDER, COLLECTION_HIDE_VIEWPORT, Main::collections, DEG_id_tag_update(), DEG_id_tag_update_ex(), ELEM, Collection::flag, IDOverrideLibrary::flag, GS, IDOverrideLibrary::hierarchy_root, Collection::id, Object::id, ID_GR, ID_IS_LINKED, ID_IS_OVERRIDE_LIBRARY, ID_OB, ID_REAL_USERS, ID_RECALC_BASE_FLAGS, ID_RECALC_SELECT, ID_RECALC_TRANSFORM, id_us_min(), ID::lib, LIBOVERRIDE_FLAG_NO_HIERARCHY, LISTBASE_FOREACH, ID::name, ID::newid, Main::objects, ID::override_library, and IDOverrideLibrary::reference.
Referenced by BKE_lib_override_library_create(), BKE_lib_override_library_main_resync(), and lib_override_library_resync().
|
static |
Definition at line 4805 of file lib_override.cc.
References BLI_ghash_lookup_p(), ID_IS_OVERRIDE_LIBRARY_REAL, lib_override_hierarchy_dependencies_relationship_skip_check(), lib_override_library_id_hierarchy_recursive_reset(), lib_override_library_id_reset_do(), MAINIDRELATIONS_ENTRY_TAGS_PROCESSED, ID::override_library, Main::relations, MainIDRelations::relations_from_pointers, MainIDRelationsEntry::tags, and MainIDRelationsEntry::to_ids.
Referenced by BKE_lib_override_library_id_hierarchy_reset(), and lib_override_library_id_hierarchy_recursive_reset().
|
static |
Definition at line 4723 of file lib_override.cc.
References BKE_lib_override_library_property_delete(), BLI_assert, DEG_id_tag_update_ex(), ELEM, IDOverrideLibrary::flag, ID_RECALC_SYNC_TO_EVAL, LIBOVERRIDE_FLAG_SYSTEM_DEFINED, LIBOVERRIDE_TAG_NEEDS_RELOAD, LISTBASE_FOREACH_MUTABLE, ID::override_library, override_library_runtime_ensure(), PointerRNA::owner_id, PROP_COLLECTION, PROP_POINTER, IDOverrideLibrary::properties, ptr, IDOverrideLibrary::reference, RNA_path_resolve_property(), RNA_pointer_create(), RNA_property_pointer_get(), RNA_property_pointer_type(), RNA_property_type(), RNA_struct_is_ID(), IDOverrideLibraryRuntime::tag, and PointerRNA::type.
Referenced by BKE_lib_override_library_id_reset(), and lib_override_library_id_hierarchy_recursive_reset().
|
static |
Definition at line 3002 of file lib_override.cc.
References BLI_assert, IDOverrideLibrary::hierarchy_root, ID_IS_OVERRIDE_LIBRARY_REAL, ID_TAG_LIBOVERRIDE_NEED_RESYNC, ID_TAG_MISSING, lib_override_resync_id_lib_level_is_valid(), LIBOVERRIDE_FLAG_NO_HIERARCHY, ID::override_library, IDOverrideLibrary::reference, and ID::tag.
Referenced by lib_override_library_main_resync_on_library_indirect_level(), lib_override_resync_tagging_finalize(), and lib_override_resync_tagging_finalize_recursive_check_from().
|
static |
Definition at line 3270 of file lib_override.cc.
References BKE_id_free(), BKE_id_multi_tagged_delete(), BKE_lib_override_library_is_user_edited(), BKE_lib_override_library_main_hierarchy_root_ensure(), BKE_main_id_tag_all(), BKE_main_relations_create(), BKE_main_relations_free(), BKE_main_relations_tag_set(), BLI_assert, BLI_ghash_free(), BLI_ghash_haskey(), BLI_ghash_lookup(), BLI_ghash_ptr_new(), BLI_ghashIterator_done(), BLI_ghashIterator_free(), BLI_ghashIterator_getKey(), BLI_ghashIterator_getValue(), BLI_ghashIterator_new(), BLI_ghashIterator_step(), BLI_linklist_free(), BLI_linklist_index(), BLI_linklist_prepend(), BLI_listbase_clear(), BLI_time_now_seconds(), LibOverrideGroupTagData::bmain, CLOG_ERROR, CLOG_INFO, CLOG_WARN, BlendFileReadReport::count, BlendFileReadReport::do_resynced_lib_overrides_libraries_list, BlendFileReadReport::duration, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, ID_IS_LINKED, ID_IS_OVERRIDE_LIBRARY_REAL, ID_TAG_DOIT, ID_TAG_LIBOVERRIDE_NEED_RESYNC, ID_TAG_MISSING, LinkNodePair::last_node, ID::lib, lib_override_group_tag_data_object_to_collection_init(), lib_override_hierarchy_dependencies_recursive_tag(), lib_override_hierarchy_dependencies_relationship_skip_check(), lib_override_library_main_resync_id_skip_check(), lib_override_library_resync(), lib_override_linked_group_tag(), lib_override_resync_tagging_finalize(), BlendFileReadReport::lib_overrides_recursive_resync, LIBOVERRIDE_TAG_NEED_RESYNC_ORIGINAL, LIBOVERRIDE_TAG_RESYNC_ISOLATED_FROM_ROOT, LIBRARY_TAG_RESYNC_REQUIRED, LinkNode::link, LinkNodePair::list, LISTBASE_FOREACH_MUTABLE, LOG_RESYNC, MAINIDRELATIONS_ENTRY_TAGS_PROCESSED, MEM_freeN(), ID::name, override_library_runtime_ensure(), Main::relations, MainIDRelations::relations_from_pointers, BlendFileReadReport::resynced_lib_overrides, BlendFileReadReport::resynced_lib_overrides_libraries, BlendFileReadReport::resynced_lib_overrides_libraries_count, Library::runtime, scene, ID::tag, IDOverrideLibraryRuntime::tag, Library_Runtime::tag, and MainIDRelationsEntry::to_ids.
Referenced by BKE_lib_override_library_main_resync().
|
static |
Definition at line 4452 of file lib_override.cc.
References BKE_pose_ensure(), BLI_assert, CLOG_INFO, Object::data, GS, ID_IS_LINKED, ID_IS_OVERRIDE_LIBRARY_REAL, ID_MISSING, ID_OB, LOG, OB_ARMATURE, RNA_id_pointer_create(), RNA_OVERRIDE_MATCH_RESULT_CREATED, RNA_OVERRIDE_MATCH_RESULT_INIT, RNA_OVERRIDE_MATCH_RESULT_RESTORE_TAGGED, RNA_OVERRIDE_MATCH_RESULT_RESTORED, RNA_struct_override_matches(), and Object::type.
Referenced by BKE_lib_override_library_operations_create(), and lib_override_library_operations_create_cb().
|
static |
Definition at line 4570 of file lib_override.cc.
References atomic_fetch_and_or_uint32(), BLI_task_pool_user_data(), LibOverrideOpCreateData::bmain, lib_override_library_operations_create(), LibOverrideOpCreateData::report_flags, RNA_OVERRIDE_COMPARE_CREATE, RNA_OVERRIDE_COMPARE_TAG_FOR_RESTORE, and RNA_OVERRIDE_MATCH_RESULT_INIT.
Referenced by BKE_lib_override_library_main_operations_create().
|
static |
Definition at line 3934 of file lib_override.cc.
References BLI_assert, BLI_freelistN(), lib_override_library_property_operation_clear(), LISTBASE_FOREACH, MEM_freeN(), IDOverrideLibraryProperty::operations, and IDOverrideLibraryProperty::rna_path.
Referenced by BKE_lib_override_library_clear(), and lib_override_library_property_delete().
|
static |
Definition at line 3918 of file lib_override.cc.
References BLI_duplicatelist(), BLI_strdup(), ListBase::first, lib_override_library_property_operation_copy(), IDOverrideLibraryProperty::operations, and IDOverrideLibraryProperty::rna_path.
Referenced by BKE_lib_override_library_copy(), and lib_override_library_resync().
|
static |
Definition at line 3969 of file lib_override.cc.
References BLI_freelinkN(), BLI_ghash_remove(), ELEM, lib_override_library_property_clear(), IDOverrideLibrary::properties, IDOverrideLibraryProperty::rna_path, IDOverrideLibraryRuntime::rna_path_to_override_properties, and IDOverrideLibrary::runtime.
Referenced by BKE_lib_override_library_property_delete(), and BKE_lib_override_library_property_search_and_delete().
|
static |
Definition at line 4220 of file lib_override.cc.
References MEM_freeN(), IDOverrideLibraryPropertyOperation::subitem_local_name, and IDOverrideLibraryPropertyOperation::subitem_reference_name.
Referenced by BKE_lib_override_library_property_operation_delete(), lib_override_library_property_clear(), and lib_override_library_resync().
|
static |
Definition at line 4209 of file lib_override.cc.
References BLI_strdup(), IDOverrideLibraryPropertyOperation::subitem_local_name, and IDOverrideLibraryPropertyOperation::subitem_reference_name.
Referenced by lib_override_library_property_copy().
|
static |
Definition at line 1959 of file lib_override.cc.
References blender::bke::id::IDRemapper::add(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BKE_libblock_relink_multiple(), BKE_libblock_remap_multiple(), BLI_assert, BLI_ghash_lookup(), BLI_ghashIterator_getKey(), BLI_ghashIterator_getValue(), GHASH_ITER, ID_REMAP_FORCE_NEVER_NULL_USAGE, ID_REMAP_FORCE_USER_REFCOUNT, ID_REMAP_SKIP_OVERRIDE_LIBRARY, ID_REMAP_TYPE_REMAP, ID_TAG_NO_MAIN, ID::lib, ID::newid, ID::tag, and UNUSED_VARS_NDEBUG.
Referenced by lib_override_library_resync().
|
static |
ID_IS_LINKED(id_override_new) ||
Definition at line 2106 of file lib_override.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BKE_id_multi_tagged_delete(), BKE_key_from_id(), BKE_key_from_id_p(), BKE_lib_override_library_create_from_tag(), BKE_lib_override_library_get(), BKE_lib_override_library_is_user_edited(), BKE_lib_override_library_property_delete(), BKE_libblock_management_main_add(), BKE_libblock_relink_multiple(), BKE_main_collection_sync(), BKE_main_id_newptr_and_tag_clear(), BKE_main_id_tag_all(), BKE_main_relations_create(), BKE_main_relations_free(), BKE_main_relations_tag_set(), BKE_reportf(), BKE_scene_view_layers_synced_ensure(), BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), BLI_addtail(), BLI_assert, BLI_duplicatelist(), BLI_findindex(), BLI_freelinkN(), BLI_ghash_free(), BLI_ghash_haskey(), BLI_ghash_insert(), BLI_ghash_lookup(), BLI_ghash_new(), BLI_ghashutil_ptrcmp(), BLI_ghashutil_ptrhash(), BLI_insertlinkreplace(), BLI_listbase_is_empty(), LibOverrideGroupTagData::bmain, blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), CLOG_ERROR, CLOG_INFO, CLOG_WARN, ListBase::first, IDOverrideLibrary::flag, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, FOREACH_MAIN_LISTBASE_BEGIN, FOREACH_MAIN_LISTBASE_END, FOREACH_MAIN_LISTBASE_ID_BEGIN, FOREACH_MAIN_LISTBASE_ID_END, GS, IDOverrideLibrary::hierarchy_root, Key::id, Object::id, id_fake_user_set(), ID_FLAG_LIB_OVERRIDE_RESYNC_LEFTOVER, ID_GR, ID_IS_LINKED, ID_IS_OVERRIDE_LIBRARY, ID_IS_OVERRIDE_LIBRARY_REAL, ID_KE, ID_NT, ID_OB, ID_REMAP_FORCE_NEVER_NULL_USAGE, ID_REMAP_FORCE_USER_REFCOUNT, ID_REMAP_TYPE_CLEANUP, ID_SCE, ID_TAG_DOIT, ID_TAG_INDIRECT, ID_TAG_LIBOVERRIDE_NEED_RESYNC, ID_TAG_MISSING, ID_TAG_NO_MAIN, ID_TAG_NO_USER_REFCOUNT, ID::lib, lib_override_group_tag_data_object_to_collection_init(), lib_override_hierarchy_dependencies_recursive_tag(), lib_override_library_create_post_process(), lib_override_library_property_copy(), lib_override_library_property_operation_clear(), lib_override_library_remap(), lib_override_library_resync_build_missing_ids_data(), lib_override_library_resync_search_missing_ids_data(), lib_override_linked_group_tag(), lib_override_object_posemode_transfer(), lib_override_overrides_group_tag(), LIBOVERRIDE_OP_FLAG_IDPOINTER_MATCH_REFERENCE, LISTBASE_FOREACH_MUTABLE, LOG_RESYNC, MAINIDRELATIONS_ENTRY_TAGS_PROCESSED, MAX_ID_NAME, ID::name, ID::newid, IDOverrideLibraryProperty::next, LinkNode::next, blender::bke::node_tree_from_id(), OB_DATA_SUPPORT_ID, ID::override_library, Object::parent, IDOverrideLibrary::properties, IDOverrideLibrary::reference, BlendFileReadReport::reports, RNA_id_pointer_create(), RNA_OVERRIDE_APPLY_FLAG_IGNORE_ID_POINTERS, RNA_OVERRIDE_APPLY_FLAG_NOP, RNA_struct_override_apply(), RPT_ERROR, RPT_WARNING, scene, and ID::tag.
Referenced by BKE_lib_override_library_resync(), and lib_override_library_main_resync_on_library_indirect_level().
|
static |
Definition at line 2067 of file lib_override.cc.
References FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, ID_IS_LINKED, ID_TAG_LIBOVERRIDE_NEED_RESYNC, ID_TAG_MISSING, lib_override_library_resync_missing_id_key(), and ID::tag.
Referenced by lib_override_library_resync().
|
static |
Definition at line 2053 of file lib_override.cc.
References BLI_assert.
Referenced by lib_override_library_resync_build_missing_ids_data(), and lib_override_library_resync_search_missing_ids_data().
|
static |
Definition at line 2090 of file lib_override.cc.
References lib_override_library_resync_missing_id_key().
Referenced by lib_override_library_resync().
|
static |
Definition at line 1170 of file lib_override.cc.
References BKE_main_relations_tag_set(), BLI_assert, BLI_ghash_lookup(), Collection::id, ID_IS_LINKED, ID_TAG_MISSING, ID::lib, lib_override_linked_group_tag_clear_boneshapes_objects(), lib_override_linked_group_tag_recursive(), LinkNodePair::list, LISTBASE_FOREACH, MAINIDRELATIONS_ENTRY_TAGS_PROCESSED, Main::objects, and ID::tag.
Referenced by lib_override_library_create_do(), lib_override_library_main_resync_on_library_indirect_level(), and lib_override_library_resync().
|
static |
Definition at line 1117 of file lib_override.cc.
References Main::collections, ID_TAG_MISSING, ID::lib, lib_override_linked_group_tag_collections_keep_tagged_check_recursive(), LISTBASE_FOREACH, OB_ARMATURE, and Main::objects.
Referenced by lib_override_linked_group_tag().
|
static |
Definition at line 1079 of file lib_override.cc.
References lib_override_linked_group_tag_collections_keep_tagged_check_recursive(), and CollectionChild::next.
Referenced by lib_override_linked_group_tag_clear_boneshapes_objects(), and lib_override_linked_group_tag_collections_keep_tagged_check_recursive().
|
static |
Definition at line 1029 of file lib_override.cc.
References BLI_assert, BLI_ghash_lookup(), ID_IS_LINKED, ID_TAG_MISSING, IDWALK_CB_OVERRIDE_LIBRARY_HIERARCHY_DEFAULT, lib_override_hierarchy_dependencies_relationship_skip_check(), lib_override_hierarchy_dependencies_skip_check(), lib_override_linked_group_tag_recursive(), MAINIDRELATIONS_ENTRY_TAGS_PROCESSED, Main::relations, MainIDRelations::relations_from_pointers, ID::tag, MainIDRelationsEntry::tags, and MainIDRelationsEntry::to_ids.
Referenced by lib_override_linked_group_tag(), and lib_override_linked_group_tag_recursive().
| BLI_INLINE void lib_override_object_posemode_transfer | ( | ID * | id_dst, |
| ID * | id_src ) |
Helper to preserve Pose mode on override objects. A bit annoying to have this special case, but not much to be done here currently, since the matching RNA property is read-only.
Definition at line 103 of file lib_override.cc.
References GS, ID_OB, Object::mode, ID::name, OB_ARMATURE, OB_MODE_POSE, Object::restore_mode, and Object::type.
Referenced by BKE_lib_override_library_update(), and lib_override_library_resync().
|
static |
Definition at line 1354 of file lib_override.cc.
References BLI_assert, ID_IS_OVERRIDE_LIBRARY_REAL, ID_TAG_MISSING, lib_override_overrides_group_tag_recursive(), ID::override_library, IDOverrideLibrary::reference, ID::tag, and UNUSED_VARS_NDEBUG.
Referenced by BKE_lib_override_library_delete(), lib_override_library_create_do(), and lib_override_library_resync().
|
static |
Definition at line 1289 of file lib_override.cc.
References BKE_lib_override_library_get(), BLI_assert, BLI_ghash_lookup(), IDOverrideLibrary::flag, IDOverrideLibrary::hierarchy_root, ID_IS_OVERRIDE_LIBRARY, ID_IS_OVERRIDE_LIBRARY_REAL, ID_TAG_MISSING, ID::lib, lib_override_hierarchy_dependencies_relationship_skip_check(), lib_override_hierarchy_dependencies_skip_check(), lib_override_overrides_group_tag_recursive(), LIBOVERRIDE_FLAG_NO_HIERARCHY, MAINIDRELATIONS_ENTRY_TAGS_PROCESSED, ID::override_library, IDOverrideLibrary::reference, Main::relations, MainIDRelations::relations_from_pointers, ID::tag, MainIDRelationsEntry::tags, and MainIDRelationsEntry::to_ids.
Referenced by lib_override_overrides_group_tag(), and lib_override_overrides_group_tag_recursive().
|
static |
Definition at line 473 of file lib_override.cc.
References BKE_key_from_id(), BLI_assert, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, GS, Key::id, ID_IS_OVERRIDE_LIBRARY_REAL, ID_KE, ID::name, and ID::newid.
Referenced by BKE_lib_override_library_create_from_tag().
|
static |
Definition at line 497 of file lib_override.cc.
References blender::bke::id::IDRemapper::add(), BKE_key_from_id(), BLI_assert, Key::id, and ID::newid.
Referenced by BKE_lib_override_library_create_from_tag().
|
static |
Definition at line 2802 of file lib_override.cc.
References ID_IS_LINKED.
Referenced by lib_override_library_main_resync_id_skip_check(), and lib_override_resync_tagging_finalize_recurse().
|
static |
Definition at line 3099 of file lib_override.cc.
References BKE_main_relations_tag_set(), BLI_assert, BLI_ghash_ensure_p(), BLI_ghash_lookup(), BLI_linklist_append(), CLOG_INFO, ELEM, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, IDOverrideLibrary::hierarchy_root, ID_TAG_LIBOVERRIDE_NEED_RESYNC, ID::lib, lib_override_library_main_resync_id_skip_check(), lib_override_resync_tagging_finalize_recurse(), lib_override_resync_tagging_finalize_recursive_check_from(), LIBOVERRIDE_TAG_RESYNC_ISOLATED_FROM_ROOT, LOG_RESYNC, MAINIDRELATIONS_ENTRY_TAGS_DOIT, MAINIDRELATIONS_ENTRY_TAGS_INPROGRESS, MAINIDRELATIONS_ENTRY_TAGS_PROCESSED, ID::name, ID::override_library, override_library_runtime_ensure(), Main::relations, MainIDRelations::relations_from_pointers, IDOverrideLibrary::runtime, ID::tag, IDOverrideLibraryRuntime::tag, and MainIDRelationsEntry::tags.
Referenced by lib_override_library_main_resync_on_library_indirect_level().
|
static |
Definition at line 2822 of file lib_override.cc.
References BKE_lib_override_library_get(), BLI_assert, BLI_assert_msg, BLI_ghash_lookup(), CLOG_ERROR, CLOG_INFO, Library::filepath, IDOverrideLibrary::hierarchy_root, ID_IS_OVERRIDE_LIBRARY_REAL, ID_TAG_LIBOVERRIDE_NEED_RESYNC, ID::lib, lib_override_hierarchy_dependencies_relationship_skip_check(), lib_override_hierarchy_dependencies_skip_check(), lib_override_resync_id_lib_level_is_valid(), lib_override_resync_tagging_finalize_recurse(), LOG, LOG_RESYNC, MAINIDRELATIONS_ENTRY_TAGS_DOIT, MAINIDRELATIONS_ENTRY_TAGS_INPROGRESS, MAINIDRELATIONS_ENTRY_TAGS_PROCESSED, ID::name, ID::override_library, Main::relations, MainIDRelations::relations_from_pointers, IDOverrideLibrary::runtime, Library::runtime, ID::tag, IDOverrideLibraryRuntime::tag, MainIDRelationsEntry::tags, Library_Runtime::temp_index, and MainIDRelationsEntry::to_ids.
Referenced by lib_override_resync_tagging_finalize(), and lib_override_resync_tagging_finalize_recurse().
|
static |
Clear 'unreachable' tag of existing liboverrides if they are using another reachable liboverride (typical case: Mesh object which only relationship to the rest of the liboverride hierarchy is through its 'parent' pointer (i.e. rest of the hierarchy has no actual relationship to this mesh object).
Logic and rational of this function are very similar to these of lib_override_hierarchy_dependencies_recursive_tag_from, but withing specific resync context.
Definition at line 3048 of file lib_override.cc.
References BLI_assert, BLI_ghash_lookup(), lib_override_hierarchy_dependencies_relationship_skip_check(), lib_override_library_main_resync_id_skip_check(), lib_override_resync_tagging_finalize_recursive_check_from(), LIBOVERRIDE_TAG_RESYNC_ISOLATED_FROM_ROOT, MAINIDRELATIONS_ENTRY_TAGS_PROCESSED_TO, ID::override_library, Main::relations, MainIDRelations::relations_from_pointers, IDOverrideLibrary::runtime, IDOverrideLibraryRuntime::tag, MainIDRelationsEntry::tags, and MainIDRelationsEntry::to_ids.
Referenced by lib_override_resync_tagging_finalize(), and lib_override_resync_tagging_finalize_recursive_check_from().
|
static |
Definition at line 1694 of file lib_override.cc.
References BKE_lib_override_library_get(), BLI_assert, BLI_assert_unreachable, BLI_ghash_lookup(), CLOG_ERROR, ID::flag, MainIDRelationsEntry::from_ids, ID_FLAG_EMBEDDED_DATA_LIB_OVERRIDE, ID_IS_OVERRIDE_LIBRARY, ID_IS_OVERRIDE_LIBRARY_REAL, lib_override_hierarchy_dependencies_relationship_skip_check(), lib_override_hierarchy_dependencies_skip_check(), lib_override_root_find(), LOG, MAINIDRELATIONS_ENTRY_TAGS_INPROGRESS, MAINIDRELATIONS_ENTRY_TAGS_PROCESSED, Main::relations, MainIDRelations::relations_from_pointers, and MainIDRelationsEntry::tags.
Referenced by BKE_lib_override_library_main_hierarchy_root_ensure(), and lib_override_root_find().
|
static |
Definition at line 1781 of file lib_override.cc.
References BLI_assert, BLI_ghash_lookup(), CLOG_INFO, CLOG_WARN, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), MainIDRelationsEntry::from_ids, ID_IS_OVERRIDE_LIBRARY_REAL, IDWALK_CB_OVERRIDE_LIBRARY_NOT_OVERRIDABLE, lib_override_hierarchy_dependencies_relationship_skip_check(), lib_override_hierarchy_dependencies_skip_check(), lib_override_root_hierarchy_set(), LOG, ID::name, ID::override_library, IDOverrideLibrary::reference, Main::relations, MainIDRelations::relations_from_pointers, and MainIDRelationsEntry::to_ids.
Referenced by BKE_lib_override_library_main_hierarchy_root_ensure(), and lib_override_root_hierarchy_set().
|
static |
Definition at line 3591 of file lib_override.cc.
References LibraryIDLinkCallbackData::cb_flag, CLOG_ERROR, CLOG_WARN, Library::filepath, ID_IS_LINKED, LibraryIDLinkCallbackData::id_pointer, IDWALK_CB_LOOPBACK, IDWALK_RET_NOP, ID::lib, LOG_RESYNC, ID::name, LibraryIDLinkCallbackData::owner_id, Library::runtime, Library_Runtime::temp_index, and LibraryIDLinkCallbackData::user_data.
Referenced by lib_override_libraries_index_define().
|
static |
Definition at line 4008 of file lib_override.cc.
References BLI_findstring_ptr(), BLI_listbase_findafter_string_ptr(), IDOverrideLibraryPropertyOperation::flag, LIBOVERRIDE_OP_FLAG_IDPOINTER_ITEM_USE_ID, and STREQ.
Referenced by BKE_lib_override_library_property_operation_find().
|
static |
Definition at line 4276 of file lib_override.cc.
References BKE_reportf(), ID_IS_LINKED, ID::name, IDOverrideLibrary::reference, RPT_ERROR, and RPT_WARNING.
Referenced by BKE_lib_override_library_validate().
| BLI_INLINE GHash * override_library_rna_path_mapping_ensure | ( | IDOverrideLibrary * | liboverride | ) |
Definition at line 3857 of file lib_override.cc.
References BLI_ghash_insert(), BLI_ghash_new(), BLI_ghashutil_strcmp(), BLI_ghashutil_strhash_p_murmur(), ListBase::first, override_library_runtime_ensure(), IDOverrideLibrary::properties, and IDOverrideLibraryRuntime::rna_path_to_override_properties.
Referenced by BKE_lib_override_library_property_find(), BKE_lib_override_library_property_get(), BKE_lib_override_library_property_rna_path_change(), and BKE_lib_override_library_property_search_and_delete().
| BLI_INLINE IDOverrideLibraryRuntime * override_library_runtime_ensure | ( | IDOverrideLibrary * | liboverride | ) |
Definition at line 89 of file lib_override.cc.
References IDOverrideLibrary::runtime.
Referenced by lib_override_library_id_reset_do(), lib_override_library_main_resync_on_library_indirect_level(), lib_override_resync_tagging_finalize(), and override_library_rna_path_mapping_ensure().
|
static |
Definition at line 77 of file lib_override.cc.
Referenced by BKE_lib_override_library_main_hierarchy_root_ensure(), lib_override_library_operations_create(), lib_override_resync_tagging_finalize_recurse(), lib_override_root_find(), and lib_override_root_hierarchy_set().
|
static |
Definition at line 78 of file lib_override.cc.
Referenced by BKE_lib_override_library_main_resync(), lib_override_cleanup_after_resync(), lib_override_library_main_resync_on_library_indirect_level(), lib_override_library_resync(), lib_override_resync_tagging_finalize(), lib_override_resync_tagging_finalize_recurse(), and lib_override_sort_libraries_func().