Optimization: pass Main to BKE_library_foreach_ID_link() and use its relations.
Use Main->relations in BKE_library_foreach_ID_link(), when possible (i.e. IDWALK_READONLY is set), and if the data is available of course. This is quite minor optimization, no sensible improvements are expected, but does not hurt either to avoid potentially tens of looping over e.g. objects constraints and modifiers, or heap of drivers...
This commit is contained in:
@@ -1204,7 +1204,7 @@ void BKE_object_make_local_ex(Main *bmain, Object *ob, const bool lib_local, con
|
||||
if (lib_local || is_local) {
|
||||
if (!is_lib) {
|
||||
id_clear_lib_data(bmain, &ob->id);
|
||||
BKE_id_expand_local(&ob->id);
|
||||
BKE_id_expand_local(bmain, &ob->id);
|
||||
if (clear_proxy) {
|
||||
if (ob->proxy_from != NULL) {
|
||||
ob->proxy_from->proxy = NULL;
|
||||
|
||||
Reference in New Issue
Block a user