Created blender/source/collada skeleton for new 'bf_collada' lib
authorArystanbek Dyussenov <arystan.d@gmail.com>
Mon, 25 May 2009 08:46:24 +0000 (08:46 +0000)
committerArystanbek Dyussenov <arystan.d@gmail.com>
Mon, 25 May 2009 08:46:24 +0000 (08:46 +0000)
- setup SConscript, not sure about these values: libtype='core', priority=150
- only scons build on linux is set up
- not configured to link to OpenCollada yet

config/linux2-config.py
source/blender/SConscript
source/blender/collada/SConscript [new file with mode: 0644]
source/blender/collada/collada.cpp [new file with mode: 0644]
source/blender/collada/collada.h [new file with mode: 0644]
tools/btools.py

index eb93d8084f172398d80d207d6ab25bf0a95f219f..98b7394e401785e23f4967b61e42a482bd3ed341 100644 (file)
@@ -160,6 +160,11 @@ BF_OPENGL_LIB = 'GL GLU X11 Xi'
 BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
 BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a'
 
+WITH_BF_COLLADA = True
+BF_COLLADA = '#source/blender/collada'
+BF_COLLADA_INC = '${BF_COLLADA}'
+BF_COLLADA_LIB = 'bf_collada'
+
 ##
 CC = 'gcc'
 CXX = 'g++'
index f8b7fd358fefade163f5b17f4b3c74b7d54f2925..4598e4e497960ce4b8bc7fd617082768b9638419 100644 (file)
@@ -36,3 +36,6 @@ if env['WITH_BF_OPENEXR']:
 
 if env['WITH_BF_QUICKTIME']:
     SConscript (['quicktime/SConscript'])
+
+if env['WITH_BF_COLLADA']:
+    SConscript (['collada/SConscript'])
diff --git a/source/blender/collada/SConscript b/source/blender/collada/SConscript
new file mode 100644 (file)
index 0000000..93e0c54
--- /dev/null
@@ -0,0 +1,10 @@
+#!/usr/bin/python
+Import ('env')
+
+sources = env.Glob('*.cpp')
+
+# relative paths to include dirs, space-separated, string
+incs = '../blenlib ../blenkernel'
+
+env.BlenderLib ('bf_collada', sources, Split(incs), [], libtype='core', priority=150 )
+
diff --git a/source/blender/collada/collada.cpp b/source/blender/collada/collada.cpp
new file mode 100644 (file)
index 0000000..7bb36ca
--- /dev/null
@@ -0,0 +1,11 @@
+#include "BKE_scene.h"
+
+int collada_import(Scene *sce, const char *filepath)
+{
+       return 1;
+}
+
+int collada_export(Scene *sce, const char *filepath)
+{
+       return 1;
+}
diff --git a/source/blender/collada/collada.h b/source/blender/collada/collada.h
new file mode 100644 (file)
index 0000000..bf4b21e
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef BLENDER_COLLADA_H
+#define BLENDER_COLLADA_H
+
+#include "BKE_scene.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+       /*
+        * both return 1 on success, 0 on error
+        */
+       int collada_import(Scene *sce, const char *filepath);
+       int collada_export(Scene *sce, const char *filepath);
+#ifdef __cplusplus
+}
+#endif
+
+#endif
index bd646a2f3eb606776b1e9ec825547e5b89cf5856..24898841a96681ddb4ab51073a72dc8441e0e66e 100755 (executable)
@@ -49,6 +49,7 @@ def validate_arguments(args, bc):
                        'WITH_BF_FREETYPE', 'BF_FREETYPE', 'BF_FREETYPE_INC', 'BF_FREETYPE_LIB', 'BF_FREETYPE_LIBPATH',
                        'WITH_BF_QUICKTIME', 'BF_QUICKTIME', 'BF_QUICKTIME_INC', 'BF_QUICKTIME_LIB', 'BF_QUICKTIME_LIBPATH',
                        'WITH_BF_STATICOPENGL', 'BF_OPENGL', 'BF_OPENGL_INC', 'BF_OPENGL_LIB', 'BF_OPENGL_LIBPATH', 'BF_OPENGL_LIB_STATIC',
+                       'WITH_BF_COLLADA', 'BF_COLLADA', 'BF_COLLADA_INC', 'BF_COLLADA_LIB',
                        'WITH_BF_PLAYER',
                        'WITH_BF_NOBLENDER',
                        'WITH_BF_BINRELOC',
@@ -307,6 +308,11 @@ def read_opts(cfg, args):
                ('BF_OPENGL_LIBPATH', 'OpenGL library path', ''),
                ('BF_OPENGL_LIB_STATIC', 'OpenGL static libraries', ''),
                ('BF_OPENGL_LINKFLAGS', 'OpenGL link flags', ''),
+
+               (BoolVariable('WITH_BF_COLLADA', 'Build COLLADA import/export module if true', True)),
+               ('BF_COLLADA', 'COLLADA base path', ''),
+               ('BF_COLLADA_INC', 'COLLADA include path', ''),
+               ('BF_COLLADA_LIB', 'COLLADA library', ''),
                
                (BoolVariable('WITH_BF_PLAYER', 'Build blenderplayer if true', False)),
                (BoolVariable('WITH_BF_NOBLENDER', 'Do not build blender if true', False)),