[Bf-blender-cvs] [0951778ebaa] master: ID management: use FOREACH_MAIN_ID in some places.

Bastien Montagne noreply at git.blender.org
Mon Feb 18 17:16:51 CET 2019


Commit: 0951778ebaabd70af6cebb325472c6754a07555c
Author: Bastien Montagne
Date:   Mon Feb 18 16:15:01 2019 +0100
Branches: master
https://developer.blender.org/rB0951778ebaabd70af6cebb325472c6754a07555c

ID management: use FOREACH_MAIN_ID in some places.

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

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

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

diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index f28d98a9677..c46ae67a56d 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -1660,19 +1660,14 @@ void id_clear_lib_data(Main *bmain, ID *id)
 /* next to indirect usage in read/writefile also in editobject.c scene.c */
 void BKE_main_id_clear_newpoins(Main *bmain)
 {
-	ListBase *lbarray[MAX_LIBARRAY];
 	ID *id;
-	int a;
 
-	a = set_listbasepointers(bmain, lbarray);
-	while (a--) {
-		id = lbarray[a]->first;
-		while (id) {
-			id->newid = NULL;
-			id->tag &= ~LIB_TAG_NEW;
-			id = id->next;
-		}
+	FOREACH_MAIN_ID_BEGIN(bmain, id)
+	{
+		id->newid = NULL;
+		id->tag &= ~LIB_TAG_NEW;
 	}
+	FOREACH_MAIN_ID_END;
 }



More information about the Bf-blender-cvs mailing list