Files
test2/source/blender/freestyle/SConscript
Maxime Curioni 8518e500d1 soc-2008-mxcurioni: Big update. Finally works (links and compiles). So far, the following steps work:
1. instantiates the config path, the controller and the view
2. sets the controller’s view
3. loads a 3ds file (right now a fixed file)
4. inserts a style module (right now, also fixed)
5. computes the view map

The next and final step is running the Python script. A lot of information are fixed and should be changed to test the following code: see source/blender/freestyle/app_blender/*.cpp and search for fixed paths (starting in /Users/).

I am currently evaluating whether it's worth making Python run on its own environment (right now, the program crashes because of PyImport_AddModule) or whether it should use Blender's Python capabilities. Also, I need to figure out how to integrate the SWIG wrapper dynamic library into the current scheme.
2008-05-25 17:34:21 +00:00

95 lines
2.8 KiB
Python

#!/usr/bin/python
import sys
Import ('env')
sources = []
defs = []
incs = ''
incs += '../blenkernel ../blenlib ../imbuf ../makesdna'
incs += ' #/extern/freestyle/lib3ds'
incs += ' ' + env['BF_PYTHON_INC']
incs += ' ' + env['BF_LIB3DS_INC']
incs += ' ' + env['BF_PNG_INC']
########################################################
# folders sources
########################################################
# system
prefix = 'intern/system'
system_sources = env.Glob(prefix + '/*.cpp')
# image
prefix = 'intern/image'
image_sources = env.Glob(prefix + '/*.cpp')
# geometry
prefix = 'intern/geometry'
geometry_sources = env.Glob(prefix + '/*.cpp')
# scene_graph
prefix = 'intern/scene_graph'
scene_graph_sources = env.Glob(prefix + '/*.cpp')
# winged_edge
prefix = 'intern/winged_edge'
winged_edge_sources = env.Glob(prefix + '/*.cpp')
# view_map
prefix = 'intern/view_map'
view_map_sources = env.Glob(prefix + '/*.cpp')
# stroke
prefix = 'intern/stroke'
stroke_sources = env.Glob(prefix + '/*.cpp')
# rendering
prefix = 'intern/rendering'
rendering_sources = env.Glob(prefix + '/GL*.cpp')
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'):
rendering_sources = env.Glob(prefix + '/extgl.cpp')
# app / app_blender
prefix = 'intern/app_blender'
app_sources = env.Glob(prefix + '/*.cpp')
# swig wrapper
#prefix = 'intern/swig'
#swig_sources = env.Glob(prefix + '/*.cpp')
swig_sources = []
sources = system_sources + image_sources + geometry_sources + scene_graph_sources \
+ winged_edge_sources + view_map_sources + stroke_sources + rendering_sources \
+ app_sources + swig_sources
env.BlenderLib (libname="bf_freestyle",
sources=sources,
includes=Split(incs),
defines=defs,
libtype=['blender'],
priority = [25]
)
########################################################
# SWIG
########################################################
# swig
# swig -c++ -python -o ModuleWrapper.cpp Freestyle.i
#
# g++ -w -I../geometry -I../image -I../scene_graph -I../stroke -I../system -I../view_map -I../winged_edge -I/usr/include/python2.5 -c ModuleWrapper.cpp -o ModuleWrapper.o
#
# install -d ../../build/macosx/release/lib/python
#
# g++ -bundle -flat_namespace -undefined suppress -w -L/usr/lib/python2.5/config -lpython2.5 -o ../../build/macosx/release/lib/python/_Freestyle.so ModuleWrapper.o
#
# install Freestyle.py ../../build/macosx/release/lib/python
#================ MINE
# g++ -w -I../geometry -I../image -I../scene_graph -I../stroke -I../system -I../view_map -I../winged_edge -I/usr/include/python2.5 -I../../../blenlib -I../../../blenkernel -I../../../imbuf -I../../../makesdna -c ModuleWrapper.cpp -o ModuleWrapper.o
#
# g++ -bundle -flat_namespace -undefined suppress -w -L/usr/lib/python2.5/config -lpython2.5 -o ../../python/_Freestyle.so ModuleWrapper.o