Commit: 439ccca1e0b7078f3055ec14a7c81e964594ae6b
Author: Bastien Montagne
Date:   Mon Jul 11 19:09:46 2016 +0200
Branches: master
https://developer.blender.org/rB439ccca1e0b7078f3055ec14a7c81e964594ae6b

Add an exception/hack to new BKE_id_expand_local(), to ignore actions datablock 
in its usercount handling.

Reason is, typically those actions datablock usercounts have already been 
adjusted in BKE_animdata_copy()
(called by generic iddata copy function).

Think this needs to be reworked a bit too, there are way too much ways to copy 
animdata currently,
it's rather confusing. But not the goal here, so for now we'll live with the 
hack!

===================================================================

M       source/blender/blenkernel/intern/library.c

===================================================================

diff --git a/source/blender/blenkernel/intern/library.c 
b/source/blender/blenkernel/intern/library.c
index fc584e1..678ac66 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -257,7 +257,11 @@ static int id_expand_local_callback(void *user_data, 
struct ID *UNUSED(id_self),
 
        /* We tag all ID usages as extern, and increase usercount in case it 
was requested. */
        if (*id_pointer) {
-               if (do_user_count && (cd_flag & IDWALK_USER)) {
+               if (do_user_count && (cd_flag & IDWALK_USER) &&
+                   /* XXX This is a hack - animdata copying needs a good check 
and cleanup, it's done with way too much
+                    * various functions currently, so for now we assume 
actions' usercount is already handled here... */
+                   (GS((*id_pointer)->name) != ID_AC))
+               {
                        id_us_plus(*id_pointer);
                }
                else {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to