[Bf-blender-cvs] [a2e81fa] render-layers: Final cleanup of read/write to have things in the right order (pure cosmetic)

Dalai Felinto noreply at git.blender.org
Tue Dec 6 16:37:21 CET 2016


Commit: a2e81fa2e93bf2c32fa48fd10c71e82d9f7659d7
Author: Dalai Felinto
Date:   Tue Dec 6 16:37:13 2016 +0100
Branches: render-layers
https://developer.blender.org/rBa2e81fa2e93bf2c32fa48fd10c71e82d9f7659d7

Final cleanup of read/write to have things in the right order (pure cosmetic)

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

M	source/blender/blenloader/intern/readfile.c
M	source/blender/blenloader/intern/writefile.c
M	source/blender/makesdna/DNA_layer_types.h

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

diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 3313245..b11a04d 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5524,13 +5524,15 @@ static void direct_link_layer_collections(FileData *fd, ListBase *lb)
 	link_list(fd, lb);
 	for (LayerCollection *lc = lb->first; lc; lc = lc->next) {
 		lc->scene_collection = newdataadr(fd, lc->scene_collection);
-		link_list(fd, &lc->overrides);
+
 		link_list(fd, &lc->object_bases);
 
 		for (LinkData *link = lc->object_bases.first; link; link = link->next) {
 			link->data = newdataadr(fd, link->data);
 		}
 
+		link_list(fd, &lc->overrides);
+
 		direct_link_layer_collections(fd, &lc->layer_collections);
 	}
 }
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index fcbcf3d..3dd388c 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2419,8 +2419,8 @@ static void write_layer_collections(WriteData *wd, ListBase *lb)
 	for (LayerCollection *lc = lb->first; lc; lc = lc->next) {
 		writestruct(wd, DATA, LayerCollection, 1, lc);
 
-		writelist(wd, DATA, CollectionOverride, &lc->overrides);
 		writelist(wd, DATA, LinkData, &lc->object_bases);
+		writelist(wd, DATA, CollectionOverride, &lc->overrides);
 
 		write_layer_collections(wd, &lc->layer_collections);
 	}
diff --git a/source/blender/makesdna/DNA_layer_types.h b/source/blender/makesdna/DNA_layer_types.h
index b07f9f6..63856d9 100644
--- a/source/blender/makesdna/DNA_layer_types.h
+++ b/source/blender/makesdna/DNA_layer_types.h
@@ -52,9 +52,9 @@ typedef struct LayerCollection {
 	struct SceneCollection *scene_collection;
 	short flag;
 	short pad[3];
-	ListBase layer_collections; /* synced with collection->collections */
 	ListBase object_bases;      /* (ObjectBase *)LinkData->data - synced with collection->objects and collection->filter_objects */
 	ListBase overrides;
+	ListBase layer_collections; /* synced with collection->collections */
 } LayerCollection;
 
 typedef struct SceneLayer {
@@ -63,18 +63,18 @@ typedef struct SceneLayer {
 	char engine[32]; /* render engine */
 	short active_collection;
 	short pad[3];
+	ListBase object_bases;      /* ObjectBase */
 	struct ObjectBase *basact;
 	ListBase layer_collections; /* LayerCollection */
-	ListBase object_bases;      /* ObjectBase */
 } SceneLayer;
 
 typedef struct SceneCollection {
 	struct SceneCollection *next, *prev;
 	char name[64]; /* MAX_NAME */
 	char filter[64]; /* MAX_NAME */
-	ListBase scene_collections; /* nested collections */
 	ListBase objects;           /* (Object *)LinkData->data */
 	ListBase filter_objects;    /* (Object *)LinkData->data */
+	ListBase scene_collections; /* nested collections */
 } SceneCollection;
 
 /* ObjectBase->flag */




More information about the Bf-blender-cvs mailing list