Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Hnidek <jiri.hnidek@tul.cz>2006-08-20 19:22:56 +0400
committerJiri Hnidek <jiri.hnidek@tul.cz>2006-08-20 19:22:56 +0400
commit2ee42ac01e6f4b154ac68976024af0615f7acb26 (patch)
tree9a2400a99bf7880a2f146c7a89bd2d8c0108374c /source/blender/blenloader
parentffe630b452f4abb28c105fca2b8eb9fdb6e72370 (diff)
Huge commit: VERSE
- All code is in #ifdef ... #endif - Only make build system is supported and you have to add: export WITH_VERSE=true to user-def.mk file - Blender can share only mesh objects and bitmaps now - More informations can be found at wiki: http://mediawiki.blender.org/index.php/BlenderDev/VerseIntegrationToBlender http://mediawiki.blender.org/index.php/BlenderDev/VerseIntegrationToBlenderUserDoc I hope, that I didn't forget at anything
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/Makefile5
-rw-r--r--source/blender/blenloader/intern/writefile.c24
2 files changed, 29 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/Makefile b/source/blender/blenloader/intern/Makefile
index 9faeb42879f..86ccd607d63 100644
--- a/source/blender/blenloader/intern/Makefile
+++ b/source/blender/blenloader/intern/Makefile
@@ -51,6 +51,11 @@ ifeq ($(OS),$(findstring $(OS), "solaris windows"))
CPPFLAGS += -I$(NAN_ZLIB)/include
endif
+ifeq ($(WITH_VERSE), true)
+ CPPFLAGS += -DWITH_VERSE
+ CPPFLAGS += -I$(NAN_VERSE)/include
+endif
+
# streaming write function
CPPFLAGS += -I../../writestreamglue
CPPFLAGS += -I../../readstreamglue
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 557c553d0fd..7156b6ffcab 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -164,6 +164,10 @@ Important to know is that 'streaming' has been added to files, for Blender Publi
#include "BKE_sound.h" /* ... and for samples */
#include "BKE_utildefines.h" // for defines
#include "BKE_modifier.h"
+#ifdef WITH_VERSE
+#include "BKE_verse.h"
+#include "BIF_verse.h"
+#endif
#include "GEN_messaging.h"
@@ -745,7 +749,15 @@ static void write_objects(WriteData *wd, ListBase *idbase)
while(ob) {
if(ob->id.us>0 || wd->current) {
/* write LibData */
+#ifdef WITH_VERSE
+ /* pointer at vnode stored in file have to be NULL */
+ struct VNode *vnode = (VNode*)ob->vnode;
+ if(vnode) ob->vnode = NULL;
+#endif
writestruct(wd, ID_OB, "Object", 1, ob);
+#ifdef WITH_VERSE
+ if(vnode) ob->vnode = (void*)vnode;
+#endif
/* direct data */
writedata(wd, DATA, sizeof(void *)*ob->totcol, ob->mat);
@@ -987,7 +999,19 @@ static void write_meshs(WriteData *wd, ListBase *idbase)
while(mesh) {
if(mesh->id.us>0 || wd->current) {
/* write LibData */
+#ifdef WITH_VERSE
+ struct VNode *vnode = (VNode*)mesh->vnode;
+ if(vnode) {
+ /* mesh has to be created from verse geometry node*/
+ create_meshdata_from_geom_node(mesh, vnode);
+ /* pointer at verse node can't be stored in file */
+ mesh->vnode = NULL;
+ }
+#endif
writestruct(wd, ID_ME, "Mesh", 1, mesh);
+#ifdef WITH_VERSE
+ if(vnode) mesh->vnode = (void*)vnode;
+#endif
/* direct data */
writedata(wd, DATA, sizeof(void *)*mesh->totcol, mesh->mat);