[Bf-blender-cvs] [be40d86e35b] master: Fix (unreported) private/embedded IDs being added to `bpy.data.user_map()` dict.
Bastien Montagne
noreply at git.blender.org
Thu Feb 13 16:23:59 CET 2020
Commit: be40d86e35b1a6387a60843aabe9b08cf7011806
Author: Bastien Montagne
Date: Thu Feb 13 16:23:23 2020 +0100
Branches: master
https://developer.blender.org/rBbe40d86e35b1a6387a60843aabe9b08cf7011806
Fix (unreported) private/embedded IDs being added to `bpy.data.user_map()` dict.
We do not want those here.
===================================================================
M source/blender/python/intern/bpy_rna_id_collection.c
===================================================================
diff --git a/source/blender/python/intern/bpy_rna_id_collection.c b/source/blender/python/intern/bpy_rna_id_collection.c
index a711d223cdf..e1d5c358ba5 100644
--- a/source/blender/python/intern/bpy_rna_id_collection.c
+++ b/source/blender/python/intern/bpy_rna_id_collection.c
@@ -98,6 +98,12 @@ static int foreach_libblock_id_user_map_callback(LibraryIDLinkCallbackData *cb_d
return IDWALK_RET_NOP;
}
+ if (cb_flag & IDWALK_CB_PRIVATE) {
+ /* We skip private pointers themselves, like root node trees, we'll 'link' their own ID
+ * pointers to their 'ID owner' instead. */
+ return IDWALK_RET_NOP;
+ }
+
PyObject *key = pyrna_id_CreatePyObject(*id_p);
PyObject *set;
More information about the Bf-blender-cvs
mailing list