Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2016-09-15 12:12:31 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-09-15 12:28:53 +0300
commita2a5ae5b54713d59287aebf189428270feddbb23 (patch)
tree2cf16b08fbc889b0ab1e71441814d12efa2e6d3b /source/blender/python
parent21e9db9cf190d77c8aa9d71f9692f9adbe39cbc2 (diff)
Fix Py's IDs user mapping: do not consider ShapeKeys' from here.
This is internal pointer helper for scene evaluation and tools, though exposed to bpy API, it can give false 'dependency cycles' in bpy.data.user_map() results. That's followup to rBe007552442634 really, both should be backported to 2.78
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/intern/bpy_rna_id_collection.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_rna_id_collection.c b/source/blender/python/intern/bpy_rna_id_collection.c
index 95c2b3ac8f5..1037c83815c 100644
--- a/source/blender/python/intern/bpy_rna_id_collection.c
+++ b/source/blender/python/intern/bpy_rna_id_collection.c
@@ -40,7 +40,9 @@
#include "BKE_library_query.h"
#include "DNA_ID.h"
+/* Those folowing are only to support hack of not listing some internal 'backward' pointers in generated user_map... */
#include "DNA_object_types.h"
+#include "DNA_key_types.h"
#include "bpy_util.h"
#include "bpy_rna_id_collection.h"
@@ -98,6 +100,10 @@ static int foreach_libblock_id_user_map_callback(
/* We skip proxy_from here, since it some internal pointer which is not irrelevant info for py/API level. */
return IDWALK_RET_NOP;
}
+ else if ((GS(self_id->name) == ID_KE) && (id_p == (ID **)&((Key *)self_id)->from)) {
+ /* We skip from here, since it some internal pointer which is not irrelevant info for py/API level. */
+ return IDWALK_RET_NOP;
+ }
/* pyrna_struct_hash() uses ptr.data only,
* but pyrna_struct_richcmp() uses also ptr.type,