Make Scene Master collection 'Private' ID data, like root nodetrees.
Same issue here as with root nodetrees, those are private ID data owned by another ID, and not in Main DB. This requires special handling. there are still quiet a few things to do here, like getting rid of special code for master collection (regular ID copying should handle that just as it already does for root nodetrees), cleanup in ID copying code, etc.
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
#include "BLT_translation.h"
|
||||
|
||||
#include "BKE_animsys.h"
|
||||
#include "BKE_collection.h"
|
||||
#include "BKE_context.h"
|
||||
#include "BKE_idcode.h"
|
||||
#include "BKE_idprop.h"
|
||||
@@ -5778,6 +5779,11 @@ ID *RNA_find_real_ID_and_path(Main *bmain, ID *id, const char **r_path)
|
||||
*r_path = "node_tree";
|
||||
}
|
||||
return BKE_node_tree_find_owner_ID(bmain, (bNodeTree *)id);
|
||||
case ID_GR:
|
||||
if (r_path) {
|
||||
*r_path = "collection";
|
||||
}
|
||||
return (ID *)BKE_collection_master_scene_search(bmain, (Collection *)id);
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user