Commit: dc3154b29fd6d640dd50d4f0b4568eca72c37b47
Author: Dalai Felinto
Date:   Tue Nov 29 15:23:26 2016 +0100
Branches: render-layers
https://developer.blender.org/rBdc3154b29fd6d640dd50d4f0b4568eca72c37b47

New DNA for layers

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

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

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

diff --git a/source/blender/blenloader/intern/readfile.h 
b/source/blender/blenloader/intern/readfile.h
index 7719aaa..06d4c90 100644
--- a/source/blender/blenloader/intern/readfile.h
+++ b/source/blender/blenloader/intern/readfile.h
@@ -34,6 +34,8 @@
 #define __READFILE_H__
 
 #include "zlib.h"
+#include "DNA_sdna_types.h"
+#include "DNA_space_types.h"
 #include "DNA_windowmanager_types.h"  /* for ReportType */
 
 struct OldNewMap;
@@ -169,6 +171,7 @@ void blo_do_versions_pre250(struct FileData *fd, struct 
Library *lib, struct Mai
 void blo_do_versions_250(struct FileData *fd, struct Library *lib, struct Main 
*main);
 void blo_do_versions_260(struct FileData *fd, struct Library *lib, struct Main 
*main);
 void blo_do_versions_270(struct FileData *fd, struct Library *lib, struct Main 
*main);
+void blo_do_versions_280(struct FileData *fd, struct Library *lib, struct Main 
*main);
 
 #endif
 
diff --git a/source/blender/blenloader/intern/versioning_280.c 
b/source/blender/blenloader/intern/versioning_280.c
index fc7b19f..25fbc2f 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -28,6 +28,21 @@
 /* allow readfile to use deprecated functionality */
 #define DNA_DEPRECATED_ALLOW
 
+#include "DNA_object_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_genfile.h"
+
+#include "BKE_main.h"
+#include "BKE_scene.h"
+
+#include "BLI_listbase.h"
+#include "BLI_string.h"
+
+#include "BLO_readfile.h"
+#include "readfile.h"
+
+#include "MEM_guardedalloc.h"
+
 void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *main)
 {
 }
diff --git a/source/blender/makesdna/DNA_layer_types.h 
b/source/blender/makesdna/DNA_layer_types.h
index aaab9f9..7023110 100644
--- a/source/blender/makesdna/DNA_layer_types.h
+++ b/source/blender/makesdna/DNA_layer_types.h
@@ -27,6 +27,61 @@
 #ifndef __DNA_LAYER_TYPES_H__
 #define __DNA_LAYER_TYPES_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "DNA_listBase.h"
+
+typedef struct ObjectBase {
+       struct ObjectBase *next, *prev;
+       short refcount;
+       struct Object *object;
+} ObjectBase;
+
+typedef struct CollectionOverride {
+       struct CollectionOverride *next, *prev;
+       char name[64]; /* MAX_NAME */
+       /* TODO proper data */
+} CollectionOverride;
+
+typedef struct CollectionBase {
+       struct CollectionBase *next, *prev;
+       struct Collection *collection;
+       short flag;
+       short pad[3];
+       ListBase collection_bases; /* synced with collection->collections */
+       ListBase object_bases; /* synced with collection->objects */
+       ListBase overrides;
+} CollectionBase;
+
+typedef struct Collection {
+       struct Collection *next, *prev;
+       char name[64]; /* MAX_NAME */
+       char filter[64]; /* MAX_NAME */
+       ListBase collections; /* nested collections */
+       ListBase objects;
+} Collection;
+
+typedef struct Layer {
+       struct Layer *next, prev;
+       char name[64]; /* MAX_NAME */
+       char engine[32]; /* render engine */
+       short active_collection;
+       struct Base *actbase;
+       ListBase object_bases;
+} RenderLayer;
+
+/* CollectionBase->flag */
+enum {
+       COLLECTION_VISIBLE    = (1 << 0),
+       COLLECTION_SELECTABLE = (1 << 1),
+       COLLECTION_FOLDED     = (1 << 2),
+};
+
+#ifdef __cplusplus
+}
+#endif
 
 #endif  /* __DNA_LAYER_TYPES_H__ */
 
diff --git a/source/blender/makesdna/DNA_scene_types.h 
b/source/blender/makesdna/DNA_scene_types.h
index cf367bf..2895b47 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -1628,6 +1628,9 @@ typedef struct Scene {
        struct RigidBodyWorld *rigidbody_world;
 
        struct PreviewImage *preview;
+
+       ListBase render_layers;
+       ListBase collections;
 } Scene;
 
 /* **************** RENDERDATA ********************* */

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

Reply via email to