merge 17122:17206
authorMartin Poirier <theeth@yahoo.com>
Tue, 28 Oct 2008 18:47:01 +0000 (18:47 +0000)
committerMartin Poirier <theeth@yahoo.com>
Tue, 28 Oct 2008 18:47:01 +0000 (18:47 +0000)
96 files changed:
CMakeLists.txt
SConstruct
config/darwin-config.py
config/linux2-config.py
config/linuxcross-config.py
config/openbsd3-config.py
config/sunos5-config.py
config/win32-mingw-config.py
config/win32-vc-config.py
extern/bFTGL/SConscript
intern/SConscript
intern/elbeem/SConscript
intern/ghost/SConscript
release/datafiles/splash.jpg
release/scripts/DirectX8Exporter.py
release/scripts/export_fbx.py
release/scripts/export_obj.py
release/scripts/import_obj.py
release/scripts/import_web3d.py
release/scripts/lightwave_import.py
release/scripts/object_drop.py
release/scripts/ply_export.py
release/scripts/ply_import.py
release/scripts/uvcalc_lightmap.py
release/scripts/wizard_curve2tree.py
source/SConscript
source/blender/CMakeLists.txt
source/blender/SConscript
source/blender/blenkernel/BKE_blender.h
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/SConscript
source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/ipo.c
source/blender/blenkernel/intern/shrinkwrap.c
source/blender/blenlib/SConscript
source/blender/blenloader/intern/readfile.c
source/blender/blenpluginapi/SConscript
source/blender/imbuf/CMakeLists.txt
source/blender/imbuf/SConscript
source/blender/imbuf/intern/dds/CMakeLists.txt [new file with mode: 0644]
source/blender/include/BIF_editdeform.h
source/blender/makesdna/DNA_view3d_types.h
source/blender/nodes/SConscript
source/blender/python/BPY_interface.c
source/blender/python/SConscript
source/blender/python/api2_2x/Armature.c
source/blender/python/api2_2x/BezTriple.c
source/blender/python/api2_2x/CurNurb.c
source/blender/python/api2_2x/Curve.c
source/blender/python/api2_2x/Draw.c
source/blender/python/api2_2x/Image.c
source/blender/python/api2_2x/Material.c
source/blender/python/api2_2x/Mesh.c
source/blender/python/api2_2x/Object.c
source/blender/python/api2_2x/Types.c
source/blender/python/api2_2x/doc/Blender.py
source/blender/python/api2_2x/doc/Draw.py
source/blender/python/api2_2x/doc/Image.py
source/blender/python/api2_2x/doc/Mesh.py
source/blender/python/api2_2x/doc/Types.py
source/blender/render/SConscript
source/blender/render/intern/source/sss.c
source/blender/src/SConscript
source/blender/src/buttons_editing.c
source/blender/src/buttons_object.c
source/blender/src/drawaction.c
source/blender/src/drawgpencil.c
source/blender/src/editaction.c
source/blender/src/editaction_gpencil.c
source/blender/src/editarmature.c
source/blender/src/editdeform.c
source/blender/src/editipo.c
source/blender/src/editnla.c
source/blender/src/gpencil.c
source/blender/src/header_info.c
source/blender/src/header_time.c
source/blender/src/header_view3d.c
source/blender/src/keyframing.c
source/blender/src/outliner.c
source/blender/src/poselib.c
source/blender/src/poseobject.c
source/blender/src/space.c
source/blender/src/splash.jpg.c
source/blender/src/toets.c
source/blender/src/transform.c
source/blender/src/transform_conversions.c
source/blender/src/view.c
source/creator/CMakeLists.txt
source/creator/SConscript
source/gameengine/GameLogic/SCA_PythonController.cpp
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_GameObject.h
source/gameengine/PyDoc/KX_GameObject.py
source/gameengine/PyDoc/SConscript [new file with mode: 0644]
tools/Blender.py
tools/btools.py

index 9e615ecdfa593239f70801a97a882eca6b730903..41f2311af985a4daea4ee4f472ee071e04265ba9 100644 (file)
@@ -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)
index f15aa8bfa2241d65e442d44cf5be4b2b3a65c835..48115a39b1d659b2a5cb91c66f7065fd43847b7e 100644 (file)
@@ -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')
 
index cc6c6ef76aff736bd0fba5e629838884add3d14f..ccc3eb5a0d0ccc9032a89d761774df3fa8c19a23 100644 (file)
@@ -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'
index 74853de70b65718ae784f3c462005179523ec342..181f1d5364da8afd740e11e4c74a94ecbf50bd35 100644 (file)
@@ -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'
index 13f477d21f3eb43aa8948e76d16a07471f910827..c10e9d76cb525cb9e752f00535d233da2d08cf90 100644 (file)
@@ -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'
index 1cd93008561e69d3987af45be0ad1f2c6e3aff22..b2112c84b9895698d2c745e4c995faacf9fd0d68 100644 (file)
@@ -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'
index a5ba33e44cd7a7608e8adf4c57c4a902fad56862..bb6c5d89e4633ffb755ee602611450481e4725ff 100644 (file)
@@ -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'
index 65b7beb79adb7d27d831b4f718a577e6f5167b92..d7ecad33bca48043799782ba5264eb638a894f08 100644 (file)
@@ -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'
index 14fd8b3aac75ba739c17e2333e267cb19a855167..ec401e3ad57a85c882f9ebb7c9890b82217a9e3c 100644 (file)
@@ -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'
index c03992631e6913f93b11e1a1e307a3bdff087989..f377c61f01d47ccf277eaca8b1f75ab3a2594d39 100644 (file)
@@ -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 = ''
 
index f6092b7bd0299dc078f2bd94492217aeb48c20e9..82c7739bf42926cf0a2f5378b6435596ca49ba78 100644 (file)
@@ -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':
index 68892ac261cdd45295fdbdc9262fbf8a9b9ef822..f1c09423f04eb1f2c1014941b9a5dfabb45d1ef9 100644 (file)
@@ -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':
index 40968e816a9791939a4abce684b6d14c97d1aad2..f6283cfc0f2f5e47e1a3b5afd450e717131f2601 100644 (file)
@@ -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')
index f80a35becbc02eb2dc561c733e340ecc61f68606..c65b2f37e871a5a05475b0205888cb8a9c2b6f9c 100644 (file)
Binary files a/release/datafiles/splash.jpg and b/release/datafiles/splash.jpg differ
index 01212545f775b63724d81c5dafedab79d89e4447..b8bdae4de2b5e66f2156e60cb35dbae6de7ebc95 100644 (file)
@@ -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__ = """\
index 696d3d1561a1816b1e2c54622629dc0c95685cae..3f02a71f95194f4ea63d1aa41490d1e67b791238 100644 (file)
@@ -2952,7 +2952,7 @@ def write_ui():
                        #fbx_ui_write('/test.fbx')
                        break
                
-               Draw.UIBlock(fbx_ui)
+               Draw.UIBlock(fbx_ui, 0)
        
        
        # GLOBALS.clear()
index f99a949fbae3c32910806a8ea13f15dc5b1df8bc..9feb02638c350d09951b52a629fbc9335d1578ca 100644 (file)
@@ -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
index b7bdd54fe6de1dfa3d78e8f1c6e90514b5cfba12..3aad0800cf7e54b3027620bfa458645451b9d49d 100644 (file)
@@ -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
index e934d06e9efc55ae55fb92698deaa8804f8838da..9447f15fb79b2b55c34603782d87c42dcd4158f7 100755 (executable)
@@ -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 = {}
index 2049fbd23802425b4ba0746236c440406dfd6395..6d02467cef8cb68afaabeb59dcfe010ce09184c9 100644 (file)
@@ -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
index 63a0bd574fb2a736c8f006dee38f3285a0cbd44c..f4803e62d98f3d8394d9f7b489641886512e0eb5 100644 (file)
@@ -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()
index 19a4a60674e5556dc815dd8203320da292f8903c..46d080503028a5967944eb60c18f14b645454b92 100644 (file)
@@ -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])
index 6b96777102a9f4136b8bcdc242648b32b74d222d..302e21a0a43167e057819af9497eb6092e3f6259 100644 (file)
@@ -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)
+       
+       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]
        
-       del obj # Reclaim memory
+       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)
+'''
\ No newline at end of file
index 37423b7197e2ac147a36ee76938b131ed4dfe481..1433ccbd13ab4ab0c13d55f475494c3196c9c333 100644 (file)
@@ -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
index eb27f1ca0f566fd704918116a9346f513e2908bd..1965f9a50708c73119c8ac9733527f7549b25c3b 100644 (file)
@@ -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):
index ca264579f6ecbe1ae63775bf0e8ae425608a0b4f..9b497edd85a7b7b83da3c627561c13a56f3ae28d 100644 (file)
@@ -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'):
index a21eadf15fa830432af8bc39c74aa00a7dafb849..007ee34e4e779c0a475ffa9d0eefd46fc63ba133 100644 (file)
@@ -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)
index 25745c0e51a2c399449aef4929c030badeab47d2..decbbf3564224805e277cc86c1c31609e12b973f 100644 (file)
@@ -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'])
index 1806fa18ea9d32dc0a01f74bd46dd36815d5c9e6..f392d57521cb9e94285f7b4c376b07863ff3395d 100644 (file)
@@ -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
index c3cbc36a94fb62f7e7faa7dc38d76c717ad5a2a0..0ed4f38e457bffbf932c3131d49ece2d22d47a1e 100644 (file)
@@ -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)
index f891b307b2ccb0991b821701097b30349640f9d3..82743ef5ea771b54790171a7e08cdfc84b73f062 100644 (file)
@@ -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']:
index 99cf58e8e5a4dbb4a87b4785adc440c358eedb88..4914732b801291d74e8e885c7a4eae7b50621e90 100644 (file)
@@ -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 */
index a115ac39e1ab94ba394ff4131710000061013e34..9f0ea0f13887662ce0c6d7c962905c171c3b681b 100644 (file)
@@ -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;
index 76af9a763eee1aabbe3c6fb9f7aa297308dac0b3..28bf7aee88439578c05e1400f213920ec020b4e4 100644 (file)
@@ -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;
index 65cebf02f62261f7a859700d755339682b4d01c0..e7a4f2eaf1344d6a7e9f18a2c86e82931a39d984 100644 (file)
@@ -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']:
index ec26683444ebed7fd2c7380abb46552301275c85..3a9d0a6ae6a16cd611658fe33c86cf2886cb4df8 100644 (file)
@@ -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;
index d17a35e933e67f93cd375418d2518307d8153da8..4cf52a50e8cfb7551e250d14405dee9fc0f5e5c6 100644 (file)
@@ -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']
 
index 0aac462573ac6b69bae8afb362d4cb2c5a8e4de1..2d41a6d73e68b5cbffd103c122506266715ce233 100644 (file)
@@ -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] )
index 7349f481731259a845c31db7a229197b33113760..4eba4a843b2f4890b2ab7274336efce07dc91166 100644 (file)
@@ -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')
 
diff --git a/source/blender/imbuf/intern/dds/CMakeLists.txt b/source/blender/imbuf/intern/dds/CMakeLists.txt
new file mode 100644 (file)
index 0000000..842f53b
--- /dev/null
@@ -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])
index 8e8b1be2dd3606b26311bbfabda0a490ddd4e956..6429b60a888cbc8b712e61ddb733c4f3e1d5f05a 100644 (file)
@@ -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);
index ae0dcfc3f0eeb6d65d0af5c78d740d4425367f06..b7b5f71c84530c04f104f9bf13c4a21d11cc523c 100644 (file)
@@ -148,8 +148,8 @@ typedef struct View3D {
        /* last view */
        float lviewquat[4];
        short lpersp, lview;
-       short lastview_set;
-       short pad5;
+
+       short pad5, pad6;
 } View3D;
 
 
index 8af7b67520e75e3e1233483edb0b69d66b2be5d2..f80f4b521dbf476c8bac5c67ef3d0d25aa066730 100644 (file)
@@ -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']
 
index 29ef6c5da1d28ea371231857bca7931773294887..1c8b606ace36d50b031fe6d26beacad2c7d5e376 100644 (file)
@@ -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 )
 {
index 1f0cbd2c86d9828bfb88eb4ab0de3d49f5d50b24..670041a6504b4eb9a214b10a1b4c8b35755927ce 100644 (file)
@@ -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] )
index dab2d49df0c876f93818059dfebe5d4c27669d8b..aa3ef82a3e8f6d7af7c455e33069bc6850e12a4a 100644 (file)
@@ -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-----------------------
index b7b94dc93e12a4080a6130e2a3576eb4fc9bd6a3..9e57994d2da13322f0d62e8005747fe851d1367f 100644 (file)
@@ -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 );
index b2120bd63c604841c3ab60dfcb7aaee7bcfdf7b7..63a1dccbc50daa8009ab7139274d487c02f5150b 100644 (file)
@@ -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" );
 
        }
 
index 26208e600e65445b899226dc982766cae549bc2d..d1abde19de907f14b973b0ccd7dfadb9fdc6db0b 100644 (file)
@@ -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); */
                }
index c942657fbd0fd8f0326f0dec258abcda88eadfaf..e0111f099aab2e9ceebcb9028e781aa58ba340f9 100644 (file)
@@ -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;
index 5ef2cbadbdc88fb9a2b32484410c130cfee6755c..dc15e0082092febda4be04e8f8b3742c7d7ca3d4 100644 (file)
@@ -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,
index 02fdc32c5c93f37c7975a1bcde2d0d64227039ad..cb2c81aba6ef0fea8239c36bdaca0ae08f50cda1 100644 (file)
 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 );
 
index fdecd66f5e257979db16e7271f381d7237ab2254..32ddb464c88eb5d4e8301032b3c7896212d42540 100644 (file)
@@ -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;
index f14ac81fe247cad3415ae7e65ea16d6cbca80296..1282b9bd82c325f693c33585ab39445b27456844 100644 (file)
@@ -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:                                  */
 /*****************************************************************************/
index 1ce1907188575609eec69795068127de2263eb44..10b968cacbaef98f4e818d847d0e7471f8fcf849 100644 (file)
  * ***** 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);
index 9d89cae713770ce9c3228a5b7f200b92756b6ccc..8767df43ee15d8c12dae3b6e6d98514394b1cdea 100644 (file)
@@ -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
   """
index 97e2279790201cfdb972b36322121fca84081aa6..127f37bfbade29ea43bbe356ab4d251d6235d037 100644 (file)
@@ -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.
        """
index 564cac3ef9bc3edeca2e7aa619c209ca8d6eaa1c..e376b11c4fa60d3b94f3b0aef27e85d47babda2d 100644 (file)
@@ -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>} .
index e48f41e8f9c0ca23816df7e878f2832c0eada7d1..9b6dcae8bb6b3b1ebccf7346ee65a72784a0c1d2 100644 (file)
@@ -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.
index a08226e46ee097a369e87f7e06efae15775ebb75..d9cd70a1f5bb8554597f78cfaf0a1df677e5a476 100644 (file)
@@ -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.
+    """
\ No newline at end of file
index f0d1353b0d3a8a41a6473ff62368e9f91e6d5883..607ddf5c7a38f1b1ba25354d01ab981f883b04ca 100644 (file)
@@ -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']:
index 2e7ca48affcbe55b507a3d62ac49848a98c5ad34..9fb48a08503ec88c87213c239f0fd968ab453649 100644 (file)
@@ -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)));
 }
 
index 5365908c130b9dfede32a60d6cb1a872f6f3d93d..47b269c85d73bb9af01e1d128c7dffae3c58b81f 100644 (file)
@@ -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:
index b7561deed8e4f9549b55a3a8b58a428027efbae2..45267f506226acf58e2c61923b3acccd4bdb59f2 100644 (file)
@@ -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);
index c86d5193a5a3fe3085978e26177d65c0cd560c1a..a8ce9da8780f56460d57a1eda976996a34c27e1f 100644 (file)
@@ -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)
index c3a8b7c3690814a258721927a0e8b3cbd8506438..0d7a720dd1e8d97578c938833656e0c5866951e0 100644 (file)
@@ -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; 
                        
index 9c12871aa54155d1a3674ad86c17d16dcea68c0e..1b3d869b2f844823b97a0fd3ce9be1117a049113 100644 (file)
@@ -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, 12rb_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! */
index 0f0e38084b62f5f40f08b59ff912249f3228e3ad..e230c97f0102cf12778dce50d50c42c324d02a5f 100644 (file)
@@ -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);
                                
index 5ea12faffd444bb14b982841e563a31869768f1b..fb070624e8f1b29472ffc56d5fa6660f7189767e 100644 (file)
@@ -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
index d94d77952248f2993c32b76f41eb68279f06289a..5ddf522e4a86aa86e043c2857f0a736ca9ac3b26 100644 (file)
@@ -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;
                        }
                }
        }
index 3f178e1ea2bcaf560334c9d6862a152730881791..8a07a4fddffbb0213ba56fff5c371b6f2cf53a46 100644 (file)
@@ -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;
        }
 }
 
index 617683a6ab45d61364c2779cdb6f73c6723b7df2..6293e669aa1e4e50bbc17c7d391e6f754088ccb9 100644 (file)
@@ -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);
                                }
                        }
index 2c17b20735b3ff9bbe3749224609ed3e6aefa53e..179ea41d5ad5e27939ff775530b6e714af47ae74 100644 (file)
@@ -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;
index 3d54fdc4439b6222f15a8ece1bc65a29601e50c7..497443edffd159c66289adffd40152d3e28adcdc 100644 (file)
@@ -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:
index 9bacc2b63511bf770b6d3a6c8ef62e46f2c9a13c..28248c052b3e2bb79a7eaaab8f7bb6b0d59ea82c 100644 (file)
@@ -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];
index 51f71e5bdab078d6d2c2985122f9db7f461cbc90..574e0b3a9f1a58404a57a5e4ac522c9094920f57 100644 (file)
@@ -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)");
index 5c215dcdd46153b938f3c10044c5045a94005f60..d57fa18a7055ea98feb8ae70aa2d76ce89b96eb7 100644 (file)
@@ -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++;
index e61d81401839e9a19f70b9fc193d1a989de03ee3..d9c729e7df6a9d7d7288b70f576ade1d2c09fe5f 100644 (file)
@@ -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;
+                               }
                        }
                }
        }
index 04506d7d3c3e80709d3f99f66e7186c2e2a59c5b..8e3e44c06de794501cc69a196cbd6ea0871e0bf1 100644 (file)
@@ -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");
+