diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-09-02 13:14:51 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-09-02 19:39:08 +0300 |
commit | 64efbbca8e24664e9105a4c2db02ccafb45a8b16 (patch) | |
tree | 01e433c713c502b9c4bbaf64797058b7e56c0a25 /source/blender/makesrna/intern/rna_access.c | |
parent | 283d96de1170f7c42a43bde4e30fdb438939978f (diff) |
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.
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index bc015a378cc..531c2ef2003 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -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; |