Files
test/source/blender/freestyle/SConscript
Maxime Curioni 7426a3e35b Added StrokeAttribute class. Beginning of StrokeVertex.
IMPORTANT: The setters functions' names were normalized due to constant confusion regarding capitalization. All the function names start with set... instead of Set.... This convention was changed all throughout Freestyle. To use Freestyle as an external renderer, the SWIG library MUST be regenerated.
2008-07-21 21:24:37 +00:00

124 lines
4.1 KiB
Python

#!/usr/bin/python
import sys
Import ('env')
sources = []
defs = []
incs = ''
incs += '../blenkernel ../blenlib ../imbuf ../makesdna ../python '
incs += '../render/extern/include ../render/intern/include ../include ../src'
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')
# Python
prefix = 'intern/python'
# python_sources = env.Glob(prefix + '/*.cpp')
python_sources = [
prefix + '/Freestyle.cpp',
prefix + '/Convert.cpp',
prefix + '/BinaryPredicate0D.cpp',
prefix + '/BinaryPredicate1D.cpp',
prefix + '/Id.cpp',
prefix + '/IntegrationType.cpp',
prefix + '/Interface0D.cpp',
prefix + '/Interface0D/CurvePoint.cpp',
# prefix + '/Interface0D/CurvePoint/StrokeVertex.cpp',
prefix + '/Interface0D/SVertex.cpp',
prefix + '/Interface0D/ViewVertex.cpp',
prefix + '/Interface1D.cpp',
prefix + '/Interface1D/FEdge.cpp',
prefix + '/Nature.cpp',
prefix + '/StrokeAttribute.cpp',
prefix + '/UnaryFunction0D.cpp',
prefix + '/UnaryFunction1D.cpp',
prefix + '/UnaryPredicate0D.cpp',
prefix + '/UnaryPredicate1D.cpp',
]
sources = system_sources + image_sources + geometry_sources + scene_graph_sources \
+ winged_edge_sources + view_map_sources + stroke_sources + rendering_sources \
+ app_sources + python_sources
env.BlenderLib (libname="bf_freestyle",
sources=sources,
includes=Split(incs),
defines=defs,
libtype=['blender'],
priority = [25]
)
########################################################
# SWIG
########################################################
# swig
#
# 1] Run the following three commands in the source/blender/freestyle/intern/swig directory.
#
# 2] Replace /Users/mx/Documents/work/GSoC_2008/bf-blender/branches/build/darwin/lib to the path
# of your library directory (used to locate libbf_freestyle.a)
#
# 3] Replace the python directories to suit your config
# export SWIG_LIB=/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/extern/freestyle/swig/Lib
# cd /Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/intern/swig
# /Users/mx/Documents/work/GSoC_2008/bf-blender/branches/build/darwin/bin/swig -c++ -python -o ModuleWrapper.cpp Freestyle.i
# mv ./Freestyle.py ../../python/
# 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
########### Mac OS X ###########
# g++ -bundle -flat_namespace -undefined suppress -w -L/usr/lib/python2.5/config -L/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/build/darwin/lib -lpython2.5 -lbf_freestyle -o ../../python/_Freestyle.so ModuleWrapper.o
########### Linux ###########
# g++ -shared -w -L/usr/lib/python2.5/config -L/home/joe/bf_blender_freestyle/build/linux2/lib -lpython2.5 -lbf_freestyle -o ../../python/_Freestyle.so ModuleWrapper.o