[Bf-blender-cvs] [e9ae916] alembic: Removed unused function for constructing a list of objects used by a cache library.

Lukas Tönne noreply at git.blender.org
Tue Apr 28 09:46:39 CEST 2015


Commit: e9ae916750d7c4b78cd5150423253e24aabaa7e1
Author: Lukas Tönne
Date:   Mon Apr 27 19:24:31 2015 +0200
Branches: alembic
https://developer.blender.org/rBe9ae916750d7c4b78cd5150423253e24aabaa7e1

Removed unused function for constructing a list of objects used by a
cache library.

This was no longer how cache libraries are used anyway, they now cache
based on duplilists, which can be more than recursive groups.

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

M	source/blender/blenkernel/BKE_cache_library.h
M	source/blender/blenkernel/intern/cache_library.c

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

diff --git a/source/blender/blenkernel/BKE_cache_library.h b/source/blender/blenkernel/BKE_cache_library.h
index a3a2485..431f8d8 100644
--- a/source/blender/blenkernel/BKE_cache_library.h
+++ b/source/blender/blenkernel/BKE_cache_library.h
@@ -57,8 +57,6 @@ struct CacheLibrary *BKE_cache_library_copy(struct CacheLibrary *cachelib);
 void BKE_cache_library_free(struct CacheLibrary *cachelib);
 void BKE_cache_library_unlink(struct CacheLibrary *cachelib);
 
-void BKE_cache_library_make_object_list(struct Main *bmain, struct CacheLibrary *cachelib, struct ListBase *lb);
-
 const char *BKE_cache_item_name_prefix(int type);
 void BKE_cache_item_name(struct Object *ob, int type, int index, char *name);
 int BKE_cache_item_name_length(struct Object *ob, int type, int index);
diff --git a/source/blender/blenkernel/intern/cache_library.c b/source/blender/blenkernel/intern/cache_library.c
index 3e12a23..53a5e35 100644
--- a/source/blender/blenkernel/intern/cache_library.c
+++ b/source/blender/blenkernel/intern/cache_library.c
@@ -132,54 +132,6 @@ void BKE_cache_library_unlink(CacheLibrary *UNUSED(cachelib))
 
 /* ========================================================================= */
 
-static void cache_library_tag_recursive(int level, Object *ob)
-{
-	if (level > MAX_CACHE_GROUP_LEVEL)
-		return;
-	
-	/* dupli group recursion */
-	if ((ob->transflag & OB_DUPLIGROUP) && ob->dup_group) {
-		GroupObject *gob;
-		
-		for (gob = ob->dup_group->gobject.first; gob; gob = gob->next) {
-			if (!(ob->id.flag & LIB_DOIT)) {
-				ob->id.flag |= LIB_DOIT;
-				
-				cache_library_tag_recursive(level + 1, gob->ob);
-			}
-		}
-	}
-}
-
-/* tag IDs contained in the cache library group */
-void BKE_cache_library_make_object_list(Main *bmain, CacheLibrary *cachelib, ListBase *lb)
-{
-	if (cachelib) {
-		Object *ob;
-		LinkData *link;
-		
-		/* clear tags */
-		BKE_main_id_tag_idcode(bmain, ID_OB, false);
-		
-		for (ob = bmain->object.first; ob; ob = ob->id.next) {
-			if (ob->cache_library == cachelib) {
-				cache_library_tag_recursive(0, ob);
-			}
-		}
-		
-		/* store object pointers in the list */
-		for (ob = bmain->object.first; ob; ob = ob->id.next) {
-			if (ob->id.flag & LIB_DOIT) {
-				link = MEM_callocN(sizeof(LinkData), "cache library ID link");
-				link->data = ob;
-				BLI_addtail(lb, link);
-			}
-		}
-	}
-}
-
-/* ========================================================================= */
-
 const char *BKE_cache_item_name_prefix(int type)
 {
 	/* note: avoid underscores and the like here,




More information about the Bf-blender-cvs mailing list