merge 17122:17206

This commit is contained in:
Martin Poirier 2008-10-28 18:47:01 +00:00
commit 025e4b046a
96 changed files with 10515 additions and 9103 deletions

@ -61,6 +61,8 @@ OPTION(WITH_VERSE "Enable Verse (http://verse.blender.org)" OFF)
OPTION(WITH_ELBEEM "Enable Elbeem (Fluid Simulation)" ON)
OPTION(WITH_QUICKTIME "Enable Quicktime Support" OFF)
OPTION(WITH_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" ON)
OPTION(WITH_DDS "Enable DDS Support" ON)
OPTION(WITH_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF)
OPTION(WITH_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF)
OPTION(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON)
OPTION(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" OFF)

@ -577,6 +577,7 @@ if not env['WITHOUT_BF_INSTALL']:
# TODO: build stubs and link into blenderplayer
#------------ EPYDOC
if env['WITH_BF_BPYDOC']:
SConscript(['source/blender/python/api2_2x/doc/SConscript'])
if env['WITH_BF_DOCS']:
SConscript('source/blender/python/api2_2x/doc/SConscript')
SConscript('source/gameengine/PyDoc/SConscript')

@ -8,7 +8,7 @@
import commands
# IMPORTANT NOTE : OFFICIAL BUILDS SHOULD BE DONE WITH SDKs
USE_SDK='true'
USE_SDK=True
BF_PYTHON_VERSION = '2.3'
@ -38,15 +38,15 @@ else:
# enable ffmpeg support
WITH_BF_FFMPEG = 'true' # -DWITH_FFMPEG
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
BF_FFMPEG = "#extern/ffmpeg"
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
if USE_SDK=='true':
if USE_SDK==True:
BF_FFMPEG_EXTRA = '-isysroot '+MACOSX_SDK+' -mmacosx-version-min='+MAC_MIN_VERS
#BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
#BF_FFMPEG_LIB = 'avformat.a avcodec.a avutil.a'
WITH_BF_VERSE = 'false'
WITH_BF_VERSE = False
BF_VERSE = "#extern/verse/dist"
BF_VERSE_LIBPATH = "${BF_BUILDDIR}/extern/verse/dist"
BF_VERSE_INCLUDE = BF_VERSE
@ -76,9 +76,9 @@ WITH_BF_OPENMP = '0'
# Note : should be true, but openal simply dont work on intel
if MAC_PROC == 'i386':
WITH_BF_OPENAL = 'false'
WITH_BF_OPENAL = False
else:
WITH_BF_OPENAL = 'true'
WITH_BF_OPENAL = True
#different lib must be used following version of gcc
# for gcc 3.3
#BF_OPENAL = LIBDIR + '/openal'
@ -88,7 +88,7 @@ if MAC_PROC == 'powerpc':
else :
BF_OPENAL = LIBDIR + '/openal'
WITH_BF_STATICOPENAL = 'false'
WITH_BF_STATICOPENAL = False
BF_OPENAL_INC = '${BF_OPENAL}/include'
BF_OPENAL_LIB = 'openal'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
@ -97,20 +97,20 @@ BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_CXX = '/usr'
WITH_BF_STATICCXX = 'false'
WITH_BF_STATICCXX = False
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
WITH_BF_SDL = 'true'
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl' #$(shell sdl-config --prefix)
BF_SDL_INC = '${BF_SDL}/include' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
BF_SDL_LIBPATH = '${BF_SDL}/lib'
WITH_BF_FMOD = 'false'
WITH_BF_FMOD = False
BF_FMOD = LIBDIR + '/fmod'
WITH_BF_OPENEXR = 'true'
WITH_BF_STATICOPENEXR = 'false'
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = '${LCGDIR}/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread'
@ -118,15 +118,15 @@ BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
WITH_BF_DDS = 'true'
WITH_BF_DDS = True
WITH_BF_JPEG = 'true'
WITH_BF_JPEG = True
BF_JPEG = LIBDIR + '/jpeg'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'jpeg'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
WITH_BF_PNG = 'true'
WITH_BF_PNG = True
BF_PNG = LIBDIR + '/png'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'png'
@ -135,32 +135,32 @@ BF_PNG_LIBPATH = '${BF_PNG}/lib'
BF_TIFF = LIBDIR + '/tiff'
BF_TIFF_INC = '${BF_TIFF}/include'
WITH_BF_ZLIB = 'true'
WITH_BF_ZLIB = True
BF_ZLIB = '/usr'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIB = 'z'
WITH_BF_INTERNATIONAL = 'true'
WITH_BF_INTERNATIONAL = True
BF_GETTEXT = LIBDIR + '/gettext'
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
BF_GETTEXT_LIB = 'intl'
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_FTGL = 'true'
WITH_BF_FTGL = True
BF_FTGL = '#extern/bFTGL'
BF_FTGL_INC = '${BF_FTGL}/include'
BF_FTGL_LIB = 'extern_ftgl'
WITH_BF_GAMEENGINE='true'
WITH_BF_PLAYER='true'
WITH_BF_GAMEENGINE=True
WITH_BF_PLAYER=True
WITH_BF_ODE = 'false'
WITH_BF_ODE = False
BF_ODE = LIBDIR + '/ode'
BF_ODE_INC = '${BF_ODE}/include'
BF_ODE_LIB = '${BF_ODE}/lib/libode.a'
WITH_BF_BULLET = 'true'
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
@ -169,9 +169,9 @@ BF_SOLID = '#extern/solid'
BF_SOLID_INC = '${BF_SOLID}'
BF_SOLID_LIB = 'extern_solid'
WITH_BF_YAFRAY = 'true'
WITH_BF_YAFRAY = True
#WITH_BF_NSPR = 'true'
#WITH_BF_NSPR = True
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
#BF_NSPR_LIB =
@ -186,7 +186,7 @@ WITH_BF_YAFRAY = 'true'
# if this is not set.
#
# Be paranoid regarding library creation (do not update archives)
#BF_PARANOID = 'true'
#BF_PARANOID = True
# enable freetype2 support for text objects
BF_FREETYPE = LIBDIR + '/freetype'
@ -194,16 +194,16 @@ BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_QUICKTIME = 'true' # -DWITH_QUICKTIME
WITH_BF_QUICKTIME = True # -DWITH_QUICKTIME
WITH_BF_ICONV = 'true'
WITH_BF_ICONV = True
BF_ICONV = LIBDIR + "/iconv"
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
#BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = 'true'
WITH_BF_STATICOPENGL = True
BF_OPENGL_LIB = 'GL GLU'
BF_OPENGL_LIBPATH = '/System/Library/Frameworks/OpenGL.framework/Libraries'
BF_OPENGL_LINKFLAGS = '-framework OpenGL'
@ -225,7 +225,7 @@ if MAC_MIN_VERS == '10.3':
PLATFORM_LINKFLAGS = '-fuse-cxa-atexit '+PLATFORM_LINKFLAGS
LLIBS = LLIBS + ' crt3.o'
if USE_SDK=='true':
if USE_SDK==True:
SDK_FLAGS=['-isysroot', MACOSX_SDK,'-mmacosx-version-min='+MAC_MIN_VERS]
PLATFORM_LINKFLAGS = '-mmacosx-version-min='+MAC_MIN_VERS+ ' -Wl,-syslibroot,' + MACOSX_SDK+" "+PLATFORM_LINKFLAGS
CCFLAGS=SDK_FLAGS+CCFLAGS
@ -243,7 +243,7 @@ else:
REL_CFLAGS = ['-O2']
REL_CCFLAGS = ['-O2']
##BF_DEPEND = 'true'
##BF_DEPEND = True
##
##AR = ar
##ARFLAGS = ruv
@ -261,9 +261,9 @@ CC_WARN = ' -Wall -Wno-long-double'
##DYNLDFLAGS = -shared $(LDFLAGS)
BF_PROFILE_FLAGS = ' -pg -g '
BF_PROFILE = 'false'
BF_PROFILE = False
BF_DEBUG = 'false'
BF_DEBUG = False
BF_DEBUG_FLAGS = '-g'
BF_BUILDDIR='../build/darwin'

@ -1,20 +1,20 @@
LCGDIR = '../lib/linux2'
LIBDIR = "${LCGDIR}"
WITH_BF_VERSE = 'false'
WITH_BF_VERSE = False
BF_VERSE_INCLUDE = "#extern/verse/dist"
BF_PYTHON = '/usr'
BF_PYTHON_VERSION = '2.5'
WITH_BF_STATICPYTHON = 'false'
WITH_BF_STATICPYTHON = False
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' #BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'
BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic']
BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION}.a'
WITH_BF_OPENAL = 'true'
WITH_BF_STATICOPENAL = 'false'
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = False
BF_OPENAL = '/usr'
BF_OPENAL_INC = '${BF_OPENAL}/include'
BF_OPENAL_LIB = 'openal'
@ -26,19 +26,19 @@ BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
# BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a ${BF_OPENAL}/lib/libalut.a'
BF_CXX = '/usr'
WITH_BF_STATICCXX = 'false'
WITH_BF_STATICCXX = False
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
WITH_BF_SDL = 'true'
WITH_BF_SDL = True
BF_SDL = '/usr' #$(shell sdl-config --prefix)
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
WITH_BF_FMOD = 'false'
WITH_BF_FMOD = False
BF_FMOD = LIBDIR + '/fmod'
WITH_BF_OPENEXR = 'true'
WITH_BF_STATICOPENEXR = 'false'
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = '/usr'
# when compiling with your own openexr lib you might need to set...
# BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
@ -49,14 +49,14 @@ BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf
# BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
WITH_BF_DDS = 'true'
WITH_BF_DDS = True
WITH_BF_JPEG = 'true'
WITH_BF_JPEG = True
BF_JPEG = '/usr'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'jpeg'
WITH_BF_PNG = 'true'
WITH_BF_PNG = True
BF_PNG = '/usr'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'png'
@ -64,31 +64,31 @@ BF_PNG_LIB = 'png'
BF_TIFF = '/usr'
BF_TIFF_INC = '${BF_TIFF}/include'
WITH_BF_ZLIB = 'true'
WITH_BF_ZLIB = True
BF_ZLIB = '/usr'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIB = 'z'
WITH_BF_INTERNATIONAL = 'true'
WITH_BF_INTERNATIONAL = True
BF_GETTEXT = '/usr'
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
BF_GETTEXT_LIB = 'gettextlib'
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_FTGL = 'true'
WITH_BF_FTGL = True
BF_FTGL = '#extern/bFTGL'
BF_FTGL_INC = '${BF_FTGL}/include'
BF_FTGL_LIB = 'extern_ftgl'
WITH_BF_GAMEENGINE='false'
WITH_BF_GAMEENGINE=False
WITH_BF_ODE = 'false'
WITH_BF_ODE = False
BF_ODE = LIBDIR + '/ode'
BF_ODE_INC = BF_ODE + '/include'
BF_ODE_LIB = BF_ODE + '/lib/libode.a'
WITH_BF_BULLET = 'true'
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
@ -97,9 +97,9 @@ BF_SOLID = '#extern/solid'
BF_SOLID_INC = '${BF_SOLID}'
BF_SOLID_LIB = 'extern_solid'
WITH_BF_YAFRAY = 'true'
WITH_BF_YAFRAY = True
#WITH_BF_NSPR = 'true'
#WITH_BF_NSPR = True
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
#BF_NSPR_LIB =
@ -114,27 +114,27 @@ WITH_BF_YAFRAY = 'true'
# if this is not set.
#
# Be paranoid regarding library creation (do not update archives)
#BF_PARANOID = 'true'
#BF_PARANOID = True
# enable freetype2 support for text objects
BF_FREETYPE = '/usr'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
BF_QUICKTIME = '/usr/local'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
WITH_BF_ICONV = 'false'
WITH_BF_ICONV = False
BF_ICONV = LIBDIR + "/iconv"
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
WITH_BF_BINRELOC = 'true'
WITH_BF_BINRELOC = True
# enable ffmpeg support
WITH_BF_FFMPEG = 'true' # -DWITH_FFMPEG
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
BF_FFMPEG = '#extern/ffmpeg'
BF_FFMPEG_LIB = ''
# Uncomment the following two lines to use system's ffmpeg
@ -144,30 +144,30 @@ BF_FFMPEG_INC = '${BF_FFMPEG}/include'
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
# enable ogg, vorbis and theora in ffmpeg
WITH_BF_OGG = 'false' # -DWITH_OGG
WITH_BF_OGG = False # -DWITH_OGG
BF_OGG = '/usr'
BF_OGG_INC = '${BF_OGG}/include'
BF_OGG_LIB = 'ogg vorbis theoraenc theoradec'
WITH_BF_OPENJPEG = 'true'
WITH_BF_OPENJPEG = True
BF_OPENJPEG = '#extern/libopenjpeg'
BF_OPENJPEG_LIB = ''
BF_OPENJPEG_INC = '${BF_OPENJPEG}/include'
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
WITH_BF_REDCODE = 'false'
WITH_BF_REDCODE = False
BF_REDCODE = '#extern/libredcode'
BF_REDCODE_LIB = ''
BF_REDCODE_INC = '${BF_REDCODE}/include'
BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = 'false'
WITH_BF_STATICOPENGL = False
BF_OPENGL = '/usr'
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIB = 'GL GLU X11 Xi'
BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
BF_OPENGL_LIB_STATIC = '${BF_OPENGL}/libGL.a ${BF_OPENGL}/libGLU.a ${BF_OPENGL}/libXxf86vm.a ${BF_OPENGL}/libX11.a ${BF_OPENGL}/libXi.a ${BF_OPENGL}/libXext.a ${BF_OPENGL}/libXxf86vm.a'
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'
##
CC = 'gcc'
@ -181,7 +181,7 @@ CPPFLAGS = ['-DXP_UNIX']
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
REL_CFLAGS = ['-O2']
REL_CCFLAGS = ['-O2']
##BF_DEPEND = 'true'
##BF_DEPEND = True
##
##AR = ar
##ARFLAGS = ruv
@ -198,9 +198,9 @@ LLIBS = 'util c m dl pthread stdc++'
##DYNLDFLAGS = -shared $(LDFLAGS)
BF_PROFILE_FLAGS = ['-pg','-g']
BF_PROFILE = 'false'
BF_PROFILE = False
BF_DEBUG = 'false'
BF_DEBUG = False
BF_DEBUG_FLAGS = '-g'
BF_BUILDDIR = '../build/linux2'

@ -1,10 +1,10 @@
LCGDIR = '../lib/windows'
LIBDIR = '${LCGDIR}'
WITH_BF_VERSE = 'false'
WITH_BF_VERSE = False
BF_VERSE_INCLUDE = "#extern/verse/dist"
WITH_BF_YAFRAY = 'true'
WITH_BF_YAFRAY = True
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_VERSION = '2.5'
@ -13,8 +13,8 @@ BF_PYTHON_BINARY = 'python'
BF_PYTHON_LIB = 'python25'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
WITH_BF_OPENAL = 'true'
WITH_BF_STATICOPENAL = 'false'
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = False
BF_OPENAL = LIBDIR + '/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include'
BF_OPENAL_LIB = 'openal_static'
@ -24,10 +24,10 @@ BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_CXX = '/usr'
WITH_BF_STATICCXX = 'false'
WITH_BF_STATICCXX = False
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
WITH_BF_SDL = 'true'
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl'
BF_SDL_INC = '${BF_SDL}/include'
BF_SDL_LIB = 'SDL'
@ -38,11 +38,11 @@ BF_PTHREADS_INC = '${BF_PTHREADS}/include'
BF_PTHREADS_LIB = 'pthreadGC2'
BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
WITH_BF_FMOD = 'false'
WITH_BF_FMOD = False
BF_FMOD = LIBDIR + '/fmod'
WITH_BF_OPENEXR = 'true'
WITH_BF_STATICOPENEXR = 'false'
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = LIBDIR + '/gcc/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
BF_OPENEXR_LIB = ' Half IlmImf Iex '
@ -50,15 +50,15 @@ BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
WITH_BF_DDS = 'true'
WITH_BF_DDS = True
WITH_BF_JPEG = 'true'
WITH_BF_JPEG = True
BF_JPEG = LIBDIR + '/jpeg'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'jpeg'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
WITH_BF_PNG = 'true'
WITH_BF_PNG = True
BF_PNG = LIBDIR + '/png'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'png'
@ -67,32 +67,32 @@ BF_PNG_LIBPATH = '${BF_PNG}/lib'
BF_TIFF = LIBDIR + '/tiff'
BF_TIFF_INC = '${BF_TIFF}/include'
WITH_BF_ZLIB = 'true'
WITH_BF_ZLIB = True
BF_ZLIB = LIBDIR + '/zlib'
BF_ZLIB_INC = '${BF_ZLIB}/include'
#BF_ZLIB_LIB = 'z'
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
WITH_BF_INTERNATIONAL = 'true'
WITH_BF_INTERNATIONAL = True
BF_GETTEXT = LIBDIR + '/gettext'
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
BF_GETTEXT_LIB = 'gnu_gettext'
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_FTGL = 'true'
WITH_BF_FTGL = True
BF_FTGL = LIBDIR + '/ftgl'
BF_FTGL_INC = '${BF_FTGL}/include'
BF_FTGL_LIB = 'extern_ftgl'
WITH_BF_GAMEENGINE = 'false'
WITH_BF_GAMEENGINE = False
WITH_BF_ODE = 'true'
WITH_BF_ODE = True
BF_ODE = LIBDIR + '/ode'
BF_ODE_INC = BF_ODE + '/include'
BF_ODE_LIB = BF_ODE + '/lib/libode.a'
WITH_BF_BULLET = 'true'
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
@ -107,18 +107,18 @@ BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
BF_QUICKTIME = '/usr/local'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
WITH_BF_ICONV = 'false'
WITH_BF_ICONV = False
BF_ICONV = LIBDIR + "/iconv"
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = 'false'
WITH_BF_STATICOPENGL = False
BF_OPENGL = 'C:\\MingW'
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
@ -143,7 +143,7 @@ CC_WARN = [ '-Wall' ]
LLIBS = [ '-ldxguid', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz'] #'-lutil', '-lc', '-lm', '-ldl', '-lpthread' ]
BF_DEBUG = 'false'
BF_DEBUG = False
BF_DEBUG_FLAGS= ''
BF_BUILDDIR = '../build/linuxcross'

@ -8,40 +8,40 @@ BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib/python${BF_PYTHON_VERSION}/config'
WITH_BF_OPENAL = 'false'
# WITH_BF_STATICOPENAL = 'false'
WITH_BF_OPENAL = False
# WITH_BF_STATICOPENAL = False
#BF_OPENAL = LIBDIR + '/openal'
#BF_OPENAL_INC = '${BF_OPENAL}/include'
#BF_OPENAL_LIB = 'openal'
#BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
#BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
WITH_BF_SDL = 'true'
WITH_BF_SDL = True
BF_SDL = '/usr/local' #$(shell sdl-config --prefix)
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
BF_SDL_LIBPATH = '${BF_SDL}/lib'
WITH_BF_FMOD = 'false'
WITH_BF_FMOD = False
BF_FMOD = LIBDIR + '/fmod'
WITH_BF_OPENEXR = 'false'
WITH_BF_STATICOPENEXR = 'false'
WITH_BF_OPENEXR = False
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = '/usr/local'
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR'
BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
WITH_BF_DDS = 'true'
WITH_BF_DDS = True
WITH_BF_JPEG = 'true'
WITH_BF_JPEG = True
BF_JPEG = '/usr/local'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'jpeg'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
WITH_BF_PNG = 'true'
WITH_BF_PNG = True
BF_PNG = '/usr/local'
BF_PNG_INC = '${BF_PNG}/include/libpng'
BF_PNG_LIB = 'png'
@ -50,31 +50,31 @@ BF_PNG_LIBPATH = '${BF_PNG}/lib'
BF_TIFF = '/usr/local'
BF_TIFF_INC = '${BF_TIFF}/include'
WITH_BF_ZLIB = 'true'
WITH_BF_ZLIB = True
BF_ZLIB = '/usr/local'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIB = 'z'
WITH_BF_INTERNATIONAL = 'true'
WITH_BF_INTERNATIONAL = True
BF_GETTEXT = '/usr/local'
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
BF_GETTEXT_LIB = 'intl iconv'
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_FTGL = 'true'
WITH_BF_FTGL = True
BF_FTGL = '#extern/bFTGL'
BF_FTGL_INC = '${BF_FTGL}/include'
BF_FTGL_LIB = 'extern_ftgl'
WITH_BF_GAMEENGINE='false'
WITH_BF_GAMEENGINE=False
WITH_BF_ODE = 'false'
WITH_BF_ODE = False
BF_ODE = LIBDIR + '/ode'
BF_ODE_INC = '${BF_ODE}/include'
BF_ODE_LIB = '${BF_ODE}/lib/libode.a'
WITH_BF_BULLET = 'true'
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
@ -83,9 +83,9 @@ BF_SOLID = '#extern/solid'
BF_SOLID_INC = '${BF_SOLID}'
BF_SOLID_LIB = 'extern_solid'
WITH_BF_YAFRAY = 'true'
WITH_BF_YAFRAY = True
#WITH_BF_NSPR = 'true'
#WITH_BF_NSPR = True
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
#BF_NSPR_LIB =
@ -100,7 +100,7 @@ WITH_BF_YAFRAY = 'true'
# if this is not set.
#
# Be paranoid regarding library creation (do not update archives)
#BF_PARANOID = 'true'
#BF_PARANOID = True
# enable freetype2 support for text objects
BF_FREETYPE = '/usr/X11R6'
@ -108,16 +108,16 @@ BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
WITH_BF_ICONV = 'false'
WITH_BF_ICONV = False
BF_ICONV = LIBDIR + "/iconv"
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = 'true'
WITH_BF_STATICOPENGL = True
BF_OPENGL = '/usr/X11R6'
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIB = 'GL GLU X11 Xi'
@ -137,7 +137,7 @@ CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
REL_CFLAGS = ['-O2']
REL_CCFLAGS = ['-O2']
##BF_DEPEND = 'true'
##BF_DEPEND = True
##
##AR = ar
##ARFLAGS = ruv
@ -156,9 +156,9 @@ LLIBS = 'm stdc++ pthread util'
##DYNLDFLAGS = -shared $(LDFLAGS)
BF_PROFILE_FLAGS = ' -pg -g '
BF_PROFILE = 'false'
BF_PROFILE = False
BF_DEBUG = 'false'
BF_DEBUG = False
BF_DEBUG_FLAGS = '-g'
BF_BUILDDIR='../build/openbsd3'

@ -8,8 +8,8 @@ BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' #BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'
BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic']
WITH_BF_OPENAL = 'true'
WITH_BF_STATICOPENAL = 'false'
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = False
BF_OPENAL = '/usr/local'
BF_OPENAL_INC = '${BF_OPENAL}/include'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
@ -19,20 +19,20 @@ BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_CXX = '/usr'
WITH_BF_STATICCXX = 'false'
WITH_BF_STATICCXX = False
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
WITH_BF_SDL = 'true'
WITH_BF_SDL = True
BF_SDL = '/usr/local' #$(shell sdl-config --prefix)
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
BF_SDL_LIBPATH = '${BF_SDL}/lib'
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
WITH_BF_FMOD = 'false'
WITH_BF_FMOD = False
BF_FMOD = LIBDIR + '/fmod'
WITH_BF_OPENEXR = 'true'
WITH_BF_STATICOPENEXR = 'false'
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = '/usr/local'
BF_OPENEXR_INC = ['${BF_OPENEXR}/include', '${BF_OPENEXR}/include/OpenEXR' ]
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
@ -40,15 +40,15 @@ BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
WITH_BF_DDS = 'true'
WITH_BF_DDS = True
WITH_BF_JPEG = 'true'
WITH_BF_JPEG = True
BF_JPEG = '/usr/local'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
BF_JPEG_LIB = 'jpeg'
WITH_BF_PNG = 'true'
WITH_BF_PNG = True
BF_PNG = '/usr/local'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIBPATH = '${BF_PNG}/lib'
@ -57,32 +57,32 @@ BF_PNG_LIB = 'png'
BF_TIFF = '/usr/local'
BF_TIFF_INC = '${BF_TIFF}/include'
WITH_BF_ZLIB = 'true'
WITH_BF_ZLIB = True
BF_ZLIB = '/usr'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
BF_ZLIB_LIB = 'z'
WITH_BF_INTERNATIONAL = 'true'
WITH_BF_INTERNATIONAL = True
BF_GETTEXT = '/usr/local'
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
BF_GETTEXT_LIB = 'gettextlib'
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_FTGL = 'true'
WITH_BF_FTGL = True
BF_FTGL = '#extern/bFTGL'
BF_FTGL_INC = '${BF_FTGL}/include'
BF_FTGL_LIB = 'extern_ftgl'
WITH_BF_GAMEENGINE='false'
WITH_BF_GAMEENGINE=False
WITH_BF_ODE = 'false'
WITH_BF_ODE = False
BF_ODE = LIBDIR + '/ode'
BF_ODE_INC = BF_ODE + '/include'
BF_ODE_LIB = BF_ODE + '/lib/libode.a'
WITH_BF_BULLET = 'true'
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
@ -91,9 +91,9 @@ BF_SOLID = '#extern/solid'
BF_SOLID_INC = '${BF_SOLID}'
BF_SOLID_LIB = 'extern_solid'
WITH_BF_YAFRAY = 'true'
WITH_BF_YAFRAY = True
#WITH_BF_NSPR = 'true'
#WITH_BF_NSPR = True
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
#BF_NSPR_LIB =
@ -108,7 +108,7 @@ WITH_BF_YAFRAY = 'true'
# if this is not set.
#
# Be paranoid regarding library creation (do not update archives)
#BF_PARANOID = 'true'
#BF_PARANOID = True
# enable freetype2 support for text objects
BF_FREETYPE = '/usr/local'
@ -116,25 +116,25 @@ BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
BF_FREETYPE_LIB = 'freetype'
WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
BF_QUICKTIME = '/usr/local'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
WITH_BF_ICONV = 'true'
WITH_BF_ICONV = True
BF_ICONV = "/usr"
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
# enable ffmpeg support
WITH_BF_FFMPEG = 'false' # -DWITH_FFMPEG
WITH_BF_FFMPEG = False # -DWITH_FFMPEG
BF_FFMPEG = '/usr/local'
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
BF_FFMPEG_LIB = 'avformat avcodec avutil'
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = 'false'
WITH_BF_STATICOPENGL = False
BF_OPENGL = '/usr/openwin'
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIB = 'GL GLU X11 Xi'
@ -153,7 +153,7 @@ CPPFLAGS = ['-DXP_UNIX', '-DSUN_OGL_NO_VERTEX_MACROS']
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
REL_CFLAGS = ['-O2']
REL_CCFLAGS = ['-O2']
##BF_DEPEND = 'true'
##BF_DEPEND = True
##
##AR = ar
##ARFLAGS = ruv
@ -170,9 +170,9 @@ LLIBS = 'c m dl pthread stdc++'
##DYNLDFLAGS = -shared $(LDFLAGS)
BF_PROFILE_FLAGS = ['-pg','-g']
BF_PROFILE = 'false'
BF_PROFILE = False
BF_DEBUG = 'false'
BF_DEBUG = False
BF_DEBUG_FLAGS = ''
BF_BUILDDIR = '../build/sunos5'

@ -1,7 +1,7 @@
LCGDIR = '#../lib/windows'
LIBDIR = "${LCGDIR}"
WITH_BF_VERSE = 'false'
WITH_BF_VERSE = False
BF_VERSE_INCLUDE = "#extern/verse/dist"
BF_PYTHON = LIBDIR + '/python'
@ -11,8 +11,8 @@ BF_PYTHON_BINARY = 'python'
BF_PYTHON_LIB = 'python25'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
WITH_BF_OPENAL = 'true'
WITH_BF_STATICOPENAL = 'false'
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = False
BF_OPENAL = LIBDIR + '/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include'
BF_OPENAL_LIB = 'dxguid openal_static'
@ -20,12 +20,12 @@ BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
WITH_BF_FFMPEG = 'false'
WITH_BF_FFMPEG = False
BF_FFMPEG_LIB = 'avformat swscale avcodec avutil xvidcore x264'
BF_FFMPEG_LIBPATH = LIBDIR + '/gcc/ffmpeg/lib'
BF_FFMPEG_INC = LIBDIR + '/gcc/ffmpeg/include'
WITH_BF_SDL = 'true'
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl'
BF_SDL_INC = '${BF_SDL}/include'
BF_SDL_LIB = 'SDL'
@ -36,11 +36,11 @@ BF_PTHREADS_INC = '${BF_PTHREADS}/include'
BF_PTHREADS_LIB = 'pthreadGC2'
BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
WITH_BF_FMOD = 'false'
WITH_BF_FMOD = False
BF_FMOD = LIBDIR + '/fmod'
WITH_BF_OPENEXR = 'true'
WITH_BF_STATICOPENEXR = 'false'
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = LIBDIR + '/gcc/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
BF_OPENEXR_LIB = ' Half IlmImf Iex '
@ -48,15 +48,15 @@ BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
WITH_BF_DDS = 'true'
WITH_BF_DDS = True
WITH_BF_JPEG = 'true'
WITH_BF_JPEG = True
BF_JPEG = LIBDIR + '/jpeg'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'jpeg'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
WITH_BF_PNG = 'true'
WITH_BF_PNG = True
BF_PNG = LIBDIR + '/png'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'png'
@ -65,31 +65,31 @@ BF_PNG_LIBPATH = '${BF_PNG}/lib'
BF_TIFF = LIBDIR + '/tiff'
BF_TIFF_INC = '${BF_TIFF}/include'
WITH_BF_ZLIB = 'true'
WITH_BF_ZLIB = True
BF_ZLIB = LIBDIR + '/zlib'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
WITH_BF_INTERNATIONAL = 'true'
WITH_BF_INTERNATIONAL = True
BF_GETTEXT = LIBDIR + '/gettext'
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
BF_GETTEXT_LIB = 'gnu_gettext'
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_FTGL = 'true'
WITH_BF_FTGL = True
BF_FTGL = LIBDIR + '/ftgl'
BF_FTGL_INC = '${BF_FTGL}/include'
BF_FTGL_LIB = 'extern_ftgl'
WITH_BF_GAMEENGINE = 'false'
WITH_BF_GAMEENGINE = False
WITH_BF_ODE = 'true'
WITH_BF_ODE = True
BF_ODE = LIBDIR + '/ode'
BF_ODE_INC = BF_ODE + '/include'
BF_ODE_LIB = BF_ODE + '/lib/libode.a'
WITH_BF_BULLET = 'true'
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
@ -101,9 +101,9 @@ BF_SOLID_LIB = 'extern_solid'
BF_WINTAB = LIBDIR + '/wintab'
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
WITH_BF_YAFRAY = 'true'
WITH_BF_YAFRAY = True
#WITH_BF_NSPR = 'true'
#WITH_BF_NSPR = True
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
#BF_NSPR_LIB =
@ -123,18 +123,18 @@ BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
BF_QUICKTIME = '/usr/local'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
WITH_BF_ICONV = 'false'
WITH_BF_ICONV = False
BF_ICONV = LIBDIR + "/iconv"
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = 'false'
WITH_BF_STATICOPENGL = False
BF_OPENGL = 'C:\\MingW'
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
@ -159,11 +159,11 @@ CC_WARN = [ '-Wall' ]
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++']
BF_DEBUG = 'false'
BF_DEBUG = False
BF_DEBUG_FLAGS= '-g'
BF_PROFILE_FLAGS = ['-pg','-g']
BF_PROFILE = 'false'
BF_PROFILE = False
BF_BUILDDIR = '..\\build\\win32-mingw'
BF_INSTALLDIR='..\\install\\win32-mingw'

@ -1,11 +1,11 @@
LCGDIR = '#../lib/windows'
LIBDIR = '${LCGDIR}'
WITH_BF_VERSE = 'false'
WITH_BF_VERSE = False
BF_VERSE_INCLUDE = "#extern/verse/dist"
# enable ffmpeg support
WITH_BF_FFMPEG = 'true' # -DWITH_FFMPEG
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
BF_FFMPEG = LIBDIR +'/ffmpeg'
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
@ -18,8 +18,8 @@ BF_PYTHON_BINARY = 'python'
BF_PYTHON_LIB = 'python25'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
WITH_BF_OPENAL = 'true'
WITH_BF_STATICOPENAL = 'false'
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = False
BF_OPENAL = LIBDIR + '/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include ${BF_OPENAL}/include/AL '
BF_OPENAL_LIB = 'dxguid openal_static'
@ -29,16 +29,16 @@ BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
# TODO - are these useful on win32?
# BF_CXX = '/usr'
# WITH_BF_STATICCXX = 'false'
# WITH_BF_STATICCXX = False
# BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
WITH_BF_ICONV = 'true'
WITH_BF_ICONV = True
BF_ICONV = LIBDIR + '/iconv'
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
WITH_BF_SDL = 'true'
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl'
BF_SDL_INC = '${BF_SDL}/include'
BF_SDL_LIB = 'SDL.lib'
@ -49,11 +49,11 @@ BF_PTHREADS_INC = '${BF_PTHREADS}/include'
BF_PTHREADS_LIB = 'pthreadVC2'
BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
WITH_BF_FMOD = 'false'
WITH_BF_FMOD = False
BF_FMOD = LIBDIR + '/fmod'
WITH_BF_OPENEXR = 'true'
WITH_BF_STATICOPENEXR = 'false'
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = LIBDIR + '/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/IlmImf ${BF_OPENEXR}/include/Iex ${BF_OPENEXR}/include/Imath '
BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread '
@ -61,15 +61,15 @@ BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib_vs2008'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
WITH_BF_DDS = 'true'
WITH_BF_DDS = True
WITH_BF_JPEG = 'true'
WITH_BF_JPEG = True
BF_JPEG = LIBDIR + '/jpeg'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'libjpeg'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
WITH_BF_PNG = 'true'
WITH_BF_PNG = True
BF_PNG = LIBDIR + '/png'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'libpng_st'
@ -78,33 +78,33 @@ BF_PNG_LIBPATH = '${BF_PNG}/lib'
BF_TIFF = LIBDIR + '/tiff'
BF_TIFF_INC = '${BF_TIFF}/include'
WITH_BF_ZLIB = 'true'
WITH_BF_ZLIB = True
BF_ZLIB = LIBDIR + '/zlib'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIB = 'libz'
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
WITH_BF_INTERNATIONAL = 'true'
WITH_BF_INTERNATIONAL = True
BF_GETTEXT = LIBDIR + '/gettext'
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
BF_GETTEXT_LIB = 'gnu_gettext'
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_FTGL = 'true'
WITH_BF_FTGL = True
BF_FTGL = LIBDIR + '/ftgl'
BF_FTGL_INC = '${BF_FTGL}/include'
BF_FTGL_LIB = 'extern_ftgl'
WITH_BF_GAMEENGINE = 'true'
WITH_BF_PLAYER = 'true'
WITH_BF_GAMEENGINE = True
WITH_BF_PLAYER = True
WITH_BF_ODE = 'true'
WITH_BF_ODE = True
BF_ODE = LIBDIR + '/ode'
BF_ODE_INC = BF_ODE + '/include'
BF_ODE_LIB = BF_ODE + '/lib/libode.a'
WITH_BF_BULLET = 'true'
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
@ -116,11 +116,11 @@ BF_SOLID_LIB = 'extern_solid'
BF_WINTAB = LIBDIR + '/wintab'
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
WITH_BF_YAFRAY = 'true'
WITH_BF_YAFRAY = True
WITH_BF_BINRELOC = 'false'
WITH_BF_BINRELOC = False
#WITH_BF_NSPR = 'true'
#WITH_BF_NSPR = True
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
#BF_NSPR_LIB =
@ -135,21 +135,22 @@ WITH_BF_BINRELOC = 'false'
# if this is not set.
#
# Be paranoid regarding library creation (do not update archives)
#BF_PARANOID = 'true'
#BF_PARANOID = True
# enable freetype2 support for text objects
BF_WITH_FREETYPE = True
BF_FREETYPE = LIBDIR + '/freetype'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype2ST'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_QUICKTIME = 'true' # -DWITH_QUICKTIME
WITH_BF_QUICKTIME = True # -DWITH_QUICKTIME
BF_QUICKTIME = LIBDIR + '/QTDevWin'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/CIncludes'
BF_QUICKTIME_LIB = 'qtmlClient'
BF_QUICKTIME_LIBPATH = '${BF_QUICKTIME}/Libraries'
WITH_BF_STATICOPENGL = 'false'
WITH_BF_STATICOPENGL = False
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
BF_OPENGL_LIB = 'opengl32 glu32'

@ -4,24 +4,6 @@ import os
Import('env')
# Import the C flags set in the SConstruct file
#Import ('cflags')
#Import ('defines')
#Import ('user_options_dict')
#if sys.platform=='linux2' or sys.platform=='linux-i386':
# ftgl_env.Append (CCFLAGS = ['-O2', '-ansi'])
#elif sys.platform=='win32':
#ftgl_env.Append (CCFLAGS = ['/O2'])
#elif sys.platform=='sunos':
# ftgl_env.Append (CCFLAGS = ['Xc', '-v', '-fast'])
#elif sys.platform=='darwin':
# ftgl_env.Append (CCFLAGS = ['-O2', '-pipe', '-fPIC', '-funsigned-char', '-ffast-math'])
#else:
# ftgl_env.Append (CCFLAGS = cflags)
#ftgl_env.Append (CPPDEFINES = defines)
incs = 'include src ' + env['BF_FREETYPE_INC'] + ' ' + env['BF_OPENGL_INC']
defs = ''

@ -20,7 +20,7 @@ SConscript(['SoundSystem/SConscript',
# perhaps get rid of intern/csg?
NEW_CSG='false'
if env['BF_NO_ELBEEM'] == 0:
if not env['BF_NO_ELBEEM']:
SConscript(['elbeem/SConscript'])
if NEW_CSG=='false':

@ -7,7 +7,7 @@ sources = env.Glob('intern/*.cpp')
defs = 'NOGUI ELBEEM_BLENDER=1'
if env['WITH_BF_OPENMP'] == 1:
if env['WITH_BF_OPENMP']:
defs += ' PARALLEL'
if env['OURPLATFORM']=='win32-vc':

@ -10,7 +10,7 @@ sources = env.Glob('intern/*.cpp')
pf = ['GHOST_DisplayManager', 'GHOST_System', 'GHOST_Window']
if window_system in ('linux2', 'openbsd3', 'sunos5', 'freebsd6'):
if window_system in ('linux2', 'openbsd3', 'sunos5', 'freebsd6', 'irix6'):
for f in pf:
sources.remove('intern' + os.sep + f + 'Win32.cpp')
sources.remove('intern' + os.sep + f + 'Carbon.cpp')

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 KiB

After

Width:  |  Height:  |  Size: 282 KiB

@ -7,7 +7,7 @@
# Tooltip: 'Export to DirectX text file format format for XNA Animation Component Library.'
"""
__author__ = "vertex color exporting feature is added by mnemoto (original:minahito (original:Arben (Ben) Omari))"
__url__ = ("blender", "elysiun", "Adjuster's site http://sunday-lab.blogspot.com/, Author's site http://www.omariben.too.it","Adjuster's site http://ex.homeunix.net/")
__url__ = ("blender.org", "blenderartists.org", "Adjuster's site http://sunday-lab.blogspot.com/, Author's site http://www.omariben.too.it","Adjuster's site http://ex.homeunix.net/")
__version__ = "3.1"
__bpydoc__ = """\

@ -2952,7 +2952,7 @@ def write_ui():
#fbx_ui_write('/test.fbx')
break
Draw.UIBlock(fbx_ui)
Draw.UIBlock(fbx_ui, 0)
# GLOBALS.clear()

@ -678,7 +678,7 @@ def write_ui(filename):
Draw.Label('Blender Objects as OBJ:', ui_x+9, ui_y+59, 220, 20)
Draw.BeginAlign()
EXPORT_BLEN_OBS = Draw.Toggle('Objects', EVENT_REDRAW, ui_x+9, ui_y+40, 60, 20, EXPORT_BLEN_OBS.val, 'Export blender objects as "OBJ objects".', do_split)
EXPORT_BLEN_OBS = Draw.Toggle('Objects', EVENT_REDRAW, ui_x+9, ui_y+39, 60, 20, EXPORT_BLEN_OBS.val, 'Export blender objects as "OBJ objects".', do_split)
EXPORT_GROUP_BY_OB = Draw.Toggle('Groups', EVENT_REDRAW, ui_x+69, ui_y+39, 60, 20, EXPORT_GROUP_BY_OB.val, 'Export blender objects as "OBJ Groups".', do_split)
EXPORT_GROUP_BY_MAT = Draw.Toggle('Material Groups', EVENT_REDRAW, ui_x+129, ui_y+39, 100, 20, EXPORT_GROUP_BY_MAT.val, 'Group by materials.', do_split)
Draw.EndAlign()
@ -694,7 +694,7 @@ def write_ui(filename):
# hack so the toggle buttons redraw. this is not nice at all
while GLOBALS['EVENT'] not in (EVENT_EXIT, EVENT_EXPORT):
Draw.UIBlock(obj_ui)
Draw.UIBlock(obj_ui, 0)
if GLOBALS['EVENT'] != EVENT_EXPORT:
return

@ -878,7 +878,7 @@ def load_obj_ui(filepath, BATCH_LOAD= False):
# hack so the toggle buttons redraw. this is not nice at all
while GLOBALS['EVENT'] not in (EVENT_EXIT, EVENT_IMPORT):
Draw.UIBlock(obj_ui)
Draw.UIBlock(obj_ui, 0)
if GLOBALS['EVENT'] != EVENT_IMPORT:
return

@ -53,7 +53,7 @@ def dirName(path):
# order dosnt matter for loc/size/rot
# right handed rotation
# angles are in radians
# rotation first defines axis then ammount in deg
# rotation first defines axis then ammount in radians
@ -1782,7 +1782,7 @@ def importTransform(node, ancestry):
bpyob.setMatrix( getFinalMatrix(node, None, ancestry) )
def load_web3d(path, PREF_FLAT=False, PREF_CIRCLE_DIV=16):
def load_web3d(path, PREF_FLAT=False, PREF_CIRCLE_DIV=16, HELPER_FUNC = None):
# Used when adding blender primitives
GLOBALS['CIRCLE_DETAIL'] = PREF_CIRCLE_DIV
@ -1818,8 +1818,14 @@ def load_web3d(path, PREF_FLAT=False, PREF_CIRCLE_DIV=16):
elif spec=='Transform':
# Only use transform nodes when we are not importing a flat object hierarchy
if PREF_FLAT==False:
importTransform(node, ancestry)
importTransform(node, ancestry)
else:
# Note, include this function so the VRML/X3D importer can be extended
# by an external script.
if HELPER_FUNC:
HELPER_FUNC(node, ancestry)
# Add in hierarchy
if PREF_FLAT==False:
child_dict = {}

@ -106,6 +106,12 @@ try:
except:
struct= chunk= cStringIO= None
# python 2.3 has no reversed() iterator. this will only work on lists and tuples
try:
reversed
except:
def reversed(l): return l[::-1]
### # Debuggin disabled in release.
### # do a search replace to enabe debug prints
### DEBUG = False

@ -216,7 +216,7 @@ def main():
# hack so the toggle buttons redraw. this is not nice at all
while GLOBALS['EVENT'] == EVENT_REDRAW:
Draw.UIBlock(terain_clamp_ui)
Draw.UIBlock(terain_clamp_ui, 0)
if __name__ == '__main__':
main()

@ -143,10 +143,10 @@ def file_callback(filename):
normal_key = rvec3d(normal)
if faceUV:
uvcoord= tuple(uv[j])
uvcoord= uv[j][0], 1.0-uv[j][1]
uvcoord_key = rvec2d(uvcoord)
elif vertexUV:
uvcoord= tuple(v.uvco)
uvcoord= v.uvco[0], 1.0-v.uvco[1]
uvcoord_key = rvec2d(uvcoord)
if vertexColors: color= col[j].r, col[j].g, col[j].b
@ -209,8 +209,8 @@ def file_callback(filename):
for j, v in enumerate(f):
if f.smooth: normal= rvec3d(v.no)
else: normal= no
if faceUV: uvcoord= rvec2d(uv[j])
elif vertexUV: uvcoord= rvec2d(v.uvco)
if faceUV: uvcoord= rvec2d((uv[j][0], 1.0-uv[j][1]))
elif vertexUV: uvcoord= rvec2d((v.uvco[0], 1.0-v.uvco[1]))
if vertexColors: color= col[j].r, col[j].g, col[j].b
file.write('%d ' % vdict[v.index][normal, uvcoord, color])

@ -2,13 +2,13 @@
"""
Name: 'Stanford PLY (*.ply)...'
Blender: 241
Blender: 248
Group: 'Import'
Tip: 'Import a Stanford PLY file'
"""
__author__ = 'Bruce Merry'
__version__ = '0.92'
__version__ = '0.93'
__bpydoc__ = """\
This script imports Stanford PLY files into Blender. It supports per-vertex
normals, and per-face colours and texture coordinates.
@ -35,20 +35,20 @@ Run this script from "File->Import" and select the desired PLY file.
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Updated by Campbell Barton AKA Ideasman, 10% faster code.
# 20th Oct 2008, 0.93 - Updated by Campbell Barton AKA ideasman42, use Mesh rather then NMesh, dont import normals, vcolors work again.
# Updated by Campbell Barton AKA Ideasman42, 10% faster code.
# Portions of this code are taken from mod_meshtools.py in Blender
# 2.32.
import Blender
try:
import re, struct, StringIO
import re, struct
except:
struct= None
class element_spec:
name = ''
count = 0
class element_spec(object):
__slots__ = 'name', 'count', 'properties'
def __init__(self, name, count):
self.name = name
self.count = count
@ -64,10 +64,8 @@ class element_spec:
if p.name == name: return i
return -1
class property_spec:
name = ''
list_type = ''
numeric_type = ''
class property_spec(object):
__slots__ = 'name', 'list_type', 'numeric_type'
def __init__(self, name, list_type, numeric_type):
self.name = name
self.list_type = list_type
@ -117,14 +115,17 @@ class property_spec:
else:
return self.read_format(format, 1, self.numeric_type, stream)[0]
class object_spec:
class object_spec(object):
__slots__ = 'specs'
'A list of element_specs'
specs = []
def __init__(self):
self.specs = []
def load(self, format, stream):
return dict([(i.name,[i.load(format, stream) for j in xrange(i.count) ]) for i in self.specs])
'''
# Longhand for above LC
answer = {}
for i in self.specs:
answer[i.name] = []
@ -176,7 +177,7 @@ def read(filename):
if (len(tokens) < 3):
print 'Invalid format line'
return None
if (tokens[1] not in format_specs.keys()):
if (tokens[1] not in format_specs): # .keys()): # keys is implicit
print 'Unknown format', tokens[1]
return None
if (tokens[2] != version):
@ -209,115 +210,132 @@ def read(filename):
return (obj_spec, obj);
def add_face(vertices, varr, indices, uvindices, colindices):
face = Blender.NMesh.Face([varr[i] for i in indices])
for index in indices:
vertex = vertices[index];
if uvindices:
face.uv.append((vertex[uvindices[0]], 1.0 - vertex[uvindices[1]]))
face.mode &= ~Blender.NMesh.FaceModes.TEX
if colindices:
if not uvindices: face.uv.append((0, 0)) # Force faceUV
face.col.append(Blender.NMesh.Col(vertex[colindices[0]], vertex[colindices[1]], vertex[colindices[2]], 255))
face.mode &= ~Blender.NMesh.FaceModes.TEX
return face
def filesel_callback(filename):
def load_ply(filename):
t = Blender.sys.time()
(obj_spec, obj) = read(filename)
obj_spec, obj = read(filename)
if obj == None:
print 'Invalid file'
return
vmap = {}
varr = []
uvindices = None
noindices = None
colindices = None
uvindices = colindices = None
# noindices = None # Ignore normals
for el in obj_spec.specs:
if el.name == 'vertex':
vindices = vindices_x, vindices_y, vindices_z = (el.index('x'), el.index('y'), el.index('z'))
if el.index('nx') >= 0 and el.index('ny') >= 0 and el.index('nz') >= 0:
noindices = (el.index('nx'), el.index('ny'), el.index('nz'))
if el.index('s') >= 0 and el.index('t') >= 0:
uvindices = (el.index('s'), el.index('t'))
if el.index('red') >= 0 and el.index('green') and el.index('blue') >= 0:
colindices = (el.index('red'), el.index('green'), el.index('blue'))
# noindices = (el.index('nx'), el.index('ny'), el.index('nz'))
# if -1 in noindices: noindices = None
uvindices = (el.index('s'), el.index('t'))
if -1 in uvindices: uvindices = None
colindices = (el.index('red'), el.index('green'), el.index('blue'))
if -1 in colindices: colindices = None
elif el.name == 'face':
findex = el.index('vertex_indices')
mesh_faces = []
mesh_uvs = []
mesh_colors = []
def add_face(vertices, indices, uvindices, colindices):
mesh_faces.append(indices)
if uvindices: mesh_uvs.append([ (vertices[index][uvindices[0]], 1.0 - vertices[index][uvindices[1]]) for index in indices])
if colindices: mesh_colors.append([ (vertices[index][colindices[0]], vertices[index][colindices[1]], vertices[index][colindices[2]]) for index in indices])
if uvindices or colindices:
# If we have Cols or UVs then we need to check the face order.
add_face_simple = add_face
mesh = Blender.NMesh.GetRaw()
NMVert = Blender.NMesh.Vert
for v in obj['vertex']:
if noindices > 0:
x,y,z,nx,ny,nz = vkey =\
(v[vindices_x], v[vindices_y], v[vindices_z],\
v[noindices[0]], v[noindices[1]], v[noindices[2]])
else:
x,y,z = vkey = (v[vindices_x], v[vindices_y], v[vindices_z])
#if not vmap.has_key(vkey):
try: # try uses 1 less dict lookup
varr.append(vmap[vkey])
except:
nmv = NMVert(vkey[0], vkey[1], vkey[2])
mesh.verts.append(nmv)
if noindices > 0:
nmv.no[0] = vkey[3]
nmv.no[1] = vkey[4]
nmv.no[2] = vkey[5]
vmap[vkey] = nmv
varr.append(vmap[vkey])
# EVIL EEKADOODLE - face order annoyance.
def add_face(vertices, indices, uvindices, colindices):
if len(indices)==4:
if indices[2]==0 or indices[3]==0:
indices= indices[2], indices[3], indices[0], indices[1]
elif len(indices)==3:
if indices[2]==0:
indices= indices[1], indices[2], indices[0]
add_face_simple(vertices, indices, uvindices, colindices)
verts = obj['vertex']
if 'face' in obj:
for f in obj['face']:
ind = f[findex]
nind = len(ind)
if nind <= 4:
mesh.faces.append(add_face(verts, varr, ind, uvindices, colindices))
len_ind = len(ind)
if len_ind <= 4:
add_face(verts, ind, uvindices, colindices)
else:
for j in xrange(nind - 2):
mesh.faces.append(add_face(verts, varr, (ind[0], ind[j + 1], ind[j + 2]), uvindices, colindices))
# Fan fill the face
for j in xrange(len_ind - 2):
add_face(verts, (ind[0], ind[j + 1], ind[j + 2]), uvindices, colindices)
del obj # Reclaim memory
mesh = Blender.Mesh.New()
mesh.verts.extend([(v[vindices_x], v[vindices_y], v[vindices_z]) for v in obj['vertex']])
if mesh_faces:
mesh.faces.extend(mesh_faces, smooth=True, ignoreDups=True)
if uvindices or colindices:
if uvindices: mesh.faceUV = True
if colindices: mesh.vertexColors = True
for i, f in enumerate(mesh.faces):
if uvindices:
ply_uv = mesh_uvs[i]
for j, uv in enumerate(f.uv):
uv[:] = ply_uv[j]
if colindices:
ply_col = mesh_colors[i]
for j, col in enumerate(f.col):
col.r, col.g, col.b = ply_col[j]
mesh.calcNormals()
'''
if noindices:
normals = 1
else:
normals = 0
'''
objname = Blender.sys.splitext(Blender.sys.basename(filename))[0]
scn= Blender.Scene.GetCurrent()
scn.objects.selected = []
mesh.name= objname
scn.objects.new(mesh)
scn.objects.active = scn.objects.new(mesh)
Blender.Redraw()
Blender.Window.DrawProgressBar(1.0, '')
print '\nSuccessfully imported ' + Blender.sys.basename(filename) + ' ' + str(Blender.sys.time()-t)
print '\nSuccessfully imported "%s" in %.3f sec' % (filename, Blender.sys.time()-t)
def main():
if not struct:
Blender.Draw.PupMenu('This importer requires a full python install')
msg = 'This importer requires a full python install'
if Blender.mode == 'background': print msg
else: Blender.Draw.PupMenu(msg)
return
Blender.Window.FileSelector(filesel_callback, 'Import PLY', '*.ply')
Blender.Window.FileSelector(load_ply, 'Import PLY', '*.ply')
if __name__=='__main__':
main()
'''
import bpy
import os
files = os.popen('find /fe/ply -iname "*.ply"').readlines()
files.sort()
tot = len(files)
for i, f in enumerate(files):
if i < 26 or i > 1000000:
continue
#if i != 12686:
# continue
f = f.strip()
print f, i, tot
sce = bpy.data.scenes.new(f.split('/')[-1])
bpy.data.scenes.active = sce
# Window.
load_ply(f)
'''

@ -47,6 +47,12 @@ def AngleBetweenVecs(a1,a2):
except:
return 180.0
# python 2.3 has no reversed() iterator. this will only work on lists and tuples
try:
reversed
except:
def reversed(l): return l[::-1]
class prettyface(object):
__slots__ = 'uv', 'width', 'height', 'children', 'xoff', 'yoff', 'has_parent', 'rot'
def __init__(self, data):
@ -451,7 +457,10 @@ PREF_MARGIN_DIV= 512):
# Even boxes in groups of 4
for d, boxes in even_dict.items():
if d < max_int_dimension:
boxes.sort(key = lambda a: len(a.children))
# py 2.3 compat
try: boxes.sort(key = lambda a: len(a.children))
except: boxes.sort(lambda a, b: cmp(len(a.children), len(b.children)))
while len(boxes) >= 4:
# print "bar", len(boxes)
ok = True

@ -61,6 +61,12 @@ def AngleBetweenVecsSafe(a1, a2):
except:
return 180.0
# Python 2.3 has no reversed.
try:
reversed
except:
def reversed(l): return l[::-1]
# Copied from blender, we could wrap this! - BKE_curve.c
# But probably not toooo bad in python
def forward_diff_bezier(q0, q1, q2, q3, pointlist, steps, axis):
@ -266,7 +272,9 @@ class tree:
brch.calcData()
# Sort from big to small, so big branches get priority
self.branches_all.sort( key = lambda brch: -brch.bpoints[0].radius )
# Py 2.3 dosnt have keywords in sort
try: self.branches_all.sort( key = lambda brch: -brch.bpoints[0].radius )
except: self.branches_all.sort( lambda brch_a, brch_b: cmp(brch_b.bpoints[0].radius, brch_a.bpoints[0].radius) ) # py2.3
def closestBranchPt(self, co):
@ -1144,7 +1152,8 @@ class tree:
# Try sorting by other properties! this is ok for now
for segments_level_current in segments_level:
segments_level_current.sort( key = lambda seg: -(seg.headCo-seg.tailCo).length )
try: segments_level_current.sort( key = lambda seg: -(seg.headCo-seg.tailCo).length )
except: segments_level_current.sort( lambda a,b: cmp((b.headCo-b.tailCo).length, (a.headCo-a.tailCo).length) ) # py2.3
for level in xrange(twig_fill_levels):
if len(segments_level) > level:
@ -1370,18 +1379,23 @@ class tree:
# Get the branches based on our selection method!
if twig_select_mode==0:
branches_sorted.sort( key = lambda brch: brch.getLength())
try: branches_sorted.sort( key = lambda brch: brch.getLength())
except: branches_sorted.sort( lambda a,b: cmp(a.getLength(),a.getLength()) ) # py2.3
elif twig_select_mode==1:
branches_sorted.sort( key = lambda brch:-brch.getLength())
try: branches_sorted.sort( key = lambda brch:-brch.getLength())
except: branches_sorted.sort( lambda a,b: cmp(b.getLength(), a.getLength()) ) # py2.3
elif twig_select_mode==2:
branches_sorted.sort( key = lambda brch:brch.getStraightness())
try: branches_sorted.sort( key = lambda brch:brch.getStraightness())
except: branches_sorted.sort( lambda a,b: cmp(a.getStraightness(), b.getStraightness())) # py2.3
elif twig_select_mode==3:
branches_sorted.sort( key = lambda brch:-brch.getStraightness())
try: branches_sorted.sort( key = lambda brch:-brch.getStraightness())
except: branches_sorted.sort( lambda a,b: cmp(b.getStraightness(), a.getStraightness())) # py2.3
factor_int = int(len(self.branches_all) * twig_select_factor)
branches_sorted[factor_int:] = [] # remove the last part of the list
branches_sorted.sort( key = lambda brch: len(brch.bpoints))
try: branches_sorted.sort( key = lambda brch: len(brch.bpoints))
except: branches_sorted.sort( lambda a,b: cmp(len(a.bpoints), len(b.bpoints)) ) # py2.3
branches_new = []
#for i in xrange(ratio_int):

@ -4,7 +4,7 @@ Import ('env')
SConscript(['blender/SConscript',
'kernel/SConscript',
'creator/SConscript'])
if env['WITH_BF_GAMEENGINE'] == 1:
if env['WITH_BF_GAMEENGINE']:
SConscript (['gameengine/SConscript'])
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'):

@ -34,6 +34,10 @@ IF(WITH_OPENEXR)
SUBDIRS(imbuf/intern/openexr)
ENDIF(WITH_OPENEXR)
IF(WITH_DDS)
SUBDIRS(imbuf/intern/dds)
ENDIF(WITH_DDS)
IF(WITH_QUICKTIME)
SUBDIRS(quicktime)
ENDIF(WITH_QUICKTIME)

@ -18,17 +18,17 @@ SConscript(['avi/SConscript',
'src/SConscript',
'nodes/SConscript'])
if env['WITH_BF_YAFRAY'] == 1:
if env['WITH_BF_YAFRAY']:
SConscript(['yafray/SConscript'])
if env['WITH_BF_INTERNATIONAL'] == 1:
if env['WITH_BF_INTERNATIONAL']:
SConscript (['ftfont/SConscript'])
if env['WITH_BF_DDS'] == 1:
if env['WITH_BF_DDS']:
SConscript (['imbuf/intern/dds/SConscript'])
if env['WITH_BF_OPENEXR'] == 1:
if env['WITH_BF_OPENEXR']:
SConscript (['imbuf/intern/openexr/SConscript'])
if env['WITH_BF_QUICKTIME'] == 1:
if env['WITH_BF_QUICKTIME']:
SConscript (['quicktime/SConscript'])

@ -41,7 +41,7 @@ struct ListBase;
struct MemFile;
#define BLENDER_VERSION 248
#define BLENDER_SUBVERSION 0
#define BLENDER_SUBVERSION 1
#define BLENDER_MINVERSION 245
#define BLENDER_MINSUBVERSION 15

@ -47,6 +47,10 @@ IF(WITH_OPENEXR)
ADD_DEFINITIONS(-DWITH_OPENEXR)
ENDIF(WITH_OPENEXR)
IF(WITH_DDS)
ADD_DEFINITIONS(-DWITH_DDS)
ENDIF(WITH_DDS)
IF(WITH_QUICKTIME)
SET(INC ${INC} ${QUICKTIME_INC})
ADD_DEFINITIONS(-DWITH_QUICKTIME)

@ -29,21 +29,21 @@ if env['WITH_BF_VERSE']:
if env['WITH_BF_VERSE']:
defs += ' WITH_VERSE'
if env['WITH_BF_OPENEXR'] == 1:
if env['WITH_BF_OPENEXR']:
defs += ' WITH_OPENEXR'
if env['WITH_BF_DDS'] == 1:
if env['WITH_BF_DDS']:
defs += ' WITH_DDS'
if env['WITH_BF_FFMPEG'] == 1:
if env['WITH_BF_FFMPEG']:
defs += ' WITH_FFMPEG'
incs += ' ' + env['BF_FFMPEG_INC']
if env['WITH_BF_QUICKTIME'] == 1:
if env['WITH_BF_QUICKTIME']:
defs += ' WITH_QUICKTIME'
incs += ' ' + env['BF_QUICKTIME_INC']
if env['BF_NO_ELBEEM'] == 1:
if env['BF_NO_ELBEEM']:
defs += ' DISABLE_ELBEEM'
if env['WITH_BF_PLAYER']:

@ -842,7 +842,7 @@ static void default_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstrain
if (nocopy == 0) { \
datatar= ct->tar; \
strcpy(datasubtarget, ct->subtarget); \
con->tarspace= ct->space; \
con->tarspace= (char)ct->space; \
} \
\
BLI_freelinkN(list, ct); \
@ -862,7 +862,7 @@ static void default_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstrain
bConstraintTarget *ctn = ct->next; \
if (nocopy == 0) { \
datatar= ct->tar; \
con->tarspace= ct->space; \
con->tarspace= (char)ct->space; \
} \
\
BLI_freelinkN(list, ct); \
@ -1434,9 +1434,9 @@ static void rotlimit_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *t
Mat4ToEul(cob->matrix, eul);
/* eulers: radians to degrees! */
eul[0] = (eul[0] / M_PI * 180);
eul[1] = (eul[1] / M_PI * 180);
eul[2] = (eul[2] / M_PI * 180);
eul[0] = (float)(eul[0] / M_PI * 180);
eul[1] = (float)(eul[1] / M_PI * 180);
eul[2] = (float)(eul[2] / M_PI * 180);
/* limiting of euler values... */
if (data->flag & LIMIT_XROT) {
@ -1462,9 +1462,9 @@ static void rotlimit_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *t
}
/* eulers: degrees to radians ! */
eul[0] = (eul[0] / 180 * M_PI);
eul[1] = (eul[1] / 180 * M_PI);
eul[2] = (eul[2] / 180 * M_PI);
eul[0] = (float)(eul[0] / 180 * M_PI);
eul[1] = (float)(eul[1] / 180 * M_PI);
eul[2] = (float)(eul[2] / 180 * M_PI);
LocEulSizeToMat4(cob->matrix, loc, eul, size);
}
@ -2508,7 +2508,7 @@ static void distlimit_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
else if (data->flag & LIMITDIST_USESOFT) {
// FIXME: there's a problem with "jumping" when this kicks in
if (dist >= (data->dist - data->soft)) {
sfac = data->soft*(1.0 - exp(-(dist - data->dist)/data->soft)) + data->dist;
sfac = (float)( data->soft*(1.0 - exp(-(dist - data->dist)/data->soft)) + data->dist );
sfac /= dist;
clamp_surf= 1;
@ -3139,7 +3139,7 @@ static void transform_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
case 1: /* rotation (convert to degrees first) */
Mat4ToEul(ct->matrix, dvec);
for (i=0; i<3; i++)
dvec[i] = dvec[i] / M_PI * 180;
dvec[i] = (float)(dvec[i] / M_PI * 180);
break;
default: /* location */
VecCopyf(dvec, ct->matrix[3]);
@ -3189,7 +3189,7 @@ static void transform_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
eul[i]= tmin + (sval[data->map[i]] * (tmax - tmin));
/* now convert final value back to radians */
eul[i] = eul[i] / 180 * M_PI;
eul[i] = (float)(eul[i] / 180 * M_PI);
}
break;
default: /* location */

@ -234,46 +234,46 @@ void ipo_default_v2d_cur (int blocktype, rctf *cur)
{
switch (blocktype) {
case ID_CA:
cur->xmin= G.scene->r.sfra;
cur->xmax= G.scene->r.efra;
cur->ymin= 0.0;
cur->ymax= 100.0;
cur->xmin= (float)G.scene->r.sfra;
cur->xmax= (float)G.scene->r.efra;
cur->ymin= 0.0f;
cur->ymax= 100.0f;
break;
case ID_MA: case ID_WO: case ID_LA:
case ID_CU: case ID_CO:
cur->xmin= (float)G.scene->r.sfra-0.1;
cur->xmax= G.scene->r.efra;
cur->ymin= (float)-0.1;
cur->ymax= (float)+1.1;
cur->xmin= (float)(G.scene->r.sfra - 0.1f);
cur->xmax= (float)G.scene->r.efra;
cur->ymin= (float)-0.1f;
cur->ymax= (float)+1.1f;
break;
case ID_TE:
cur->xmin= (float)G.scene->r.sfra-0.1;
cur->xmax= G.scene->r.efra;
cur->ymin= (float)-0.1;
cur->ymax= (float)+1.1;
cur->xmin= (float)(G.scene->r.sfra - 0.1f);
cur->xmax= (float)G.scene->r.efra;
cur->ymin= (float)-0.1f;
cur->ymax= (float)+1.1f;
break;
case ID_SEQ:
cur->xmin= -5.0;
cur->xmax= 105.0;
cur->ymin= (float)-0.1;
cur->ymax= (float)+1.1;
cur->xmin= -5.0f;
cur->xmax= 105.0f;
cur->ymin= (float)-0.1f;
cur->ymax= (float)+1.1f;
break;
case ID_KE:
cur->xmin= (float)G.scene->r.sfra-0.1;
cur->xmax= G.scene->r.efra;
cur->ymin= (float)-0.1;
cur->ymax= (float)+2.1;
cur->xmin= (float)(G.scene->r.sfra - 0.1f);
cur->xmax= (float)G.scene->r.efra;
cur->ymin= (float)-0.1f;
cur->ymax= (float)+2.1f;
break;
default: /* ID_OB and everything else */
cur->xmin= G.scene->r.sfra;
cur->xmax= G.scene->r.efra;
cur->ymin= -5.0;
cur->ymax= +5.0;
cur->xmin= (float)G.scene->r.sfra;
cur->xmax= (float)G.scene->r.efra;
cur->ymin= -5.0f;
cur->ymax= +5.0f;
break;
}
}
@ -1053,11 +1053,11 @@ static float eval_driver (IpoDriver *driver, float ipotime)
case OB_LOC_Z:
return ob->loc[2];
case OB_ROT_X: /* hack: euler rotations are divided by 10 deg to fit on same axes as other channels */
return ob->rot[0]/(M_PI_2/9.0);
return (float)( ob->rot[0]/(M_PI_2/9.0) );
case OB_ROT_Y: /* hack: euler rotations are divided by 10 deg to fit on same axes as other channels */
return ob->rot[1]/(M_PI_2/9.0);
return (float)( ob->rot[1]/(M_PI_2/9.0) );
case OB_ROT_Z: /* hack: euler rotations are divided by 10 deg to fit on same axes as other channels */
return ob->rot[2]/(M_PI_2/9.0);
return (float)( ob->rot[2]/(M_PI_2/9.0) );
case OB_SIZE_X:
return ob->size[0];
case OB_SIZE_Y:
@ -1090,7 +1090,7 @@ static float eval_driver (IpoDriver *driver, float ipotime)
angle = 2.0f * (saacos(quat[0]));
angle= ABS(angle);
return (angle > M_PI) ? ((2.0f * M_PI) - angle) : (angle);
return (angle > M_PI) ? (float)((2.0f * M_PI) - angle) : (float)(angle);
}
}
@ -1112,11 +1112,11 @@ static float eval_driver (IpoDriver *driver, float ipotime)
case OB_LOC_Z:
return loc[2];
case OB_ROT_X: /* hack: euler rotations are divided by 10 deg to fit on same axes as other channels */
return eul[0]/(M_PI_2/9.0);
return (float)( eul[0]/(M_PI_2/9.0) );
case OB_ROT_Y: /* hack: euler rotations are divided by 10 deg to fit on same axes as other channels */
return eul[1]/(M_PI_2/9.0);
return (float)( eul[1]/(M_PI_2/9.0) );
case OB_ROT_Z: /* hack: euler rotations are divided by 10 deg to fit on same axes as other channels */
return eul[2]/(M_PI_2/9.0);
return (float)( eul[2]/(M_PI_2/9.0) );
case OB_SIZE_X:
return size[0];
case OB_SIZE_Y:
@ -2487,79 +2487,92 @@ void set_icu_vars (IpoCurve *icu)
{
switch (icu->adrcode & (MA_MAP1-1)) {
case TE_NSIZE:
icu->ymin= 0.0001;
icu->ymax= 2.0; break;
icu->ymin= 0.0001f;
icu->ymax= 2.0f;
break;
case TE_NDEPTH:
icu->vartype= IPO_SHORT;
icu->ipo= IPO_CONST;
icu->ymax= 6.0; break;
icu->ymax= 6.0f;
break;
case TE_NTYPE:
icu->vartype= IPO_SHORT;
icu->ipo= IPO_CONST;
icu->ymax= 1.0; break;
icu->ymax= 1.0f;
break;
case TE_TURB:
icu->ymax= 200.0; break;
icu->ymax= 200.0f;
break;
case TE_VNW1:
case TE_VNW2:
case TE_VNW3:
case TE_VNW4:
icu->ymax= 2.0;
icu->ymin= -2.0; break;
icu->ymax= 2.0f;
icu->ymin= -2.0f;
break;
case TE_VNMEXP:
icu->ymax= 10.0;
icu->ymin= 0.01; break;
icu->ymax= 10.0f;
icu->ymin= 0.01f;
break;
case TE_VN_DISTM:
icu->vartype= IPO_SHORT;
icu->ipo= IPO_CONST;
icu->ymax= 6.0; break;
icu->ymax= 6.0f;
break;
case TE_VN_COLT:
icu->vartype= IPO_SHORT;
icu->ipo= IPO_CONST;
icu->ymax= 3.0; break;
icu->ymax= 3.0f;
break;
case TE_ISCA:
icu->ymax= 10.0;
icu->ymin= 0.01; break;
icu->ymax= 10.0f;
icu->ymin= 0.01f;
break;
case TE_DISTA:
icu->ymax= 10.0; break;
icu->ymax= 10.0f;
break;
case TE_MG_TYP:
icu->vartype= IPO_SHORT;
icu->ipo= IPO_CONST;
icu->ymax= 6.0; break;
icu->ymax= 6.0f;
break;
case TE_MGH:
icu->ymin= 0.0001;
icu->ymax= 2.0; break;
icu->ymin= 0.0001f;
icu->ymax= 2.0f;
break;
case TE_MG_LAC:
case TE_MG_OFF:
case TE_MG_GAIN:
icu->ymax= 6.0; break;
icu->ymax= 6.0f; break;
case TE_MG_OCT:
icu->ymax= 8.0; break;
icu->ymax= 8.0f; break;
case TE_N_BAS1:
case TE_N_BAS2:
icu->vartype= IPO_SHORT;
icu->ipo= IPO_CONST;
icu->ymax= 8.0; break;
icu->ymax= 8.0f;
break;
case TE_COL_R:
icu->ymax= 0.0; break;
icu->ymax= 0.0f; break;
case TE_COL_G:
icu->ymax= 2.0; break;
icu->ymax= 2.0f; break;
case TE_COL_B:
icu->ymax= 2.0; break;
icu->ymax= 2.0f; break;
case TE_BRIGHT:
icu->ymax= 2.0; break;
icu->ymax= 2.0f; break;
case TE_CONTRA:
icu->ymax= 5.0; break;
icu->ymax= 5.0f; break;
}
}
break;
case ID_SEQ: /* sequence channels ----------------------------- */
{
icu->ymax= 1.0;
icu->ymax= 1.0f;
}
break;
case ID_CU: /* curve channels ----------------------------- */
{
icu->ymax= 1.0;
icu->ymax= 1.0f;
}
break;
case ID_WO: /* world channels ----------------------------- */
@ -2567,7 +2580,8 @@ void set_icu_vars (IpoCurve *icu)
if (icu->adrcode < MA_MAP1) {
switch (icu->adrcode) {
case WO_EXPOS:
icu->ymax= 5.0; break;
icu->ymax= 5.0f; break;
case WO_MISTDI:
case WO_MISTSTA:
case WO_MISTHI:
@ -2576,7 +2590,7 @@ void set_icu_vars (IpoCurve *icu)
break;
default:
icu->ymax= 1.0;
icu->ymax= 1.0f;
break;
}
}
@ -2588,8 +2602,8 @@ void set_icu_vars (IpoCurve *icu)
case MAP_SIZE_X:
case MAP_SIZE_Y:
case MAP_SIZE_Z:
icu->ymax= 100.0;
icu->ymin= -100.0;
icu->ymax= 100.0f;
icu->ymin= -100.0f;
break;
case MAP_R:
case MAP_G:
@ -2599,7 +2613,7 @@ void set_icu_vars (IpoCurve *icu)
case MAP_NORF:
case MAP_VARF:
case MAP_DISP:
icu->ymax= 1.0;
icu->ymax= 1.0f;
}
}
}
@ -2618,13 +2632,13 @@ void set_icu_vars (IpoCurve *icu)
case LA_SPOTBL:
case LA_QUAD1:
case LA_QUAD2:
icu->ymax= 1.0; break;
icu->ymax= 1.0f; break;
case LA_SPOTSI:
icu->ymax= 180.0; break;
icu->ymax= 180.0f; break;
case LA_HALOINT:
icu->ymax= 5.0; break;
icu->ymax= 5.0f; break;
}
}
else {
@ -2635,8 +2649,8 @@ void set_icu_vars (IpoCurve *icu)
case MAP_SIZE_X:
case MAP_SIZE_Y:
case MAP_SIZE_Z:
icu->ymax= 100.0;
icu->ymin= -100.0;
icu->ymax= 100.0f;
icu->ymin= -100.0f;
break;
case MAP_R:
case MAP_G:
@ -2646,7 +2660,7 @@ void set_icu_vars (IpoCurve *icu)
case MAP_NORF:
case MAP_VARF:
case MAP_DISP:
icu->ymax= 1.0;
icu->ymax= 1.0f;
}
}
}
@ -2655,8 +2669,8 @@ void set_icu_vars (IpoCurve *icu)
{
switch (icu->adrcode) {
case CAM_LENS:
icu->ymin= 1.0;
icu->ymax= 1000.0;
icu->ymin= 1.0f;
icu->ymax= 1000.0f;
break;
case CAM_STA:
icu->ymin= 0.001f;
@ -2666,12 +2680,12 @@ void set_icu_vars (IpoCurve *icu)
break;
case CAM_YF_APERT:
icu->ymin = 0.0;
icu->ymax = 2.0;
icu->ymin = 0.0f;
icu->ymax = 2.0f;
break;
case CAM_YF_FDIST:
icu->ymin = 0.0;
icu->ymax = 5000.0;
icu->ymin = 0.0f;
icu->ymax = 5000.0f;
break;
case CAM_SHIFT_X:
@ -2686,20 +2700,20 @@ void set_icu_vars (IpoCurve *icu)
{
switch (icu->adrcode) {
case SND_VOLUME:
icu->ymin= 0.0;
icu->ymax= 1.0;
icu->ymin= 0.0f;
icu->ymax= 1.0f;
break;
case SND_PITCH:
icu->ymin= -12.0;
icu->ymin= 12.0;
icu->ymin= -12.0f;
icu->ymin= 12.0f;
break;
case SND_PANNING:
icu->ymin= 0.0;
icu->ymax= 1.0;
icu->ymin= 0.0f;
icu->ymax= 1.0f;
break;
case SND_ATTEN:
icu->ymin= 0.0;
icu->ymin= 1.0;
icu->ymin= 0.0f;
icu->ymin= 1.0f;
break;
}
}
@ -2713,28 +2727,28 @@ void set_icu_vars (IpoCurve *icu)
case PART_EMIT_VEL:
case PART_EMIT_AVE:
case PART_EMIT_SIZE:
icu->ymin= 0.0;
icu->ymin= 0.0f;
break;
case PART_CLUMP:
icu->ymin= -1.0;
icu->ymax= 1.0;
icu->ymin= -1.0f;
icu->ymax= 1.0f;
break;
case PART_DRAG:
case PART_DAMP:
case PART_LENGTH:
icu->ymin= 0.0;
icu->ymax= 1.0;
icu->ymin= 0.0f;
icu->ymax= 1.0f;
break;
case PART_KINK_SHAPE:
icu->ymin= -0.999;
icu->ymax= 0.999;
icu->ymin= -0.999f;
icu->ymax= 0.999f;
break;
}
}
break;
case ID_CO: /* constraint channels ----------------------------- */
{
icu->ymin= 0.0;
icu->ymin= 0.0f;
icu->ymax= 1.0f;
}
break;

@ -215,7 +215,11 @@ void shrinkwrap_calc_nearest_vertex(ShrinkwrapCalcData *calc)
BENCH(bvhtree_from_mesh_verts(&treeData, calc->target, 0.0, 2, 6));
if(treeData.tree == NULL) return OUT_OF_MEMORY();
if(treeData.tree == NULL)
{
OUT_OF_MEMORY();
return;
}
//Setup nearest
nearest.index = -1;
@ -526,7 +530,11 @@ void shrinkwrap_calc_nearest_surface_point(ShrinkwrapCalcData *calc)
//Create a bvh-tree of the given target
BENCH(bvhtree_from_mesh_faces( &treeData, calc->target, 0.0, 2, 6));
if(treeData.tree == NULL) return OUT_OF_MEMORY();
if(treeData.tree == NULL)
{
OUT_OF_MEMORY();
return;
}
//Setup nearest
nearest.index = -1;

@ -10,7 +10,7 @@ incs += ' ' + env['BF_ZLIB_INC']
incs += ' ' + env['BF_SDL_INC']
defs = ''
if env['WITH_BF_INTERNATIONAL'] == 1:
if env['WITH_BF_INTERNATIONAL']:
defs = 'WITH_FREETYPE2'
if env['WITH_BF_VERSE']:

@ -4921,6 +4921,12 @@ static void alphasort_version_246(FileData *fd, Library *lib, Mesh *me)
ma= newlibadr(fd, lib, me->mat[mf->mat_nr]);
texalpha = 0;
/* we can't read from this if it comes from a library,
* because direct_link might not have happened on it,
* so ma->mtex is not pointing to valid memory yet */
if(ma && ma->id.lib)
ma= NULL;
for(b=0; ma && b<MAX_MTEX; b++)
if(ma->mtex && ma->mtex[b] && ma->mtex[b]->mapto & MAP_ALPHA)
texalpha = 1;

@ -7,7 +7,7 @@ incs = '. .. #/intern/guardedalloc ../blenlib ../imbuf ../makesdna'
defs = []
if env['WITH_BF_QUICKTIME'] == 1:
if env['WITH_BF_QUICKTIME']:
defs.append('WITH_QUICKTIME')
incs += ' ' + env['BF_QUICKTIME_INC']

@ -54,5 +54,9 @@ IF(WITH_FFMPEG)
ADD_DEFINITIONS(-DWITH_FFMPEG)
ENDIF(WITH_FFMPEG)
if(WITH_DDS)
ADD_DEFINITIONS(-DWITH_DDS)
ENDIF(WITH_DDS)
BLENDERLIB(bf_imbuf "${SRC}" "${INC}")
#env.BlenderLib ( libname = 'bf_imbuf', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [80, 40] )

@ -17,25 +17,25 @@ if env['WITH_BF_VERSE']:
defs.append('WITH_VERSE')
incs += ' ' + env['BF_VERSE_INCLUDE']
if env['WITH_BF_OPENEXR'] == 1:
if env['WITH_BF_OPENEXR']:
defs.append('WITH_OPENEXR')
if env['WITH_BF_DDS'] == 1:
if env['WITH_BF_DDS']:
defs.append('WITH_DDS')
if env['WITH_BF_FFMPEG'] == 1:
if env['WITH_BF_FFMPEG']:
defs.append('WITH_FFMPEG')
incs += ' ' + env['BF_FFMPEG_INC']
if env['WITH_BF_OPENJPEG'] == 1:
if env['WITH_BF_OPENJPEG']:
defs.append('WITH_OPENJPEG')
incs += ' ' + env['BF_OPENJPEG_INC']
if env['WITH_BF_REDCODE'] == 1:
if env['WITH_BF_REDCODE']:
defs.append('WITH_REDCODE')
incs += ' ' + env['BF_REDCODE_INC']
if env['WITH_BF_QUICKTIME']==1:
if env['WITH_BF_QUICKTIME']:
incs += ' ' + env['BF_QUICKTIME_INC']
defs.append('WITH_QUICKTIME')

@ -0,0 +1,45 @@
# $Id: CMakeLists.txt 14444 2008-04-16 22:40:48Z hos $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# The Original Code is Copyright (C) 2006, Blender Foundation
# All rights reserved.
#
# The Original Code is: all of this file.
#
# Contributor(s):
#
# ***** END GPL LICENSE BLOCK *****
FILE (GLOB SRC *.cpp)
SET(INC
.
../../../blenkernel
../../../makesdna
../../
..
../../../blenlib
intern/include
../../../../../intern/guardedalloc
)
if(WITH_DDS)
ADD_DEFINITIONS(-DWITH_DDS)
ENDIF(WITH_DDS)
BLENDERLIB(bf_dds "${SRC}" "${INC}")
#env.BlenderLib ('bf_dds', source_files, incs, defs, libtype=['core','player'], priority = [90, 200])

@ -42,9 +42,10 @@ struct bDeformGroup;
struct bDeformGroup *add_defgroup_name (struct Object *ob, char *name);
void add_defgroup (struct Object *ob);
void del_defgroup_in_object_mode ( Object *ob );
void del_defgroup_in_object_mode (struct Object *ob );
void del_defgroup (struct Object *ob);
void duplicate_defgroup ( struct Object *ob );
void del_all_defgroups (struct Object *ob);
void duplicate_defgroup (struct Object *ob );
void assign_verts_defgroup (void);
void remove_verts_defgroup (int allverts);
void remove_verts_defgroups (int allverts);

@ -148,8 +148,8 @@ typedef struct View3D {
/* last view */
float lviewquat[4];
short lpersp, lview;
short lastview_set;
short pad5;
short pad5, pad6;
} View3D;

@ -31,14 +31,14 @@ if env['WITH_BF_VERSE']:
if env['WITH_BF_VERSE']:
defs += ' WITH_VERSE'
if env['WITH_BF_OPENEXR'] == 1:
if env['WITH_BF_OPENEXR']:
defs += ' WITH_OPENEXR'
if env['WITH_BF_FFMPEG'] == 1:
if env['WITH_BF_FFMPEG']:
defs += ' WITH_FFMPEG'
incs += ' ' + env['BF_FFMPEG_INC']
if env['WITH_BF_QUICKTIME'] == 1:
if env['WITH_BF_QUICKTIME']:
defs += ' WITH_QUICKTIME'
incs += ' ' + env['BF_QUICKTIME_INC']

@ -532,6 +532,16 @@ static PyObject *traceback_getFilename( PyObject * tb )
else return PyString_FromString("unknown");
}
static void BPY_Err_Clear(void)
{
/* Added in 2.48a, the last_traceback can reference Objects for example, increasing
* their user count. Not to mention holding references to wrapped data.
* This is especially bad when the PyObject for the wrapped data is free'd, after blender
* has alredy dealocated the pointer */
PySys_SetObject( "last_traceback", Py_None);
PyErr_Clear();
}
/****************************************************************************
* Description: Blender Python error handler. This catches the error and
* stores filename and line number in a global
@ -542,6 +552,7 @@ static void BPY_Err_Handle( char *script_name )
if( !script_name ) {
printf( "Error: script has NULL name\n" );
BPY_Err_Clear();
return;
}
@ -568,8 +579,9 @@ static void BPY_Err_Handle( char *script_name )
} else {
g_script_error.lineno = -1;
}
/* this avoids an abort in Python 2.3's garbage collecting: */
PyErr_Clear( );
/* this avoids an abort in Python 2.3's garbage collecting:
PyErr_Clear() */
BPY_Err_Clear(); /* Calls PyErr_Clear as well */
return;
} else {
PyErr_NormalizeException( &exception, &err, &tb );
@ -579,6 +591,7 @@ static void BPY_Err_Handle( char *script_name )
if( !tb ) {
printf( "\nCan't get traceback\n" );
BPY_Err_Clear(); /* incase there is still some data hanging about */
return;
}
@ -616,7 +629,8 @@ static void BPY_Err_Handle( char *script_name )
}
Py_DECREF( tb );
}
BPY_Err_Clear();
return;
}
@ -2727,6 +2741,8 @@ int BPY_call_importloader( char *name )
* Description: This function executes the python script passed by text.
* The Python dictionary containing global variables needs to
* be passed in globaldict.
* NOTE: Make sure BPY_Err_Handle() runs if this returns NULL
* otherwise pointers can be left in sys.last_traceback that become invalid.
*****************************************************************************/
static PyObject *RunPython( Text * text, PyObject * globaldict )
{

@ -14,17 +14,17 @@ defs = []
if env['OURPLATFORM'] in ('win32-mingw') and env['BF_DEBUG']:
defs.append('Py_TRACE_REFS')
if env['WITH_BF_QUICKTIME']==1:
if env['WITH_BF_QUICKTIME']:
incs += ' ' + env['BF_QUICKTIME_INC']
defs.append('WITH_QUICKTIME')
if env['WITH_BF_OPENEXR'] == 1:
if env['WITH_BF_OPENEXR']:
defs.append('WITH_OPENEXR')
if env['WITH_BF_FFMPEG'] == 1:
if env['WITH_BF_FFMPEG']:
defs.append('WITH_FFMPEG')
if env['BF_BUILDINFO'] == 1:
if env['BF_BUILDINFO']:
defs.append('NAN_BUILDINFO')
env.BlenderLib ( libname='blender_python', sources = Split(sources), includes = Split(incs), defines = defs, libtype=['core','game2'], priority = [60,115] )

@ -1295,27 +1295,6 @@ static PyObject *M_Armature_New(PyObject * self, PyObject * args)
return (PyObject *)obj;
}
static PyObject *M_Armature_DataSize(PyObject * self, PyObject *args)
{
int t = 0;
int ret = 0;
if( !PyArg_ParseTuple(args, "|i", &t))
return EXPP_ReturnPyObjError( PyExc_TypeError,
"expected nothing or an int as argument" );
switch(t) {
case 0:
ret = sizeof(struct bArmature);
break;
default:
ret = sizeof(struct Bone);
break;
}
return PyInt_FromLong(ret);
}
//-------------------MODULE METHODS DEFINITION-----------------------------
static char M_Armature_Get_doc[] = "(name) - return the armature with the name 'name', \
@ -1324,12 +1303,9 @@ static char M_Armature_Get_doc[] = "(name) - return the armature with the name '
static char M_Armature_New_doc[] = "(name) - return a new armature object.";
static char M_Armature_DataSize_doc[] = "(type) - return sizeof of either Armature (0) or Bone (1).";
struct PyMethodDef M_Armature_methods[] = {
{"Get", M_Armature_Get, METH_VARARGS, M_Armature_Get_doc},
{"New", M_Armature_New, METH_VARARGS, M_Armature_New_doc},
{"DataSize", M_Armature_DataSize, METH_VARARGS, M_Armature_DataSize_doc},
{NULL, NULL, 0, NULL}
};
//------------------VISIBLE PROTOTYPE IMPLEMENTATION-----------------------

@ -694,6 +694,7 @@ PyObject *newBezTriple( float *numbuf )
}
bzt->h1 = HD_ALIGN;
bzt->h2 = HD_ALIGN;
bzt->radius = 1.0;
/* wrap it */
pyobj = BezTriple_CreatePyObject( bzt );

@ -522,7 +522,7 @@ PyObject *CurNurb_appendPointToNurb( Nurb * nurb, PyObject * value )
else if( PySequence_Check( value ) ) {
size = PySequence_Size( value );
/* printf("\ndbg: got a sequence of size %d\n", size ); */
if( size == 4 || size == 5 ) {
if( size == 4 || size == 5 || size == 6) {
BPoint *tmp;
tmp = nurb->bp; /* save old pts */
@ -556,8 +556,8 @@ PyObject *CurNurb_appendPointToNurb( Nurb * nurb, PyObject * value )
Py_DECREF( item );
}
if (size == 5) {
PyObject *item = PySequence_GetItem( value, i );
if (size >= 5) {
PyObject *item = PySequence_GetItem( value, 4 );
if (item == NULL)
return NULL;
@ -568,18 +568,33 @@ PyObject *CurNurb_appendPointToNurb( Nurb * nurb, PyObject * value )
else {
nurb->bp[npoints].alfa = 0.0f;
}
if (size == 6) {
PyObject *item = PySequence_GetItem( value, 5 );
if (item == NULL)
return NULL;
nurb->bp[npoints].radius = ( float ) PyFloat_AsDouble( item );
Py_DECREF( item );
}
else {
nurb->bp[npoints].radius = 1.0f;
}
nurb->bp[npoints].weight = 0.0; /* softbody weight TODO - add access to this, is zero elsewhere but through blender is 1.0 by default */
makeknots( nurb, 1, nurb->flagu >> 1 );
} else {
return EXPP_ReturnPyObjError( PyExc_TypeError,
"expected a sequence of 4 or 5 floats" );
"expected a sequence of 4 or 6 floats" );
}
} else {
/* bail with error */
return EXPP_ReturnPyObjError( PyExc_TypeError,
"expected a sequence of 4 or 5 floats" );
"expected a sequence of 4 to 6 floats" );
}

@ -822,6 +822,7 @@ static PyObject *Curve_appendNurb( BPy_Curve * self, PyObject * value )
new_nurb->bezt->f2 = SELECT;
new_nurb->bezt->f3 = SELECT;
new_nurb->bezt->hide = 0;
new_nurb->bezt->radius = 1.0;
/* calchandlesNurb( new_nurb ); */
} else { /* set up bp */
new_nurb->pntsv = 1;
@ -831,6 +832,7 @@ static PyObject *Curve_appendNurb( BPy_Curve * self, PyObject * value )
new_nurb->flagv = 0;
new_nurb->bp->f1 = 0;
new_nurb->bp->hide = 0;
new_nurb->bp->radius = 1.0;
new_nurb->knotsu = 0;
/*makenots( new_nurb, 1, new_nurb->flagu >> 1); */
}

@ -141,7 +141,7 @@ static uiBlock *uiblock=NULL;
static char Draw_doc[] = "The Blender.Draw submodule";
static char Method_UIBlock_doc[] = "(drawfunc, x,y) - Popup dialog where buttons can be drawn (expemental)";
static char Method_UIBlock_doc[] = "(drawfunc, mouse_exit) - Popup dialog where buttons can be drawn (expemental)";
static char Method_Register_doc[] =
"(draw, event, button) - Register callbacks for windowing\n\n\
@ -290,9 +290,9 @@ static char Method_Text_doc[] =
This function returns the width of the drawn string.";
static char Method_Label_doc[] =
"(text, x, y) - Draw a text label onscreen\n\n\
"(text, x, y, w, h, tip, callback) - Draw a text label onscreen\n\n\
(text) The text to draw\n\
(x, y) The lower left coordinate of the lable";
(x, y, w, h) The lower left coordinate of the lable, width and height";
static char Method_PupMenu_doc[] =
"(string, maxrow = None) - Display a pop-up menu at the screen.\n\
@ -1101,15 +1101,16 @@ static PyObject *Method_UIBlock( PyObject * self, PyObject * args )
PyObject *val = NULL;
PyObject *result = NULL;
ListBase listb= {NULL, NULL};
int mouse_exit = 1;
if (G.background) {
return EXPP_ReturnPyObjError( PyExc_RuntimeError,
"Can't run Draw.UIBlock() in background mode." );
}
if ( !PyArg_ParseTuple( args, "O", &val ) || !PyCallable_Check( val ) )
if ( !PyArg_ParseTuple( args, "O|i", &val, &mouse_exit ) || !PyCallable_Check( val ) )
return EXPP_ReturnPyObjError( PyExc_AttributeError,
"expected 1 python function and 2 ints" );
"expected 1 python function and an optional int" );
if (uiblock)
return EXPP_ReturnPyObjError( PyExc_RuntimeError,
@ -1121,7 +1122,7 @@ static PyObject *Method_UIBlock( PyObject * self, PyObject * args )
uiblock= uiNewBlock(&listb, "numbuts", UI_EMBOSS, UI_HELV, G.curscreen->mainwin);
uiBlockSetFlag(uiblock, UI_BLOCK_LOOP|UI_BLOCK_REDRAW);
result = PyObject_CallObject( val, Py_BuildValue( "()" ) );
result = PyObject_CallObject( val, NULL );
if (!result) {
PyErr_Print( );
@ -1146,7 +1147,7 @@ static PyObject *Method_UIBlock( PyObject * self, PyObject * args )
/* Done clearing events */
uiBoundsBlock(uiblock, 5);
uiDoBlocks(&listb, 0, 1);
uiDoBlocks(&listb, 0, mouse_exit);
}
uiFreeBlocks(&listb);
uiblock = NULL;

@ -1380,6 +1380,8 @@ static PyGetSetDef BPy_Image_getseters[] = {
"image odd fields toggle", (void *)IMA_STD_FIELD },
{"antialias", (getter)Image_getFlag, (setter)Image_setFlag,
"image antialiasing toggle", (void *)IMA_ANTIALI },
{"premul", (getter)Image_getFlag, (setter)Image_setFlag,
"image premultiply alpha toggle", (void *)IMA_DO_PREMUL },
{"reflect", (getter)Image_getFlag, (setter)Image_setFlag,
"image reflect toggle", (void *)IMA_REFLECT },
{"clampX", (getter)Image_getFlagTpage, (setter)Image_setFlagTpage,

@ -207,7 +207,6 @@
static PyObject *M_Material_New( PyObject * self, PyObject * args,
PyObject * keywords );
static PyObject *M_Material_Get( PyObject * self, PyObject * args );
static PyObject *M_Material_DataSize(PyObject *unused);
/*****************************************************************************/
/* The following string definitions are used for documentation strings. In */
@ -232,8 +231,6 @@ struct PyMethodDef M_Material_methods[] = {
M_Material_New_doc},
{"Get", M_Material_Get, METH_VARARGS, M_Material_Get_doc},
{"get", M_Material_Get, METH_VARARGS, M_Material_Get_doc},
{"DataSize", ( PyCFunction ) M_Material_DataSize, METH_NOARGS,
"Get sizeof() of Material"},
{NULL, NULL, 0, NULL}
};
@ -338,12 +335,6 @@ static PyObject *M_Material_Get( PyObject * self, PyObject * args )
}
}
static PyObject *M_Material_DataSize(PyObject *unused)
{
return PyInt_FromLong(sizeof(Material));
}
static PyObject *Material_ModesDict( void )
{
PyObject *Modes = PyConstant_New( );
@ -2515,10 +2506,10 @@ static PyObject *Material_setTexture( BPy_Material * self, PyObject * args )
if( !PyArg_ParseTuple( args, "iO!|ii", &texnum, &Texture_Type, &pytex,
&texco, &mapto ) )
return EXPP_ReturnPyObjError( PyExc_TypeError,
"expected int in [0,9] and Texture" );
"expected int in [0,17] and Texture" );
if( ( texnum < 0 ) || ( texnum >= MAX_MTEX ) )
return EXPP_ReturnPyObjError( PyExc_TypeError,
"expected int in [0,9] and Texture" );
"expected int in [0,17] and Texture" );
bltex = Texture_FromPyObject( pytex );

@ -4239,7 +4239,7 @@ static int MFace_setTransp( BPy_MFace *self, PyObject *value )
return -1;
return EXPP_setIValueRange( value,
&self->mesh->mtface[self->index].transp, TF_SOLID, TF_SUB, 'b' );
&self->mesh->mtface[self->index].transp, TF_SOLID, TF_CLIP, 'b' );
}
/*
@ -6271,19 +6271,12 @@ static PyObject *Mesh_getFromObject( BPy_Mesh * self, PyObject * args )
if( origmesh->mat ) {
for( i = origmesh->totcol; i-- > 0; ) {
/* are we an object material or data based? */
if (ob->colbits & 1<<i) {
if (ob->colbits & 1<<i)
self->mesh->mat[i] = ob->mat[i];
if (ob->mat[i])
ob->mat[i]->id.us++;
if (origmesh->mat[i])
origmesh->mat[i]->id.us--;
} else {
else
self->mesh->mat[i] = origmesh->mat[i];
if (origmesh->mat[i])
origmesh->mat[i]->id.us++;
}
if (self->mesh->mat[i])
self->mesh->mat[i]->id.us++;
}
}
}
@ -8637,35 +8630,6 @@ static PyObject *M_Mesh_MVert( PyObject * self_unused, PyObject * args )
return PVert_CreatePyObject( &vert );
}
static PyObject *M_Mesh_DataSize(PyObject * self, PyObject *args)
{
int t = 0;
int ret = 0;
if( !PyArg_ParseTuple(args, "|i", &t))
return EXPP_ReturnPyObjError( PyExc_TypeError,
"expected nothing or an int as argument" );
switch(t) {
case 0:
ret = sizeof(Mesh);
break;
case 1:
ret = sizeof(MVert);
break;
case 2:
ret = sizeof(MEdge);
break;
case 3:
ret = sizeof(MFace);
break;
default:
ret = sizeof(Mesh);
break;
}
return PyInt_FromLong(ret);
}
static PyObject *M_Mesh_Modes( PyObject * self_unused, PyObject * args )
{
int modes = 0;
@ -8697,8 +8661,6 @@ static struct PyMethodDef M_Mesh_methods[] = {
"Create a new MVert"},
{"Mode", (PyCFunction)M_Mesh_Modes, METH_VARARGS,
"Get/set edit selection mode(s)"},
{"DataSize", (PyCFunction)M_Mesh_DataSize, METH_VARARGS,
"Get sizeof() of Mesh (0), MVert (1), MEdge (2) or MFace (3)"},
{NULL, NULL, 0, NULL},
};
@ -8774,6 +8736,7 @@ static PyObject *M_Mesh_FaceTranspModesDict( void )
PyConstant_Insert( d, "ADD", PyInt_FromLong( TF_ADD ) );
PyConstant_Insert( d, "ALPHA", PyInt_FromLong( TF_ALPHA ) );
PyConstant_Insert( d, "SUB", PyInt_FromLong( TF_SUB ) );
PyConstant_Insert( d, "CLIP", PyInt_FromLong( TF_CLIP ) );
}
return FTM;

@ -290,7 +290,6 @@ static PyObject *M_Object_New( PyObject * self, PyObject * args );
PyObject *M_Object_Get( PyObject * self, PyObject * args );
static PyObject *M_Object_GetSelected( PyObject * self );
static PyObject *M_Object_Duplicate( PyObject * self, PyObject * args, PyObject *kwd);
static PyObject *M_Object_DataSize( PyObject * self );
/* HELPER FUNCTION FOR PARENTING */
static PyObject *internal_makeParent(Object *parent, PyObject *py_child, int partype, int noninverse, int fast, int v1, int v2, int v3, char *bonename);
@ -319,9 +318,6 @@ The active object is the first in the list, if visible";
static char M_Object_Duplicate_doc[] =
"(linked) - Duplicate all selected, visible objects in the current scene";
static char M_Object_DataSize_doc[] =
"() - return the sizeof(Object)";
/*****************************************************************************/
/* Python method structure definition for Blender.Object module: */
/*****************************************************************************/
@ -334,8 +330,6 @@ struct PyMethodDef M_Object_methods[] = {
M_Object_GetSelected_doc},
{"Duplicate", ( PyCFunction ) M_Object_Duplicate, METH_VARARGS | METH_KEYWORDS,
M_Object_Duplicate_doc},
{"DataSize", ( PyCFunction ) M_Object_DataSize, METH_NOARGS,
M_Object_DataSize_doc},
{NULL, NULL, 0, NULL}
};
@ -1042,12 +1036,6 @@ static PyObject *M_Object_Duplicate( PyObject * self_unused,
Py_RETURN_NONE;
}
static PyObject *M_Object_DataSize(PyObject * self)
{
return PyInt_FromLong(sizeof(Object));
}
/*****************************************************************************/
/* Python BPy_Object methods: */
/*****************************************************************************/

@ -26,8 +26,10 @@
* ***** END GPL LICENSE BLOCK *****
*/
#include "Types.h"
#include "Types.h"
#include "IDProp.h"
#include "gen_utils.h"
#include "BLI_blenlib.h"
/*
stuff pasted from the old Types.h
is only need here now
@ -65,10 +67,126 @@ extern PyTypeObject ThemeSpace_Type;
extern PyTypeObject ThemeUI_Type;
extern PyTypeObject TimeLine_Type;
/* includes to get structs for CSizeof */
#include "Armature.h"
#include "Bone.h"
#include "BezTriple.h"
#include "Camera.h"
#include "Constraint.h"
#include "Curve.h"
#include "CurNurb.h"
#include "Draw.h"
#include "Effect.h"
#include "Ipo.h"
#include "Ipocurve.h"
#include "Key.h"
#include "Lamp.h"
#include "Lattice.h"
#include "Library.h"
#include "Mathutils.h"
#include "Geometry.h"
#include "Mesh.h"
#include "Metaball.h"
#include "Modifier.h"
#include "NMesh.h"
#include "Node.h"
#include "Object.h"
#include "Group.h"
#include "Registry.h"
#include "Scene.h"
#include "Sound.h"
#include "SurfNurb.h"
#include "Sys.h"
#include "Text.h"
#include "Texture.h"
#include "Window.h"
#include "World.h"
#include "Particle.h"
char M_Types_doc[] = "The Blender Types module\n\n\
This module is a dictionary of all Blender Python types";
struct PyMethodDef Null_methods[] = { {NULL, NULL, 0, NULL} };
static PyObject *Types_CSizeof(PyObject * self, PyObject *o)
{
int ret = 0;
if(o) {
if((void *)o == (void *)&Action_Type) {
ret = sizeof(struct bAction);
} else if ((void *)o==(void *)&Armature_Type) {
ret = sizeof(struct bArmature);
} else if ((void *)o==(void *)&BezTriple_Type) {
ret = sizeof(struct BezTriple);
} else if ((void *)o==(void *)&Bone_Type) {
ret = sizeof(struct Bone);
} else if ((void *)o==(void *)&Camera_Type) {
ret = sizeof(struct Camera);
} else if ((void *)o==(void *)&CurNurb_Type) {
ret = sizeof(struct Nurb);
} else if ((void *)o==(void *)&Curve_Type) {
ret = sizeof(struct Curve);
} else if ((void *)o==(void *)&Group_Type) {
ret = sizeof(struct Group);
} else if ((void *)o==(void *)&IDGroup_Type) {
ret = sizeof(struct IDProperty);
} else if ((void *)o==(void *)&Image_Type) {
ret = sizeof(struct Image);
} else if ((void *)o==(void *)&Ipo_Type) {
ret = sizeof(struct Ipo);
} else if ((void *)o==(void *)&IpoCurve_Type) {
ret = sizeof(struct IpoCurve);
} else if ((void *)o==(void *)&Lamp_Type) {
ret = sizeof(struct Lamp);
} else if ((void *)o==(void *)&Lattice_Type) {
ret = sizeof(struct Lattice);
} else if ((void *)o==(void *)&MCol_Type) {
ret = sizeof(struct MCol);
} else if ((void *)o==(void *)&MEdge_Type) {
ret = sizeof(struct MEdge);
} else if ((void *)o==(void *)&MFace_Type) {
ret = sizeof(struct MFace);
} else if ((void *)o==(void *)&MTex_Type) {
ret = sizeof(struct MTex);
} else if ((void *)o==(void *)&MVert_Type) {
ret = sizeof(struct MVert);
} else if ((void *)o==(void *)&Material_Type) {
ret = sizeof(struct Material);
} else if ((void *)o==(void *)&Mesh_Type) {
ret = sizeof(struct Mesh);
} else if ((void *)o==(void *)&Metaball_Type) {
ret = sizeof(struct MetaBall);
} else if ((void *)o==(void *)&ModSeq_Type) {
ret = sizeof(struct ModifierData);
} else if ((void *)o==(void *)&Modifier_Type) {
ret = sizeof(struct ModifierData);
} else if ((void *)o==(void *)&Object_Type) {
ret = sizeof(struct Object);
} else if ((void *)o==(void *)&Pose_Type) {
ret = sizeof(struct bPose);
} else if ((void *)o==(void *)&RenderData_Type) {
ret = sizeof(struct RenderData);
} else if ((void *)o==(void *)&Scene_Type) {
ret = sizeof(struct Scene);
} else if ((void *)o==(void *)&SurfNurb_Type) {
ret = sizeof(struct Nurb);
} else if ((void *)o==(void *)&Text3d_Type) {
ret = sizeof(struct Curve);
} else if ((void *)o==(void *)&Text_Type) {
ret = sizeof(struct Text);
} else if ((void *)o==(void *)&Texture_Type) {
ret = sizeof(struct Tex);
} else {
ret = -1;
}
}
return PyInt_FromLong(ret);
}
struct PyMethodDef M_Types_methods[] = {
{"CSizeof", Types_CSizeof, METH_O,
"(type) - Returns sizeof of the underlying C structure of the given type"},
{NULL, NULL, 0, NULL}
};
@ -145,7 +263,7 @@ PyObject *Types_Init( void )
PyObject *submodule, *dict;
submodule =
Py_InitModule3( "Blender.Types", Null_methods, M_Types_doc );
Py_InitModule3( "Blender.Types", M_Types_methods, M_Types_doc );
dict = PyModule_GetDict( submodule );
@ -187,13 +305,14 @@ PyObject *Types_Init( void )
( PyObject * ) &Armature_Type );
PyDict_SetItemString( dict, "BoneType", ( PyObject * ) &Bone_Type );
PyDict_SetItemString( dict, "CurNurb_Type",
PyDict_SetItemString( dict, "CurNurbType",
( PyObject * ) &CurNurb_Type );
PyDict_SetItemString( dict, "SurfNurb_Type",
PyDict_SetItemString( dict, "SurfNurbType",
( PyObject * ) &SurfNurb_Type );
PyDict_SetItemString( dict, "CurveType", ( PyObject * ) &Curve_Type );
PyDict_SetItemString( dict, "IpoType", ( PyObject * ) &Ipo_Type );
PyDict_SetItemString( dict, "IpoCurveType", ( PyObject * ) &IpoCurve_Type );
PyDict_SetItemString( dict, "MetaballType",
( PyObject * ) &Metaball_Type );
@ -226,7 +345,7 @@ PyObject *Types_Init( void )
( PyObject * ) &constant_Type );
PyDict_SetItemString( dict, "rgbTupleType",
( PyObject * ) &rgbTuple_Type );
PyDict_SetItemString( dict, "matrix_Type",
PyDict_SetItemString( dict, "matrixType",
( PyObject * ) &matrix_Type );
PyDict_SetItemString( dict, "eulerType", ( PyObject * ) &euler_Type );
PyDict_SetItemString( dict, "quaternionType",
@ -249,7 +368,7 @@ PyObject *Types_Init( void )
( PyObject * ) &EditBone_Type);
PyDict_SetItemString( dict, "ThemeSpaceType",
( PyObject * ) &ThemeSpace_Type);
PyDict_SetItemString( dict, "ThemeUI_Type",
PyDict_SetItemString( dict, "ThemeUIType",
( PyObject * ) &ThemeUI_Type);
PyDict_SetItemString( dict, "IDGroupType",
( PyObject * ) &IDGroup_Type);

@ -73,7 +73,7 @@ def Set (request, data):
- 'renderdir': default render output dir
- 'soundsdir': sound dir
- 'tempdir': temp file storage dir
- 'mipmap' : Use mipmapping in the 3d view (Use a boolean value True/False).
- 'mipmap' : Use mipmapping in the 3d view (Use a boolean value True/False).
@type data: int or string
@param data: The new value.
"""
@ -111,7 +111,7 @@ def Get (request):
- 'soundsdir': the path to the user defined dir for sound files. (*)
- 'tempdir': the path to the user defined dir for storage of Blender
temporary files. (*)
- 'mipmap' : Use mipmapping in the 3d view. (*)
- 'mipmap' : Use mipmapping in the 3d view. (*)
- 'version' : the Blender version number.
@note: (*) these can be set in Blender at the User Preferences window -> File
Paths tab.
@ -255,6 +255,6 @@ def Quit ():
def SaveUndoState (message):
"""
Sets an undo at the current state.
@param message: Message that appiers in the undo menu
@param message: Message that appears in the undo menu
@type message: string
"""

@ -235,19 +235,21 @@ def EndAlign():
Use after BeginAlign() to stop aligning the buttons (button layout only).
"""
def UIBlock(draw):
def UIBlock(draw, mouse_exit=1):
"""
This function creates a popup area where buttons, labels, sliders etc can be drawn.
@type mouse_exit: int
@param mouse_exit: When zero the popup wont close when the mouse moves away from the popup.
@type draw: function
@param draw: A function to draw to the popup area, taking no arguments: draw().
@note: The size of the popup will expand to fit the bounds of the buttons created in the draw function.
@note: Be sure to use the mouse coordinates to position the buttons under the mouse,
@note: If mouse_exit is nonzero be sure to use the mouse coordinates if to position the buttons under the mouse,
so the popup dosn't exit as soon as it opens.
The coordinates for buttons start 0,0 at the bottom left hand side of the screen.
@note: Within this popup, Redraw events and the registered button callback will not work.
For buttons to run events, use per button callbacks.
For buttons to run events, use per button callbacks instead.
@note: OpenGL drawing functions wont work within this popup, for text use L{Label} rather then L{Text}
@warning: L{Menu} will not work properly within a UIBlock, this is a limitation with blenders user interface internals.
"""

@ -107,6 +107,8 @@ class Image:
@type fields_odd: boolean
@ivar antialias: enable or disable the antialias option for this image.
@type antialias: boolean
@ivar premul: premultiply alpha toggle.
@type premul: boolean
@ivar bindcode: Texture's bind code (readonly).
@type bindcode: int
@ivar source: Image source type. See L{the Sources dictionary<Sources>} .

@ -85,6 +85,7 @@ done once.
- ADD - add to background (halo).
- ALPHA - draw with transparency.
- SUB - subtract from background.
- CLIP - Clipped alpha.
@var EdgeFlags: The available edge flags.
- SELECT - selected (B{deprecated}). Use edge.sel attribute instead.
- EDGEDRAW - edge is drawn out of edition mode.

@ -25,6 +25,17 @@ Example::
elif type(data) == Types.LampType:
print "Let there be light!"
Since Blender 2.48a you can get the size of the underlying DNA structs for a collection of Blender Python types.
Example::
# loop over Types dictionary and print the struct sizes
# -1 where the type is not supported byt the CSizeof function
import Blender.Types as bt
x = dir(bt)
for t in x:
s = 'bt.CSizeof(bt.' + t + ')'
print t,"=", eval(s)
@var ObjectType: Blender Object. The base object, linked to its specific data
at its .data member variable.
@var GroupType: Blender Group. A Group that references a list of objects that are a part of this group.
@ -45,8 +56,12 @@ Example::
@var ArmatureType: Blender Armature. The "skeleton", for animating and deforming
objects.
@var BoneType: Blender Bone. Bones are, obviously, the "pieces" of an Armature.
@var EditBoneType: Blender Editbone. Bones in editmode.
@var CurveType: Blender Curve.
@var IpoType: Blender Ipo.
@var CurNurbType: Blender CurNurb.
@var SurfNurbType: Blender SurfNurb.
@var IpoCurveType: Blender IpoCurve.
@var MetaballType: Blender Metaball.
@var CameraType: Blender Camera.
@var ImageType: Blender Image.
@ -57,7 +72,7 @@ objects.
@var SceneType: A Blender Scene. Container of all other objects.
@var ButtonType: Blender Button. One of the Draw widgets.
@var vectorType: Blender vector. Used in NMesh, Mesh and elsewhere.
@var matrix_Type: Blender matrix.
@var matrixType: Blender matrix.
@var quaternionType: Blender quaternion. Used in armatures.
@var eulerType: Blender euler.
@var bufferType: Blender buffer. A contiguous piece of storage, used in BGL.
@ -68,3 +83,11 @@ objects.
@var IDGroupType: Blender IDProperty Group type.
@var IDArrayType: Blender IDProperty Array type.
"""
def CSizeof (type):
"""
Get the size in bytes of the underlying DNA struct for the given type.
@param type: A Blender Python type.
@type type: type
@return: size in bytes or -1 if not supported type.
"""

@ -10,16 +10,16 @@ incs += ' ../quicktime ../include ../../kernel/gen_messaging ../blenloader'
defs = []
if env['WITH_BF_YAFRAY'] == 1:
if env['WITH_BF_YAFRAY']:
incs += ' ../yafray'
else:
defs.append('DISABLE_YAFRAY')
if env['WITH_BF_QUICKTIME'] == 1:
if env['WITH_BF_QUICKTIME']:
defs.append('WITH_QUICKTIME')
incs += ' ' + env['BF_QUICKTIME_INC']
if env['WITH_BF_FFMPEG'] == 1:
if env['WITH_BF_FFMPEG']:
defs.append('WITH_FFMPEG')
if env['WITH_BF_OPENEXR']:

@ -1025,6 +1025,6 @@ int sample_sss(Render *re, Material *mat, float *co, float *color)
int sss_pass_done(struct Render *re, struct Material *mat)
{
return ((re->flag & R_BAKING) || (re->sss_hash && BLI_ghash_lookup(re->sss_hash, mat)));
return ((re->flag & R_BAKING) || !(re->r.mode & R_SSS) || (re->sss_hash && BLI_ghash_lookup(re->sss_hash, mat)));
}

@ -5,7 +5,7 @@ Import ('env')
sources = env.Glob('*.c')
if env['BF_SPLIT_SRC'] == 1:
if env['BF_SPLIT_SRC']:
numobj = len(sources)
maxobj = 30
@ -36,36 +36,36 @@ incs += ' ' + env['BF_OPENGL_INC']
defs = []
if env['BF_TWEAK_MODE'] == 1:
if env['BF_TWEAK_MODE']:
defs.append('TWEAK_MODE')
if env['WITH_BF_YAFRAY'] == 0:
if not env['WITH_BF_YAFRAY']:
defs.append('DISABLE_YAFRAY')
if env['WITH_BF_INTERNATIONAL'] == 1:
if env['WITH_BF_INTERNATIONAL']:
incs += ' ../ftfont'
defs.append('INTERNATIONAL')
defs.append('FTGL_STATIC_LIBRARY')
if env['WITH_BF_OPENEXR'] == 1:
if env['WITH_BF_OPENEXR']:
defs.append('WITH_OPENEXR')
if env['WITH_BF_DDS'] == 1:
if env['WITH_BF_DDS']:
defs.append('WITH_DDS')
if env['WITH_BF_QUICKTIME']==1:
if env['WITH_BF_QUICKTIME']:
incs += ' ' + env['BF_QUICKTIME_INC']
defs.append('WITH_QUICKTIME')
if env['WITH_BF_ICONV'] == 1:
if env['WITH_BF_ICONV']:
incs += ' ' + env['BF_ICONV_INC']
defs.append('WITH_ICONV')
if env['WITH_BF_FFMPEG'] == 1:
if env['WITH_BF_FFMPEG']:
defs.append('WITH_FFMPEG')
incs += ' ' + env['BF_FFMPEG_INC']
if env['WITH_BF_OGG'] == 1:
if env['WITH_BF_OGG']:
defs.append('WITH_OGG')
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'):
@ -76,16 +76,16 @@ if env['WITH_BF_VERSE']:
incs += ' ' + env['BF_VERSE_INCLUDE']
# TODO buildinfo
if env['BF_BUILDINFO'] == 1:
if env['BF_BUILDINFO']:
defs.append('NAN_BUILDINFO')
if env['BF_NO_ELBEEM'] == 1:
if env['BF_NO_ELBEEM']:
defs.append('DISABLE_ELBEEM')
if env['WITH_BF_SDL'] == 0:
if not env['WITH_BF_SDL']:
defs.append('DISABLE_SDL')
if (env['BF_SPLIT_SRC'] == 1) and (env['OURPLATFORM'] == 'win32-mingw'):
if env['BF_SPLIT_SRC'] and (env['OURPLATFORM'] == 'win32-mingw'):
for i in range(numlibs):
env.BlenderLib ( libname = 'src%d' % (i), sources = subsources[i], includes = Split(incs), defines = defs, libtype=['core', 'intern'], priority = [5, 25] )
else:

@ -4637,7 +4637,7 @@ static void editing_panel_pose_bones(Object *ob, bArmature *arm)
uiDefButBitI(block, TOG, BONE_NO_SCALE, B_ARM_RECALCDATA, "S", 70,by-38,20,19, &curBone->flag, 1.0, 32.0, 0.0, 0.0, "Don't inherit scale from parent Bone");
uiDefButBitI(block, TOGN, BONE_NO_DEFORM, B_ARM_RECALCDATA, "Deform", 90, by-38, 80, 19, &curBone->flag, 0.0, 0.0, 0.0, 0.0, "Indicate if Bone deforms geometry");
uiDefButBitI(block, TOG, BONE_MULT_VG_ENV, B_ARM_RECALCDATA, "Mult", 170,by-38,80,19, &curBone->flag, 1.0, 32.0, 0.0, 0.0, "Multiply Bone Envelope with VertexGroup");
uiDefButBitI(block, TOG, BONE_MULT_VG_ENV, B_ARM_RECALCDATA, "Hide", 250,by-38,80,19, &curBone->flag, 1.0, 32.0, 0.0, 0.0, "Toggles display of this bone in Edit Mode");
uiDefButBitI(block, TOG, BONE_HIDDEN_P, B_ARM_RECALCDATA, "Hide", 250,by-38,80,19, &curBone->flag, 1.0, 32.0, 0.0, 0.0, "Toggles display of this bone in Edit Mode");
/* layers */
uiBlockBeginAlign(block);
@ -4762,7 +4762,7 @@ void do_vgroupbuts(unsigned short event)
DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
scrarea_queue_winredraw(curarea);
allqueue(REDRAWOOPS, 0);
BIF_undo_push("New vertex group");
break;
case B_DELVGROUP:
if ((G.obedit) && (G.obedit == ob)) {
@ -4778,35 +4778,40 @@ void do_vgroupbuts(unsigned short event)
break;
case B_ASSIGNVGROUP:
assign_verts_defgroup ();
DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
allqueue (REDRAWVIEW3D, 1);
BIF_undo_push("Assign to vertex group");
break;
case B_REMOVEVGROUP:
remove_verts_defgroup (0);
DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
allqueue (REDRAWVIEW3D, 1);
allqueue(REDRAWOOPS, 0);
BIF_undo_push("Remove from vertex group");
break;
case B_SELVGROUP:
sel_verts_defgroup(1);
sel_verts_defgroup(1); /* runs countall() */
allqueue (REDRAWVIEW3D, 1);
allqueue(REDRAWOOPS, 0);
countall();
BIF_undo_push("Select vertex group");
break;
case B_DESELVGROUP:
sel_verts_defgroup(0);
DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
sel_verts_defgroup(0); /* runs countall() */
allqueue (REDRAWVIEW3D, 1);
allqueue(REDRAWOOPS, 0);
countall();
BIF_undo_push("DeSelect vertex group");
break;
case B_LINKEDVGROUP:
copy_linked_vgroup_channels(ob);
allqueue (REDRAWVIEW3D, 1);
allqueue(REDRAWOOPS, 0);
BIF_undo_push("Copy vertex group to linked obdata");
break;
case B_COPYVGROUP:
duplicate_defgroup (ob);
scrarea_queue_winredraw (curarea);
allqueue (REDRAWOOPS, 0);
BIF_undo_push("Copy vertex group");
break;
}
}
@ -6740,7 +6745,7 @@ void editing_panels()
editing_panel_links(ob);
editing_panel_curve_type(ob, cu);
editing_panel_modifiers(ob);
// editing_panel_shapes(ob);
// editing_panel_shapes(ob); /* there are some backend things that are not ready for this yet */
if(G.obedit) {
editing_panel_curve_tools(ob, cu);
editing_panel_curve_tools1(ob, cu);

@ -1847,6 +1847,7 @@ void do_constraintbuts(unsigned short event)
case B_CONSTRAINT_TEST:
allqueue(REDRAWVIEW3D, 0);
allqueue(REDRAWBUTSOBJECT, 0);
allqueue(REDRAWBUTSEDIT, 0);
break; // no handling
case B_CONSTRAINT_INF:
/* influence; do not execute actions for 1 dag_flush */
@ -2055,8 +2056,9 @@ void do_constraintbuts(unsigned short event)
if(ob->type==OB_ARMATURE) DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA|OB_RECALC_OB);
else DAG_object_flush_update(G.scene, ob, OB_RECALC_OB);
allqueue (REDRAWVIEW3D, 0);
allqueue (REDRAWBUTSOBJECT, 0);
allqueue(REDRAWVIEW3D, 0);
allqueue(REDRAWBUTSOBJECT, 0);
allqueue(REDRAWBUTSEDIT, 0);
}
void pointcache_bake(PTCacheID *pid, int startframe)

@ -122,7 +122,7 @@ static void meshactionbuts(SpaceAction *saction, Object *ob, Key *key)
* correctly *grumble*
*/
mywinset(curarea->win);
myortho2(-0.375, curarea->winx-0.375, G.v2d->cur.ymin, G.v2d->cur.ymax);
myortho2(-0.375f, curarea->winx-0.375f, G.v2d->cur.ymin, G.v2d->cur.ymax);
sprintf(str, "actionbuttonswin %d", curarea->win);
block= uiNewBlock (&curarea->uiblocks, str, UI_EMBOSS, UI_HELV, curarea->win);
@ -133,7 +133,7 @@ static void meshactionbuts(SpaceAction *saction, Object *ob, Key *key)
/* make the little 'open the sliders' widget */
// should eventually be removed
BIF_ThemeColor(TH_FACE); // this slot was open... (???... Aligorith)
glRects(2, y + 2*CHANNELHEIGHT - 2, ACTWIDTH - 2, y + CHANNELHEIGHT + 2);
glRects(2, (short)y + 2*CHANNELHEIGHT - 2, ACTWIDTH - 2, (short)y + CHANNELHEIGHT + 2);
glColor3ub(0, 0, 0);
glRasterPos2f(4, y + CHANNELHEIGHT + 6);
BMF_DrawString(G.font, "Sliders");
@ -144,7 +144,7 @@ static void meshactionbuts(SpaceAction *saction, Object *ob, Key *key)
ACTWIDTH = NAMEWIDTH;
but=uiDefIconButBitS(block, TOG, SACTION_SLIDERS, B_REDR,
ICON_DISCLOSURE_TRI_RIGHT,
NAMEWIDTH - XIC - 5, y + CHANNELHEIGHT,
NAMEWIDTH - XIC - 5, (short)y + CHANNELHEIGHT,
XIC,YIC-2,
&(G.saction->flag), 0, 0, 0, 0,
"Show action window sliders");
@ -155,28 +155,28 @@ static void meshactionbuts(SpaceAction *saction, Object *ob, Key *key)
else {
but= uiDefIconButBitS(block, TOG, SACTION_SLIDERS, B_REDR,
ICON_DISCLOSURE_TRI_DOWN,
NAMEWIDTH - XIC - 5, y + CHANNELHEIGHT,
NAMEWIDTH - XIC - 5, (short)y + CHANNELHEIGHT,
XIC,YIC-2,
&(G.saction->flag), 0, 0, 0, 0,
"Hide action window sliders");
/* no hilite, the winmatrix is not correct later on... */
uiButSetFlag(but, UI_NO_HILITE);
ACTWIDTH = NAMEWIDTH + SLIDERWIDTH;
/* sliders are open so draw them */
BIF_ThemeColor(TH_FACE);
glRects(NAMEWIDTH, 0, NAMEWIDTH+SLIDERWIDTH, curarea->winy);
uiBlockSetEmboss(block, UI_EMBOSS);
for (i=1; i < key->totkey; i++) {
make_rvk_slider(block, ob, i,
x, y, SLIDERWIDTH-2, CHANNELHEIGHT-1, "Slider to control Shape Keys");
(int)x, (int)y, SLIDERWIDTH-2, CHANNELHEIGHT-1, "Slider to control Shape Keys");
y-=CHANNELHEIGHT+CHANNELSKIP;
/* see sliderval array in editkey.c */
if(i >= 255) break;
if (i >= 255) break;
}
}
uiDrawBlock(block);
@ -294,7 +294,7 @@ static void action_icu_buts(SpaceAction *saction)
* correctly *grumble*
*/
mywinset(curarea->win);
myortho2(-0.375, curarea->winx-0.375, G.v2d->cur.ymin, G.v2d->cur.ymax);
myortho2(-0.375f, curarea->winx-0.375f, G.v2d->cur.ymin, G.v2d->cur.ymax);
sprintf(str, "actionbuttonswin %d", curarea->win);
block= uiNewBlock (&curarea->uiblocks, str,
@ -318,7 +318,7 @@ static void action_icu_buts(SpaceAction *saction)
/* draw backdrop first */
BIF_ThemeColor(TH_FACE); // change this color... it's ugly
glRects(NAMEWIDTH, G.v2d->cur.ymin, NAMEWIDTH+SLIDERWIDTH, G.v2d->cur.ymax);
glRects(NAMEWIDTH, (short)G.v2d->cur.ymin, NAMEWIDTH+SLIDERWIDTH, (short)G.v2d->cur.ymax);
uiBlockSetEmboss(block, UI_EMBOSS);
for (ale= act_data.first; ale; ale= ale->next) {
@ -339,7 +339,7 @@ static void action_icu_buts(SpaceAction *saction)
/* only show if action channel is selected */
if (SEL_ACHAN(achan)) {
make_icu_slider(block, icu,
x, y, SLIDERWIDTH-2, CHANNELHEIGHT-2,
(int)x, (int)y, SLIDERWIDTH-2, CHANNELHEIGHT-2,
"Slider to control current value of Constraint Influence");
}
}
@ -352,7 +352,7 @@ static void action_icu_buts(SpaceAction *saction)
/* only show if action channel is selected */
if (SEL_ACHAN(achan)) {
make_icu_slider(block, icu,
x, y, SLIDERWIDTH-2, CHANNELHEIGHT-2,
(int)x, (int)y, SLIDERWIDTH-2, CHANNELHEIGHT-2,
"Slider to control current value of IPO-Curve");
}
}
@ -383,7 +383,7 @@ void draw_cfra_action (void)
float vec[2];
/* Draw a light green line to indicate current frame */
vec[0]= (G.scene->r.cfra);
vec[0]= (float)(G.scene->r.cfra);
vec[0]*= G.scene->r.framelen;
vec[1]= G.v2d->cur.ymin;
@ -820,13 +820,13 @@ static void draw_channel_names(void)
/* draw protect 'lock' */
if (protect > -1) {
offset = 16;
BIF_icon_draw(NAMEWIDTH-offset, yminc, protect);
BIF_icon_draw((float)NAMEWIDTH-offset, yminc, protect);
}
/* draw mute 'eye' */
if (mute > -1) {
offset += 16;
BIF_icon_draw(NAMEWIDTH-offset, yminc, mute);
BIF_icon_draw((float)(NAMEWIDTH-offset), yminc, mute);
}
}
@ -838,7 +838,7 @@ static void draw_channel_names(void)
BLI_freelistN(&act_data);
/* re-adjust view matrices for correct scaling */
myortho2(0, NAMEWIDTH, 0, (ofsy+G.v2d->mask.ymax) - (ofsy+G.v2d->mask.ymin)); // Scaling
myortho2(0, NAMEWIDTH, 0, (float)(ofsy+G.v2d->mask.ymax) - (ofsy+G.v2d->mask.ymin)); // Scaling
}
/* sets or clears hidden flags */
@ -969,7 +969,7 @@ static void draw_channel_strips(void)
if (sel) glColor4ub(col1[0], col1[1], col1[2], 0x22);
else glColor4ub(col2[0], col2[1], col2[2], 0x22);
}
glRectf(frame1_x, channel_y-CHANNELHEIGHT/2, G.v2d->hor.xmax, channel_y+CHANNELHEIGHT/2);
glRectf((float)frame1_x, (float)channel_y-CHANNELHEIGHT/2, (float)G.v2d->hor.xmax, (float)channel_y+CHANNELHEIGHT/2);
if (ale->datatype == ALE_GROUP) {
if (sel) glColor4ub(col1a[0], col1a[1], col1a[2], 0x22);
@ -979,7 +979,7 @@ static void draw_channel_strips(void)
if (sel) glColor4ub(col1[0], col1[1], col1[2], 0x22);
else glColor4ub(col2[0], col2[1], col2[2], 0x22);
}
glRectf(act_start, channel_y-CHANNELHEIGHT/2, act_end, channel_y+CHANNELHEIGHT/2);
glRectf((float)act_start, (float)channel_y-CHANNELHEIGHT/2, (float)act_end, (float)channel_y+CHANNELHEIGHT/2);
}
else if (datatype == ACTCONT_SHAPEKEY) {
gla2DDrawTranslatePt(di, 1, y, &frame1_x, &channel_y);
@ -988,11 +988,11 @@ static void draw_channel_strips(void)
* get a desaturated orange background
*/
glColor4ub(col2[0], col2[1], col2[2], 0x22);
glRectf(0, channel_y-CHANNELHEIGHT/2, frame1_x, channel_y+CHANNELHEIGHT/2);
glRectf(0.0f, (float)channel_y-CHANNELHEIGHT/2, (float)frame1_x, (float)channel_y+CHANNELHEIGHT/2);
/* frames one and higher get a saturated orange background */
glColor4ub(col2[0], col2[1], col2[2], 0x44);
glRectf(frame1_x, channel_y-CHANNELHEIGHT/2, G.v2d->hor.xmax, channel_y+CHANNELHEIGHT/2);
glRectf((float)frame1_x, (float)channel_y-CHANNELHEIGHT/2, (float)G.v2d->hor.xmax, (float)channel_y+CHANNELHEIGHT/2.0f);
}
else if (datatype == ACTCONT_GPENCIL) {
gla2DDrawTranslatePt(di, G.v2d->cur.xmin, y, &frame1_x, &channel_y);
@ -1000,12 +1000,12 @@ static void draw_channel_strips(void)
/* frames less than one get less saturated background */
if (sel) glColor4ub(col1[0], col1[1], col1[2], 0x22);
else glColor4ub(col2[0], col2[1], col2[2], 0x22);
glRectf(0, channel_y-CHANNELHEIGHT/2, frame1_x, channel_y+CHANNELHEIGHT/2);
glRectf(0.0f, (float)channel_y-CHANNELHEIGHT/2, (float)frame1_x, (float)channel_y+CHANNELHEIGHT/2);
/* frames one and higher get a saturated background */
if (sel) glColor4ub(col1[0], col1[1], col1[2], 0x44);
else glColor4ub(col2[0], col2[1], col2[2], 0x44);
glRectf(frame1_x, channel_y-CHANNELHEIGHT/2, G.v2d->hor.xmax, channel_y+CHANNELHEIGHT/2);
glRectf((float)frame1_x, (float)channel_y-CHANNELHEIGHT/2, (float)G.v2d->hor.xmax, (float)channel_y+CHANNELHEIGHT/2);
}
}
@ -1061,8 +1061,8 @@ static void draw_channel_strips(void)
cpack(0x0);
glBegin(GL_LINES);
glVertex2f(frame1_x, G.v2d->mask.ymin - 100);
glVertex2f(frame1_x, G.v2d->mask.ymax);
glVertex2f((float)frame1_x, (float)G.v2d->mask.ymin - 100);
glVertex2f((float)frame1_x, (float)G.v2d->mask.ymax);
glEnd();
}
@ -1335,7 +1335,7 @@ void drawactionspace(ScrArea *sa, void *spacedata)
/* Draw scroll */
mywinset(curarea->win); // reset scissor too
if (curarea->winx>SCROLLB+10 && curarea->winy>SCROLLH+10) {
myortho2(-0.375, curarea->winx-0.375, -0.375, curarea->winy-0.375);
myortho2(-0.375f, curarea->winx-0.375f, -0.375f, curarea->winy-0.375f);
if (G.v2d->scroll) drawscroll(0);
}
@ -1361,7 +1361,7 @@ void drawactionspace(ScrArea *sa, void *spacedata)
}
mywinset(curarea->win); // reset scissor too
myortho2(-0.375, curarea->winx-0.375, -0.375, curarea->winy-0.375);
myortho2(-0.375f, curarea->winx-0.375f, -0.375f, curarea->winy-0.375f);
draw_area_emboss(sa);
/* it is important to end a view in a transform compatible with buttons */
@ -1584,7 +1584,7 @@ static void draw_keylist(gla2DDrawInfo *di, ListBase *keys, ListBase *blocks, fl
BIF_ThemeColor4(TH_STRIP_SELECT);
else
BIF_ThemeColor4(TH_STRIP);
glRectf(sc_xa, sc_ya-3, sc_xb, sc_yb+5);
glRectf((float)sc_xa, (float)sc_ya-3, (float)sc_xb, (float)sc_yb+5);
}
}
}
@ -1598,8 +1598,8 @@ static void draw_keylist(gla2DDrawInfo *di, ListBase *keys, ListBase *blocks, fl
gla2DDrawTranslatePt(di, ak->cfra, ypos, &sc_x, &sc_y);
/* draw using icons - old way which is slower but more proven */
if (ak->sel & SELECT) BIF_icon_draw_aspect(sc_x-7, sc_y-6, ICON_SPACE2, 1.0f);
else BIF_icon_draw_aspect(sc_x-7, sc_y-6, ICON_SPACE3, 1.0f);
if (ak->sel & SELECT) BIF_icon_draw_aspect((float)sc_x-7, (float)sc_y-6, ICON_SPACE2, 1.0f);
else BIF_icon_draw_aspect((float)sc_x-7, (float)sc_y-6, ICON_SPACE3, 1.0f);
/* draw using OpenGL - slightly uglier but faster */
// NOTE: disabled for now, as some intel cards seem to have problems with this
@ -1868,7 +1868,7 @@ void gpl_to_keylist(bGPDlayer *gpl, ListBase *keys, ListBase *blocks, ActKeysInc
ak= MEM_callocN(sizeof(ActKeyColumn), "ActKeyColumn");
BLI_addtail(keys, ak);
ak->cfra= gpf->framenum;
ak->cfra= (float)gpf->framenum;
ak->modified = 1;
ak->handle_type= 0;

@ -187,7 +187,7 @@ static void gp_drawui_layer (uiBlock *block, bGPdata *gpd, bGPDlayer *gpl, short
/* rounded header */
if (active) uiBlockSetCol(block, TH_BUT_ACTION);
rb_col= (active)?-20:20;
uiDefBut(block, ROUNDBOX, B_REDR, "", *xco-8, *yco-2, width, 24, NULL, 5.0, 0.0, 15 , rb_col-20, "");
uiDefBut(block, ROUNDBOX, B_REDR, "", *xco-8, *yco-2, width, 24, NULL, 5.0, 0.0, 15.0, (float)(rb_col-20), "");
if (active) uiBlockSetCol(block, TH_AUTO);
/* lock toggle */
@ -243,7 +243,7 @@ static void gp_drawui_layer (uiBlock *block, bGPdata *gpd, bGPDlayer *gpl, short
/* draw backdrop */
if (active) uiBlockSetCol(block, TH_BUT_ACTION);
uiDefBut(block, ROUNDBOX, B_DIFF, "", *xco-8, *yco-height, width, height-1, NULL, 5.0, 0.0, 12, rb_col, "");
uiDefBut(block, ROUNDBOX, B_DIFF, "", *xco-8, *yco-height, width, height-1, NULL, 5.0, 0.0, 12.0, (float)rb_col, "");
if (active) uiBlockSetCol(block, TH_AUTO);
/* draw settings */
@ -251,7 +251,7 @@ static void gp_drawui_layer (uiBlock *block, bGPdata *gpd, bGPDlayer *gpl, short
/* color */
uiBlockBeginAlign(block);
uiDefButF(block, COL, B_REDR, "", *xco, *yco-26, 150, 19, gpl->color, 0, 0, 0, 0, "Color to use for all strokes on this Grease Pencil Layer");
uiDefButF(block, NUMSLI, B_REDR, "Opacity: ", *xco,*yco-45,150,19, &gpl->color[3], 0.3, 1.0, 0, 0, "Visibility of stroke (0.3 to 1.0)");
uiDefButF(block, NUMSLI, B_REDR, "Opacity: ", *xco,*yco-45,150,19, &gpl->color[3], 0.3f, 1.0f, 0, 0, "Visibility of stroke (0.3 to 1.0)");
uiBlockEndAlign(block);
/* stroke thickness */
@ -581,10 +581,10 @@ static void gp_draw_stroke (bGPDspoint *points, int totpoints, short thickness,
/* draw start cap first
* - make points slightly closer to center (about halfway across)
*/
mt[0]= m2[0] * pthick * 0.5;
mt[1]= m2[1] * pthick * 0.5;
sc[0]= s0[0] - (m1[0] * pthick * 0.75);
sc[1]= s0[1] - (m1[1] * pthick * 0.75);
mt[0]= m2[0] * pthick * 0.5f;
mt[1]= m2[1] * pthick * 0.5f;
sc[0]= s0[0] - (m1[0] * pthick * 0.75f);
sc[1]= s0[1] - (m1[1] * pthick * 0.75f);
t0[0]= sc[0] - mt[0];
t0[1]= sc[1] - mt[1];
@ -670,10 +670,10 @@ static void gp_draw_stroke (bGPDspoint *points, int totpoints, short thickness,
/* draw end cap as last step
* - make points slightly closer to center (about halfway across)
*/
mt[0]= m2[0] * pthick * 0.5;
mt[1]= m2[1] * pthick * 0.5;
sc[0]= s1[0] + (m1[0] * pthick * 0.75);
sc[1]= s1[1] + (m1[1] * pthick * 0.75);
mt[0]= m2[0] * pthick * 0.5f;
mt[1]= m2[1] * pthick * 0.5f;
sc[0]= s1[0] + (m1[0] * pthick * 0.75f);
sc[1]= s1[1] + (m1[1] * pthick * 0.75f);
t0[0]= sc[0] - mt[0];
t0[1]= sc[1] - mt[1];
@ -702,14 +702,14 @@ static void gp_draw_stroke (bGPDspoint *points, int totpoints, short thickness,
glVertex2f(pt->x, pt->y);
}
else if (sflag & GP_STROKE_2DIMAGE) {
const float x= (pt->x * winx) + offsx;
const float y= (pt->y * winy) + offsy;
const float x= (float)((pt->x * winx) + offsx);
const float y= (float)((pt->y * winy) + offsy);
glVertex2f(x, y);
}
else {
const float x= (pt->x / 1000 * winx);
const float y= (pt->y / 1000 * winy);
const float x= (float)(pt->x / 1000 * winx);
const float y= (float)(pt->y / 1000 * winy);
glVertex2f(x, y);
}
@ -794,7 +794,7 @@ static void gp_draw_data (bGPdata *gpd, int offsx, int offsy, int winx, int winy
QUATCOPY(color, gpl->color); // just for copying 4 array elements
QUATCOPY(tcolor, gpl->color); // additional copy of color (for ghosting)
glColor4f(color[0], color[1], color[2], color[3]);
glPointSize(gpl->thickness + 2);
glPointSize((float)(gpl->thickness + 2));
/* draw 'onionskins' (frame left + right) */
if (gpl->flag & GP_LAYER_ONIONSKIN) {
@ -952,7 +952,7 @@ void draw_gpencil_2dimage (ScrArea *sa, ImBuf *ibuf)
float zoom, zoomx, zoomy;
/* calculate accessory values */
zoom= SEQ_ZOOM_FAC(sseq->zoom);
zoom= (float)(SEQ_ZOOM_FAC(sseq->zoom));
if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) {
zoomx = zoom * ((float)G.scene->r.xasp / (float)G.scene->r.yasp);
zoomy = zoom;
@ -961,10 +961,10 @@ void draw_gpencil_2dimage (ScrArea *sa, ImBuf *ibuf)
zoomx = zoomy = zoom;
/* calculate transforms (Note: we use ibuf here, as we have it) */
sizex= zoomx * ibuf->x;
sizey= zoomy * ibuf->y;
offsx= (sa->winx-sizex)/2 + sseq->xof;
offsy= (sa->winy-sizey)/2 + sseq->yof;
sizex= (int)(zoomx * ibuf->x);
sizey= (int)(zoomy * ibuf->y);
offsx= (int)( (sa->winx-sizex)/2 + sseq->xof );
offsy= (int)( (sa->winy-sizey)/2 + sseq->yof );
dflag |= GP_DRAWDATA_ONLYI2D;
}
@ -1035,7 +1035,7 @@ void draw_gpencil_oglrender (View3D *v3d, int winx, int winy)
/* pass 2: draw 2d-strokes ------------ > */
/* adjust view matrices */
myortho2(-0.375, (float)(winx)-0.375, -0.375, (float)(winy)-0.375);
myortho2(-0.375f, (float)(winx)-0.375f, -0.375f, (float)(winy)-0.375f);
glLoadIdentity();
/* draw it! */

@ -935,8 +935,8 @@ void action_previewrange_set (bAction *act)
}
/* set preview range */
G.scene->r.psfra= start;
G.scene->r.pefra= end;
G.scene->r.psfra= (int)start;
G.scene->r.pefra= (int)end;
BIF_undo_push("Set anim-preview range");
allqueue(REDRAWTIME, 0);
@ -1830,7 +1830,7 @@ void clean_action (void)
/* don't proceed any further if nothing to work on or user refuses */
data= get_action_context(&datatype);
ok= fbutton(&G.scene->toolsettings->clean_thresh,
0.0000001f, 1.0, 0.001, 0.1,
0.0000001f, 1.0f, 0.001f, 0.1f,
"Clean Threshold");
if (!ok) return;
if (datatype == ACTCONT_GPENCIL) return;
@ -2095,9 +2095,9 @@ void paste_actdata ()
short datatype;
Object *ob= OBACT;
short no_name= 0;
float offset = CFRA - actcopy_firstframe;
const float offset = (float)(CFRA - actcopy_firstframe);
char *actname = NULL, *conname = NULL;
short no_name= 0;
/* check if buffer is empty */
if (ELEM(NULL, actcopybuf.first, actcopybuf.last)) {
@ -2118,13 +2118,13 @@ void paste_actdata ()
/* from selected channels */
for (ale= act_data.first; ale; ale= ale->next) {
Ipo *ipo_src=NULL;
Ipo *ipo_src = NULL;
bActionChannel *achan;
IpoCurve *ico, *icu;
BezTriple *bezt;
int i;
/* find matching ipo-block */
/* find suitable IPO-block from buffer to paste from */
for (achan= actcopybuf.first; achan; achan= achan->next) {
/* try to match data */
if (ale->ownertype == ACTTYPE_ACHAN) {
@ -2170,7 +2170,8 @@ void paste_actdata ()
/* loop over curves, pasting keyframes */
for (ico= ipo_src->curve.first; ico; ico= ico->next) {
icu= verify_ipocurve((ID*)ob, ico->blocktype, actname, conname, NULL, ico->adrcode, 1);
/* get IPO-curve to paste to (IPO-curve might not exist for destination, so gets created) */
icu= verify_ipocurve((ID *)ob, ico->blocktype, actname, conname, NULL, ico->adrcode, 1);
if (icu) {
/* just start pasting, with the the first keyframe on the current frame, and so on */
@ -3203,8 +3204,8 @@ void selectall_action_keys (short mval[], short mode, short select_mode)
rectf.xmax= rectf.xmin;
rectf.ymax= rectf.ymin;
rectf.xmin = rectf.xmin - 0.5;
rectf.xmax = rectf.xmax + 0.5;
rectf.xmin = rectf.xmin - 0.5f;
rectf.xmax = rectf.xmax + 0.5f;
/* filter data */
if (datatype == ACTCONT_GPENCIL)
@ -3387,11 +3388,11 @@ void nextprev_action_keyframe (short dir)
short changed= 0;
if ((dir > 0) && (nearest->next)) {
CFRA= nearest->next->cfra;
CFRA= (int)nearest->next->cfra;
changed= 1;
}
else if ((dir < 0) && (nearest->prev)) {
CFRA= nearest->prev->cfra;
CFRA= (int)nearest->prev->cfra;
changed= 1;
}
@ -3481,9 +3482,9 @@ void column_select_action_keys (int mode)
/* apply scaled action correction if needed */
if (NLA_ACTION_SCALED && datatype==ACTCONT_ACTION)
ce->cfra= get_action_frame(OBACT, CFRA);
ce->cfra= (float)get_action_frame(OBACT, (float)CFRA);
else
ce->cfra= CFRA;
ce->cfra= (float)CFRA;
}
/* loop through all of the keys and select additional keyframes
@ -3960,7 +3961,7 @@ static void mouse_action (int selectmode)
}
}
else if (gpl)
select_gpencil_frame(gpl, selx, selectmode);
select_gpencil_frame(gpl, (int)selx, selectmode);
std_rmouse_transform(transform_action_keys);
@ -5210,7 +5211,7 @@ void winqreadactionspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
openclose_level_action(1);
}
else {
view2d_zoom(G.v2d, 0.1154, sa->winx, sa->winy);
view2d_zoom(G.v2d, 0.1154f, sa->winx, sa->winy);
test_view2d(G.v2d, sa->winx, sa->winy);
view2d_do_locks(curarea, V2D_LOCK_COPY);
@ -5223,7 +5224,7 @@ void winqreadactionspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
openclose_level_action(-1);
}
else {
view2d_zoom(G.v2d, -0.15, sa->winx, sa->winy);
view2d_zoom(G.v2d, -0.15f, sa->winx, sa->winy);
test_view2d(G.v2d, sa->winx, sa->winy);
view2d_do_locks(curarea, V2D_LOCK_COPY);

@ -83,7 +83,7 @@
#include "blendef.h"
#include "butspace.h"
#include "PIL_time.h" /* sleep */
#include "PIL_time.h"
#include "mydevice.h"
/* ***************************************** */
@ -133,7 +133,7 @@ void gplayer_make_cfra_list (bGPDlayer *gpl, ListBase *elems, short onlysel)
if ((onlysel == 0) || (gpf->flag & GP_FRAME_SELECT)) {
ce= MEM_callocN(sizeof(CfraElem), "CfraElem");
ce->cfra= gpf->framenum;
ce->cfra= (float)gpf->framenum;
ce->sel= (gpf->flag & GP_FRAME_SELECT) ? 1 : 0;
BLI_addtail(elems, ce);
@ -220,17 +220,22 @@ void set_gplayer_frame_selection (bGPDlayer *gpl, short mode)
select_gpencil_frames (gpl, mode);
}
/* select the frame in this layer that occurs on this frame (there should only be one at most) */
void select_gpencil_frame (bGPDlayer *gpl, int selx, short select_mode)
{
bGPDframe *gpf;
/* search through frames for a match */
for (gpf= gpl->frames.first; gpf; gpf= gpf->next) {
if (gpf->framenum == selx)
/* there should only be one frame with this frame-number */
if (gpf->framenum == selx) {
gpframe_select(gpf, select_mode);
break;
}
}
}
/* select the frames in this layer that occur within the bounds specified */
void borderselect_gplayer_frames (bGPDlayer *gpl, float min, float max, short select_mode)
{
bGPDframe *gpf;
@ -290,6 +295,7 @@ void deselect_gpencil_layers (void *data, short mode)
/* ***************************************** */
/* Frame Editing Tools */
/* Delete selected grease-pencil layers */
void delete_gpencil_layers (void)
{
ListBase act_data = {NULL, NULL};
@ -384,7 +390,7 @@ void duplicate_gplayer_frames (bGPDlayer *gpl)
/* globals for copy/paste data (like for other copy/paste buffers) */
ListBase gpcopybuf = {NULL, NULL};
static float gpcopy_firstframe= 999999999.0f;
static int gpcopy_firstframe= 999999999;
/* This function frees any MEM_calloc'ed copy/paste buffer data */
void free_gpcopybuf ()
@ -392,11 +398,11 @@ void free_gpcopybuf ()
free_gpencil_layers(&gpcopybuf);
gpcopybuf.first= gpcopybuf.last= NULL;
gpcopy_firstframe= 999999999.0f;
gpcopy_firstframe= 999999999;
}
/* This function adds data to the copy/paste buffer, freeing existing data first
* Only the selected action channels gets their selected keyframes copied.
* Only the selected GP-layers get their selected keyframes copied.
*/
void copy_gpdata ()
{
@ -463,8 +469,8 @@ void paste_gpdata ()
void *data;
short datatype;
const int offset = (CFRA - gpcopy_firstframe);
short no_name= 0;
float offset = CFRA - gpcopy_firstframe;
/* check if buffer is empty */
if (ELEM(NULL, gpcopybuf.first, gpcopybuf.last)) {
@ -594,7 +600,7 @@ static short snap_gpf_nearest (bGPDframe *gpf)
static short snap_gpf_nearestsec (bGPDframe *gpf)
{
float secf = FPS;
float secf = (float)FPS;
if (gpf->flag & GP_FRAME_SELECT)
gpf->framenum= (int)(floor(gpf->framenum/secf + 0.5f) * secf);
return 0;
@ -610,7 +616,7 @@ static short snap_gpf_cframe (bGPDframe *gpf)
static short snap_gpf_nearmarker (bGPDframe *gpf)
{
if (gpf->flag & GP_FRAME_SELECT)
gpf->framenum= (int)find_nearest_marker_time(gpf->framenum);
gpf->framenum= (int)find_nearest_marker_time((float)gpf->framenum);
return 0;
}
@ -642,11 +648,11 @@ void snap_gplayer_frames (bGPDlayer *gpl, short mode)
static short mirror_gpf_cframe (bGPDframe *gpf)
{
float diff;
int diff;
if (gpf->flag & GP_FRAME_SELECT) {
diff= ((float)CFRA - gpf->framenum);
gpf->framenum= ((float)CFRA + diff);
diff= CFRA - gpf->framenum;
gpf->framenum= CFRA;
}
return 0;
@ -654,11 +660,11 @@ static short mirror_gpf_cframe (bGPDframe *gpf)
static short mirror_gpf_yaxis (bGPDframe *gpf)
{
float diff;
int diff;
if (gpf->flag & GP_FRAME_SELECT) {
diff= (0.0f - gpf->framenum);
gpf->framenum= (0.0f + diff);
diff= -gpf->framenum;
gpf->framenum= diff;
}
return 0;
@ -666,11 +672,11 @@ static short mirror_gpf_yaxis (bGPDframe *gpf)
static short mirror_gpf_xaxis (bGPDframe *gpf)
{
float diff;
int diff;
if (gpf->flag & GP_FRAME_SELECT) {
diff= (0.0f - gpf->framenum);
gpf->framenum= (0.0f + diff);
diff= -gpf->framenum;
gpf->framenum= diff;
}
return 0;
@ -680,7 +686,7 @@ static short mirror_gpf_marker (bGPDframe *gpf)
{
static TimeMarker *marker;
static short initialised = 0;
float diff;
int diff;
/* In order for this mirror function to work without
* any extra arguments being added, we use the case

@ -2278,7 +2278,7 @@ void adduplicate_armature(void)
bPoseChannel *chanold, *channew;
ListBase *listold, *listnew;
chanold = verify_pose_channel (OBACT->pose, curBone->name);
chanold = verify_pose_channel(OBACT->pose, curBone->name);
if (chanold) {
listold = &chanold->constraints;
if (listold) {
@ -2291,6 +2291,9 @@ void adduplicate_armature(void)
/* copy transform locks */
channew->protectflag = chanold->protectflag;
/* copy bone group */
channew->agrp_index= chanold->agrp_index;
/* ik (dof) settings */
channew->ikflag = chanold->ikflag;
VECCOPY(channew->limitmin, chanold->limitmin);
@ -2300,7 +2303,10 @@ void adduplicate_armature(void)
/* constraints */
listnew = &channew->constraints;
copy_constraints (listnew, listold);
copy_constraints(listnew, listold);
/* custom shape */
channew->custom= chanold->custom;
}
}
}
@ -3277,7 +3283,11 @@ void switch_direction_armature (void)
EditBone *ebo, *child=NULL, *parent=NULL;
/* loop over bones in chain */
for (ebo= chain->data; ebo; child= ebo, ebo=parent) {
for (ebo= chain->data; ebo; ebo= parent) {
/* parent is this bone's original parent
* - we store this, as the next bone that is checked is this one
* but the value of ebo->parent may change here...
*/
parent= ebo->parent;
/* only if selected and editable */
@ -3297,9 +3307,25 @@ void switch_direction_armature (void)
else
ebo->flag &= ~BONE_CONNECTED;
/* FIXME: other things that need fixing?
* i.e. roll?
/* get next bones
* - child will become the new parent of next bone
*/
child= ebo;
}
else {
/* not swapping this bone, however, if its 'parent' got swapped, unparent us from it
* as it will be facing in opposite direction
*/
if ((parent) && (EBONE_VISIBLE(arm, parent) && EBONE_EDITABLE(parent))) {
ebo->parent= NULL;
ebo->flag &= ~BONE_CONNECTED;
}
/* get next bones
* - child will become new parent of next bone (not swapping occurred,
* so set to NULL to prevent infinite-loop)
*/
child= NULL;
}
}
}

@ -439,6 +439,32 @@ void del_defgroup (Object *ob)
}
}
void del_all_defgroups (Object *ob)
{
/* Sanity check */
if (ob == NULL)
return;
/* Remove all DVerts */
if (ob->type==OB_MESH) {
Mesh *me= ob->data;
CustomData_free_layer_active(&me->vdata, CD_MDEFORMVERT, me->totvert);
me->dvert= NULL;
}
else {
if (editLatt->dvert) {
MEM_freeN(editLatt->dvert);
editLatt->dvert= NULL;
}
}
/* Remove all DefGroups */
BLI_freelistN(&ob->defbase);
/* Fix counters/indices */
ob->actdef= 0;
}
void create_dverts(ID *id)
{
/* create deform verts
@ -1008,9 +1034,9 @@ void vgroup_operation_with_menu(void)
/* give user choices of adding to current/new or removing from current */
if (ob->actdef)
mode = pupmenu("Vertex Groups %t|Change Active Group%x1|Delete Active Group%x2");
mode = pupmenu("Vertex Groups %t|Change Active Group%x1|Delete Active Group%x2|Delete All Groups%x3");
else
mode= pupmenu("Vertex Groups %t|Change Active Group%x1");
mode= pupmenu("Vertex Groups %t|Change Active Group%x1|Delete All Groups%x3");
/* handle choices */
switch (mode) {
@ -1033,11 +1059,20 @@ void vgroup_operation_with_menu(void)
case 2: /* delete active group */
{
del_defgroup(ob);
allqueue (REDRAWVIEW3D, 1);
allqueue(REDRAWVIEW3D, 1);
allqueue(REDRAWOOPS, 0);
BIF_undo_push("Delete vertex group");
}
break;
case 3: /* delete all groups */
{
del_all_defgroups(ob);
allqueue(REDRAWVIEW3D, 1);
allqueue(REDRAWOOPS, 0);
allqueue(REDRAWBUTSEDIT, 1);
BIF_undo_push("Delete all vertex groups");
}
break;
}
}

@ -285,14 +285,14 @@ void editipo_changed(SpaceIpo *si, int doredraw)
/* is there no curve? */
if(first) {
v2d->tot.xmin= 0.0;
v2d->tot.xmax= EFRA;
v2d->tot.xmin= (float)0.0;
v2d->tot.xmax= (float)EFRA;
v2d->tot.ymin= (float)-0.1;
v2d->tot.ymax= (float)1.1;
if(si->blocktype==ID_SEQ) {
v2d->tot.xmin= -5.0;
v2d->tot.xmax= 105.0;
v2d->tot.xmin= (float)-5.0;
v2d->tot.xmax= (float)105.0;
v2d->tot.ymin= (float)-0.1;
v2d->tot.ymax= (float)1.1;
}
@ -2408,7 +2408,7 @@ void clean_ipo(void)
int b;
ok= fbutton(&G.scene->toolsettings->clean_thresh,
0.0000001f, 1.0, 0.001, 0.1,
0.0000001f, 1.0f, 0.001f, 0.1f,
"Threshold");
if (!ok) return;
@ -3767,7 +3767,7 @@ void movekey_obipo(int dir) /* only call external from view3d queue */
ListBase elems;
IpoKey *ik;
int a;
float toframe= CFRA;
float toframe= (float)CFRA;
if (!G.vd)
return;
@ -3793,7 +3793,7 @@ void movekey_obipo(int dir) /* only call external from view3d queue */
}
if (ik) toframe= ik->val;
}
free_ipokey(&elems);
}
}

@ -442,8 +442,8 @@ void snap_action_strips(int snap_mode)
if (strip->flag & ACTSTRIP_SELECT) {
if (snap_mode==1) {
/* nearest frame */
strip->start= floor(strip->start+0.5);
strip->end= floor(strip->end+0.5);
strip->start= (float)floor(strip->start+0.5);
strip->end= (float)floor(strip->end+0.5);
}
else if (snap_mode==2) {
/* current frame */
@ -461,7 +461,7 @@ void snap_action_strips(int snap_mode)
}
else if (snap_mode==3) {
/* nearest second */
float secf = FPS;
float secf = (float)FPS;
strip->start= (float)(floor(strip->start/secf + 0.5f) * secf);
strip->end= (float)(floor(strip->end/secf + 0.5f) * secf);
}
@ -602,8 +602,8 @@ static void add_nla_block(short event)
strip->act = act;
id_us_plus(&act->id);
calc_action_range(strip->act, &strip->actstart, &strip->actend, 1);
strip->start = G.scene->r.cfra; /* could be mval[0] another time... */
strip->end = strip->start + (strip->actend-strip->actstart);
strip->start = (float)G.scene->r.cfra; /* could be mval[0] another time... */
strip->end = (float)strip->start + (strip->actend-strip->actstart);
/* simple prevention of zero strips */
if(strip->start>strip->end-2)
strip->end= strip->start+100;
@ -653,8 +653,8 @@ static void add_nla_block_by_name(char name[32], Object *ob, short hold, short a
/* Link the action to the strip */
strip->act = act;
calc_action_range(strip->act, &strip->actstart, &strip->actend, 1);
strip->start = G.scene->r.cfra; /* could be mval[0] another time... */
strip->end = strip->start + (strip->actend-strip->actstart);
strip->start = (float)G.scene->r.cfra; /* could be mval[0] another time... */
strip->end = (float)strip->start + (strip->actend-strip->actstart);
/* simple prevention of zero strips */
if(strip->start>strip->end-2)
strip->end= strip->start+100;
@ -751,20 +751,20 @@ void add_empty_nlablock(void)
if ((EFRA-CFRA) < 100) {
strip->flag |= ACTSTRIP_AUTO_BLENDS;
strip->flag &= ~ACTSTRIP_LOCK_ACTION;
strip->actstart = CFRA;
strip->actend = CFRA + 100;
strip->actstart = (float)CFRA;
strip->actend = (float)(CFRA + 100);
strip->start = CFRA;
strip->end = CFRA + 100;
strip->start = (float)CFRA;
strip->end = (float)(CFRA + 100);
}
else {
strip->flag |= ACTSTRIP_AUTO_BLENDS;
strip->flag &= ~ACTSTRIP_LOCK_ACTION;
strip->actstart = CFRA;
strip->actend = EFRA;
strip->actstart = (float)CFRA;
strip->actend = (float)EFRA;
strip->start = CFRA;
strip->end = EFRA;
strip->start = (float)CFRA;
strip->end = (float)EFRA;
}
BIF_undo_push("Add NLA strip");
@ -1196,9 +1196,9 @@ void borderselect_nla(void)
mval[1]= rect.ymax-2;
areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax);
ymax = count_nla_levels();
ymax*= (NLACHANNELHEIGHT+NLACHANNELSKIP);
ymax+= (NLACHANNELHEIGHT+NLACHANNELSKIP)/2;
ymax = (float)count_nla_levels();
ymax *= (float)(NLACHANNELHEIGHT+NLACHANNELSKIP);
ymax += (float)(NLACHANNELHEIGHT+NLACHANNELSKIP)/2;
for (base=G.scene->base.first; base; base=base->next){
if (nla_filter(base)) {
@ -1392,9 +1392,9 @@ static Base *get_nearest_nlastrip (bActionStrip **rstrip, short *sel)
mval[0]+=14;
areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax);
ymax = count_nla_levels();
ymax*=(NLACHANNELHEIGHT + NLACHANNELSKIP);
ymax+= NLACHANNELHEIGHT/2;
ymax = (float)count_nla_levels();
ymax *= (float)(NLACHANNELHEIGHT + NLACHANNELSKIP);
ymax += (float)(NLACHANNELHEIGHT / 2);
for (base = G.scene->base.first; base; base=base->next){
if (nla_filter(base)) {
@ -1467,17 +1467,15 @@ static Base *get_nearest_nlachannel_ob_key (float *index, short *sel)
mval[0]+=14;
areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax);
ymax = count_nla_levels();
ymax*= (NLACHANNELHEIGHT + NLACHANNELSKIP);
ymax+= NLACHANNELHEIGHT/2;
ymax = (float)count_nla_levels();
ymax *= (float)(NLACHANNELHEIGHT + NLACHANNELSKIP);
ymax += (float)(NLACHANNELHEIGHT / 2);
*sel=0;
for (base=G.scene->base.first; base; base=base->next){
for (base=G.scene->base.first; base; base=base->next) {
if (nla_filter(base)) {
ymin=ymax-(NLACHANNELHEIGHT+NLACHANNELSKIP);
ymin= ymax - (NLACHANNELHEIGHT + NLACHANNELSKIP);
/* Handle object ipo selection */
if (base->object->ipo){
@ -1579,10 +1577,9 @@ static bAction *get_nearest_nlachannel_ac_key (float *index, short *sel)
mval[0]+=14;
areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax);
ymax = count_nla_levels();
ymax*= (NLACHANNELHEIGHT + NLACHANNELSKIP);
ymax+= NLACHANNELHEIGHT/2;
ymax = (float)count_nla_levels();
ymax *= (float)(NLACHANNELHEIGHT + NLACHANNELSKIP);
ymax += (float)(NLACHANNELHEIGHT / 2);
*sel=0;
@ -1995,13 +1992,13 @@ void winqreadnlaspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
break;
case PADPLUSKEY:
view2d_zoom(G.v2d, 0.1154, sa->winx, sa->winy);
view2d_zoom(G.v2d, 0.1154f, sa->winx, sa->winy);
test_view2d(G.v2d, sa->winx, sa->winy);
view2d_do_locks(curarea, V2D_LOCK_COPY);
doredraw= 1;
break;
case PADMINUS:
view2d_zoom(G.v2d, -0.15, sa->winx, sa->winy);
view2d_zoom(G.v2d, -0.15f, sa->winx, sa->winy);
test_view2d(G.v2d, sa->winx, sa->winy);
view2d_do_locks(curarea, V2D_LOCK_COPY);
doredraw= 1;

@ -769,8 +769,8 @@ static void gp_strokepoint_convertcoords (bGPDstroke *gps, bGPDspoint *pt, float
ipoco_to_areaco_noclip(v2d, &pt->x, mval);
}
else {
mval[0]= (pt->x / 1000 * curarea->winx);
mval[1]= (pt->y / 1000 * curarea->winy);
mval[0]= (short)(pt->x / 1000 * curarea->winx);
mval[1]= (short)(pt->y / 1000 * curarea->winy);
}
mx= mval[0];
my= mval[1];
@ -854,7 +854,7 @@ static void gp_stroke_to_bezier (bGPDlayer *gpl, bGPDstroke *gps, Curve *cu)
/* set settings */
bezt->h1= bezt->h2= HD_FREE;
bezt->f1= bezt->f2= bezt->f3= SELECT;
bezt->radius = bezt->weight = pt->pressure * gpl->thickness * 0.1;
bezt->radius = bezt->weight = pt->pressure * gpl->thickness * 0.1f;
}
/* must calculate handles or else we crash */
@ -941,14 +941,14 @@ static void gp_stroke_to_bonechain (bGPDlayer *gpl, bGPDstroke *gps, bArmature *
{
ebo->flag |= BONE_CONNECTED;
}
ebo->weight= 1.0F;
ebo->dist= 0.25F;
ebo->xwidth= 0.1;
ebo->zwidth= 0.1;
ebo->ease1= 1.0;
ebo->ease2= 1.0;
ebo->rad_head= pt->pressure * gpl->thickness * 0.1;
ebo->rad_tail= ptn->pressure * gpl->thickness * 0.1;
ebo->weight= 1.0f;
ebo->dist= 0.25f;
ebo->xwidth= 0.1f;
ebo->zwidth= 0.1f;
ebo->ease1= 1.0f;
ebo->ease2= 1.0f;
ebo->rad_head= pt->pressure * gpl->thickness * 0.1f;
ebo->rad_tail= ptn->pressure * gpl->thickness * 0.1f;
ebo->segments= 1;
ebo->layer= arm->layer;
}
@ -1347,10 +1347,10 @@ static void gp_stroke_simplify (tGPsdata *p)
pressure = 0;
/* using macro, calculate new point */
GP_SIMPLIFY_AVPOINT(j, -0.25);
GP_SIMPLIFY_AVPOINT(j+1, 0.75);
GP_SIMPLIFY_AVPOINT(j+2, 0.75);
GP_SIMPLIFY_AVPOINT(j+3, -0.25);
GP_SIMPLIFY_AVPOINT(j, -0.25f);
GP_SIMPLIFY_AVPOINT(j+1, 0.75f);
GP_SIMPLIFY_AVPOINT(j+2, 0.75f);
GP_SIMPLIFY_AVPOINT(j+3, -0.25f);
/* set values for adding */
mco[0]= (short)co[0];
@ -1557,7 +1557,7 @@ static void gp_stroke_eraser_dostroke (tGPsdata *p, short mval[], short mvalo[],
}
else if (gps->flag & GP_STROKE_2DIMAGE) {
int offsx, offsy, sizex, sizey;
/* get stored settings */
sizex= p->im2d_settings.sizex;
sizey= p->im2d_settings.sizey;
@ -1565,12 +1565,12 @@ static void gp_stroke_eraser_dostroke (tGPsdata *p, short mval[], short mvalo[],
offsy= p->im2d_settings.offsy;
/* calculate new points */
x0= (gps->points->x * sizex) + offsx;
y0= (gps->points->y * sizey) + offsy;
x0= (short)((gps->points->x * sizex) + offsx);
y0= (short)((gps->points->y * sizey) + offsy);
}
else {
x0= (gps->points->x / 1000 * p->sa->winx);
y0= (gps->points->y / 1000 * p->sa->winy);
x0= (short)(gps->points->x / 1000 * p->sa->winx);
y0= (short)(gps->points->y / 1000 * p->sa->winy);
}
/* do boundbox check first */
@ -1621,17 +1621,17 @@ static void gp_stroke_eraser_dostroke (tGPsdata *p, short mval[], short mvalo[],
offsy= p->im2d_settings.offsy;
/* calculate new points */
x0= (pt1->x * sizex) + offsx;
y0= (pt1->y * sizey) + offsy;
x0= (short)((pt1->x * sizex) + offsx);
y0= (short)((pt1->y * sizey) + offsy);
x1= (pt2->x * sizex) + offsx;
y1= (pt2->y * sizey) + offsy;
x1= (short)((pt2->x * sizex) + offsx);
y1= (short)((pt2->y * sizey) + offsy);
}
else {
x0= (pt1->x / 1000 * p->sa->winx);
y0= (pt1->y / 1000 * p->sa->winy);
x1= (pt2->x / 1000 * p->sa->winx);
y1= (pt2->y / 1000 * p->sa->winy);
x0= (short)(pt1->x / 1000 * p->sa->winx);
y0= (short)(pt1->y / 1000 * p->sa->winy);
x1= (short)(pt2->x / 1000 * p->sa->winx);
y1= (short)(pt2->y / 1000 * p->sa->winy);
}
/* check that point segment of the boundbox of the eraser stroke */
@ -1879,7 +1879,7 @@ static void gp_paint_initstroke (tGPsdata *p, short paintmode)
p->gpd->sbuffer_sflag |= GP_STROKE_2DIMAGE;
/* calculate zoom factor */
zoom= SEQ_ZOOM_FAC(sseq->zoom);
zoom= (float)(SEQ_ZOOM_FAC(sseq->zoom));
if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) {
zoomx = zoom * ((float)G.scene->r.xasp / (float)G.scene->r.yasp);
zoomy = zoom;
@ -1896,10 +1896,10 @@ static void gp_paint_initstroke (tGPsdata *p, short paintmode)
recty= (G.scene->r.size * G.scene->r.ysch) / 100;
/* set offset and scale values for opertations to use */
p->im2d_settings.sizex= zoomx * rectx;
p->im2d_settings.sizey= zoomy * recty;
p->im2d_settings.offsx= (p->sa->winx-p->im2d_settings.sizex)/2 + sseq->xof;
p->im2d_settings.offsy= (p->sa->winy-p->im2d_settings.sizey)/2 + sseq->yof;
p->im2d_settings.sizex= (int)(zoomx * rectx);
p->im2d_settings.sizey= (int)(zoomy * recty);
p->im2d_settings.offsx= (int)((p->sa->winx-p->im2d_settings.sizex)/2 + sseq->xof);
p->im2d_settings.offsy= (int)((p->sa->winy-p->im2d_settings.sizey)/2 + sseq->yof);
}
break;
case SPACE_IMAGE:

@ -1020,7 +1020,7 @@ static void do_info_externalfiles(void *arg, int event)
pupmenu("Can't set relative paths with an unsaved blend file");
}
break;
case 11: /* make all paths relative */
case 11: /* make all paths absolute */
{
int tot,changed,failed,linked;
char str[512];

@ -500,7 +500,7 @@ void time_buttons(ScrArea *sa)
&G.scene->r.psfra,MINFRAMEF, MAXFRAMEF, 0, 0,
"The start frame of the animation preview (inclusive)");
xco += 4.5*XIC;
xco += (short)(4.5*XIC);
uiDefButI(block, NUM, REDRAWALL,"End:",
xco,0,4.5*XIC,YIC,
@ -513,23 +513,23 @@ void time_buttons(ScrArea *sa)
&G.scene->r.sfra,MINFRAMEF, MAXFRAMEF, 0, 0,
"The start frame of the animation (inclusive)");
xco += 4.5*XIC;
xco += (short)(4.5*XIC);
uiDefButI(block, NUM, REDRAWALL,"End:",
xco,0,4.5*XIC,YIC,
&G.scene->r.efra,SFRA,MAXFRAMEF, 0, 0,
&G.scene->r.efra,(float)SFRA,MAXFRAMEF, 0, 0,
"The end frame of the animation (inclusive)");
}
uiBlockEndAlign(block);
xco += 4.5*XIC+16;
xco += (short)(4.5 * XIC + 16);
uiDefButI(block, NUM, B_NEWFRAME, "",
xco,0,3.5*XIC,YIC,
&(G.scene->r.cfra), MINFRAMEF, MAXFRAMEF, 0, 0,
"Displays Current Frame of animation");
xco += 3.5*XIC+16;
xco += (short)(3.5 * XIC + 16);
uiDefIconBut(block, BUT, B_TL_REW, ICON_REW,
xco, 0, XIC, YIC, 0, 0, 0, 0, 0, "Skip to Start frame (Shift DownArrow)");

@ -212,6 +212,14 @@ static void do_view3d_view_camerasmenu(void *arg, int event)
persptoetsen(PAD0);
G.qual &= ~LR_CTRLKEY;
} else {
/* store settings of current view before allowing overwriting with camera view */
/* this is a copy of the code in toets.c */
if(G.vd->persp != V3D_CAMOB) {
QUATCOPY(G.vd->lviewquat, G.vd->viewquat);
G.vd->lview= G.vd->view;
G.vd->lpersp= G.vd->persp;
}
for( base = FIRSTBASE; base; base = base->next ) {
if (base->object->type == OB_CAMERA) {
i++;

@ -590,6 +590,8 @@ static short visualkey_can_use (ID *id, int blocktype, char *actname, char *cons
return 1;
case CONSTRAINT_TYPE_FOLLOWPATH:
return 1;
case CONSTRAINT_TYPE_KINEMATIC:
return 1;
/* single-transform constraits */
case CONSTRAINT_TYPE_TRACKTO:
@ -664,7 +666,7 @@ static float visualkey_get_value (ID *id, int blocktype, char *actname, char *co
index= adrcode - OB_ROT_X;
Mat4ToEul(ob->obmat, eul);
return eul[index]*(5.72958);
return eul[index]*(5.72958f);
}
}
}
@ -921,6 +923,9 @@ static short incl_v3d_ob_shapekey (bKeyingSet *ks, const char mode[])
Object *ob= (G.obedit)? (G.obedit) : (OBACT);
char *newname= NULL;
if(ob==NULL)
return 0;
/* not available for delete mode */
if (strcmp(mode, "Delete")==0)
return 0;
@ -1183,6 +1188,8 @@ static short incl_buts_ob (bKeyingSet *ks, const char mode[])
{
Object *ob= OBACT;
/* only if object is mesh type */
if(ob==NULL) return 0;
return (ob->type == OB_MESH);
}
@ -1920,18 +1927,21 @@ short ipo_frame_has_keyframe (Ipo *ipo, float frame, short filter)
* - this assumes that keyframes are only beztriples
*/
for (icu= ipo->curve.first; icu; icu= icu->next) {
/* we either include all regardless of muting, or only non-muted */
if ((filter & ANIMFILTER_MUTED) || (icu->flag & IPO_MUTE)==0) {
short replace = -1;
int i = binarysearch_bezt_index(icu->bezt, frame, icu->totvert, &replace);
/* binarysearch_bezt_index will set replace to be 0 or 1
* - obviously, 1 represents a match
*/
if (replace) {
/* sanity check: 'i' may in rare cases exceed arraylen */
if ((i >= 0) && (i < icu->totvert))
return 1;
/* only check if there are keyframes (currently only of type BezTriple) */
if (icu->bezt) {
/* we either include all regardless of muting, or only non-muted */
if ((filter & ANIMFILTER_MUTED) || (icu->flag & IPO_MUTE)==0) {
short replace = -1;
int i = binarysearch_bezt_index(icu->bezt, frame, icu->totvert, &replace);
/* binarysearch_bezt_index will set replace to be 0 or 1
* - obviously, 1 represents a match
*/
if (replace) {
/* sanity check: 'i' may in rare cases exceed arraylen */
if ((i >= 0) && (i < icu->totvert))
return 1;
}
}
}
}

@ -1688,7 +1688,7 @@ static int tree_element_active_texture(SpaceOops *soops, TreeElement *te, int se
sbuts->texfrom= 0;
}
extern_set_butspace(F6KEY, 0); // force shading buttons texture
ma->texact= te->index;
ma->texact= (char)te->index;
/* also set active material */
ob->actcol= tep->index+1;
@ -2329,8 +2329,8 @@ static void outliner_set_coordinates_element(SpaceOops *soops, TreeElement *te,
TreeStoreElem *tselem= TREESTORE(te);
/* store coord and continue, we need coordinates for elements outside view too */
te->xs= startx;
te->ys= *starty;
te->xs= (float)startx;
te->ys= (float)(*starty);
*starty-= OL_H;
if((tselem->flag & TSE_CLOSED)==0) {
@ -2346,7 +2346,7 @@ static void outliner_set_coordinates_element(SpaceOops *soops, TreeElement *te,
static void outliner_set_coordinates(SpaceOops *soops)
{
TreeElement *te;
int starty= soops->v2d.tot.ymax-OL_H;
int starty= (int)(soops->v2d.tot.ymax)-OL_H;
int startx= 0;
for(te= soops->tree.first; te; te= te->next) {
@ -2384,13 +2384,13 @@ void outliner_show_active(struct ScrArea *sa)
te= outliner_find_id(so, &so->tree, (ID *)OBACT);
if(te) {
/* make te->ys center of view */
ytop= te->ys + (so->v2d.mask.ymax-so->v2d.mask.ymin)/2;
ytop= (int)(te->ys + (so->v2d.mask.ymax-so->v2d.mask.ymin)/2);
if(ytop>0) ytop= 0;
so->v2d.cur.ymax= ytop;
so->v2d.cur.ymin= ytop-(so->v2d.mask.ymax-so->v2d.mask.ymin);
so->v2d.cur.ymax= (float)ytop;
so->v2d.cur.ymin= (float)(ytop-(so->v2d.mask.ymax-so->v2d.mask.ymin));
/* make te->xs ==> te->xend center of view */
xdelta = te->xs - so->v2d.cur.xmin;
xdelta = (int)(te->xs - so->v2d.cur.xmin);
so->v2d.cur.xmin += xdelta;
so->v2d.cur.xmax += xdelta;
@ -2408,13 +2408,13 @@ void outliner_show_selected(struct ScrArea *sa)
te= outliner_find_id(so, &so->tree, (ID *)OBACT);
if(te) {
/* make te->ys center of view */
ytop= te->ys + (so->v2d.mask.ymax-so->v2d.mask.ymin)/2;
ytop= (int)(te->ys + (so->v2d.mask.ymax-so->v2d.mask.ymin)/2);
if(ytop>0) ytop= 0;
so->v2d.cur.ymax= ytop;
so->v2d.cur.ymin= ytop-(so->v2d.mask.ymax-so->v2d.mask.ymin);
so->v2d.cur.ymax= (float)ytop;
so->v2d.cur.ymin= (float)(ytop-(so->v2d.mask.ymax-so->v2d.mask.ymin));
/* make te->xs ==> te->xend center of view */
xdelta = te->xs - so->v2d.cur.xmin;
xdelta = (int)(te->xs - so->v2d.cur.xmin);
so->v2d.cur.xmin += xdelta;
so->v2d.cur.xmax += xdelta;
@ -2538,13 +2538,13 @@ void outliner_find_panel(struct ScrArea *sa, int again, int flags)
tselem->flag |= TSE_SELECTED;
/* make te->ys center of view */
ytop= te->ys + (soops->v2d.mask.ymax-soops->v2d.mask.ymin)/2;
ytop= (int)(te->ys + (soops->v2d.mask.ymax-soops->v2d.mask.ymin)/2);
if(ytop>0) ytop= 0;
soops->v2d.cur.ymax= ytop;
soops->v2d.cur.ymin= ytop-(soops->v2d.mask.ymax-soops->v2d.mask.ymin);
soops->v2d.cur.ymax= (float)ytop;
soops->v2d.cur.ymin= (float)(ytop-(soops->v2d.mask.ymax-soops->v2d.mask.ymin));
/* make te->xs ==> te->xend center of view */
xdelta = te->xs - soops->v2d.cur.xmin;
xdelta = (int)(te->xs - soops->v2d.cur.xmin);
soops->v2d.cur.xmin += xdelta;
soops->v2d.cur.xmax += xdelta;
@ -3357,14 +3357,14 @@ static void outliner_draw_iconrow(SpaceOops *soops, ListBase *lb, int level, int
if(active) {
uiSetRoundBox(15);
glColor4ub(255, 255, 255, 100);
uiRoundBox( (float)*offsx-0.5, (float)ys-1.0, (float)*offsx+OL_H-3.0, (float)ys+OL_H-3.0, OL_H/2.0-2.0);
uiRoundBox( (float)*offsx-0.5f, (float)ys-1.0f, (float)*offsx+OL_H-3.0f, (float)ys+OL_H-3.0f, OL_H/2.0f-2.0f);
glEnable(GL_BLEND);
}
tselem_draw_icon(*offsx, ys, tselem, te);
te->xs= *offsx;
te->ys= ys;
te->xend= *offsx+OL_X;
tselem_draw_icon((float)*offsx, (float)ys, tselem, te);
te->xs= (float)*offsx;
te->ys= (float)ys;
te->xend= (short)*offsx+OL_X;
te->flag |= TE_ICONROW; // for click
(*offsx) += OL_X;
@ -3478,7 +3478,7 @@ static void outliner_draw_tree_element(SpaceOops *soops, TreeElement *te, int st
/* active circle */
if(active) {
uiSetRoundBox(15);
uiRoundBox( (float)startx+OL_H-1.5, (float)*starty+2.0, (float)startx+2*OL_H-4.0, (float)*starty+OL_H-1.0, OL_H/2.0-2.0);
uiRoundBox( (float)startx+OL_H-1.5f, (float)*starty+2.0f, (float)startx+2.0f*OL_H-4.0f, (float)*starty+OL_H-1.0f, OL_H/2.0f-2.0f);
glEnable(GL_BLEND); /* roundbox disables it */
te->flag |= TE_ACTIVE; // for lookup in display hierarchies
@ -3494,25 +3494,25 @@ static void outliner_draw_tree_element(SpaceOops *soops, TreeElement *te, int st
// icons a bit higher
if(tselem->flag & TSE_CLOSED)
BIF_icon_draw(icon_x, *starty+2, ICON_TRIA_RIGHT);
BIF_icon_draw((float)icon_x, (float)*starty+2, ICON_TRIA_RIGHT);
else
BIF_icon_draw(icon_x, *starty+2, ICON_TRIA_DOWN);
BIF_icon_draw((float)icon_x, (float)*starty+2, ICON_TRIA_DOWN);
}
offsx+= OL_X;
/* datatype icon */
// icons a bit higher
tselem_draw_icon(startx+offsx, *starty+2, tselem, te);
tselem_draw_icon((float)startx+offsx, (float)*starty+2, tselem, te);
offsx+= OL_X;
if(tselem->type==0 && tselem->id->lib) {
glPixelTransferf(GL_ALPHA_SCALE, 0.5);
glPixelTransferf(GL_ALPHA_SCALE, 0.5f);
if(tselem->id->flag & LIB_INDIRECT)
BIF_icon_draw(startx+offsx, *starty+2, ICON_DATALIB);
BIF_icon_draw((float)startx+offsx, (float)*starty+2, ICON_DATALIB);
else
BIF_icon_draw(startx+offsx, *starty+2, ICON_PARLIB);
glPixelTransferf(GL_ALPHA_SCALE, 1.0);
BIF_icon_draw((float)startx+offsx, (float)*starty+2, ICON_PARLIB);
glPixelTransferf(GL_ALPHA_SCALE, 1.0f);
offsx+= OL_X;
}
glDisable(GL_BLEND);
@ -3521,12 +3521,12 @@ static void outliner_draw_tree_element(SpaceOops *soops, TreeElement *te, int st
if(active==1) BIF_ThemeColor(TH_TEXT_HI);
else BIF_ThemeColor(TH_TEXT);
glRasterPos2i(startx+offsx, *starty+5);
BIF_RasterPos(startx+offsx, *starty+5);
BIF_RasterPos((float)startx+offsx, (float)*starty+5);
#ifdef WITH_VERSE
if(te->name) {
#endif
BIF_DrawString(G.font, te->name, 0);
offsx+= OL_X + BIF_GetStringWidth(G.font, te->name, 0);
offsx+= (int)(OL_X + BIF_GetStringWidth(G.font, te->name, 0));
#ifdef WITH_VERSE
}
#endif
@ -3569,8 +3569,8 @@ static void outliner_draw_tree_element(SpaceOops *soops, TreeElement *te, int st
}
}
/* store coord and continue, we need coordinates for elements outside view too */
te->xs= startx;
te->ys= *starty;
te->xs= (float)startx;
te->ys= (float)*starty;
te->xend= startx+offsx;
*starty-= OL_H;
@ -3650,17 +3650,17 @@ static void outliner_draw_tree(SpaceOops *soops)
// selection first
BIF_GetThemeColor3fv(TH_BACK, col);
glColor3f(col[0]+0.06f, col[1]+0.08f, col[2]+0.10f);
starty= soops->v2d.tot.ymax-OL_H;
starty= (int)soops->v2d.tot.ymax-OL_H;
outliner_draw_selection(soops, &soops->tree, &starty);
// grey hierarchy lines
BIF_ThemeColorBlend(TH_BACK, TH_TEXT, 0.2);
starty= soops->v2d.tot.ymax-OL_H/2;
BIF_ThemeColorBlend(TH_BACK, TH_TEXT, 0.2f);
starty= (int)soops->v2d.tot.ymax-OL_H/2;
startx= 6;
outliner_draw_hierarchy(soops, &soops->tree, startx, &starty);
// items themselves
starty= soops->v2d.tot.ymax-OL_H;
starty= (int)soops->v2d.tot.ymax-OL_H;
startx= 0;
for(te= soops->tree.first; te; te= te->next) {
outliner_draw_tree_element(soops, te, startx, &starty);
@ -3673,7 +3673,7 @@ static void outliner_back(SpaceOops *soops)
int ystart;
BIF_ThemeColorShade(TH_BACK, 6);
ystart= soops->v2d.tot.ymax;
ystart= (int)soops->v2d.tot.ymax;
ystart= OL_H*(ystart/(OL_H));
while(ystart > soops->v2d.cur.ymin) {
@ -3688,10 +3688,10 @@ static void outliner_draw_restrictcols(SpaceOops *soops)
/* background underneath */
BIF_ThemeColor(TH_BACK);
glRecti((int)soops->v2d.cur.xmax-OL_TOGW, soops->v2d.cur.ymin, (int)soops->v2d.cur.xmax, soops->v2d.cur.ymax);
glRecti((int)soops->v2d.cur.xmax-OL_TOGW, (int)soops->v2d.cur.ymin, (int)soops->v2d.cur.xmax, (int)soops->v2d.cur.ymax);
BIF_ThemeColorShade(TH_BACK, 6);
ystart= soops->v2d.tot.ymax;
ystart= (int)soops->v2d.tot.ymax;
ystart= OL_H*(ystart/(OL_H));
while(ystart > soops->v2d.cur.ymin) {
@ -3917,17 +3917,17 @@ static void outliner_draw_restrictbuts(uiBlock *block, SpaceOops *soops, ListBas
uiBlockSetEmboss(block, UI_EMBOSSN);
bt= uiDefIconButBitS(block, ICONTOG, OB_RESTRICT_VIEW, REDRAWALL, ICON_RESTRICT_VIEW_OFF,
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, te->ys, 17, OL_H-1, &(ob->restrictflag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, &(ob->restrictflag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
uiButSetFunc(bt, restrictbutton_view_cb, ob, NULL);
uiButSetFlag(bt, UI_NO_HILITE);
bt= uiDefIconButBitS(block, ICONTOG, OB_RESTRICT_SELECT, REDRAWALL, ICON_RESTRICT_SELECT_OFF,
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, te->ys, 17, OL_H-1, &(ob->restrictflag), 0, 0, 0, 0, "Restrict/Allow selection in the 3D View");
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (short)te->ys, 17, OL_H-1, &(ob->restrictflag), 0, 0, 0, 0, "Restrict/Allow selection in the 3D View");
uiButSetFunc(bt, restrictbutton_sel_cb, ob, NULL);
uiButSetFlag(bt, UI_NO_HILITE);
bt= uiDefIconButBitS(block, ICONTOG, OB_RESTRICT_RENDER, REDRAWALL, ICON_RESTRICT_RENDER_OFF,
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, te->ys, 17, OL_H-1, &(ob->restrictflag), 0, 0, 0, 0, "Restrict/Allow renderability");
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, (short)te->ys, 17, OL_H-1, &(ob->restrictflag), 0, 0, 0, 0, "Restrict/Allow renderability");
uiButSetFunc(bt, restrictbutton_rend_cb, NULL, NULL);
uiButSetFlag(bt, UI_NO_HILITE);
@ -3938,7 +3938,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, SpaceOops *soops, ListBas
uiBlockSetEmboss(block, UI_EMBOSSN);
bt= uiDefIconButBitI(block, ICONTOGN, SCE_LAY_DISABLE, REDRAWBUTSSCENE, ICON_CHECKBOX_HLT-1,
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, te->ys, 17, OL_H-1, te->directdata, 0, 0, 0, 0, "Render this RenderLayer");
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, te->directdata, 0, 0, 0, 0, "Render this RenderLayer");
uiButSetFunc(bt, restrictbutton_r_lay_cb, NULL, NULL);
uiBlockSetEmboss(block, UI_EMBOSS);
@ -3949,13 +3949,13 @@ static void outliner_draw_restrictbuts(uiBlock *block, SpaceOops *soops, ListBas
/* NOTE: tselem->nr is short! */
bt= uiDefIconButBitI(block, ICONTOG, tselem->nr, REDRAWBUTSSCENE, ICON_CHECKBOX_HLT-1,
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, te->ys, 17, OL_H-1, layflag, 0, 0, 0, 0, "Render this Pass");
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, layflag, 0, 0, 0, 0, "Render this Pass");
uiButSetFunc(bt, restrictbutton_r_lay_cb, NULL, NULL);
layflag++; /* is lay_xor */
if(ELEM6(tselem->nr, SCE_PASS_SPEC, SCE_PASS_SHADOW, SCE_PASS_AO, SCE_PASS_REFLECT, SCE_PASS_REFRACT, SCE_PASS_RADIO))
bt= uiDefIconButBitI(block, TOG, tselem->nr, REDRAWBUTSSCENE, (*layflag & tselem->nr)?ICON_DOT:ICON_BLANK1,
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, te->ys, 17, OL_H-1, layflag, 0, 0, 0, 0, "Exclude this Pass from Combined");
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (short)te->ys, 17, OL_H-1, layflag, 0, 0, 0, 0, "Exclude this Pass from Combined");
uiButSetFunc(bt, restrictbutton_r_lay_cb, NULL, NULL);
uiBlockSetEmboss(block, UI_EMBOSS);
@ -3966,12 +3966,12 @@ static void outliner_draw_restrictbuts(uiBlock *block, SpaceOops *soops, ListBas
uiBlockSetEmboss(block, UI_EMBOSSN);
bt= uiDefIconButBitI(block, ICONTOGN, eModifierMode_Realtime, REDRAWALL, ICON_RESTRICT_VIEW_OFF,
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, te->ys, 17, OL_H-1, &(md->mode), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, &(md->mode), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
uiButSetFunc(bt, restrictbutton_modifier_cb, ob, NULL);
uiButSetFlag(bt, UI_NO_HILITE);
bt= uiDefIconButBitI(block, ICONTOGN, eModifierMode_Render, REDRAWALL, ICON_RESTRICT_RENDER_OFF,
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, te->ys, 17, OL_H-1, &(md->mode), 0, 0, 0, 0, "Restrict/Allow renderability");
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, (short)te->ys, 17, OL_H-1, &(md->mode), 0, 0, 0, 0, "Restrict/Allow renderability");
uiButSetFunc(bt, restrictbutton_modifier_cb, ob, NULL);
uiButSetFlag(bt, UI_NO_HILITE);
}
@ -3981,7 +3981,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, SpaceOops *soops, ListBas
uiBlockSetEmboss(block, UI_EMBOSSN);
bt= uiDefIconButBitI(block, ICONTOG, BONE_HIDDEN_P, REDRAWALL, ICON_RESTRICT_VIEW_OFF,
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, te->ys, 17, OL_H-1, &(bone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, &(bone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
uiButSetFunc(bt, restrictbutton_bone_cb, NULL, NULL);
uiButSetFlag(bt, UI_NO_HILITE);
}
@ -3990,7 +3990,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, SpaceOops *soops, ListBas
uiBlockSetEmboss(block, UI_EMBOSSN);
bt= uiDefIconButBitI(block, ICONTOG, BONE_HIDDEN_A, REDRAWALL, ICON_RESTRICT_VIEW_OFF,
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, te->ys, 17, OL_H-1, &(ebone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, &(ebone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
uiButSetFunc(bt, restrictbutton_bone_cb, NULL, NULL);
uiButSetFlag(bt, UI_NO_HILITE);
}
@ -4022,10 +4022,10 @@ static void outliner_buttons(uiBlock *block, SpaceOops *soops, ListBase *lb)
else if(tselem->id && GS(tselem->id->name)==ID_LI) len = sizeof(((Library*) 0)->name);
else len= sizeof(((ID*) 0)->name)-2;
dx= BIF_GetStringWidth(G.font, te->name, 0);
dx= (int)BIF_GetStringWidth(G.font, te->name, 0);
if(dx<50) dx= 50;
bt= uiDefBut(block, TEX, OL_NAMEBUTTON, "", te->xs+2*OL_X-4, te->ys, dx+10, OL_H-1, te->name, 1.0, (float)len-1, 0, 0, "");
bt= uiDefBut(block, TEX, OL_NAMEBUTTON, "", (short)te->xs+2*OL_X-4, (short)te->ys, dx+10, OL_H-1, te->name, 1.0, (float)len-1, 0, 0, "");
uiButSetFunc(bt, namebutton_cb, te, NULL);
// signal for button to open
@ -4070,27 +4070,27 @@ void draw_outliner(ScrArea *sa, SpaceOops *soops)
outliner_width(soops, &soops->tree, &sizex);
/* we init all tot rect vars, only really needed on window size change though */
G.v2d->tot.xmin= 0.0;
G.v2d->tot.xmax= (G.v2d->mask.xmax-G.v2d->mask.xmin);
G.v2d->tot.xmin= 0.0f;
G.v2d->tot.xmax= (float)(G.v2d->mask.xmax-G.v2d->mask.xmin);
if(soops->flag & SO_HIDE_RESTRICTCOLS) {
if(G.v2d->tot.xmax <= sizex)
G.v2d->tot.xmax= 2*sizex;
G.v2d->tot.xmax= (float)2*sizex;
}
else {
if(G.v2d->tot.xmax-OL_TOGW <= sizex)
G.v2d->tot.xmax= 2*sizex;
G.v2d->tot.xmax= (float)2*sizex;
}
G.v2d->tot.ymax= 0.0;
G.v2d->tot.ymin= -sizey*OL_H;
G.v2d->tot.ymax= 0.0f;
G.v2d->tot.ymin= (float)-sizey*OL_H;
test_view2d(G.v2d, sa->winx, sa->winy);
// align on top window if cur bigger than tot
if(G.v2d->cur.ymax-G.v2d->cur.ymin > sizey*OL_H) {
G.v2d->cur.ymax= 0.0;
G.v2d->cur.ymin= -(G.v2d->mask.ymax-G.v2d->mask.ymin);
G.v2d->cur.ymax= 0.0f;
G.v2d->cur.ymin= (float)-(G.v2d->mask.ymax-G.v2d->mask.ymin);
}
myortho2(G.v2d->cur.xmin-0.375, G.v2d->cur.xmax-0.375, G.v2d->cur.ymin-0.375, G.v2d->cur.ymax-0.375);
myortho2(G.v2d->cur.xmin-0.375f, G.v2d->cur.xmax-0.375f, G.v2d->cur.ymin-0.375f, G.v2d->cur.ymax-0.375f);
/* draw outliner stuff (background and hierachy lines) */
outliner_back(soops);
@ -4100,7 +4100,7 @@ void draw_outliner(ScrArea *sa, SpaceOops *soops)
mywinset(sa->win);
/* ortho corrected - 'pixel space' */
myortho2(G.v2d->cur.xmin-SCROLLB-0.375, G.v2d->cur.xmax-0.375, G.v2d->cur.ymin-SCROLLH-0.375, G.v2d->cur.ymax-0.375);
myortho2(G.v2d->cur.xmin-SCROLLB-0.375f, G.v2d->cur.xmax-0.375f, G.v2d->cur.ymin-SCROLLH-0.375f, G.v2d->cur.ymax-0.375f);
/* draw icons and names */
block= uiNewBlock(&sa->uiblocks, "outliner buttons", UI_EMBOSS, UI_HELV, sa->win);

@ -388,7 +388,7 @@ void poselib_add_current_pose (Object *ob, int val)
/* add missing ipo-curves and insert keys */
#define INSERT_KEY_ICU(adrcode, data) {\
icu= poselib_verify_icu(achan->ipo, adrcode); \
insert_vert_icu(icu, frame, data, 1); \
insert_vert_icu(icu, (float)frame, data, 1); \
}
INSERT_KEY_ICU(AC_LOC_X, pchan->loc[0])
@ -685,7 +685,7 @@ static void poselib_apply_pose (tPoseLib_PreviewData *pld)
if (ok) {
/* Evaluates and sets the internal ipo values */
calc_ipo(achan->ipo, frame);
calc_ipo(achan->ipo, (float)frame);
/* This call also sets the pchan flags */
execute_action_ipo(achan, pchan);
}

@ -1065,10 +1065,15 @@ void pose_remove_posegroup ()
/* get group to remove */
grp= BLI_findlink(&pose->agroups, pose->active_group-1);
if (grp) {
/* firstly, make sure nothing references it */
/* adjust group references (the trouble of using indices!):
* - firstly, make sure nothing references it
* - also, make sure that those after this item get corrected
*/
for (pchan= pose->chanbase.first; pchan; pchan= pchan->next) {
if (pchan->agrp_index == pose->active_group)
pchan->agrp_index= 0;
else if (pchan->agrp_index > pose->active_group)
pchan->agrp_index--;
}
/* now, remove it from the pose */

@ -893,7 +893,7 @@ static short select_same_color(Object *ob)
Base *base = FIRSTBASE;
while(base) {
if (BASE_SELECTABLE(base) && !(base->flag & SELECT) && (FloatCompare(base->object->col, ob->col, 0.005))) {
if (BASE_SELECTABLE(base) && !(base->flag & SELECT) && (FloatCompare(base->object->col, ob->col, 0.005f))) {
base->flag |= SELECT;
base->object->flag |= SELECT;
changed = 1;
@ -3303,10 +3303,10 @@ void initipo(ScrArea *sa)
sipo->blockscale= 0.7f;
/* sipo space loopt van (0,-?) tot (??,?) */
sipo->v2d.tot.xmin= 0.0;
sipo->v2d.tot.ymin= -10.0;
sipo->v2d.tot.xmax= G.scene->r.efra;
sipo->v2d.tot.ymax= 10.0;
sipo->v2d.tot.xmin= 0.0f;
sipo->v2d.tot.ymin= -10.0f;
sipo->v2d.tot.xmax= (float)G.scene->r.efra;
sipo->v2d.tot.ymax= 10.0f;
sipo->v2d.cur= sipo->v2d.tot;
@ -5020,12 +5020,12 @@ static void winqreadseqspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
case WHEELUPMOUSE:
if(sseq->mainb) {
if (G.qual == LR_SHIFTKEY) {
sseq->zoom += 0.10;
sseq->zoom += 0.10f;
} else {
sseq->zoom++;
}
if(sseq->zoom >= -1 && sseq->zoom < 1) {
sseq->zoom += 2;
sseq->zoom += 2.0f;
}
if(sseq->zoom>8) sseq->zoom= 8;
} else {
@ -5048,12 +5048,12 @@ static void winqreadseqspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
case WHEELDOWNMOUSE:
if(sseq->mainb) {
if (G.qual == LR_SHIFTKEY) {
sseq->zoom -= 0.10;
sseq->zoom -= 0.10f;
} else {
sseq->zoom--;
}
if(sseq->zoom >= -1 && sseq->zoom < 1) {
sseq->zoom -= 2;
sseq->zoom -= 2.0f;
}
if(sseq->zoom<-8) sseq->zoom= -8;
} else {
@ -5264,26 +5264,26 @@ static void init_seqspace(ScrArea *sa)
sseq->spacetype= SPACE_SEQ;
sseq->zoom= 4;
sseq->blockscale= 0.7;
sseq->blockscale= 0.7f;
sseq->chanshown = 0;
/* seq space goes from (0,8) to (250, 0) */
sseq->v2d.tot.xmin= 0.0;
sseq->v2d.tot.ymin= 0.0;
sseq->v2d.tot.xmax= 250.0;
sseq->v2d.tot.ymax= 8.0;
sseq->v2d.tot.xmin= 0.0f;
sseq->v2d.tot.ymin= 0.0f;
sseq->v2d.tot.xmax= 250.0f;
sseq->v2d.tot.ymax= 8.0f;
sseq->v2d.cur= sseq->v2d.tot;
sseq->v2d.min[0]= 10.0;
sseq->v2d.min[1]= 4.0;
sseq->v2d.min[0]= 10.0f;
sseq->v2d.min[1]= 4.0f;
sseq->v2d.max[0]= MAXFRAMEF;
sseq->v2d.max[1]= MAXSEQ;
sseq->v2d.minzoom= 0.01f;
sseq->v2d.maxzoom= 100.0;
sseq->v2d.maxzoom= 100.0f;
sseq->v2d.scroll= L_SCROLL+B_SCROLL;
sseq->v2d.keepaspect= 0;
@ -5315,25 +5315,25 @@ static void init_actionspace(ScrArea *sa)
BLI_addhead(&sa->spacedata, saction);
saction->spacetype= SPACE_ACTION;
saction->blockscale= 0.7;
saction->blockscale= 0.7f;
saction->v2d.tot.xmin= 1.0;
saction->v2d.tot.ymin= -1000.0;
saction->v2d.tot.xmax= 1000.0;
saction->v2d.tot.ymax= 0.0;
saction->v2d.tot.xmin= 1.0f;
saction->v2d.tot.ymin= -1000.0f;
saction->v2d.tot.xmax= 1000.0f;
saction->v2d.tot.ymax= 0.0f;
saction->v2d.cur.xmin= -5.0;
saction->v2d.cur.ymin= -75.0;
saction->v2d.cur.xmax= 65.0;
saction->v2d.cur.ymax= 5.0;
saction->v2d.cur.xmin= -5.0f;
saction->v2d.cur.ymin= -75.0f;
saction->v2d.cur.xmax= 65.0f;
saction->v2d.cur.ymax= 5.0f;
saction->v2d.min[0]= 0.0;
saction->v2d.min[1]= 0.0;
saction->v2d.min[0]= 0.0f;
saction->v2d.min[1]= 0.0f;
saction->v2d.max[0]= MAXFRAMEF;
saction->v2d.max[1]= 1000.0;
saction->v2d.max[1]= 1000.0f;
saction->v2d.minzoom= 0.01;
saction->v2d.minzoom= 0.01f;
saction->v2d.maxzoom= 50;
saction->v2d.scroll= R_SCROLL+B_SCROLL;
@ -5368,7 +5368,7 @@ static void init_filespace(ScrArea *sa)
sfile->dir[0]= '/';
sfile->type= FILE_UNIX;
sfile->blockscale= 0.7;
sfile->blockscale= 0.7f;
sfile->spacetype= SPACE_FILE;
}
@ -5386,27 +5386,27 @@ static void init_soundspace(ScrArea *sa)
BLI_addhead(&sa->spacedata, ssound);
ssound->spacetype= SPACE_SOUND;
ssound->blockscale= 0.7;
ssound->blockscale= 0.7f;
/* sound space goes from (0,8) to (250, 0) */
ssound->v2d.tot.xmin= -4.0;
ssound->v2d.tot.ymin= -4.0;
ssound->v2d.tot.xmax= 250.0;
ssound->v2d.tot.ymax= 255.0;
ssound->v2d.tot.xmin= -4.0f;
ssound->v2d.tot.ymin= -4.0f;
ssound->v2d.tot.xmax= 250.0f;
ssound->v2d.tot.ymax= 255.0f;
ssound->v2d.cur.xmin= -4.0;
ssound->v2d.cur.ymin= -4.0;
ssound->v2d.cur.xmax= 50.0;
ssound->v2d.cur.ymax= 255.0;
ssound->v2d.cur.xmin= -4.0f;
ssound->v2d.cur.ymin= -4.0f;
ssound->v2d.cur.xmax= 50.0f;
ssound->v2d.cur.ymax= 255.0f;
ssound->v2d.min[0]= 1.0;
ssound->v2d.min[1]= 259.0;
ssound->v2d.min[0]= 1.0f;
ssound->v2d.min[1]= 259.0f;
ssound->v2d.max[0]= MAXFRAMEF;
ssound->v2d.max[1]= 259;
ssound->v2d.max[1]= 259.0f;
ssound->v2d.minzoom= 0.1f;
ssound->v2d.maxzoom= 10.0;
ssound->v2d.maxzoom= 10.0f;
ssound->v2d.scroll= B_SCROLL;
ssound->v2d.keepaspect= 0;
@ -5745,7 +5745,7 @@ static void init_imagespace(ScrArea *sa)
sima->spacetype= SPACE_IMAGE;
sima->zoom= 1;
sima->blockscale= 0.7;
sima->blockscale= 0.7f;
sima->iuser.ok= 1;
sima->iuser.fie_ima= 2;
@ -5777,18 +5777,18 @@ static void init_imaselspace(ScrArea *sa)
simasel->blockscale= 0.7;
/* view 2D */
simasel->v2d.tot.xmin= -10.0;
simasel->v2d.tot.ymin= -10.0;
simasel->v2d.tot.xmin= -10.0f;
simasel->v2d.tot.ymin= -10.0f;
simasel->v2d.tot.xmax= (float)sa->winx + 10.0f;
simasel->v2d.tot.ymax= (float)sa->winy + 10.0f;
simasel->v2d.cur.xmin= 0.0;
simasel->v2d.cur.ymin= 0.0;
simasel->v2d.cur.xmin= 0.0f;
simasel->v2d.cur.ymin= 0.0f;
simasel->v2d.cur.xmax= (float)sa->winx;
simasel->v2d.cur.ymax= (float)sa->winy;
simasel->v2d.min[0]= 1.0;
simasel->v2d.min[1]= 1.0;
simasel->v2d.min[0]= 1.0f;
simasel->v2d.min[1]= 1.0f;
simasel->v2d.max[0]= 32000.0f;
simasel->v2d.max[1]= 32000.0f;
@ -5932,8 +5932,8 @@ static void winqreadoopsspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
break;
case PADPLUSKEY:
dx= 0.1154*(v2d->cur.xmax-v2d->cur.xmin);
dy= 0.1154*(v2d->cur.ymax-v2d->cur.ymin);
dx= 0.1154f*(v2d->cur.xmax-v2d->cur.xmin);
dy= 0.1154f*(v2d->cur.ymax-v2d->cur.ymin);
v2d->cur.xmin+= dx;
v2d->cur.xmax-= dx;
v2d->cur.ymin+= dy;
@ -5944,8 +5944,8 @@ static void winqreadoopsspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
case PADMINUS:
dx= 0.15*(v2d->cur.xmax-v2d->cur.xmin);
dy= 0.15*(v2d->cur.ymax-v2d->cur.ymin);
dx= 0.15f*(v2d->cur.xmax-v2d->cur.xmin);
dy= 0.15f*(v2d->cur.ymax-v2d->cur.ymin);
v2d->cur.xmin-= dx;
v2d->cur.xmax+= dx;
v2d->cur.ymin-= dy;
@ -6045,10 +6045,10 @@ void init_v2d_oops(ScrArea *sa, SpaceOops *soops)
/* outliner space is window size */
calc_scrollrcts(sa, v2d, sa->winx, sa->winy);
v2d->tot.xmax= (v2d->mask.xmax-v2d->mask.xmin);
v2d->tot.ymax= (v2d->mask.ymax-v2d->mask.ymin);
v2d->tot.xmin= 0.0;
v2d->tot.ymin= 0.0;
v2d->tot.xmax= (float)(v2d->mask.xmax-v2d->mask.xmin);
v2d->tot.ymax= (float)(v2d->mask.ymax-v2d->mask.ymin);
v2d->tot.xmin= 0.0f;
v2d->tot.ymin= 0.0f;
v2d->cur= v2d->tot;
@ -6058,8 +6058,8 @@ void init_v2d_oops(ScrArea *sa, SpaceOops *soops)
v2d->max[0]= v2d->tot.xmax;
v2d->max[1]= v2d->tot.ymax;
v2d->minzoom= 1.0;
v2d->maxzoom= 1.0;
v2d->minzoom= 1.0f;
v2d->maxzoom= 1.0f;
/* B_SCROLLO used here instead of B_SCROLL, to stop old blender's hanging on
* loading a file from a version with horizontal scrolling due to an old bug
@ -6075,21 +6075,21 @@ void init_v2d_oops(ScrArea *sa, SpaceOops *soops)
v2d->keeptot= 2;
}
else {
v2d->tot.xmin= -28.0;
v2d->tot.xmax= 28.0;
v2d->tot.ymin= -28.0;
v2d->tot.ymax= 28.0;
v2d->tot.xmin= -28.0f;
v2d->tot.xmax= 28.0f;
v2d->tot.ymin= -28.0f;
v2d->tot.ymax= 28.0f;
v2d->cur= v2d->tot;
v2d->min[0]= 10.0;
v2d->min[1]= 4.0;
v2d->min[0]= 10.0f;
v2d->min[1]= 4.0f;
v2d->max[0]= 320.0;
v2d->max[1]= 320.0;
v2d->max[0]= 320.0f;
v2d->max[1]= 320.0f;
v2d->minzoom= 0.01f;
v2d->maxzoom= 2.0;
v2d->maxzoom= 2.0f;
/* v2d->scroll= L_SCROLL+B_SCROLL; */
v2d->scroll= 0;
@ -6111,7 +6111,7 @@ static void init_oopsspace(ScrArea *sa)
soops->type= SO_OUTLINER;
soops->spacetype= SPACE_OOPS;
soops->blockscale= 0.7;
soops->blockscale= 0.7f;
init_v2d_oops(sa, soops);
}
@ -6125,26 +6125,26 @@ static void init_nlaspace(ScrArea *sa)
BLI_addhead(&sa->spacedata, snla);
snla->spacetype= SPACE_NLA;
snla->blockscale= 0.7;
snla->blockscale= 0.7f;
snla->v2d.tot.xmin= 1.0;
snla->v2d.tot.ymin= 0.0;
snla->v2d.tot.xmax= 1000.0;
snla->v2d.tot.ymax= 1000.0;
snla->v2d.tot.xmin= 1.0f;
snla->v2d.tot.ymin= 0.0f;
snla->v2d.tot.xmax= 1000.0f;
snla->v2d.tot.ymax= 1000.0f;
snla->v2d.cur.xmin= -5.0;
snla->v2d.cur.ymin= 0.0;
snla->v2d.cur.xmax= 65.0;
snla->v2d.cur.ymax= 1000.0;
snla->v2d.cur.xmin= -5.0f;
snla->v2d.cur.ymin= 0.0f;
snla->v2d.cur.xmax= 65.0f;
snla->v2d.cur.ymax= 1000.0f;
snla->v2d.min[0]= 0.0;
snla->v2d.min[1]= 0.0;
snla->v2d.min[0]= 0.0f;
snla->v2d.min[1]= 0.0f;
snla->v2d.max[0]= MAXFRAMEF;
snla->v2d.max[1]= 1000.0;
snla->v2d.max[1]= 1000.0f;
snla->v2d.minzoom= 0.1F;
snla->v2d.maxzoom= 50;
snla->v2d.minzoom= 0.1f;
snla->v2d.maxzoom= 50.0f;
snla->v2d.scroll= R_SCROLL+B_SCROLL;
snla->v2d.keepaspect= 0;
@ -6169,7 +6169,7 @@ static void init_textspace(ScrArea *sa)
BLI_addhead(&sa->spacedata, st);
st->spacetype= SPACE_TEXT;
st->blockscale= 0.7;
st->blockscale= 0.7f;
st->text= NULL;
st->flags= 0;
@ -6200,7 +6200,7 @@ static void init_scriptspace(ScrArea *sa)
BLI_addhead(&sa->spacedata, sc);
sc->spacetype = SPACE_SCRIPT;
sc->blockscale= 0.7;
sc->blockscale= 0.7f;
sc->script = NULL;
sc->flags = 0;
}
@ -6219,24 +6219,24 @@ static void init_timespace(ScrArea *sa)
BLI_addhead(&sa->spacedata, stime);
stime->spacetype= SPACE_TIME;
stime->blockscale= 0.7;
stime->blockscale= 0.7f;
stime->redraws= TIME_ALL_3D_WIN|TIME_ALL_ANIM_WIN;
stime->v2d.tot.xmin= -4.0;
stime->v2d.tot.ymin= 0.0;
stime->v2d.tot.xmin= -4.0f;
stime->v2d.tot.ymin= 0.0f;
stime->v2d.tot.xmax= (float)EFRA + 4.0;
stime->v2d.tot.ymax= (float)sa->winy;
stime->v2d.cur= stime->v2d.tot;
stime->v2d.min[0]= 1.0;
stime->v2d.min[0]= 1.0f;
stime->v2d.min[1]= (float)sa->winy;
stime->v2d.max[0]= MAXFRAMEF;
stime->v2d.max[1]= (float)sa->winy;
stime->v2d.minzoom= 0.1f;
stime->v2d.maxzoom= 10.0;
stime->v2d.maxzoom= 10.0f;
stime->v2d.scroll= 0;
stime->v2d.keepaspect= 0;
@ -6260,20 +6260,20 @@ static void init_nodespace(ScrArea *sa)
BLI_addhead(&sa->spacedata, snode);
snode->spacetype= SPACE_NODE;
snode->blockscale= 0.7;
snode->blockscale= 0.7f;
snode->v2d.tot.xmin= -10.0;
snode->v2d.tot.ymin= -10.0;
snode->v2d.tot.xmin= -10.0f;
snode->v2d.tot.ymin= -10.0f;
snode->v2d.tot.xmax= (float)sa->winx + 10.0f;
snode->v2d.tot.ymax= (float)sa->winy + 10.0f;
snode->v2d.cur.xmin= 0.0;
snode->v2d.cur.ymin= 0.0;
snode->v2d.cur.xmin= 0.0f;
snode->v2d.cur.ymin= 0.0f;
snode->v2d.cur.xmax= (float)sa->winx;
snode->v2d.cur.ymax= (float)sa->winy;
snode->v2d.min[0]= 1.0;
snode->v2d.min[1]= 1.0;
snode->v2d.min[0]= 1.0f;
snode->v2d.min[1]= 1.0f;
snode->v2d.max[0]= 32000.0f;
snode->v2d.max[1]= 32000.0f;

File diff suppressed because it is too large Load Diff

@ -292,17 +292,15 @@ void persptoetsen(unsigned short event)
}
else if(event==PAD0) {
/* lastview - */
if(G.vd->lastview_set==0) {
if(G.vd->persp != V3D_CAMOB) {
/* store settings of current view before allowing overwriting with camera view */
QUATCOPY(G.vd->lviewquat, G.vd->viewquat);
G.vd->lview= G.vd->view;
G.vd->lpersp= G.vd->persp;
G.vd->lastview_set= 1;
}
else {
/* return to settings of last view */
axis_set_view(G.vd->lviewquat[0], G.vd->lviewquat[1], G.vd->lviewquat[2], G.vd->lviewquat[3], G.vd->lview, G.vd->lpersp);
G.vd->lastview_set= 0;
}
if(G.qual==LR_ALTKEY) {

@ -1502,6 +1502,10 @@ static void constraintTransLim(TransInfo *t, TransData *td)
for (con= td->con; con; con= con->next) {
float tmat[4][4];
/* only consider constraint if enabled */
if (con->flag & CONSTRAINT_DISABLE) continue;
if (con->enforce == 0.0f) continue;
/* only use it if it's tagged for this purpose (and the right type) */
if (con->type == CONSTRAINT_TYPE_LOCLIMIT) {
bLocLimitConstraint *data= con->data;
@ -1585,7 +1589,11 @@ static void constraintRotLim(TransInfo *t, TransData *td)
/* Evaluate valid constraints */
for (con= td->con; con; con= con->next) {
/* we're only interested in Limit-Scale constraints */
/* only consider constraint if enabled */
if (con->flag & CONSTRAINT_DISABLE) continue;
if (con->enforce == 0.0f) continue;
/* we're only interested in Limit-Rotation constraints */
if (con->type == CONSTRAINT_TYPE_ROTLIMIT) {
bRotLimitConstraint *data= con->data;
float tmat[4][4];
@ -1675,6 +1683,10 @@ static void constraintSizeLim(TransInfo *t, TransData *td)
/* Evaluate valid constraints */
for (con= td->con; con; con= con->next) {
/* only consider constraint if enabled */
if (con->flag & CONSTRAINT_DISABLE) continue;
if (con->enforce == 0.0f) continue;
/* we're only interested in Limit-Scale constraints */
if (con->type == CONSTRAINT_TYPE_SIZELIMIT) {
bSizeLimitConstraint *data= con->data;

@ -2408,8 +2408,8 @@ void flushTransUVs(TransInfo *t)
td->loc2d[1]= td->loc[1]*invy;
if((G.sima->flag & SI_PIXELSNAP) && (t->state != TRANS_CANCEL)) {
td->loc2d[0]= floor(width*td->loc2d[0] + 0.5f)/width;
td->loc2d[1]= floor(height*td->loc2d[1] + 0.5f)/height;
td->loc2d[0]= (float)floor(width*td->loc2d[0] + 0.5f)/width;
td->loc2d[1]= (float)floor(height*td->loc2d[1] + 0.5f)/height;
}
}
@ -2719,12 +2719,12 @@ static void posttrans_nla_clean (TransInfo *t)
ob= base->object;
/* Check object ipos */
i= count_ipo_keys(ob->ipo, side, CFRA);
i= count_ipo_keys(ob->ipo, side, (float)CFRA);
if (i) posttrans_ipo_clean(ob->ipo);
/* Check object constraint ipos */
for (conchan=ob->constraintChannels.first; conchan; conchan=conchan->next) {
i= count_ipo_keys(conchan->ipo, side, CFRA);
i= count_ipo_keys(conchan->ipo, side, (float)CFRA);
if (i) posttrans_ipo_clean(conchan->ipo);
}
@ -2742,7 +2742,7 @@ static void posttrans_nla_clean (TransInfo *t)
}
}
if (strip==NULL) {
cfra = get_action_frame(ob, CFRA);
cfra = get_action_frame(ob, (float)CFRA);
for (achan=ob->action->chanbase.first; achan; achan=achan->next) {
if (EDITABLE_ACHAN(achan)) {
@ -2828,7 +2828,7 @@ static int count_gplayer_frames(bGPDlayer *gpl, char side, float cfra)
/* only include points that occur on the right side of cfra */
for (gpf= gpl->frames.first; gpf; gpf= gpf->next) {
if (gpf->flag & GP_FRAME_SELECT) {
if (FrameOnMouseSide(side, gpf->framenum, cfra))
if (FrameOnMouseSide(side, (float)gpf->framenum, cfra))
count++;
}
}
@ -2920,7 +2920,7 @@ void flushTransGPactionData (TransInfo *t)
* The 'side' argument is needed for the extend mode. 'B' = both sides, 'R'/'L' mean only data
* on the named side are used.
*/
static int GPLayerToTransData (TransData *td, tGPFtransdata *tfd, bGPDlayer *gpl, short side, float cfra)
static int GPLayerToTransData (TransData *td, tGPFtransdata *tfd, bGPDlayer *gpl, char side, float cfra)
{
bGPDframe *gpf;
int count= 0;
@ -2928,12 +2928,12 @@ static int GPLayerToTransData (TransData *td, tGPFtransdata *tfd, bGPDlayer *gpl
/* check for select frames on right side of current frame */
for (gpf= gpl->frames.first; gpf; gpf= gpf->next) {
if (gpf->flag & GP_FRAME_SELECT) {
if (FrameOnMouseSide(side, gpf->framenum, cfra)) {
if (FrameOnMouseSide(side, (float)gpf->framenum, cfra)) {
/* memory is calloc'ed, so that should zero everything nicely for us */
td->val= &tfd->val;
td->ival= gpf->framenum;
td->ival= (float)gpf->framenum;
tfd->val= gpf->framenum;
tfd->val= (float)gpf->framenum;
tfd->sdata= &gpf->framenum;
/* advance td now */
@ -2995,9 +2995,9 @@ static void createTransActionData(TransInfo *t)
* higher scaling ratios, but is faster than converting all points)
*/
if (ob)
cfra = get_action_frame(ob, CFRA);
cfra = get_action_frame(ob, (float)CFRA);
else
cfra = CFRA;
cfra = (float)CFRA;
/* loop 1: fully select ipo-keys and count how many BezTriples are selected */
for (ale= act_data.first; ale; ale= ale->next) {
@ -3052,7 +3052,7 @@ static void createTransActionData(TransInfo *t)
/* check if we're supposed to be setting minx/maxx for TimeSlide */
if (t->mode == TFM_TIME_SLIDE) {
float min=999999999.0f, max=-999999999.0;
float min=999999999.0f, max=-999999999.0f;
int i;
td= (t->data + 1);
@ -3101,13 +3101,13 @@ static void createTransNlaData(TransInfo *t)
/* Ensure that partial selections result in beztriple selections */
for (base=G.scene->base.first; base; base=base->next) {
/* Check object ipos */
i= count_ipo_keys(base->object->ipo, side, CFRA);
i= count_ipo_keys(base->object->ipo, side, (float)CFRA);
if (i) base->flag |= BA_HAS_RECALC_OB;
count += i;
/* Check object constraint ipos */
for (conchan=base->object->constraintChannels.first; conchan; conchan=conchan->next)
count += count_ipo_keys(conchan->ipo, side, CFRA);
count += count_ipo_keys(conchan->ipo, side, (float)CFRA);
/* skip actions and nlastrips if object is collapsed */
if (base->object->nlaflag & OB_NLA_COLLAPSED)
@ -3123,7 +3123,7 @@ static void createTransNlaData(TransInfo *t)
}
}
if (strip==NULL) {
cfra = get_action_frame(base->object, CFRA);
cfra = get_action_frame(base->object, (float)CFRA);
for (achan=base->object->action->chanbase.first; achan; achan=achan->next) {
if (EDITABLE_ACHAN(achan)) {
@ -3148,8 +3148,8 @@ static void createTransNlaData(TransInfo *t)
if (strip->flag & ACTSTRIP_SELECT) {
base->flag |= BA_HAS_RECALC_OB|BA_HAS_RECALC_DATA;
if (FrameOnMouseSide(side, strip->start, CFRA)) count++;
if (FrameOnMouseSide(side, strip->end, CFRA)) count++;
if (FrameOnMouseSide(side, strip->start, (float)CFRA)) count++;
if (FrameOnMouseSide(side, strip->end, (float)CFRA)) count++;
}
}
}
@ -3167,12 +3167,12 @@ static void createTransNlaData(TransInfo *t)
for (base=G.scene->base.first; base; base=base->next) {
/* Manipulate object ipos */
/* - no scaling of keyframe times is allowed here */
td= IpoToTransData(td, base->object->ipo, NULL, side, CFRA);
td= IpoToTransData(td, base->object->ipo, NULL, side, (float)CFRA);
/* Manipulate object constraint ipos */
/* - no scaling of keyframe times is allowed here */
for (conchan=base->object->constraintChannels.first; conchan; conchan=conchan->next)
td= IpoToTransData(td, conchan->ipo, NULL, side, CFRA);
td= IpoToTransData(td, conchan->ipo, NULL, side, (float)CFRA);
/* skip actions and nlastrips if object collapsed */
if (base->object->nlaflag & OB_NLA_COLLAPSED)
@ -3190,7 +3190,7 @@ static void createTransNlaData(TransInfo *t)
/* can include if no strip found */
if (strip==NULL) {
cfra = get_action_frame(base->object, CFRA);
cfra = get_action_frame(base->object, (float)CFRA);
for (achan=base->object->action->chanbase.first; achan; achan=achan->next) {
if (EDITABLE_ACHAN(achan)) {
@ -3212,12 +3212,12 @@ static void createTransNlaData(TransInfo *t)
for (strip=base->object->nlastrips.first; strip; strip=strip->next) {
if (strip->flag & ACTSTRIP_SELECT) {
/* first TransData is the start, second is the end */
if (FrameOnMouseSide(side, strip->start, CFRA)) {
if (FrameOnMouseSide(side, strip->start, (float)CFRA)) {
td->val = &strip->start;
td->ival = strip->start;
td++;
}
if (FrameOnMouseSide(side, strip->end, CFRA)) {
if (FrameOnMouseSide(side, strip->end, (float)CFRA)) {
td->val = &strip->end;
td->ival = strip->end;
td++;

@ -111,7 +111,7 @@ void persp_general(int a)
glPushMatrix();
glMatrixMode(GL_MODELVIEW);
myortho2(-0.375, ((float)(curarea->winx))-0.375, -0.375, ((float)(curarea->winy))-0.375);
myortho2(-0.375f, ((float)(curarea->winx))-0.375f, -0.375f, ((float)(curarea->winy))-0.375f);
glLoadIdentity();
}
else if(a== 1) {
@ -134,7 +134,7 @@ void persp(int a)
mygetmatrix(G.vd->viewmat1);
}
else if(a== PERSP_WIN) { // only set
myortho2(-0.375, (float)(curarea->winx)-0.375, -0.375, (float)(curarea->winy)-0.375);
myortho2(-0.375f, (float)(curarea->winx)-0.375f, -0.375f, (float)(curarea->winy)-0.375f);
glLoadIdentity();
}
else if(a== PERSP_VIEW) {
@ -242,8 +242,8 @@ void project_short(float *vec, short *adr) /* clips */
fy= (curarea->winy/2)*(1 + vec4[1]/vec4[3]);
if(fy>0.0 && fy< (float)curarea->winy) {
adr[0]= floor(fx);
adr[1]= floor(fy);
adr[0]= (short)floor(fx);
adr[1]= (short)floor(fy);
}
}
}
@ -253,7 +253,7 @@ void project_int(float *vec, int *adr)
{
float fx, fy, vec4[4];
adr[0]= 2140000000.0f;
adr[0]= (int)2140000000.0f;
VECCOPY(vec4, vec);
vec4[3]= 1.0;
@ -266,8 +266,8 @@ void project_int(float *vec, int *adr)
fy= (curarea->winy/2)*(1 + vec4[1]/vec4[3]);
if(fy>-2140000000.0f && fy<2140000000.0f) {
adr[0]= floor(fx);
adr[1]= floor(fy);
adr[0]= (int)floor(fx);
adr[1]= (int)floor(fy);
}
}
}
@ -286,8 +286,8 @@ void project_int_noclip(float *vec, int *adr)
fx = (curarea->winx/2)*(1 + vec4[0]/vec4[3]);
fy = (curarea->winy/2)*(1 + vec4[1]/vec4[3]);
adr[0] = floor(fx);
adr[1] = floor(fy);
adr[0] = (int)floor(fx);
adr[1] = (int)floor(fy);
}
else
{
@ -314,8 +314,8 @@ void project_short_noclip(float *vec, short *adr)
fy= (curarea->winy/2)*(1 + vec4[1]/vec4[3]);
if(fy>-32700.0 && fy<32700.0) {
adr[0]= floor(fx);
adr[1]= floor(fy);
adr[0]= (short)floor(fx);
adr[1]= (short)floor(fy);
}
}
}
@ -332,8 +332,8 @@ void project_float(float *vec, float *adr)
Mat4MulVec4fl(G.vd->persmat, vec4);
if( vec4[3]>BL_NEAR_CLIP ) {
adr[0] = (curarea->winx/2.0)+(curarea->winx/2.0)*vec4[0]/vec4[3];
adr[1] = (curarea->winy/2.0)+(curarea->winy/2.0)*vec4[1]/vec4[3];
adr[0] = (float)(curarea->winx/2.0)+(curarea->winx/2.0)*vec4[0]/vec4[3];
adr[1] = (float)(curarea->winy/2.0)+(curarea->winy/2.0)*vec4[1]/vec4[3];
}
}
@ -347,8 +347,8 @@ void project_float_noclip(float *vec, float *adr)
Mat4MulVec4fl(G.vd->persmat, vec4);
if( fabs(vec4[3]) > BL_NEAR_CLIP ) {
adr[0] = (curarea->winx/2.0)+(curarea->winx/2.0)*vec4[0]/vec4[3];
adr[1] = (curarea->winy/2.0)+(curarea->winy/2.0)*vec4[1]/vec4[3];
adr[0] = (float)(curarea->winx/2.0)+(curarea->winx/2.0)*vec4[0]/vec4[3];
adr[1] = (float)(curarea->winy/2.0)+(curarea->winy/2.0)*vec4[1]/vec4[3];
}
else
{
@ -401,8 +401,8 @@ void view3d_project_short_clip(ScrArea *area, float *vec, short *adr, float proj
fy= (area->winy/2)*(1 + vec4[1]/vec4[3]);
if(fy>0.0 && fy< (float)area->winy) {
adr[0]= floor(fx);
adr[1]= floor(fy);
adr[0]= (short)floor(fx);
adr[1]= (short)floor(fy);
}
}
}
@ -427,8 +427,8 @@ void view3d_project_short_noclip(ScrArea *area, float *vec, short *adr, float ma
fy= (area->winy/2)*(1 + vec4[1]/vec4[3]);
if(fy>-32700.0 && fy<32700.0) {
adr[0]= floor(fx);
adr[1]= floor(fy);
adr[0]= (short)floor(fx);
adr[1]= (short)floor(fy);
}
}
}
@ -445,10 +445,10 @@ void view3d_project_float(ScrArea *area, float *vec, float *adr, float mat[4][4]
Mat4MulVec4fl(mat, vec4);
if( vec4[3]>FLT_EPSILON ) {
adr[0] = (area->winx/2.0)+(area->winx/2.0)*vec4[0]/vec4[3];
adr[1] = (area->winy/2.0)+(area->winy/2.0)*vec4[1]/vec4[3];
adr[0] = (float)(area->winx/2.0f)+(area->winx/2.0f)*vec4[0]/vec4[3];
adr[1] = (float)(area->winy/2.0f)+(area->winy/2.0f)*vec4[1]/vec4[3];
} else {
adr[0] = adr[1] = 0.0;
adr[0] = adr[1] = 0.0f;
}
}
@ -894,11 +894,6 @@ void viewmove(int mode)
return;
}
/* clear lastview flag (used to return to previous view when
* pressing Pad0 again after entering Camera view)
*/
if (G.vd->lastview_set) G.vd->lastview_set= 0;
// dist correction from other movement devices
if((dz_flag)||G.vd->dist==0) {
dz_flag = 0;
@ -1119,7 +1114,7 @@ void viewmove(int mode)
int i;
float viewmat[3][3];
static const float thres = 0.93; //cos(20 deg);
static const float thres = 0.93f; //cos(20 deg);
static float snapquats[39][6] = {
/*{q0, q1, q3, q4, view, oposite_direction}*/
@ -2164,20 +2159,20 @@ void centerview() /* like a localview without local! */
afm[0]= (max[0]-min[0]);
afm[1]= (max[1]-min[1]);
afm[2]= (max[2]-min[2]);
size= 0.7*MAX3(afm[0], afm[1], afm[2]);
size= 0.7f*MAX3(afm[0], afm[1], afm[2]);
if(size <= G.vd->near*1.5) size= G.vd->near*1.5;
if(size <= G.vd->near*1.5f) size= G.vd->near*1.5f;
new_ofs[0]= -(min[0]+max[0])/2.0;
new_ofs[1]= -(min[1]+max[1])/2.0;
new_ofs[2]= -(min[2]+max[2])/2.0;
new_ofs[0]= -(min[0]+max[0])/2.0f;
new_ofs[1]= -(min[1]+max[1])/2.0f;
new_ofs[2]= -(min[2]+max[2])/2.0f;
new_dist = size;
/* correction for window aspect ratio */
if(curarea->winy>2 && curarea->winx>2) {
size= (float)curarea->winx/(float)curarea->winy;
if(size<1.0) size= 1.0/size;
if(size<1.0f) size= 1.0f/size;
new_dist*= size;
}
@ -2189,7 +2184,7 @@ void centerview() /* like a localview without local! */
float orig_lens= G.vd->lens;
G.vd->persp=V3D_PERSP;
G.vd->dist= 0.0;
G.vd->dist= 0.0f;
view_settings_from_ob(G.vd->camera, G.vd->ofs, NULL, NULL, &G.vd->lens);
smooth_view(G.vd, new_ofs, NULL, &new_dist, &orig_lens);
} else {
@ -2272,8 +2267,8 @@ void view3d_home(int center)
int ok= 1, onedone=0;
if(center) {
min[0]= min[1]= min[2]= 0.0;
max[0]= max[1]= max[2]= 0.0;
min[0]= min[1]= min[2]= 0.0f;
max[0]= max[1]= max[2]= 0.0f;
}
else {
INIT_MINMAX(min, max);
@ -2290,7 +2285,7 @@ void view3d_home(int center)
afm[0]= (max[0]-min[0]);
afm[1]= (max[1]-min[1]);
afm[2]= (max[2]-min[2]);
size= 0.7*MAX3(afm[0], afm[1], afm[2]);
size= 0.7f*MAX3(afm[0], afm[1], afm[2]);
if(size==0.0) ok= 0;
if(ok) {
@ -2298,14 +2293,14 @@ void view3d_home(int center)
float new_ofs[3];
new_dist = size;
new_ofs[0]= -(min[0]+max[0])/2.0;
new_ofs[1]= -(min[1]+max[1])/2.0;
new_ofs[2]= -(min[2]+max[2])/2.0;
new_ofs[0]= -(min[0]+max[0])/2.0f;
new_ofs[1]= -(min[1]+max[1])/2.0f;
new_ofs[2]= -(min[2]+max[2])/2.0f;
// correction for window aspect ratio
if(curarea->winy>2 && curarea->winx>2) {
size= (float)curarea->winx/(float)curarea->winy;
if(size<1.0) size= 1.0/size;
if(size<1.0) size= 1.0f/size;
new_dist*= size;
}
@ -2340,7 +2335,7 @@ void view3d_align_axis_to_vector(View3D *v3d, int axisidx, float vec[3])
VECCOPY(norm, vec);
Normalize(norm);
angle= acos(Inpf(alignaxis, norm));
angle= (float)acos(Inpf(alignaxis, norm));
Crossf(axis, alignaxis, norm);
VecRotToQuat(axis, -angle, new_quat);
@ -2439,8 +2434,8 @@ void smooth_view(View3D *v3d, float *ofs, float *quat, float *dist, float *lens)
step = (float)((time_current-time_start) / time_allowed);
/* ease in/out */
if (step < 0.5) step = pow(step*2, 2)/2;
else step = 1-(pow(2*(1-step) ,2)/2);
if (step < 0.5) step = (float)pow(step*2, 2)/2;
else step = (float)1-(pow(2*(1-step),2)/2);
step_inv = 1-step;

@ -222,6 +222,7 @@ IF(UNIX)
bf_avi
bf_cineon
bf_openexr
bf_dds
bf_readblenfile
blender_bop
bf_kernel

@ -11,15 +11,15 @@ incs += ' ../kernel/gen_system #/extern/glew/include ../blender/gpu'
incs += ' ' + env['BF_OPENGL_INC']
defs = []
if env['WITH_BF_QUICKTIME']==1:
if env['WITH_BF_QUICKTIME']:
incs += ' ' + env['BF_QUICKTIME_INC']
defs.append('WITH_QUICKTIME')
if env['WITH_BF_BINRELOC']==1:
if env['WITH_BF_BINRELOC']:
incs += ' ../../extern/binreloc/include'
defs.append('WITH_BINRELOC')
if env['WITH_BF_OPENEXR']==1:
if env['WITH_BF_OPENEXR']:
defs.append('WITH_OPENEXR')
if not env['WITH_BF_SDL']:

@ -262,6 +262,14 @@ void SCA_PythonController::Trigger(SCA_LogicManager* logicmgr)
printf("Python compile error from controller \"%s\": \n", GetName().Ptr());
//PyRun_SimpleString(m_scriptText.Ptr());
PyErr_Print();
/* Added in 2.48a, the last_traceback can reference Objects for example, increasing
* their user count. Not to mention holding references to wrapped data.
* This is especially bad when the PyObject for the wrapped data is free'd, after blender
* has alredy dealocated the pointer */
PySys_SetObject( "last_traceback", Py_None);
PyErr_Clear(); /* just to be sure */
return;
}
m_bModified=false;
@ -298,6 +306,14 @@ void SCA_PythonController::Trigger(SCA_LogicManager* logicmgr)
// something is wrong, tell the user what went wrong
printf("Python script error from controller \"%s\": \n", GetName().Ptr());
PyErr_Print();
/* Added in 2.48a, the last_traceback can reference Objects for example, increasing
* their user count. Not to mention holding references to wrapped data.
* This is especially bad when the PyObject for the wrapped data is free'd, after blender
* has alredy dealocated the pointer */
PySys_SetObject( "last_traceback", Py_None);
PyErr_Clear(); /* just to be sure */
//PyRun_SimpleString(m_scriptText.Ptr());
}

@ -998,6 +998,7 @@ PyMethodDef KX_GameObject::Methods[] = {
{"getMesh", (PyCFunction)KX_GameObject::sPyGetMesh,METH_VARARGS},
{"getPhysicsId", (PyCFunction)KX_GameObject::sPyGetPhysicsId,METH_NOARGS},
{"getPropertyNames", (PyCFunction)KX_GameObject::sPyGetPropertyNames,METH_NOARGS},
{"replaceMesh",(PyCFunction) KX_GameObject::sPyReplaceMesh, METH_O},
{"endObject",(PyCFunction) KX_GameObject::sPyEndObject, METH_NOARGS},
KX_PYMETHODTABLE(KX_GameObject, rayCastTo),
KX_PYMETHODTABLE(KX_GameObject, rayCast),
@ -1024,6 +1025,28 @@ bool KX_GameObject::ConvertPythonVectorArgs(PyObject* args,
}
*/
PyObject* KX_GameObject::PyReplaceMesh(PyObject* self, PyObject* value)
{
KX_Scene *scene = PHY_GetActiveScene();
char* meshname;
void* mesh_pt;
meshname = PyString_AsString(value);
if (meshname==NULL) {
PyErr_SetString(PyExc_ValueError, "Expected a mesh name");
return NULL;
}
mesh_pt = SCA_ILogicBrick::m_sCurrentLogicManager->GetMeshByName(STR_String(meshname));
if (mesh_pt==NULL) {
PyErr_SetString(PyExc_ValueError, "The mesh name given does not exist");
return NULL;
}
scene->ReplaceMesh(this, (class RAS_MeshObject*)mesh_pt);
Py_RETURN_NONE;
}
PyObject* KX_GameObject::PyEndObject(PyObject* self)
{

@ -801,6 +801,7 @@ public:
KX_PYMETHOD_VARARGS(KX_GameObject,GetMesh);
KX_PYMETHOD_NOARGS(KX_GameObject,GetPhysicsId);
KX_PYMETHOD_NOARGS(KX_GameObject,GetPropertyNames);
KX_PYMETHOD_O(KX_GameObject,ReplaceMesh);
KX_PYMETHOD_NOARGS(KX_GameObject,EndObject);
KX_PYMETHOD_DOC(KX_GameObject,rayCastTo);
KX_PYMETHOD_DOC(KX_GameObject,rayCast);

@ -30,6 +30,11 @@ class KX_GameObject:
Delete this object, can be used inpace of the EndObject Actuator.
The actual removal of the object from the scene is delayed.
"""
def replaceMesh(mesh_name):
"""
Replace the mesh of this object with a new mesh. This works the same was as the actuator.
@type mesh_name: string
"""
def getVisible():
"""
Gets the game object's visible flag.

@ -0,0 +1,28 @@
#!/usr/bin/python
Import ('env')
from optparse import OptionParser
try:
import epydoc
except ImportError:
print "No epydoc install detected, Python API Docs will not be generated "
if epydoc:
from epydoc.docbuilder import build_doc_index
from epydoc import cli
names = env.Glob("source/gameengine/PyDoc/*.py")
docindex = build_doc_index(names)
optvalues = cli.OPTION_DEFAULTS
optvalues["verbose"] = 1
optvalues["target"] = env["BF_DOCDIR"]+"/BGE_API/"
optvalues["url"] = "http://www.blender.org"
optvalues["top"] = "Game Engine API"
optvalues["name"] = "Blender"
optvalues["noprivate"] = 1
optvalues["noframes"] = 1
optvalues["names"] = names
optparser = OptionParser()
optparser.set_defaults(**optvalues)
(options, args) = optparser.parse_args()
cli.write_html(docindex, options)

@ -155,7 +155,7 @@ def setup_syslibs(lenv):
]
if not lenv['WITH_BF_STATICPYTHON']:
if lenv['BF_DEBUG']==1 and lenv['OURPLATFORM'] in ('win32-vc'):
if lenv['BF_DEBUG'] and lenv['OURPLATFORM'] in ('win32-vc'):
syslibs.append(lenv['BF_PYTHON_LIB']+'_d')
else:
syslibs.append(lenv['BF_PYTHON_LIB'])
@ -215,7 +215,7 @@ def buildinfo(lenv, build_type):
build_rev = os.popen('svnversion').read()[:-1] # remove \n
obj = []
if lenv['BF_BUILDINFO']==1: #user_options_dict['USE_BUILDINFO'] == 1:
if lenv['BF_BUILDINFO']:
if sys.platform=='win32':
build_info_file = open("source/creator/winbuildinfo.h", 'w')
build_info_file.write("char *build_date=\"%s\";\n"%build_date)

@ -47,14 +47,14 @@ def validate_arguments(args, bc):
'WITH_BF_GAMEENGINE', 'WITH_BF_BULLET', 'BF_BULLET', 'BF_BULLET_INC', 'BF_BULLET_LIB',
'BF_SOLID', 'BF_SOLID_INC', 'BF_WINTAB', 'BF_WINTAB_INC',
'WITH_BF_YAFRAY',
'BF_FREETYPE', 'BF_FREETYPE_INC', 'BF_FREETYPE_LIB', 'BF_FREETYPE_LIBPATH',
'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', 'BF_OPENGL_LINKFLAGS',
'WITH_BF_FTGL', 'BF_FTGL', 'BF_FTGL_INC', 'BF_FTGL_LIB',
'WITH_BF_PLAYER',
'WITH_BF_NOBLENDER',
'WITH_BF_BINRELOC',
'CFLAGS', 'CCFLAGS', 'CPPFLAGS',
'WITH_BF_BINRELOC',
'CFLAGS', 'CCFLAGS', 'CPPFLAGS',
'REL_CFLAGS', 'REL_CCFLAGS',
'C_WARN', 'CC_WARN', 'LLIBS', 'PLATFORM_LINKFLAGS',
'BF_PROFILE_FLAGS', 'LCGDIR',
@ -68,7 +68,7 @@ def validate_arguments(args, bc):
'BF_FANCY', 'BF_QUIET',
'BF_X264_CONFIG',
'BF_XVIDCORE_CONFIG',
'WITH_BF_BPYDOC',
'WITH_BF_DOCS',
]
arg_list = ['BF_DEBUG', 'BF_QUIET', 'BF_CROSS', 'BF_UPDATE',
@ -137,7 +137,7 @@ def read_opts(cfg, args):
('VERSE_BUILD_BINARY', 'Build a release or debug binary.', 'release'),
('VERSE_BUILD_DIR', 'Target directory for intermediate files.', "${BF_BUILDDIR}/extern/verse"),
('VERSE_REGEN_PROTO', 'Whether to regenerate the protocol files', 'yes'),
(BoolOption('WITH_BF_VERSE', 'Use VERSE if true', 'false')),
(BoolOption('WITH_BF_VERSE', 'Use VERSE if true', False)),
('BF_VERSE_INCLUDE', 'verse include dir', '/usr/include'),
('LCGDIR', 'location of cvs lib dir'),
('VERSE_BUILD_BINARY', 'Build a release or debug binary.', 'release'),
@ -153,20 +153,20 @@ def read_opts(cfg, args):
('BF_PYTHON_LIB_STATIC', 'Python static libraries', ''),
('BF_PYTHON_LIBPATH', 'Library path', ''),
('BF_PYTHON_LINKFLAGS', 'Python link flags', ''),
(BoolOption('WITH_BF_STATICPYTHON', 'Staticly link to python', 'false')),
(BoolOption('WITH_BF_STATICPYTHON', 'Staticly link to python', False)),
(BoolOption('BF_NO_ELBEEM', 'Disable Fluid Sim', 'false')),
(BoolOption('WITH_BF_YAFRAY', 'Enable Yafray', 'true')),
(BoolOption('BF_NO_ELBEEM', 'Disable Fluid Sim', False)),
(BoolOption('WITH_BF_YAFRAY', 'Enable Yafray', True)),
(BoolOption('WITH_BF_OPENAL', 'Use OpenAL if true', '')),
(BoolOption('WITH_BF_OPENAL', 'Use OpenAL if true', False)),
('BF_OPENAL', 'base path for OpenAL', ''),
('BF_OPENAL_INC', 'include path for python headers', ''),
('BF_OPENAL_LIB', 'Path to OpenAL library', ''),
('BF_OPENAL_LIB_STATIC', 'Path to OpenAL static library', ''),
('BF_OPENAL_LIBPATH', 'Path to OpenAL library', ''),
(BoolOption('WITH_BF_STATICOPENAL', 'Staticly link to openal', 'false')),
(BoolOption('WITH_BF_STATICOPENAL', 'Staticly link to openal', False)),
(BoolOption('WITH_BF_SDL', 'Use SDL if true', '')),
(BoolOption('WITH_BF_SDL', 'Use SDL if true', False)),
('BF_SDL', 'SDL base path', ''),
('BF_SDL_INC', 'SDL include path', ''), #$(shell $(BF_SDL)/bin/sdl-config --cflags)
('BF_SDL_LIB', 'SDL library', ''), #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
@ -177,20 +177,20 @@ def read_opts(cfg, args):
('BF_PTHREADS_LIB', 'Pthreads library', ''),
('BF_PTHREADS_LIBPATH', 'Pthreads library path', ''),
(BoolOption('WITH_BF_FMOD', 'Use FMOD if true', 'false')),
(BoolOption('WITH_BF_FMOD', 'Use FMOD if true', False)),
# BF_FMOD = $(LCGDIR)/fmod
(BoolOption('WITH_BF_OPENEXR', 'Use OPENEXR if true', 'true')),
(BoolOption('WITH_BF_STATICOPENEXR', 'Staticly link to OpenEXR', 'false')),
(BoolOption('WITH_BF_OPENEXR', 'Use OPENEXR if true', True)),
(BoolOption('WITH_BF_STATICOPENEXR', 'Staticly link to OpenEXR', False)),
('BF_OPENEXR', 'OPENEXR base path', ''),
('BF_OPENEXR_INC', 'OPENEXR include path', ''),
('BF_OPENEXR_LIB', 'OPENEXR library', ''),
('BF_OPENEXR_LIBPATH', 'OPENEXR library path', ''),
('BF_OPENEXR_LIB_STATIC', 'OPENEXR static library', ''),
(BoolOption('WITH_BF_DDS', 'Use DDS if true', 'true')),
(BoolOption('WITH_BF_DDS', 'Use DDS if true', True)),
(BoolOption('WITH_BF_FFMPEG', 'Use FFMPEG if true', 'false')),
(BoolOption('WITH_BF_FFMPEG', 'Use FFMPEG if true', False)),
('BF_FFMPEG', 'FFMPEG base path', ''),
('BF_FFMPEG_LIB', 'FFMPEG library', ''),
('BF_FFMPEG_EXTRA', 'FFMPEG flags that must be preserved', ''),
@ -199,29 +199,29 @@ def read_opts(cfg, args):
('BF_FFMPEG_LIBPATH', 'FFMPEG library path', ''),
(BoolOption('WITH_BF_OGG', 'Use OGG, THEORA, VORBIS in FFMPEG if true',
'false')),
False)),
('BF_OGG', 'OGG base path', ''),
('BF_OGG_LIB', 'OGG library', ''),
(BoolOption('WITH_BF_JPEG', 'Use JPEG if true', 'true')),
(BoolOption('WITH_BF_JPEG', 'Use JPEG if true', True)),
('BF_JPEG', 'JPEG base path', ''),
('BF_JPEG_INC', 'JPEG include path', ''),
('BF_JPEG_LIB', 'JPEG library', ''),
('BF_JPEG_LIBPATH', 'JPEG library path', ''),
(BoolOption('WITH_BF_OPENJPEG', 'Use OPENJPEG if true', 'false')),
(BoolOption('WITH_BF_OPENJPEG', 'Use OPENJPEG if true', False)),
('BF_OPENJPEG', 'OPENJPEG base path', ''),
('BF_OPENJPEG_INC', 'OPENJPEG include path', ''),
('BF_OPENJPEG_LIB', 'OPENJPEG library', ''),
('BF_OPENJPEG_LIBPATH', 'OPENJPEG library path', ''),
(BoolOption('WITH_BF_REDCODE', 'Use REDCODE if true', 'false')),
(BoolOption('WITH_BF_REDCODE', 'Use REDCODE if true', False)),
('BF_REDCODE', 'REDCODE base path', ''),
('BF_REDCODE_INC', 'REDCODE include path', ''),
('BF_REDCODE_LIB', 'REDCODE library', ''),
('BF_REDCODE_LIBPATH', 'REDCODE library path', ''),
(BoolOption('WITH_BF_PNG', 'Use PNG if true', 'true')),
(BoolOption('WITH_BF_PNG', 'Use PNG if true', True)),
('BF_PNG', 'PNG base path', ''),
('BF_PNG_INC', 'PNG include path', ''),
('BF_PNG_LIB', 'PNG library', ''),
@ -230,33 +230,33 @@ def read_opts(cfg, args):
('BF_TIFF', 'TIFF base path', ''),
('BF_TIFF_INC', 'TIFF include path', ''),
(BoolOption('WITH_BF_ZLIB', 'Use ZLib if true', 'true')),
(BoolOption('WITH_BF_ZLIB', 'Use ZLib if true', True)),
('BF_ZLIB', 'ZLib base path', ''),
('BF_ZLIB_INC', 'ZLib include path', ''),
('BF_ZLIB_LIB', 'ZLib library', ''),
('BF_ZLIB_LIBPATH', 'ZLib library path', ''),
(BoolOption('WITH_BF_INTERNATIONAL', 'Use Gettext and Freetype if true', 'true')),
(BoolOption('WITH_BF_INTERNATIONAL', 'Use Gettext and Freetype if true', True)),
('BF_GETTEXT', 'gettext base path', ''),
('BF_GETTEXT_INC', 'gettext include path', ''),
('BF_GETTEXT_LIB', 'gettext library', ''),
('BF_GETTEXT_LIBPATH', 'gettext library path', ''),
(BoolOption('WITH_BF_ICONV', 'Use iconv if true', 'true')),
(BoolOption('WITH_BF_ICONV', 'Use iconv if true', True)),
('BF_ICONV', 'iconv base path', ''),
('BF_ICONV_INC', 'iconv include path', ''),
('BF_ICONV_LIB', 'iconv library', ''),
('BF_ICONV_LIBPATH', 'iconv library path', ''),
(BoolOption('WITH_BF_GAMEENGINE', 'Build with gameengine' , 'true')),
(BoolOption('WITH_BF_GAMEENGINE', 'Build with gameengine' , True)),
(BoolOption('WITH_BF_ODE', 'Use ODE if true', 'true')),
(BoolOption('WITH_BF_ODE', 'Use ODE if true', True)),
('BF_ODE', 'ODE base path', ''),
('BF_ODE_INC', 'ODE include path' , ''),
('BF_ODE_LIB', 'ODE library', ''),
(BoolOption('WITH_BF_BULLET', 'Use Bullet if true', 'true')),
(BoolOption('WITH_BF_BULLET', 'Use Bullet if true', True)),
('BF_BULLET', 'Bullet base dir', ''),
('BF_BULLET_INC', 'Bullet include path', ''),
('BF_BULLET_LIB', 'Bullet library', ''),
@ -266,10 +266,10 @@ def read_opts(cfg, args):
('BF_WINTAB', 'WinTab base dir', ''),
('BF_WINTAB_INC', 'WinTab include dir', ''),
('BF_CXX', 'c++ base path for libstdc++, only used when static linking', ''),
(BoolOption('WITH_BF_STATICCXX', 'static link to stdc++', 'false')),
(BoolOption('WITH_BF_STATICCXX', 'static link to stdc++', False)),
('BF_CXX_LIB_STATIC', 'static library path for stdc++', ''),
##
##WITH_BF_NSPR = 'true'
##WITH_BF_NSPR = True
##BF_NSPR = $(LCGDIR)/nspr
##BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
##BF_NSPR_LIB =
@ -283,23 +283,24 @@ def read_opts(cfg, args):
### if this is not set.
##
### Be paranoid regarding library creation (do not update archives)
##BF_PARANOID = 'true'
##BF_PARANOID = True
##
### enable freetype2 support for text objects
(BoolOption('WITH_BF_FREETYPE', 'Use FreeType2 if true', False)),
('BF_FREETYPE', 'Freetype base path', ''),
('BF_FREETYPE_INC', 'Freetype include path', ''),
('BF_FREETYPE_LIB', 'Freetype library', ''),
('BF_FREETYPE_LIBPATH', 'Freetype library path', ''),
(BoolOption('WITH_BF_OPENMP', 'Use OpenMP if true', 'false')),
(BoolOption('WITH_BF_OPENMP', 'Use OpenMP if true', False)),
(BoolOption('WITH_BF_QUICKTIME', 'Use QuickTime if true', 'false')),
(BoolOption('WITH_BF_QUICKTIME', 'Use QuickTime if true', False)),
('BF_QUICKTIME', 'QuickTime base path', ''),
('BF_QUICKTIME_INC', 'QuickTime include path', ''),
('BF_QUICKTIME_LIB', 'QuickTime library', ''),
('BF_QUICKTIME_LIBPATH', 'QuickTime library path', ''),
(BoolOption('WITH_BF_STATICOPENGL', 'Use MESA if true', 'true')),
(BoolOption('WITH_BF_STATICOPENGL', 'Use MESA if true', True)),
('BF_OPENGL', 'OpenGL base path', ''),
('BF_OPENGL_INC', 'OpenGL include path', ''),
('BF_OPENGL_LIB', 'OpenGL libraries', ''),
@ -307,13 +308,13 @@ def read_opts(cfg, args):
('BF_OPENGL_LIB_STATIC', 'OpenGL static libraries', ''),
('BF_OPENGL_LINKFLAGS', 'OpenGL link flags', ''),
(BoolOption('WITH_BF_FTGL', 'Use FTGL if true', 'true')),
(BoolOption('WITH_BF_FTGL', 'Use FTGL if true', True)),
('BF_FTGL', 'FTGL base path', ''),
('BF_FTGL_INC', 'FTGL include path', ''),
('BF_FTGL_LIB', 'FTGL libraries', ''),
(BoolOption('WITH_BF_PLAYER', 'Build blenderplayer if true', 'false')),
(BoolOption('WITH_BF_NOBLENDER', 'Do not build blender if true', 'false')),
(BoolOption('WITH_BF_PLAYER', 'Build blenderplayer if true', False)),
(BoolOption('WITH_BF_NOBLENDER', 'Do not build blender if true', False)),
('CFLAGS', 'C-compiler flags', ''),
('CCFLAGS', 'C++-compiler flags', ''),
@ -327,13 +328,13 @@ def read_opts(cfg, args):
('LLIBS', 'Platform libs', ''),
('PLATFORM_LINKFLAGS', 'Platform linkflags', ''),
(BoolOption('BF_PROFILE', 'Add profiling information if true', 'false')),
(BoolOption('BF_PROFILE', 'Add profiling information if true', False)),
('BF_PROFILE_FLAGS', 'Profiling flags', ''),
(BoolOption('BF_DEBUG', 'Add debug flags if true', 'false')),
(BoolOption('BF_DEBUG', 'Add debug flags if true', False)),
('BF_DEBUG_FLAGS', 'Debug flags', ''),
(BoolOption('BF_BSC', 'Create .bsc files (msvc only)', 'true')),
(BoolOption('BF_BSC', 'Create .bsc files (msvc only)', True)),
('BF_BUILDDIR', 'Build dir', ''),
('BF_INSTALLDIR', 'Installation dir', ''),
@ -342,18 +343,18 @@ def read_opts(cfg, args):
('CC', 'C compiler to use', ''),
('CXX', 'C++ compiler to use', ''),
(BoolOption('BF_BUILDINFO', 'Buildtime in splash if true', 'true')),
(BoolOption('BF_BUILDINFO', 'Buildtime in splash if true', True)),
(BoolOption('BF_TWEAK_MODE', 'Enable tweak mode if true', 'false')),
(BoolOption('BF_SPLIT_SRC', 'Split src lib into several chunks if true', 'false')),
(BoolOption('WITHOUT_BF_INSTALL', 'dont install if true', 'false')),
(BoolOption('BF_FANCY', 'Enable fancy output if true', 'true')),
(BoolOption('BF_QUIET', 'Enable silent output if true', 'true')),
(BoolOption('WITH_BF_BINRELOC', 'Enable relocatable binary (linux only)', 'false')),
(BoolOption('BF_TWEAK_MODE', 'Enable tweak mode if true', False)),
(BoolOption('BF_SPLIT_SRC', 'Split src lib into several chunks if true', False)),
(BoolOption('WITHOUT_BF_INSTALL', 'dont install if true', False)),
(BoolOption('BF_FANCY', 'Enable fancy output if true', True)),
(BoolOption('BF_QUIET', 'Enable silent output if true', True)),
(BoolOption('WITH_BF_BINRELOC', 'Enable relocatable binary (linux only)', False)),
('BF_X264_CONFIG', 'configuration flags for x264', ''),
('BF_XVIDCORE_CONFIG', 'configuration flags for xvidcore', ''),
(BoolOption('WITH_BF_BPYDOC', 'Generate BPY API documentation', 'false')),
(BoolOption('WITH_BF_DOCS', 'Generate API documentation', False)),
('BF_CONFIG', 'SCons python config file used to set default options', 'user_config.py'),