Commit: b91aea60964e8f01b2ed269734bc2700659fcbb1
Author: Bastien Montagne
Date:   Tue Jul 26 15:12:43 2016 +0200
Branches: master
https://developer.blender.org/rBb91aea60964e8f01b2ed269734bc2700659fcbb1

Fix issues in ID usages checks - we are not interested in self-usages here.

Drivers or constraints referencing self object could break deletion of proxy 
objects
(due to their ambiguous, half-local, half-linked status).

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

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

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

diff --git a/source/blender/blenkernel/intern/library_query.c 
b/source/blender/blenkernel/intern/library_query.c
index 1ded6f6..2f83547 100644
--- a/source/blender/blenkernel/intern/library_query.c
+++ b/source/blender/blenkernel/intern/library_query.c
@@ -1015,6 +1015,10 @@ static bool library_ID_is_used(Main *bmain, void *idv, 
const bool check_linked)
                }
 
                for (; id_curr && !is_defined; id_curr = id_curr->next) {
+                       if (id_curr == id) {
+                               /* We are not interested in self-usages (mostly 
from drivers or bone constraints...). */
+                               continue;
+                       }
                        iter.curr_id = id_curr;
                        BKE_library_foreach_ID_link(
                                    id_curr, 
foreach_libblock_id_users_callback, &iter, IDWALK_NOP);
@@ -1063,6 +1067,10 @@ void BKE_library_ID_test_usages(Main *bmain, void *idv, 
bool *is_used_local, boo
                }
 
                for (; id_curr && !is_defined; id_curr = id_curr->next) {
+                       if (id_curr == id) {
+                               /* We are not interested in self-usages (mostly 
from drivers or bone constraints...). */
+                               continue;
+                       }
                        iter.curr_id = id_curr;
                        BKE_library_foreach_ID_link(id_curr, 
foreach_libblock_id_users_callback, &iter, IDWALK_NOP);

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

Reply via email to