Merge trunk with branch
authorAndre Susano Pinto <andresusanopinto@gmail.com>
Wed, 30 Apr 2008 18:14:27 +0000 (18:14 +0000)
committerAndre Susano Pinto <andresusanopinto@gmail.com>
Wed, 30 Apr 2008 18:14:27 +0000 (18:14 +0000)
svn merge -r 14551:14626 https://svn.blender.org/svnroot/bf-blender/trunk/blender

123 files changed:
CMakeLists.txt
SConstruct
config/darwin-config.py
doc/blender-scons.txt
extern/verse/dist/v_network.c
intern/guardedalloc/intern/mallocn.c
intern/guardedalloc/intern/mmap_win.c [new file with mode: 0644]
intern/guardedalloc/make/msvc_7_0/guardedalloc.vcproj
intern/guardedalloc/mmap_win.h [new file with mode: 0644]
projectfiles_vc7/blender/BPY_python/BPY_python.vcproj
projectfiles_vc7/blender/blender.vcproj
projectfiles_vc7/blender/blenkernel/BKE_blenkernel.vcproj
projectfiles_vc7/blender/ftfont/FTF_ftfont.vcproj
projectfiles_vc7/blender/imbuf/BL_imbuf.vcproj
projectfiles_vc7/blender/src/BL_src.vcproj
projectfiles_vc7/gameengine/gameplayer/ghost/GP_ghost.vcproj
release/datafiles/splash.jpg
release/scripts/bpymodules/paths_svg2obj.py
release/scripts/raw_export.py
source/blender/blenkernel/BKE_blender.h
source/blender/blenkernel/BKE_cloth.h
source/blender/blenkernel/BKE_effect.h
source/blender/blenkernel/BKE_font.h
source/blender/blenkernel/BKE_multires.h
source/blender/blenkernel/BKE_particle.h
source/blender/blenkernel/bad_level_call_stubs/stubs.c
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/effect.c
source/blender/blenkernel/intern/font.c
source/blender/blenkernel/intern/group.c
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/implicit.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/multires-firstlevel.c
source/blender/blenkernel/intern/multires.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/text.c
source/blender/blenlib/BLI_blenlib.h
source/blender/blenlib/BLI_bpath.h
source/blender/blenlib/BLI_winstuff.h
source/blender/blenlib/intern/bpath.c
source/blender/blenlib/intern/noise.c
source/blender/blenlib/intern/psfont.c
source/blender/blenlib/intern/util.c
source/blender/blenlib/intern/winstuff.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/blenpluginapi/intern/pluginapi.c
source/blender/ftfont/intern/FTF_TTFont.cpp
source/blender/imbuf/intern/openexr/openexr_api.cpp
source/blender/imbuf/intern/radiance_hdr.c
source/blender/imbuf/intern/readimage.c
source/blender/imbuf/intern/util.c
source/blender/include/BIF_editaction.h
source/blender/include/blendef.h
source/blender/include/butspace.h
source/blender/include/particle_effect.h
source/blender/makesdna/DNA_action_types.h
source/blender/makesdna/DNA_cloth_types.h
source/blender/makesdna/DNA_object_types.h
source/blender/makesdna/intern/CMakeLists.txt
source/blender/makesdna/intern/SConscript
source/blender/python/BPY_interface.c
source/blender/python/api2_2x/Effect.c
source/blender/python/api2_2x/MTex.c
source/blender/python/api2_2x/Object.c
source/blender/python/api2_2x/Particle.c
source/blender/python/api2_2x/doc/Effect.py
source/blender/python/api2_2x/doc/Object.py
source/blender/python/api2_2x/doc/Texture.py
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/rayshade.c
source/blender/render/intern/source/rendercore.c
source/blender/render/intern/source/shadeoutput.c
source/blender/src/B.blend.c
source/blender/src/buttons_object.c
source/blender/src/buttons_scene.c
source/blender/src/buttons_shading.c
source/blender/src/drawaction.c
source/blender/src/drawimage.c
source/blender/src/drawimasel.c
source/blender/src/drawipo.c
source/blender/src/drawobject.c
source/blender/src/drawscene.c
source/blender/src/editaction.c
source/blender/src/editfont.c
source/blender/src/editipo.c
source/blender/src/editobject.c
source/blender/src/editscreen.c
source/blender/src/filesel.c
source/blender/src/header_action.c
source/blender/src/header_image.c
source/blender/src/header_view3d.c
source/blender/src/meshtools.c
source/blender/src/outliner.c
source/blender/src/poselib.c
source/blender/src/splash.jpg.c
source/blender/src/toets.c
source/blender/src/transform_conversions.c
source/blender/src/usiblender.c
source/blender/src/view.c
source/creator/creator.c
source/gameengine/BlenderRoutines/KX_BlenderCanvas.h
source/gameengine/BlenderRoutines/mac_compat_glext.h [new file with mode: 0644]
source/gameengine/GameLogic/SCA_IActuator.h
source/gameengine/GameLogic/SCA_IObject.cpp
source/gameengine/GameLogic/SCA_IObject.h
source/gameengine/GamePlayer/common/SConscript
source/gameengine/GamePlayer/ghost/SConscript
source/gameengine/Ketsji/KX_TrackToActuator.cpp
source/gameengine/Ketsji/KX_TrackToActuator.h
source/gameengine/Physics/Sumo/Fuzzics/include/SM_Callback.h
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.h
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
source/gameengine/Rasterizer/SConscript
tools/btools.py

index bbc799e7f6f6cbe40e82ae834c7a84010ffce66f..1c34233245a084ee3cd40fd362835a10c79f62a4 100644 (file)
@@ -60,7 +60,7 @@ OPTION(WITH_INTERNATIONAL     "Enable I18N   (International fonts and text)"          ON)
 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)"       OFF)
+OPTION(WITH_OPENEXR            "Enable OpenEXR Support (http://www.openexr.com)"       ON)
 OPTION(WITH_FFMPEG             "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)"   OFF)
 OPTION(WITH_OPENAL             "Enable OpenAL Support (http://www.openal.org)"         ON)
 OPTION(YESIAMSTUPID            "Enable execution on 64-bit platforms"                  OFF)
index 47914b8853daec8dc0419dcdb5e9ef4165509b91..942bef078d61c97ae26da8e887fd346ae55a4621 100644 (file)
@@ -143,7 +143,7 @@ if crossbuild and platform!='win32':
 
 env['OURPLATFORM'] = platform
 
-configfile = B.arguments.get('BF_CONFIG', 'config'+os.sep+platform+'-config.py')
+configfile = 'config'+os.sep+platform+'-config.py'
 
 if os.path.exists(configfile):
     print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + configfile
@@ -157,13 +157,14 @@ if crossbuild and env['PLATFORM'] != 'win32':
     # Needed for gui programs, console programs should do without it
     env.Append(LINKFLAGS=['-mwindows'])
 
+userconfig = B.arguments.get('BF_CONFIG', 'user-config.py')
 # first read platform config. B.arguments will override
 optfiles = [configfile]
-if os.path.exists('user-config.py'):
-    print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + 'user-config.py'
-    optfiles += ['user-config.py']
+if os.path.exists(userconfig):
+    print B.bc.OKGREEN + "Using user-config file: " + B.bc.ENDC + userconfig
+    optfiles += [userconfig]
 else:
-    print B.bc.WARNING + 'user-config.py' + " not found, no user overrides" + B.bc.ENDC
+    print B.bc.WARNING + userconfig + " not found, no user overrides" + B.bc.ENDC
 
 opts = btools.read_opts(optfiles, B.arguments)
 opts.Update(env)
@@ -178,20 +179,20 @@ if env['BF_NO_ELBEEM'] == 1:
     env['CCFLAGS'].append('-DDISABLE_ELBEEM')
 
 if env['WITH_BF_OPENMP'] == 1:
-       if env['OURPLATFORM']=='win32-vc':
-               env['CCFLAGS'].append('/openmp')
-               env['CPPFLAGS'].append('/openmp')
-               env['CXXFLAGS'].append('/openmp')
-       else:
-               if env['CC'] == 'icc':
-                       env.Append(LINKFLAGS=['-openmp', '-static-intel'])
-                       env['CCFLAGS'].append('-openmp')
-                       env['CPPFLAGS'].append('-openmp')
-                       env['CXXFLAGS'].append('-openmp')
-               else:
-                       env['CCFLAGS'].append('-fopenmp')
-                       env['CPPFLAGS'].append('-fopenmp')
-                       env['CXXFLAGS'].append('-fopenmp')
+        if env['OURPLATFORM']=='win32-vc':
+                env['CCFLAGS'].append('/openmp')
+                env['CPPFLAGS'].append('/openmp')
+                env['CXXFLAGS'].append('/openmp')
+        else:
+            if env['CC'] == 'icc':
+                env.Append(LINKFLAGS=['-openmp', '-static-intel'])
+                env['CCFLAGS'].append('-openmp')
+                env['CPPFLAGS'].append('-openmp')
+                env['CXXFLAGS'].append('-openmp')
+            else:
+                env['CCFLAGS'].append('-fopenmp')
+                env['CPPFLAGS'].append('-fopenmp')
+                env['CXXFLAGS'].append('-fopenmp')
 
 #check for additional debug libnames
 
@@ -263,10 +264,18 @@ if not quickie and do_clean:
     if os.path.exists(B.root_build_dir):
         print B.bc.HEADER+'Cleaning...'+B.bc.ENDC
         dirs = os.listdir(B.root_build_dir)
-        for dir in dirs:
-            if os.path.isdir(B.root_build_dir + dir) == 1:
-                print "clean dir %s"%(B.root_build_dir+dir)
-                shutil.rmtree(B.root_build_dir+dir)
+        for entry in dirs:
+            if os.path.isdir(B.root_build_dir + entry) == 1:
+                print "clean dir %s"%(B.root_build_dir+entry)
+                shutil.rmtree(B.root_build_dir+entry)
+            else: # remove file
+                print "remove file %s"%(B.root_build_dir+entry)
+                os.remove(B.root_build_dir+entry)
+        for confile in ['extern/ffmpeg/config.mak', 'extern/x264/config.mak',
+                'extern/xvidcore/build/generic/platform.inc']:
+            if os.path.exists(confile):
+                print "clean file %s"%confile
+                os.remove(confile)
         print B.bc.OKGREEN+'...done'+B.bc.ENDC
     else:
         print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC
@@ -355,30 +364,30 @@ dottargetlist = []
 scriptinstall = []
 
 if  env['OURPLATFORM']!='darwin':
-       for dp, dn, df in os.walk('bin/.blender'):
-           if 'CVS' in dn:
-               dn.remove('CVS')
-           if '.svn' in dn:
-               dn.remove('.svn')
-           for f in df:
-               dotblendlist.append(dp+os.sep+f)
-               dottargetlist.append(env['BF_INSTALLDIR']+dp[3:]+os.sep+f)
-
-       dotblenderinstall = []
-       for targetdir,srcfile in zip(dottargetlist, dotblendlist):
-           td, tf = os.path.split(targetdir)
-           dotblenderinstall.append(env.Install(dir=td, source=srcfile))
-       
-       #-- .blender/scripts    
-       scriptpath='release/scripts'
-       for dp, dn, df in os.walk(scriptpath):
-           if 'CVS' in dn:
-               dn.remove('CVS')
-           if '.svn' in dn:
-               dn.remove('.svn')
-           dir=env['BF_INSTALLDIR']+'/.blender/scripts'+dp[len(scriptpath):]
-           source=[dp+os.sep+f for f in df]
-           scriptinstall.append(env.Install(dir=dir,source=source))
+        for dp, dn, df in os.walk('bin/.blender'):
+            if 'CVS' in dn:
+                dn.remove('CVS')
+            if '.svn' in dn:
+                dn.remove('.svn')
+            for f in df:
+                dotblendlist.append(dp+os.sep+f)
+                dottargetlist.append(env['BF_INSTALLDIR']+dp[3:]+os.sep+f)
+
+        dotblenderinstall = []
+        for targetdir,srcfile in zip(dottargetlist, dotblendlist):
+            td, tf = os.path.split(targetdir)
+            dotblenderinstall.append(env.Install(dir=td, source=srcfile))
+        
+        #-- .blender/scripts    
+        scriptpath='release/scripts'
+        for dp, dn, df in os.walk(scriptpath):
+            if 'CVS' in dn:
+                dn.remove('CVS')
+            if '.svn' in dn:
+                dn.remove('.svn')
+            dir=env['BF_INSTALLDIR']+'/.blender/scripts'+dp[len(scriptpath):]
+            source=[dp+os.sep+f for f in df]
+            scriptinstall.append(env.Install(dir=dir,source=source))
 
 #-- plugins
 pluglist = []
@@ -410,9 +419,9 @@ for tp, tn, tf in os.walk('release/text'):
 textinstall = env.Install(dir=env['BF_INSTALLDIR'], source=textlist)
 
 if  env['OURPLATFORM']=='darwin':
-       allinstall = [blenderinstall, plugininstall, textinstall]
+        allinstall = [blenderinstall, plugininstall, textinstall]
 else:
-       allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall]
+        allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall]
 
 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'):
     dllsources = ['${LCGDIR}/gettext/lib/gnu_gettext.dll',
@@ -432,10 +441,17 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'):
         dllsources += ['${LCGDIR}/pthreads/lib/pthreadVC2.dll']
     if env['WITH_BF_ICONV']:
         dllsources += ['${LCGDIR}/iconv/lib/iconv.dll']
-#    if env['WITH_BF_FFMPEG']:
-#        dllsources += ['${LCGDIR}/ffmpeg/lib/avcodec-51.dll',
-#                        '${LCGDIR}/ffmpeg/lib/avformat-51.dll',
-#                        '${LCGDIR}/ffmpeg/lib/avutil-49.dll']
+    if env['WITH_BF_FFMPEG']:
+        dllsources += ['${LCGDIR}/ffmpeg/lib/avcodec-51.dll',
+                        '${LCGDIR}/ffmpeg/lib/avformat-52.dll',
+                        '${LCGDIR}/ffmpeg/lib/avdevice-52.dll',
+                        '${LCGDIR}/ffmpeg/lib/avutil-49.dll',
+                        '${LCGDIR}/ffmpeg/lib/libfaad-0.dll',
+                        '${LCGDIR}/ffmpeg/lib/libfaac-0.dll',
+                        '${LCGDIR}/ffmpeg/lib/libmp3lame-0.dll',
+                        '${LCGDIR}/ffmpeg/lib/libx264-59.dll',
+                        '${LCGDIR}/ffmpeg/lib/xvidcore.dll',
+                        '${LCGDIR}/ffmpeg/lib/swscale-0.dll']
     windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
     allinstall += windlls
 
@@ -459,7 +475,7 @@ Depends(nsiscmd, allinstall)
 Default(B.program_list)
 
 if not env['WITHOUT_BF_INSTALL']:
-       Default(installtarget)
+        Default(installtarget)
 
 #------------ RELEASE
 # TODO: zipup the installation
index 5a9b343a0bd40045e16f9cbf5f08cbb75b69fe5d..8fec38ac48ebdeff44d7b07a0e137c1730e00325 100644 (file)
@@ -1,10 +1,48 @@
-LCGDIR = '#../lib/darwin-6.1-powerpc'
+#
+# Note : if you want to alter this file
+# copy it as a whole in the upper folder
+# as user-config.py
+# dont create a new file with only some
+# vars changed.
+
+import commands
+
+# IMPORTANT NOTE : OFFICIAL BUILDS SHOULD BE DONE WITH SDKs
+USE_SDK='true'
+
+BF_PYTHON_VERSION = '2.3'
+
+cmd = 'uname -p'
+MAC_PROC=commands.getoutput(cmd) 
+cmd = 'uname -r'
+cmd_res=commands.getoutput(cmd) 
+if cmd_res[0]=='7':
+       MAC_CUR_VER='10.3'
+elif cmd_res[0]=='8':
+       MAC_CUR_VER='10.4'
+else:
+       MAC_CUR_VER='10.5'
+
+if MAC_PROC == 'powerpc':
+       LCGDIR = '#../lib/darwin-6.1-powerpc'
+else :
+       LCGDIR = '#../lib/darwin-8.x.i386'
 LIBDIR = '${LCGDIR}'
 
+if MAC_PROC== 'powerpc' and BF_PYTHON_VERSION == '2.3':
+       MAC_MIN_VERS = '10.3'
+       MACOSX_SDK='/Developer/SDKs/MacOSX10.3.9.sdk'
+else:
+       MAC_MIN_VERS = '10.4'
+       MACOSX_SDK='/Developer/SDKs/MacOSX10.4u.sdk'
+
+
 # enable ffmpeg  support
 WITH_BF_FFMPEG = 'true'  # -DWITH_FFMPEG
 BF_FFMPEG = "#extern/ffmpeg"
 BF_FFMPEG_INC = '${BF_FFMPEG}/include'
+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'
 
@@ -14,8 +52,12 @@ BF_VERSE_LIBPATH = "${BF_BUILDDIR}/extern/verse/dist"
 BF_VERSE_INCLUDE = BF_VERSE
 BF_VERSE_LIBS = "libverse"
 
-# python.org libs install in /library 
-BF_PYTHON_VERSION = '2.5'
+# python.org libs install in /library we want to use that for 2.5 
+#
+# if you want py2.5 on leopard without installing
+# change value to BF_PYTHON = '/Library/Frameworks/Python.framework/Versions/'
+# BEWARE: in that case it will work only on leopard
+
 if BF_PYTHON_VERSION=='2.3':
        BF_PYTHON = '/System/Library/Frameworks/Python.framework/Versions/'
 else:
@@ -25,15 +67,27 @@ BF_PYTHON_INC = '${BF_PYTHON}${BF_PYTHON_VERSION}/include/python${BF_PYTHON_VERS
 BF_PYTHON_BINARY = '${BF_PYTHON}${BF_PYTHON_VERSION}/bin/python${BF_PYTHON_VERSION}'
 BF_PYTHON_LIB = ''
 BF_PYTHON_LIBPATH = '${BF_PYTHON}${BF_PYTHON_VERSION}/lib/python${BF_PYTHON_VERSION}/config'
-BF_PYTHON_LINKFLAGS = '-u __dummy -u _PyMac_Error -framework System -framework Python'
-
-WITH_BF_OPENAL = 'true'
+BF_PYTHON_LINKFLAGS = '-u _PyMac_Error -framework System -framework Python'
+if MAC_CUR_VER=='10.3' or  MAC_CUR_VER=='10.4':
+       BF_PYTHON_LINKFLAGS ='-u __dummy '+BF_PYTHON_LINKFLAGS
+       
+BF_QUIET = '1'
+WITH_BF_OPENMP = '0'
+
+# Note : should be true, but openal simply dont work on intel
+if MAC_PROC == 'i386':
+       WITH_BF_OPENAL = 'false'
+else:
+       WITH_BF_OPENAL = 'true'
 #different lib must be used  following version of gcc
 # for gcc 3.3
 #BF_OPENAL = LIBDIR + '/openal'
-# for gcc 3.4
-BF_OPENAL = '#../lib/darwin-8.0.0-powerpc/openal'
-
+# for gcc 3.4 and ulterior
+if MAC_PROC == 'powerpc':
+       BF_OPENAL = '#../lib/darwin-8.0.0-powerpc/openal'
+else :
+       BF_OPENAL = LIBDIR + '/openal'
+       
 BF_OPENAL_INC = '${BF_OPENAL}/include'
 BF_OPENAL_LIB = 'openal'
 BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
@@ -89,6 +143,7 @@ BF_FTGL_LIB = 'extern_ftgl'
 
 WITH_BF_GAMEENGINE='true'
 WITH_BF_PLAYER='true'
+WITH_BF_GLEXT= '1'
 
 WITH_BF_ODE = 'false'
 BF_ODE = LIBDIR + '/ode'
@@ -143,20 +198,40 @@ BF_OPENGL_LIB = 'GL GLU'
 BF_OPENGL_LIBPATH = '/System/Library/Frameworks/OpenGL.framework/Libraries'
 BF_OPENGL_LINKFLAGS = '-framework OpenGL'
 
-##
-##CC = gcc
-##CCC = g++
-##ifeq ($CPU),alpha)
-##   CFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing -mieee
-
-CFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
+CFLAGS = ['-pipe','-fPIC','-funsigned-char']
 
 CPPFLAGS = ['-fpascal-strings']
-CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing', '-fpascal-strings']
-CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing', '-fpascal-strings']
+CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fpascal-strings']
+CXXFLAGS = [ '-pipe','-fPIC','-funsigned-char', '-fpascal-strings']
 PLATFORM_LINKFLAGS = '-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime'
-REL_CFLAGS = ['-O2']
-REL_CCFLAGS = ['-O2']
+
+#note to build succesfully on 10.3.9 SDK you need to patch  10.3.9 by adding the SystemStubs.a lib from 10.4
+LLIBS = 'stdc++ SystemStubs'
+
+# some flags shuffling for different Os versions
+if MAC_MIN_VERS == '10.3':
+       CFLAGS = ['-fuse-cxa-atexit']+CFLAGS
+       CXXFLAGS = ['-fuse-cxa-atexit']+CXXFLAGS
+       PLATFORM_LINKFLAGS = '-fuse-cxa-atexit '+PLATFORM_LINKFLAGS
+       LLIBS = LLIBS + ' crt3.o'
+       
+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
+       CXXFLAGS=SDK_FLAGS+CXXFLAGS
+       
+if MAC_PROC == 'i386':
+       REL_CFLAGS = ['-O2','-ftree-vectorize','-msse','-msse2','-msse3','-mssse3']
+       REL_CCFLAGS = ['-O2','-ftree-vectorize','-msse','-msse2','-msse3','-mssse3']
+else:
+       CFLAGS = CFLAGS+['-fno-strict-aliasing']
+       CCFLAGS =  CCFLAGS+['-fno-strict-aliasing']
+       CXXFLAGS = CXXFLAGS+['-fno-strict-aliasing']
+       
+       REL_CFLAGS = ['-O2']
+       REL_CCFLAGS = ['-O2']
+
 ##BF_DEPEND = 'true'
 ##
 ##AR = ar
@@ -171,7 +246,6 @@ CC_WARN = ' -Wall  -Wno-long-double'
 
 ##FIX_STUBS_WARNINGS = -Wno-unused
 
-LLIBS = 'stdc++ SystemStubs'
 ##LOPTS = --dynamic
 ##DYNLDFLAGS = -shared $(LDFLAGS)
 
index 8c71c31db0c86486659e77003c47fb6e49ca68ca..a7bbd28764e40f41f077a463b005d7e6b4516c55 100644 (file)
@@ -1,6 +1,8 @@
 $Id$
 
-    Note: The current official release of SCons is 0.97
+    Note: The current official release of SCons is 0.98, but
+    our system still works for 0.97. However, this will be fixed
+    soon.
 
     Blenders SCons build scripts
     ============================
@@ -76,6 +78,11 @@ $Id$
     likings. Any value set here will override the ones from the
     (platform)-config.py.
 
+    You can use BF_CONFIG argument to override the default user-config.py
+    check. This is just like the user-config.py, but just with another name:
+
+        % scons BF_CONFIG=myownsettings
+
     If you want to quickly test a new setting, you can give the option
     also on the command-line:
 
index 3d67218bb7ed6aaff66418c53e984efbbb56170f..408cc20e39345a0f4e8961577541cec22ee35218 100644 (file)
@@ -32,7 +32,7 @@ typedef unsigned short uint16;
 typedef short int16;
 typedef unsigned char uint8;
 typedef char int8;
-typedef char boolean;
+typedef unsigned char boolean;
 
 #include "v_cmd_gen.h"
 #include "v_network.h"
index f95d9aa418a176d3728f897cc1318a6d6f565ce3..25f2fd8d26903ef1d7c78bf23eb0a49d865f47de 100644 (file)
 #include <stdarg.h>
 
 /* mmap exception */
-#if defined(AMIGA) || defined(__BeOS) || defined(WIN32)
+#if defined(AMIGA) || defined(__BeOS)
+#elif defined(WIN32)
+#include <sys/types.h>
+#include "mmap_win.h"
 #else
 #include <sys/types.h>
 #include <sys/mman.h>
@@ -289,7 +292,7 @@ void *MEM_callocN(unsigned int len, const char *str)
 /* note; mmap returns zero'd memory */
 void *MEM_mapallocN(unsigned int len, const char *str)
 {
-#if defined(AMIGA) || defined(__BeOS) || defined(WIN32)
+#if defined(AMIGA) || defined(__BeOS)
        return MEM_callocN(len, str);
 #else
        MemHead *memh;
@@ -586,7 +589,7 @@ static void rem_memblock(MemHead *memh)
     totblock--;
     mem_in_use -= memh->len;
    
-#if defined(AMIGA) || defined(__BeOS) || defined(WIN32)
+#if defined(AMIGA) || defined(__BeOS)
     free(memh);
 #else   
    
diff --git a/intern/guardedalloc/intern/mmap_win.c b/intern/guardedalloc/intern/mmap_win.c
new file mode 100644 (file)
index 0000000..cc31cf5
--- /dev/null
@@ -0,0 +1,261 @@
+/**
+ * $Id: $
+ *
+ * ***** 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) 2008 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Andrea Weikert.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+#if defined(WIN32)
+
+#include <windows.h>
+#include <errno.h>
+#include <io.h>
+#include <sys/types.h>
+#include <stdio.h>
+
+#include "mmap_win.h"
+
+#ifndef FILE_MAP_EXECUTE
+//not defined in earlier versions of the Platform  SDK (before February 2003)
+#define FILE_MAP_EXECUTE 0x0020
+#endif
+
+/* --------------------------------------------------------------------- */
+/* local storage definitions                                                    */
+/* --------------------------------------------------------------------- */
+/* all memory mapped chunks are put in linked lists */
+typedef struct mmapLink
+{
+       struct mmapLink *next,*prev;
+} mmapLink;
+
+typedef struct mmapListBase 
+{
+       void *first, *last;
+} mmapListBase;
+
+typedef struct MemMap {
+       struct MemMap *next,*prev;
+       void *mmap;
+       HANDLE fhandle;
+       HANDLE maphandle;
+} MemMap;
+
+/* --------------------------------------------------------------------- */
+/* local functions                                                       */
+/* --------------------------------------------------------------------- */
+
+static void mmap_addtail(volatile mmapListBase *listbase, void *vlink);
+static void mmap_remlink(volatile mmapListBase *listbase, void *vlink);
+static void *mmap_findlink(volatile mmapListBase *listbase, void *ptr);
+
+static int mmap_get_prot_flags (int flags);
+static int mmap_get_access_flags (int flags);
+
+/* --------------------------------------------------------------------- */
+/* vars                                                                  */
+/* --------------------------------------------------------------------- */
+volatile static struct mmapListBase _mmapbase;
+volatile static struct mmapListBase *mmapbase = &_mmapbase;
+
+
+/* --------------------------------------------------------------------- */
+/* implementation                                                        */
+/* --------------------------------------------------------------------- */
+
+/* mmap for windows */
+void *mmap(void *start, size_t len, int prot, int flags, int fd, off_t offset)
+{
+       HANDLE fhandle = INVALID_HANDLE_VALUE;
+       HANDLE maphandle;
+       int prot_flags = mmap_get_prot_flags(prot);
+       int access_flags = mmap_get_access_flags(prot);
+       MemMap *mm = NULL;
+       void *ptr = NULL;
+
+       if ( flags & MAP_FIXED ) {
+               return MAP_FAILED;
+       }
+
+       /*
+       if ( fd == -1 ) {
+               _set_errno( EBADF );
+        return MAP_FAILED;
+       }
+       */
+
+       if ( fd != -1 ) {
+               fhandle = (HANDLE) _get_osfhandle (fd);
+       }
+       if ( fhandle == INVALID_HANDLE_VALUE ) {
+               if (!(flags & MAP_ANONYMOUS)) {
+                       errno = EBADF;
+                       return MAP_FAILED;
+               }
+       } else {
+               if ( !DuplicateHandle( GetCurrentProcess(), fhandle, GetCurrentProcess(),
+                                                       &fhandle, 0, FALSE, DUPLICATE_SAME_ACCESS ) ) {
+                       return MAP_FAILED;
+               }
+       }
+
+       maphandle = CreateFileMapping(fhandle, NULL, prot_flags, 0, len, NULL);
+       if ( maphandle == 0 ) {
+        errno = EBADF;
+               return MAP_FAILED;
+    }
+
+       ptr = MapViewOfFile(maphandle, access_flags, 0, offset, 0);
+       if ( ptr == NULL ) {
+               DWORD dwLastErr = GetLastError();
+               if ( dwLastErr == ERROR_MAPPED_ALIGNMENT )
+                       errno=EINVAL;
+               else
+                       errno=EACCES;
+               CloseHandle(maphandle);
+               return MAP_FAILED;
+       }
+
+       mm= (MemMap *)malloc(sizeof(MemMap));
+       if (!mm) {
+               errno=ENOMEM;
+       }
+       mm->fhandle = fhandle;
+       mm->maphandle = maphandle;
+       mm->mmap = ptr;
+       mmap_addtail(mmapbase, mm);
+
+    return ptr;
+}
+
+/* munmap for windows */
+long munmap(void *ptr, long size)
+{
+       MemMap *mm = mmap_findlink(mmapbase, ptr);
+       if (!mm) {
+               errno=EINVAL;
+        return -1; 
+       }
+       UnmapViewOfFile( mm->mmap );
+       CloseHandle( mm->maphandle );
+       CloseHandle( mm->fhandle);
+       mmap_remlink(mmapbase, mm);
+    return 0;
+}
+
+/* --------------------------------------------------------------------- */
+/* local functions                                                       */
+/* --------------------------------------------------------------------- */
+
+static void mmap_addtail(volatile mmapListBase *listbase, void *vlink)
+{
+       struct mmapLink *link= vlink;
+
+       if (link == 0) return;
+       if (listbase == 0) return;
+
+       link->next = 0;
+       link->prev = listbase->last;
+
+       if (listbase->last) ((struct mmapLink *)listbase->last)->next = link;
+       if (listbase->first == 0) listbase->first = link;
+       listbase->last = link;
+}
+
+static void mmap_remlink(volatile mmapListBase *listbase, void *vlink)
+{
+       struct mmapLink *link= vlink;
+
+       if (link == 0) return;
+       if (listbase == 0) return;
+
+       if (link->next) link->next->prev = link->prev;
+       if (link->prev) link->prev->next = link->next;
+
+       if (listbase->last == link) listbase->last = link->prev;
+       if (listbase->first == link) listbase->first = link->next;
+}
+
+static void *mmap_findlink(volatile mmapListBase *listbase, void *ptr)
+{
+       MemMap *mmap_ptr = (MemMap*)ptr;
+       MemMap *mm;
+
+       if (ptr == 0) return NULL;
+       if (listbase == 0) return NULL;
+       
+       mm = (MemMap *)listbase->first;
+       while (mm) {
+               if (mm->mmap == ptr) {
+                       return mm;
+               }
+               mm = mm->next;
+       }
+       return NULL;
+}
+
+static int mmap_get_prot_flags (int flags)
+{
+       int prot = PAGE_NOACCESS;
+
+       if ( ( flags & PROT_READ ) == PROT_READ ) {
+        if ( ( flags & PROT_WRITE ) == PROT_WRITE ) {
+            prot = (flags & PROT_EXEC) ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE;
+               } else {
+                       prot = (flags & PROT_EXEC) ? PAGE_EXECUTE_READ : PAGE_READONLY;
+               }
+    } else if ( ( flags & PROT_WRITE ) == PROT_WRITE ) {
+               prot = (flags & PROT_EXEC) ? PAGE_EXECUTE_READ : PAGE_WRITECOPY;
+    } else if ( ( flags & PROT_EXEC ) == PROT_EXEC ) {
+        prot = PAGE_EXECUTE_READ;
+    }
+       return prot;
+}
+
+static int mmap_get_access_flags (int flags)
+{
+       int access = 0;
+
+       if ( ( flags & PROT_READ ) == PROT_READ ) {
+        if ( ( flags & PROT_WRITE ) == PROT_WRITE ) {
+            access = FILE_MAP_WRITE;
+               } else {
+                       access = (flags & PROT_EXEC) ? FILE_MAP_EXECUTE : FILE_MAP_READ;
+               }
+    } else if ( ( flags & PROT_WRITE ) == PROT_WRITE ) {
+               access = FILE_MAP_COPY;
+    } else if ( ( flags & PROT_EXEC ) == PROT_EXEC ) {
+        access = FILE_MAP_EXECUTE;
+    }
+       return access;
+}
+
+
+#endif // WIN32
+
+
+
+
+
index cb3490716fa8947af81cd58ddf0cef6abe75d564..40e88511d5dbf95d06bfdc3aa68df8d98aabb00e 100644 (file)
@@ -251,6 +251,9 @@ ECHO Done
                        <File
                                RelativePath="..\..\intern\mallocn.c">
                        </File>
+                       <File
+                               RelativePath="..\..\intern\mmap_win.c">
+                       </File>
                </Filter>
                <Filter
                        Name="Header Files"
@@ -261,6 +264,13 @@ ECHO Done
                                <File
                                        RelativePath="..\..\MEM_guardedalloc.h">
                                </File>
+                               <File
+                                       RelativePath="..\..\mmap_win.h">
+                               </File>
+                       </Filter>
+                       <Filter
+                               Name="intern"
+                               Filter="">
                        </Filter>
                </Filter>
        </Files>
diff --git a/intern/guardedalloc/mmap_win.h b/intern/guardedalloc/mmap_win.h
new file mode 100644 (file)
index 0000000..f83a2d6
--- /dev/null
@@ -0,0 +1,52 @@
+/**
+ * $Id: $
+ *
+ * ***** 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) 2008 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Andrea Weikert.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+#ifndef MMAP_WIN_H
+#define MMAP_WIN_H
+
+#define PROT_NONE 0
+#define PROT_READ 1
+#define PROT_WRITE 2
+#define PROT_EXEC 4
+
+#define MAP_FILE 0
+#define MAP_SHARED 1
+#define MAP_PRIVATE 2
+#define MAP_TYPE 0xF
+#define MAP_FIXED 0x10
+#define MAP_ANONYMOUS 0x20
+#define MAP_ANON MAP_ANONYMOUS
+
+#define MAP_FAILED ((void *)-1)
+
+void *mmap(void *start, size_t len, int prot, int flags, int fd, off_t offset);
+long munmap(void *ptr, long size);
+
+#endif
+
index ac933502efbb9958b39a10bd86eb6786d52a2716..a31b9130db358e5824a2e84b0e8b4bd9fd41aa7a 100644 (file)
@@ -21,8 +21,8 @@
                        <Tool
                                Name="VCCLCompilerTool"
                                Optimization="0"
-                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\img;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\SoundSystem"
-                               PreprocessorDefinitions="_DEBUG,WIN32,_LIB"
+                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\img;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\SoundSystem"
+                               PreprocessorDefinitions="_DEBUG,WIN32,_LIB;WITH_FFMPEG"
                                BasicRuntimeChecks="3"
                                RuntimeLibrary="1"
                                DisableLanguageExtensions="FALSE"
@@ -75,7 +75,7 @@
                        <Tool
                                Name="VCCLCompilerTool"
                                InlineFunctionExpansion="1"
-                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\img;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\SoundSystem"
+                               AdditionalIncludeDirectories="..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\img;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\SoundSystem;..\..\..\..\lib\windows\ffmpeg\include"
                                PreprocessorDefinitions="WIN32,NDEBUG,_LIB"
                                StringPooling="TRUE"
                                RuntimeLibrary="0"
index e9cf694c2811e2ca6f9d987c99b030ac5cb0fead..2f73bfefd278b651ee2dd4573b2576c28dae3949 100644 (file)
                        <Tool
                                Name="VCLinkerTool"
                                AdditionalOptions="/MACHINE:I386"
-                               AdditionalDependencies="SDL.lib freetype2ST.lib ftgl_static.lib gnu_gettext.lib qtmlClient.lib openal_static.lib libsoundsystem.lib libopenalsoundsystem.lib libdummysoundsystem.lib libguardedalloc.lib libbsp.lib libbmfont.lib libghost.lib libstring.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libdecimation.lib libiksolver.lib libpng_st.lib zlib.lib libmoto.lib solid.lib qhull.lib libopennl.lib Bullet.lib python25.lib libelbeem.lib libboolop.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib broad.lib complex.lib convex.lib memutil.lib verse.lib Half.lib Iex.lib IlmImf.lib Imath.lib IlmThread.lib"
+                               AdditionalDependencies="SDL.lib freetype2ST.lib ftgl_static.lib gnu_gettext.lib qtmlClient.lib openal_static.lib libsoundsystem.lib libopenalsoundsystem.lib libdummysoundsystem.lib libguardedalloc.lib libbsp.lib libbmfont.lib libghost.lib libstring.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libdecimation.lib libiksolver.lib libpng_st.lib zlib.lib libmoto.lib solid.lib qhull.lib libopennl.lib Bullet.lib python25.lib libelbeem.lib libboolop.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib broad.lib complex.lib convex.lib memutil.lib verse.lib Half.lib Iex.lib IlmImf.lib Imath.lib IlmThread.lib avcodec-51.lib avformat-52.lib avutil-49.lib swscale-0.lib"
                                ShowProgress="0"
                                OutputFile="..\..\bin\blender.exe"
                                LinkIncremental="1"
                                SuppressStartupBanner="TRUE"
-                               AdditionalLibraryDirectories="..\..\..\lib\windows\sdl\lib;..\..\..\lib\windows\ode\lib;..\..\..\lib\windows\zlib\lib;..\..\..\lib\windows\png\lib;..\..\..\lib\windows\jpeg\lib;..\..\..\lib\windows\gettext\lib;..\..\..\lib\windows\python\lib;..\..\..\lib\windows\freetype\lib;..\..\..\lib\windows\tiff\lib;..\..\..\lib\windows\pthreads\lib;..\..\..\lib\windows\openal\lib;..\..\..\lib\windows\openexr\lib;..\..\..\lib\windows\QTDevWin\Libraries;..\..\..\build\msvc_7\libs\intern;..\..\..\build\msvc_7\libs\extern"
+                               AdditionalLibraryDirectories="..\..\..\lib\windows\sdl\lib;..\..\..\lib\windows\ode\lib;..\..\..\lib\windows\zlib\lib;..\..\..\lib\windows\png\lib;..\..\..\lib\windows\jpeg\lib;..\..\..\lib\windows\gettext\lib;..\..\..\lib\windows\python\lib;..\..\..\lib\windows\freetype\lib;..\..\..\lib\windows\tiff\lib;..\..\..\lib\windows\pthreads\lib;..\..\..\lib\windows\openal\lib;..\..\..\lib\windows\openexr\lib;..\..\..\lib\windows\QTDevWin\Libraries;..\..\..\build\msvc_7\libs\intern;..\..\..\build\msvc_7\libs\extern;..\..\..\lib\windows\ffmpeg\lib"
                                IgnoreAllDefaultLibraries="FALSE"
                                IgnoreDefaultLibraryNames="msvcprt.lib;glut32.lib;libc.lib;libcd.lib;libcpd.lib;libcp.lib;libcmtd.lib;odbc32.lib;odbccp32.lib"
                                ProgramDatabaseFile="..\..\..\build\msvc_7\libs\blender.pdb"
@@ -65,6 +65,7 @@ XCOPY /Y ..\..\..\lib\windows\gettext\lib\*.dll ..\..\bin
 XCOPY /Y ..\..\..\lib\windows\sdl\lib\*.dll ..\..\bin
 XCOPY /Y ..\..\..\lib\windows\tiff\lib\*.dll ..\..\bin
 XCOPY /Y ..\..\..\lib\windows\pthreads\lib\pthreadVSE2.dll ..\..\bin
+XCOPY /Y ..\..\..\lib\windows\ffmpeg\lib\*.dll ..\..\bin
 ECHO Copying language folder
 ECHO Copying python scripts
 IF NOT EXIST ..\..\bin\.blender\scripts MKDIR ..\..\bin\.blender\scripts
@@ -123,12 +124,12 @@ ECHO Done
                                Name="VCLinkerTool"
                                AdditionalOptions="/MACHINE:I386
 "
-                               AdditionalDependencies="SDL.lib freetype2ST.lib ftgl_static.lib gnu_gettext.lib qtmlClient.lib openal_static.lib libsoundsystem.lib libopenalsoundsystem.lib libdummysoundsystem.lib libguardedalloc.lib libbsp.lib libbmfont.lib libghost.lib libstring.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libdecimation.lib libiksolver.lib libpng_st.lib zlib.lib libmoto.lib solid.lib qhull.lib libopennl.lib Bullet.lib python25_d.lib libelbeem.lib libboolop.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib broad.lib complex.lib convex.lib memutil.lib verse.lib Half.lib Iex.lib Imath.lib IlmImf.lib IlmThread.lib"
+                               AdditionalDependencies="SDL.lib freetype2ST.lib ftgl_static.lib gnu_gettext.lib qtmlClient.lib openal_static.lib libsoundsystem.lib libopenalsoundsystem.lib libdummysoundsystem.lib libguardedalloc.lib libbsp.lib libbmfont.lib libghost.lib libstring.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libdecimation.lib libiksolver.lib libpng_st.lib zlib.lib libmoto.lib solid.lib qhull.lib libopennl.lib Bullet.lib python25_d.lib libelbeem.lib libboolop.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib broad.lib complex.lib convex.lib memutil.lib verse.lib Half.lib Iex.lib Imath.lib IlmImf.lib IlmThread.lib avcodec-51.lib avformat-52.lib avutil-49.lib swscale-0.lib"
                                ShowProgress="0"
                                OutputFile="..\..\bin\debug\blender.exe"
                                LinkIncremental="2"
                                SuppressStartupBanner="TRUE"
-                               AdditionalLibraryDirectories="..\..\..\lib\windows\sdl\lib;..\..\..\lib\windows\ode\lib;..\..\..\lib\windows\zlib\lib;..\..\..\lib\windows\png\lib;..\..\..\lib\windows\jpeg\lib;..\..\..\lib\windows\pthreads\lib;..\..\..\lib\windows\tiff\lib;..\..\..\lib\windows\gettext\lib;..\..\..\lib\windows\freetype\lib;..\..\..\lib\windows\python\lib;..\..\..\lib\windows\openal\lib;..\..\..\lib\windows\openexr\lib;..\..\..\lib\windows\QTDevWin\Libraries;..\..\..\build\msvc_7\libs\intern\debug;..\..\..\build\msvc_7\libs\extern\debug"
+                               AdditionalLibraryDirectories="..\..\..\lib\windows\sdl\lib;..\..\..\lib\windows\ode\lib;..\..\..\lib\windows\zlib\lib;..\..\..\lib\windows\png\lib;..\..\..\lib\windows\jpeg\lib;..\..\..\lib\windows\pthreads\lib;..\..\..\lib\windows\tiff\lib;..\..\..\lib\windows\gettext\lib;..\..\..\lib\windows\freetype\lib;..\..\..\lib\windows\python\lib;..\..\..\lib\windows\openal\lib;..\..\..\lib\windows\openexr\lib;..\..\..\lib\windows\QTDevWin\Libraries;..\..\..\lib\windows\ffmpeg\lib;..\..\..\build\msvc_7\libs\intern\debug;..\..\..\build\msvc_7\libs\extern\debug"
                                IgnoreDefaultLibraryNames="libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, odbc32.lib, odbccp32.lib"
                                GenerateDebugInformation="TRUE"
                                ProgramDatabaseFile="..\..\..\build\msvc_7\libs\debug\blender.pdb"
@@ -149,6 +150,7 @@ XCOPY /Y ..\..\..\lib\windows\python\lib\python25_d.dll ..\..\bin\debug
 XCOPY /Y ..\..\..\lib\windows\CRTL\lib\msvcrtd.dll ..\..\bin\debug
 XCOPY /Y ..\..\..\lib\windows\tiff\lib\*.dll ..\..\bin\debug
 XCOPY /Y ..\..\..\lib\windows\pthreads\lib\pthreadVSE2.dll ..\..\bin\debug
+XCOPY /Y ..\..\..\lib\windows\ffmpeg\lib\*.dll ..\..\bin\debug
 ECHO Copying language folder
 IF NOT EXIST ..\..\bin\debug\.blender MKDIR ..\..\bin\debug\.blender
 XCOPY /Y ..\..\bin\.blender ..\..\bin\debug\.blender /E
index 4a4146bf8053687f0fa5540f23be8fc59aaa3090..98bb21e7ad1992907e24dac1d79081a3d575257a 100644 (file)
@@ -73,8 +73,8 @@
                        <Tool
                                Name="VCCLCompilerTool"
                                Optimization="0"
-                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_7\extern\verse\include;..\..\..\..\build\msvc_7\intern\opennl\include;..\..\..\..\build\msvc_7\extern\bullet\include"
-                               PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_FREETYPE2;WITH_VERSE;WITH_OPENEXR;WITH_DDS;WITH_BULLET = 1"
+                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_7\extern\verse\include;..\..\..\..\build\msvc_7\intern\opennl\include;..\..\..\..\build\msvc_7\extern\bullet\include"
+                               PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_FREETYPE2;WITH_VERSE;WITH_OPENEXR;WITH_DDS;WITH_BULLET = 1;WITH_FFMPEG"
                                BasicRuntimeChecks="3"
                                RuntimeLibrary="1"
                                DefaultCharIsUnsigned="TRUE"
                        <Tool
                                Name="VCCLCompilerTool"
                                InlineFunctionExpansion="1"
-                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_7\extern\verse\include;..\..\..\..\build\msvc_7\intern\opennl\include;..\..\..\..\build\msvc_7\extern\bullet\include"
-                               PreprocessorDefinitions="NDEBUG;WIN32;_LIB;WITH_FREETYPE2;UNWRAPPER;WITH_VERSE;WITH_OPENEXR;WITH_DDS;WITH_BULLET=1"
+                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_7\extern\verse\include;..\..\..\..\build\msvc_7\intern\opennl\include;..\..\..\..\build\msvc_7\extern\bullet\include"
+                               PreprocessorDefinitions="NDEBUG;WIN32;_LIB;WITH_FREETYPE2;UNWRAPPER;WITH_VERSE;WITH_OPENEXR;WITH_DDS;WITH_BULLET=1;WITH_FFMPEG"
                                StringPooling="TRUE"
                                RuntimeLibrary="0"
                                EnableFunctionLevelLinking="TRUE"
                        <Tool
                                Name="VCCLCompilerTool"
                                Optimization="0"
-                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_7\extern\verse\include;..\..\..\..\build\msvc_7\intern\opennl\include;..\..\..\..\build\msvc_7\extern\bullet\include"
-                               PreprocessorDefinitions="_DEBUG,WIN32,_LIB,WITH_FREETYPE2"
+                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_7\extern\verse\include;..\..\..\..\build\msvc_7\intern\opennl\include;..\..\..\..\build\msvc_7\extern\bullet\include;..\..\..\..\lib\windows\ffmpeg\include"
+                               PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_FREETYPE2;WITH_FFMPEG"
                                BasicRuntimeChecks="3"
                                RuntimeLibrary="1"
                                DefaultCharIsUnsigned="TRUE"
                        <Tool
                                Name="VCCLCompilerTool"
                                InlineFunctionExpansion="1"
-                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_7\extern\verse\include;..\..\..\..\build\msvc_7\intern\opennl\include;..\..\..\..\build\msvc_7\extern\bullet\include"
-                               PreprocessorDefinitions="NDEBUG,WIN32,_LIB,WITH_FREETYPE2,UNWRAPPER"
+                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_7\extern\verse\include;..\..\..\..\build\msvc_7\intern\opennl\include;..\..\..\..\build\msvc_7\extern\bullet\include;..\..\..\..\lib\windows\ffmpeg\include"
+                               PreprocessorDefinitions="NDEBUG;WIN32;_LIB;WITH_FREETYPE2;UNWRAPPER;WITH_FFMPEG"
                                StringPooling="TRUE"
                                RuntimeLibrary="0"
                                EnableFunctionLevelLinking="TRUE"
index ef756c7b67fa5bfea7e052cc7dd710fd2a80b05c..3a5906273db928dc5a0bdba8f7eb507bd6cba2fc 100644 (file)
@@ -21,7 +21,7 @@
                        <Tool
                                Name="VCCLCompilerTool"
                                InlineFunctionExpansion="1"
-                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\freetype\include;..\..\..\..\build\msvc_7\extern\ftgl\include;..\..\..\..\lib\windows\gettext\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\makesdna;..\..\..\source\blender\include"
+                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\freetype\include;..\..\..\..\build\msvc_7\extern\ftgl\include;..\..\..\..\lib\windows\gettext\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\makesdna;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel"
                                PreprocessorDefinitions="WIN32;NDEBUG;_LIB;WCHAR_T16;HAVE_LC_MESSAGES;FTGL_LIBRARY_STATIC"
                                StringPooling="TRUE"
                                RuntimeLibrary="0"
@@ -74,7 +74,7 @@
                        <Tool
                                Name="VCCLCompilerTool"
                                Optimization="0"
-                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\freetype\include;..\..\..\..\build\msvc_7\extern\ftgl\include;..\..\..\..\lib\windows\gettext\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\makesdna;..\..\..\source\blender\include"
+                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\freetype\include;..\..\..\..\build\msvc_7\extern\ftgl\include;..\..\..\..\lib\windows\gettext\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\makesdna;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel"
                                PreprocessorDefinitions="WIN32,_DEBUG,_LIB,WCHAR_T16,HAVE_LC_MESSAGES,FTGL_LIBRARY_STATIC"
                                BasicRuntimeChecks="3"
                                RuntimeLibrary="1"
index b4daf386c26f7bfb154f37b88103d42d24669a5e..07ca42116be002562818cb964446a1ba066b8356 100644 (file)
@@ -21,8 +21,8 @@
                        <Tool
                                Name="VCCLCompilerTool"
                                Optimization="0"
-                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\jpeg\include;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\png\include;..\..\..\..\lib\windows\tiff\include;..\..\..\..\lib\windows\openexr\include;..\..\..\..\lib\windows\openexr\include\Iex;..\..\..\..\lib\windows\openexr\include\Imath;..\..\..\..\lib\windows\openexr\include\IlmImf;..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\build\msvc_7\intern\memutil\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\imbuf\intern;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\imbuf\intern\openexr;..\..\..\source\blender\imbuf\intern\dds"
-                               PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_QUICKTIME;WITH_OPENEXR;WITH_DDS"
+                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\jpeg\include;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\png\include;..\..\..\..\lib\windows\tiff\include;..\..\..\..\lib\windows\openexr\include;..\..\..\..\lib\windows\openexr\include\Iex;..\..\..\..\lib\windows\openexr\include\Imath;..\..\..\..\lib\windows\openexr\include\IlmImf;..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_7\intern\memutil\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\imbuf\intern;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\imbuf\intern\openexr;..\..\..\source\blender\imbuf\intern\dds"
+                               PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_QUICKTIME;WITH_OPENEXR;WITH_DDS;WITH_FFMPEG"
                                BasicRuntimeChecks="3"
                                RuntimeLibrary="1"
                                DefaultCharIsUnsigned="TRUE"
                        <Tool
                                Name="VCCLCompilerTool"
                                InlineFunctionExpansion="1"
-                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\jpeg\include;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\png\include;..\..\..\..\lib\windows\tiff\include;..\..\..\..\lib\windows\openexr\include;..\..\..\..\lib\windows\openexr\include\Iex;..\..\..\..\lib\windows\openexr\include\Imath;..\..\..\..\lib\windows\openexr\include\IlmImf;..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\build\msvc_7\intern\memutil\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\imbuf\intern;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\imbuf\intern\openexr;..\..\..\source\blender\imbuf\intern\dds"
-                               PreprocessorDefinitions="NDEBUG;WIN32;_LIB;WITH_QUICKTIME;WITH_OPENEXR;WITH_DDS"
+                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\jpeg\include;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\png\include;..\..\..\..\lib\windows\tiff\include;..\..\..\..\lib\windows\openexr\include;..\..\..\..\lib\windows\openexr\include\Iex;..\..\..\..\lib\windows\openexr\include\Imath;..\..\..\..\lib\windows\openexr\include\IlmImf;..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\build\msvc_7\intern\memutil\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\imbuf\intern;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\imbuf\intern\openexr;..\..\..\source\blender\imbuf\intern\dds;..\..\..\..\lib\windows\ffmpeg\include"
+                               PreprocessorDefinitions="NDEBUG;WIN32;_LIB;WITH_QUICKTIME;WITH_OPENEXR;WITH_DDS;WITH_FFMPEG"
                                StringPooling="TRUE"
                                RuntimeLibrary="0"
                                EnableFunctionLevelLinking="TRUE"
                        <Tool
                                Name="VCCLCompilerTool"
                                Optimization="0"
-                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\jpeg\include;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\png\include;..\..\..\..\lib\windows\tiff\include;..\..\..\..\lib\windows\openexr\include;..\..\..\..\lib\windows\openexr\include\Iex;..\..\..\..\lib\windows\openexr\include\Imath;..\..\..\..\lib\windows\openexr\include\IlmImf;..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\build\msvc_7\intern\memutil\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\imbuf\intern;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\imbuf\intern\openexr;..\..\..\source\blender\imbuf\intern\dds"
-                               PreprocessorDefinitions="_DEBUG,WIN32,_LIB,WITH_QUICKTIME,WITH_DDS"
+                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\jpeg\include;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\png\include;..\..\..\..\lib\windows\tiff\include;..\..\..\..\lib\windows\openexr\include;..\..\..\..\lib\windows\openexr\include\Iex;..\..\..\..\lib\windows\openexr\include\Imath;..\..\..\..\lib\windows\openexr\include\IlmImf;..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\build\msvc_7\intern\memutil\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\imbuf\intern;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\imbuf\intern\openexr;..\..\..\source\blender\imbuf\intern\dds;..\..\..\..\lib\windows\ffmpeg\include"
+                               PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_QUICKTIME;WITH_DDS;WITH_FFMPEG"
                                BasicRuntimeChecks="3"
                                RuntimeLibrary="1"
                                DefaultCharIsUnsigned="TRUE"
                        <Tool
                                Name="VCCLCompilerTool"
                                InlineFunctionExpansion="1"
-                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\jpeg\include;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\png\include;..\..\..\..\lib\windows\tiff\include;..\..\..\..\lib\windows\openexr\include;..\..\..\..\lib\windows\openexr\include\Iex;..\..\..\..\lib\windows\openexr\include\Imath;..\..\..\..\lib\windows\openexr\include\IlmImf;..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\build\msvc_7\intern\memutil\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\imbuf\intern;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\imbuf\intern\openexr;..\..\..\source\blender\imbuf\intern\dds"
-                               PreprocessorDefinitions="NDEBUG;WIN32;_LIB;WITH_QUICKTIME;WITH_DDS"
+                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\jpeg\include;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\png\include;..\..\..\..\lib\windows\tiff\include;..\..\..\..\lib\windows\openexr\include;..\..\..\..\lib\windows\openexr\include\Iex;..\..\..\..\lib\windows\openexr\include\Imath;..\..\..\..\lib\windows\openexr\include\IlmImf;..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\build\msvc_7\intern\memutil\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\imbuf\intern;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\imbuf\intern\openexr;..\..\..\source\blender\imbuf\intern\dds;..\..\..\..\lib\windows\ffmpeg\include"
+                               PreprocessorDefinitions="NDEBUG;WIN32;_LIB;WITH_QUICKTIME;WITH_DDS;WITH_FFMPEG"
                                StringPooling="TRUE"
                                RuntimeLibrary="0"
                                EnableFunctionLevelLinking="TRUE"
index 4d98c52de1737c8bcfee584b67620663d2e0f417..6f91aeed8b55f626a67b2e8317b1da437340f851 100644 (file)
@@ -21,8 +21,8 @@
                        <Tool
                                Name="VCCLCompilerTool"
                                InlineFunctionExpansion="1"
-                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\ghost\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\opennl\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\blenkey\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\memutil\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\soundsystem\include;..\..\..\source\blender;..\..\..\source\blender\img;..\..\..\source\blender\verify;..\..\..\source\blender\ftfont;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\renderui;..\..\..\source\blender\blenloader;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenpluginapi;..\..\..\source\blender\renderconverter;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\network;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\build\msvc_7\extern\verse\include;..\..\..\..\lib\windows\pthreads\include"
-                               PreprocessorDefinitions="NDEBUG;WIN32;_LIB;_CONSOLE;GAMEBLENDER=1;WITH_QUICKTIME;INTERNATIONAL;WITH_VERSE;WITH_OPENEXR;WITH_DDS;WITH_BULLET=1"
+                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\ghost\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\opennl\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\blenkey\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\memutil\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\soundsystem\include;..\..\..\source\blender;..\..\..\source\blender\img;..\..\..\source\blender\verify;..\..\..\source\blender\ftfont;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\renderui;..\..\..\source\blender\blenloader;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenpluginapi;..\..\..\source\blender\renderconverter;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\network;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\build\msvc_7\extern\verse\include;..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\ffmpeg\include"
+                               PreprocessorDefinitions="NDEBUG;WIN32;_LIB;_CONSOLE;GAMEBLENDER=1;WITH_QUICKTIME;INTERNATIONAL;WITH_VERSE;WITH_OPENEXR;WITH_DDS;WITH_BULLET=1;WITH_FFMPEG"
                                StringPooling="TRUE"
                                RuntimeLibrary="0"
                                EnableFunctionLevelLinking="TRUE"
@@ -73,8 +73,8 @@
                        <Tool
                                Name="VCCLCompilerTool"
                                Optimization="0"
-                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\ghost\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\opennl\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\blenkey\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\memutil\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\soundsystem\include;..\..\..\source\blender;..\..\..\source\blender\img;..\..\..\source\blender\verify;..\..\..\source\blender\ftfont;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\renderui;..\..\..\source\blender\blenloader;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenpluginapi;..\..\..\source\blender\renderconverter;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\network;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\build\msvc_7\extern\verse\include;..\..\..\..\lib\windows\pthreads\include"
-                               PreprocessorDefinitions="_DEBUG;WIN32;_LIB;_CONSOLE;GAMEBLENDER;WITH_QUICKTIME;INTERNATIONAL;WITH_VERSE;WITH_OPENEXR;WITH_DDS;WITH_BULLET = 1"
+                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\ghost\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\opennl\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\blenkey\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\memutil\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\soundsystem\include;..\..\..\source\blender;..\..\..\source\blender\img;..\..\..\source\blender\verify;..\..\..\source\blender\ftfont;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\renderui;..\..\..\source\blender\blenloader;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenpluginapi;..\..\..\source\blender\renderconverter;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\network;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\build\msvc_7\extern\verse\include;..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\ffmpeg\include"
+                               PreprocessorDefinitions="_DEBUG;WIN32;_LIB;_CONSOLE;GAMEBLENDER;WITH_QUICKTIME;INTERNATIONAL;WITH_VERSE;WITH_OPENEXR;WITH_DDS;WITH_BULLET = 1;WITH_FFMPEG"
                                BasicRuntimeChecks="3"
                                RuntimeLibrary="1"
                                DefaultCharIsUnsigned="TRUE"
index 3d6794a795f21f730095c6bbc987078913eced53..c2122f060d69f941ca97e1efb7e8f08208ac1aee 100644 (file)
                                Name="VCLinkerTool"
                                AdditionalOptions="/MACHINE:I386
 "
-                               AdditionalDependencies="libguardedalloc.lib libstring.lib libghost.lib odelib.lib fmodvc.lib libbmfont.lib ws2_32.lib vfw32.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib openal_static.lib libjpeg.lib dxguid.lib libeay32.lib libpng.lib libz.lib libmoto.lib libSoundSystem.lib qtmlClient.lib libDummySoundSystem.lib libOpenALSoundSystem.lib SDL.lib solid.lib freetype2ST.lib Bullet.lib libdecimation.lib python25_d.lib pthreadVSE2.lib pthreadVC2.lib verse.lib libopennl.lib"
+                               AdditionalDependencies="libguardedalloc.lib libstring.lib libghost.lib odelib.lib fmodvc.lib libbmfont.lib ws2_32.lib vfw32.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib openal_static.lib libjpeg.lib dxguid.lib libeay32.lib libpng.lib libz.lib libmoto.lib libSoundSystem.lib qtmlClient.lib libDummySoundSystem.lib libOpenALSoundSystem.lib SDL.lib solid.lib freetype2ST.lib Bullet.lib libdecimation.lib python25_d.lib pthreadVSE2.lib pthreadVC2.lib verse.lib libopennl.lib avcodec-51.lib avformat-52.lib avutil-49.lib swscale-0.lib"
                                ShowProgress="0"
                                OutputFile="..\..\..\..\bin\debug\blenderplayer.exe"
                                LinkIncremental="2"
                                SuppressStartupBanner="TRUE"
-                               AdditionalLibraryDirectories="..\..\..\..\..\lib\windows\sdl\lib;..\..\..\..\..\lib\windows\zlib\lib;..\..\..\..\..\lib\windows\ode\lib;..\..\..\..\..\lib\windows\png\lib;..\..\..\..\..\lib\windows\jpeg\lib;..\..\..\..\..\lib\windows\fmod\lib;..\..\..\..\..\lib\windows\openal\lib;..\..\..\..\..\lib\windows\freetype\lib;..\..\..\..\..\lib\windows\python\lib;..\..\..\..\..\lib\windows\openssl\lib;..\..\..\..\..\lib\windows\QTDevWin\Libraries;..\..\..\..\..\build\msvc_7\libs\intern\debug;..\..\..\..\..\build\msvc_7\libs\extern\debug;..\..\..\..\..\lib\windows\pthreads\lib"
+                               AdditionalLibraryDirectories="..\..\..\..\..\lib\windows\sdl\lib;..\..\..\..\..\lib\windows\zlib\lib;..\..\..\..\..\lib\windows\ode\lib;..\..\..\..\..\lib\windows\png\lib;..\..\..\..\..\lib\windows\jpeg\lib;..\..\..\..\..\lib\windows\fmod\lib;..\..\..\..\..\lib\windows\openal\lib;..\..\..\..\..\lib\windows\freetype\lib;..\..\..\..\..\lib\windows\python\lib;..\..\..\..\..\lib\windows\openssl\lib;..\..\..\..\..\lib\windows\QTDevWin\Libraries;..\..\..\..\..\build\msvc_7\libs\intern\debug;..\..\..\..\..\build\msvc_7\libs\extern\debug;..\..\..\..\..\lib\windows\pthreads\lib;..\..\..\..\..\lib\windows\ffmpeg\lib"
                                IgnoreDefaultLibraryNames="libc.lib;libcmt.lib;msvcrt.lib;libcd.lib;msvcrtd.lib"
                                GenerateDebugInformation="TRUE"
                                ProgramDatabaseFile="..\..\..\..\..\build\msvc_7\libs\debug\blenderplayer.pdb"
@@ -64,6 +64,7 @@ XCOPY /Y ..\..\..\..\..\lib\windows\python\lib\python25_d.dll ..\..\..\..\bin\de
 XCOPY /Y ..\..\..\..\..\lib\windows\sdl\lib\SDL.dll ..\..\..\..\bin\debug
 XCOPY /Y ..\..\..\..\..\lib\windows\png\lib\libpng.dll ..\..\..\..\bin\debug
 XCOPY /Y ..\..\..\..\..\lib\windows\zlib\lib\zlib.dll ..\..\..\..\bin\debug
+XCOPY /Y ..\..\..\..\..\lib\windows\ffmpeg\lib\*.dll ..\..\..\..\bin\debug
 XCOPY /Y ..\..\..\..\..\lib\windows\CRTL\lib\msvcrtd.dll ..\..\..\..\bin\debug
 ECHO Done
 "/>
@@ -116,11 +117,11 @@ ECHO Done
                        <Tool
                                Name="VCLinkerTool"
                                AdditionalOptions="/MACHINE:I386"
-                               AdditionalDependencies="libguardedalloc.lib libstring.lib libghost.lib odelib.lib fmodvc.lib libbmfont.lib ws2_32.lib vfw32.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib openal_static.lib libjpeg.lib dxguid.lib libeay32.lib libpng.lib libz.lib libmoto.lib libSoundSystem.lib qtmlClient.lib libDummySoundSystem.lib libOpenALSoundSystem.lib SDL.lib solid.lib freetype2ST.lib Bullet.lib libdecimation.lib python25.lib pthreadVSE2.lib pthreadVC2.lib verse.lib libopennl.lib"
+                               AdditionalDependencies="libguardedalloc.lib libstring.lib libghost.lib odelib.lib fmodvc.lib libbmfont.lib ws2_32.lib vfw32.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib openal_static.lib libjpeg.lib dxguid.lib libeay32.lib libpng.lib libz.lib libmoto.lib libSoundSystem.lib qtmlClient.lib libDummySoundSystem.lib libOpenALSoundSystem.lib SDL.lib solid.lib freetype2ST.lib Bullet.lib libdecimation.lib python25.lib pthreadVSE2.lib pthreadVC2.lib verse.lib libopennl.lib avcodec-51.lib avformat-52.lib avutil-49.lib swscale-0.lib"
                                OutputFile="..\..\..\..\bin\blenderplayer.exe"
                                LinkIncremental="1"
                                SuppressStartupBanner="TRUE"
-                               AdditionalLibraryDirectories="..\..\..\..\..\lib\windows\sdl\lib;..\..\..\..\..\lib\windows\zlib\lib;..\..\..\..\..\lib\windows\ode\lib;..\..\..\..\..\lib\windows\png\lib;..\..\..\..\..\lib\windows\jpeg\lib;..\..\..\..\..\lib\windows\fmod\lib;..\..\..\..\..\lib\windows\openal\lib;..\..\..\..\..\lib\windows\freetype\lib;..\..\..\..\..\lib\windows\python\lib;..\..\..\..\..\lib\windows\openssl\lib;..\..\..\..\..\lib\windows\QTDevWin\Libraries;..\..\..\..\..\build\msvc_7\libs\intern;..\..\..\..\..\build\msvc_7\libs\extern;..\..\..\..\..\lib\windows\pthreads\lib"
+                               AdditionalLibraryDirectories="..\..\..\..\..\lib\windows\sdl\lib;..\..\..\..\..\lib\windows\zlib\lib;..\..\..\..\..\lib\windows\ode\lib;..\..\..\..\..\lib\windows\png\lib;..\..\..\..\..\lib\windows\jpeg\lib;..\..\..\..\..\lib\windows\fmod\lib;..\..\..\..\..\lib\windows\openal\lib;..\..\..\..\..\lib\windows\freetype\lib;..\..\..\..\..\lib\windows\python\lib;..\..\..\..\..\lib\windows\openssl\lib;..\..\..\..\..\lib\windows\QTDevWin\Libraries;..\..\..\..\..\build\msvc_7\libs\intern;..\..\..\..\..\build\msvc_7\libs\extern;..\..\..\..\..\lib\windows\pthreads\lib;..\..\..\..\..\lib\windows\ffmpeg\lib"
                                IgnoreDefaultLibraryNames="libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib"
                                ProgramDatabaseFile="..\..\..\..\..\build\msvc_7\libs\blenderplayer.pdb"
                                SubSystem="1"/>
@@ -137,6 +138,7 @@ XCOPY /Y ..\..\..\..\..\lib\windows\python\lib\python25.dll ..\..\..\..\bin
 XCOPY /Y ..\..\..\..\..\lib\windows\sdl\lib\SDL.dll ..\..\..\..\bin
 XCOPY /Y ..\..\..\..\..\lib\windows\png\lib\libpng.dll ..\..\..\..\bin
 XCOPY /Y ..\..\..\..\..\lib\windows\zlib\lib\zlib.dll ..\..\..\..\bin
+XCOPY /Y ..\..\..\..\..\lib\windows\ffmpeg\lib\*.dll ..\..\..\..\bin
 ECHO Done
 "/>
                        <Tool
index 0d328ee4b7ccf066eb69d138884cbeebe3d4d44f..182686a8cead52ccbcd153add4e1b02badf37a77 100644 (file)
Binary files a/release/datafiles/splash.jpg and b/release/datafiles/splash.jpg differ
index e535af705df3eff80ff8395ec516ca0148043c9d..de40bea3191bab8d2e7b30b0b8fc297d0cbd3268 100644 (file)
@@ -1309,8 +1309,9 @@ def curve_FILL(Courbe,proprietes):
                        if not 'fill:none' in pr:
                                Courbe[n].fill=1
                                if USE_COLORS:
-                                       if '#' in pr:
-                                               i= pr.find('fill:#')+6
+                                       i= pr.find('fill:#')
+                                       if i != -1:
+                                               i= i+6
                                                Courbe[n].color=[int(pr[i:i+2],16),int(pr[i+2:i+4],16),int(pr[i+4:i+6],16)]
                                                Courbe[n].mat=1
                                        elif ';fill-opacity' in pr: 
index b559f2fb7c33096b4c8af2116ab077949044fa0a..e3c588cac1023f015fb285c80abd0189bf695993 100644 (file)
@@ -2,9 +2,9 @@
 
 """
 Name: 'Raw Faces (.raw)...'
-Blender: 242
+Blender: 245
 Group: 'Export'
-Tooltip: 'Export selected mesh to Raw Triangle Format (.raw)'
+Tooltip: 'Export selected mesh to Raw Format (.raw)'
 """
 
 __author__ = "Anthony D'Agostino (Scorpius)"
@@ -13,10 +13,10 @@ __url__ = ("blender", "blenderartists.org",
 __version__ = "Part of IOSuite 0.5"
 
 __bpydoc__ = """\
-This script exports meshes to Raw Triangle file format.
+This script exports meshes to Raw file format.
 
 The raw triangle format is very simple; it has no verts or faces lists.
-It's just a simple ascii text file with the vertices of each triangle
+It's just a simple ascii text file with the vertices of each triangle or quad
 listed on each line. There were some very old utilities (when the PovRay
 forum was in existence on CompuServe) that preformed operations on these
 files.
@@ -65,24 +65,24 @@ def write(filename):
                filename += '.raw'
        
        scn= Blender.Scene.GetCurrent()
-       object= scn.getActiveObject()
-       if not object:
+       ob= scn.objects.active
+       if not ob:
                Blender.Draw.PupMenu('Error%t|Select 1 active object')
                return
        
        file = open(filename, 'wb')
        
-       mesh = BPyMesh.getMeshFromObject(object, None, True, False, scn)
+       mesh = BPyMesh.getMeshFromObject(ob, None, True, False, scn)
        if not mesh:
                Blender.Draw.PupMenu('Error%t|Could not get mesh data from active object')
                return
        
-       mesh.transform(object.matrixWorld)
+       mesh.transform(ob.matrixWorld)
        
        
        file = open(filename, "wb")
        for f in mesh.faces:
-               for v in f.v:
+               for v in f:
                        file.write('%.6f %.6f %.6f ' % tuple(v.co))
                file.write('\n')
        file.close()
index d2ba180e0aa632a5f55e786bdab58e7241c7bbfc..4d1c07836dcace557113c17b18178cf5c1f4bd44 100644 (file)
@@ -41,7 +41,7 @@ struct ListBase;
 struct MemFile;
 
 #define BLENDER_VERSION                        245
-#define BLENDER_SUBVERSION             16
+#define BLENDER_SUBVERSION             17
 
 #define BLENDER_MINVERSION             240
 #define BLENDER_MINSUBVERSION  0
index 988f7c6cf446d49875510938667e11d9203ded18..af920e9762d6fd06259ca966a2346257f79fee09 100644 (file)
@@ -50,7 +50,7 @@
 #include "BKE_collision.h"
 
 struct Object;
-struct Cloth;
+
 struct MFace;
 struct DerivedMesh;
 struct ClothModifierData;
@@ -82,6 +82,33 @@ struct CollisionTree;
 #define CLOTH_VERT_FLAG_COLLISION 2
 #define CLOTH_VERT_FLAG_PINNED_EM 3
 
+/**
+* This structure describes a cloth object against which the
+* simulation can run.
+*
+* The m and n members of this structure represent the assumed
+* rectangular ordered grid for which the original paper is written.
+* At some point they need to disappear and we need to determine out
+* own connectivity of the mesh based on the actual edges in the mesh.
+*
+**/
+typedef struct Cloth
+{
+       struct ClothVertex      *verts;                 /* The vertices that represent this cloth. */
+       struct  LinkNode        *springs;               /* The springs connecting the mesh. */
+       unsigned int            numverts;               /* The number of verts == m * n. */
+       unsigned int            numsprings;             /* The count of springs. */
+       unsigned int            numfaces;
+       unsigned char           old_solver_type;        /* unused, only 1 solver here */
+       unsigned char           pad2;
+       short                   pad3;
+       struct BVH              *tree;                  /* collision tree for this cloth object */
+       struct MFace            *mfaces;
+       struct Implicit_Data    *implicit;              /* our implicit solver connects to this pointer */
+       struct Implicit_Data    *implicitEM;            /* our implicit solver connects to this pointer */
+       struct EdgeHash         *edgehash;              /* used for selfcollisions */
+} Cloth;
+
 /**
  * The definition of a cloth vertex.
  */
index 92aecfaa6f0e379d02fa718e5b598ebd54f482df..3763a659f2f22b2fc40f442e1d152043ab70f771 100644 (file)
@@ -35,7 +35,6 @@
 
 struct Effect;
 struct ListBase;
-struct PartEff;
 struct Particle;
 struct Group;
 
@@ -51,21 +50,16 @@ typedef struct pEffectorCache {
        Object obcopy;  /* for restoring transformation data */
 } pEffectorCache;
 
-
-struct Effect *add_effect(int type);
 void free_effect(struct Effect *eff);
 void free_effects(struct ListBase *lb);
 struct Effect *copy_effect(struct Effect *eff);
-void copy_act_effect(struct Object *ob);
 void copy_effects(struct ListBase *lbn, struct ListBase *lb);
 void deselectall_eff(struct Object *ob);
-struct PartEff *give_parteff(struct Object *ob);
-void where_is_particle(struct PartEff *paf, struct Particle *pa, float ctime, float *vec);
-void build_particle_system(struct Object *ob);
 
 /* particle deflector */
 #define PE_WIND_AS_SPEED 0x00000001
 
+struct PartEff *give_parteff(struct Object *ob);
 struct ListBase *pdInitEffectors(struct Object *obsrc, struct Group *group);
 void                   pdEndEffectors(struct ListBase *lb);
 void                   pdDoEffectors(struct ListBase *lb, float *opco, float *force, float *speed, float cur_time, float loc_time, unsigned int flags);
index d1f569e3f1643402d024bb41b2dfadd02d5de847..33747eb35a3a45af4296091b572aa3e479f0fb6f 100644 (file)
 #ifndef BKE_VFONT_H
 #define BKE_VFONT_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <wchar.h>
 
 struct VFont;
@@ -65,7 +69,11 @@ int getselection(int *start, int *end);
 void chtoutf8(unsigned long c, char *o);
 void wcs2utf8s(char *dst, wchar_t *src);
 int wcsleninu8(wchar_t *src);
-int utf8towchar_(wchar_t *w, char *c);
+int utf8towchar(wchar_t *w, char *c);
+
+#ifdef __cplusplus
+}
+#endif
 
 #endif
 
index 61eb796e53d78284af220a991c30530ed15d01b4..df565ddc7fe561c8dd129b752681d66c72f6bec4 100644 (file)
@@ -61,7 +61,7 @@ void multires_load_cols(struct Mesh *me);
 void multires_level_to_mesh(struct Object *ob, struct Mesh *me, const int render);
 void multires_update_levels(struct Mesh *me, const int render);
 void multires_update_first_level(struct Mesh *me, struct EditMesh *em);
-void multires_update_customdata(struct MultiresLevel *lvl1, struct CustomData *src,
+void multires_update_customdata(struct MultiresLevel *lvl1, struct EditMesh *em, struct CustomData *src,
                                struct CustomData *dst, const int type);
 void multires_customdata_to_mesh(struct Mesh *me, struct EditMesh *em,
                                 struct MultiresLevel *lvl, struct CustomData *src,
index fbde861891d9cc6233557f80a6f87dd50a500b7c..944a90816798bce1568ca62fc8834ba97570638e 100644 (file)
@@ -231,6 +231,7 @@ struct ParticleSystemModifierData *psys_get_modifier(struct Object *ob, struct P
 struct ParticleSettings *psys_new_settings(char *name, struct Main *main);
 struct ParticleSettings *psys_copy_settings(struct ParticleSettings *part);
 void psys_flush_settings(struct ParticleSettings *part, int event, int hair_recalc);
+void make_local_particlesettings(struct ParticleSettings *part);
 
 struct LinkNode *psys_using_settings(struct ParticleSettings *part, int flush_update);
 void psys_changed_type(struct ParticleSystem *psys);
index efe815a672da6205d85351f510bfa25000c95991..291dd70c801f7c81aba190a7c223c18695babea1 100644 (file)
@@ -355,6 +355,7 @@ TimeMarker *get_frame_marker(int frame){return 0;};
 
 /* editseq.c */
 Sequence *get_forground_frame_seq(int frame){return 0;};
+void set_last_seq(Sequence *seq){return 0;};
 
 /* modifier.c stub */
 void harmonic_coordinates_bind(struct MeshDeformModifierData *mmd,
index fa3e7994ee5e077aac78f2be194f940576c9975d..f31c5a0d6728dcc8f7e2e466257b1308a0a33c09 100644 (file)
@@ -420,7 +420,6 @@ static DerivedMesh *getMeshDerivedMesh(Mesh *me, Object *ob, float (*vertCos)[3]
        dofluidsim = ((ob->fluidsimFlag & OB_FLUIDSIM_ENABLE) &&
                      (ob->fluidsimSettings->type & OB_FLUIDSIM_DOMAIN)&&
                      (ob->fluidsimSettings->meshSurface) &&
-                     (1) && (!give_parteff(ob)) && // doesnt work together with particle systems!
                      (me->totvert == ((Mesh *)(ob->fluidsimSettings->meshSurface))->totvert));
 
        if (vertCos && !dofluidsim)
@@ -1916,8 +1915,7 @@ static void mesh_calc_modifiers(Object *ob, float (*inputVertexCos)[3],
         * domain objects
         */
        if((G.obedit!=ob) && !needMapping) {
-               if((ob->fluidsimFlag & OB_FLUIDSIM_ENABLE) &&
-                  (1) && (!give_parteff(ob)) ) { // doesnt work together with particle systems!
+               if((ob->fluidsimFlag & OB_FLUIDSIM_ENABLE)) {
                        if(ob->fluidsimSettings->type & OB_FLUIDSIM_DOMAIN) {
                                loadFluidsimMesh(ob,useRenderParams);
                                fluidsimMeshUsed = 1;
@@ -2550,14 +2548,7 @@ void makeDerivedMesh(Object *ob, CustomDataMask dataMask)
        if (ob==G.obedit) {
                editmesh_build_data(dataMask);
        } else {
-               PartEff *paf= give_parteff(ob);
-               
                mesh_build_data(ob, dataMask);
-               
-               if(paf) {
-                       if((paf->flag & PAF_STATIC) || (ob->recalc & OB_RECALC_TIME)==0)
-                               build_particle_system(ob);
-               }
        }
 }
 
index 3025667aa32b91e88d140c59dc32a49db0d8a4ec..c4df1db7627b3d9192e5b7bc3f84ea3ce1a314ef 100644 (file)
@@ -961,11 +961,7 @@ static float nla_time(float cfra, float unit)
        
        /* global time */
        cfra*= G.scene->r.framelen;     
-
-
-       /* decide later... */
-//     if(no_speed_curve==0) if(ob && ob->ipo) cfra= calc_ipo_time(ob->ipo, cfra);
-
+       
        return cfra;
 }
 
@@ -1143,12 +1139,13 @@ void what_does_obaction (Object *ob, bAction *act, float cframe)
        workob.constraints.first = ob->constraints.first;
        workob.constraints.last = ob->constraints.last;
 
-       strcpy(workob.parsubstr, ob->parsubstr); 
+       strcpy(workob.parsubstr, ob->parsubstr);
+       strcpy(workob.id.name, ob->id.name);
        
        /* extract_ipochannels_from_action needs id's! */
        workob.action= act;
        
-       extract_ipochannels_from_action(&tchanbase, &ob->id, act, "Object", bsystem_time(&workob, cframe, 0.0));
+       extract_ipochannels_from_action(&tchanbase, &workob.id, act, "Object", bsystem_time(&workob, cframe, 0.0));
        
        if (tchanbase.first) {
                execute_ipochannels(&tchanbase);
index 0d91f106ed77ce5fd810a4675c2ce467ea0fcac5..8533175ad37f2d2a8e783df143f59584aa6886ca 100644 (file)
@@ -733,7 +733,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Object *par, float par_
        ParticleSystemModifierData *psmd;
        float ctime, pa_time, scale = 1.0f;
        float tmat[4][4], mat[4][4], obrotmat[4][4], pamat[4][4], size=0.0;
-       float obmat[4][4], (*obmatlist)[4][4]=0;
+       float (*obmat)[4];
        float xvec[3] = {-1.0, 0.0, 0.0}, q[4];
        int lay, a, b, k, step_nbr = 0, counter, hair = 0;
        int totpart, totchild, totgroup=0, pa_num;
@@ -788,17 +788,12 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Object *par, float par_
                        }
 
                        oblist= MEM_callocN(totgroup*sizeof(Object *), "dupgroup object list");
-                       obmatlist= MEM_callocN(totgroup*sizeof(float)*4*4, "dupgroup obmat list");
                        go= part->dup_group->gobject.first;
-                       for(a=0; a<totgroup; a++, go=go->next) {
+                       for(a=0; a<totgroup; a++, go=go->next)
                                oblist[a]=go->ob;
-                               Mat4CpyMat4(obmatlist[a], go->ob->obmat);
-                       }
                }
-               else {
+               else
                        ob = part->dup_ob;
-                       Mat4CpyMat4(obmat, ob->obmat);
-               }
 
                if(totchild==0 || part->draw & PART_DRAW_PARENT)
                        a=0;
@@ -834,8 +829,10 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Object *par, float par_
                                        b= a % totgroup;
 
                                ob = oblist[b];
-                               Mat4CpyMat4(obmat, obmatlist[b]);
+                               obmat= oblist[b]->obmat;
                        }
+                       else
+                               obmat= ob->obmat;
 
                        for(k=0; k<=step_nbr; k++, counter++) {
                                if(hair) {
@@ -871,7 +868,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Object *par, float par_
                                if(part->draw_as==PART_DRAW_GR && psys->part->draw & PART_DRAW_WHOLE_GR) {
                                        for(go= part->dup_group->gobject.first, b=0; go; go= go->next, b++) {
 
-                                               Mat4MulMat4(tmat, obmatlist[b], pamat);
+                                               Mat4MulMat4(tmat, obmat, pamat);
                                                Mat4MulFloat3((float *)tmat, size*scale);
                                                if(par_space_mat)
                                                        Mat4MulMat4(mat, tmat, par_space_mat);
@@ -912,8 +909,6 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Object *par, float par_
        }
        if(oblist)
                MEM_freeN(oblist);
-       if(obmatlist)
-               MEM_freeN(obmatlist);
 
        if(psys->lattice) {
                end_latt_deform();
index 47095afdf22e2eb5fcb18b03d7f296d440ad15d9..230b7080b38668fb23129ef14c6068a6c91712b3 100644 (file)
@@ -330,6 +330,7 @@ static void setup_app_data(BlendFileData *bfd, char *filename)
                extern void lib_link_screen_restore(Main *, Scene *);
                
                SWAP(ListBase, G.main->screen, bfd->main->screen);
+               SWAP(ListBase, G.main->script, bfd->main->script);
                
                /* we re-use current screen */
                curscreen= G.curscreen;
index 9d8007e8184ec065416f3b52a1ea7f5bb628eccb..1331c9a7d126808e4a995883a55236683d562e48 100644 (file)
@@ -568,36 +568,7 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Object *ob, int
                        dag_add_relation(dag,node2,node,DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Texture On Curve");
                }
        }
-       else if(ob->type==OB_MESH) {
-               PartEff *paf= give_parteff(ob);
-               if(paf) {
-                       ListBase *listb;
-                       pEffectorCache *ec;
-                       
-                       /* ob location depends on itself */
-                       if((paf->flag & PAF_STATIC)==0)
-                               dag_add_relation(dag, node, node, DAG_RL_OB_DATA, "Particle-Object Relation");
-                       
-                       listb= pdInitEffectors(ob, paf->group);         /* note, makes copy... */
-                       if(listb) {
-                               for(ec= listb->first; ec; ec= ec->next) {
-                                       Object *ob1= ec->ob;
-                                       PartDeflect *pd= ob1->pd;
-                                               
-                                       if(pd->forcefield) {
-                                               node2 = dag_get_node(dag, ob1);
-                                               if(pd->forcefield==PFIELD_GUIDE)
-                                                       dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Particle Field");
-                                               else
-                                                       dag_add_relation(dag, node2, node, DAG_RL_OB_DATA, "Particle Field");
-                                       }
-                               }
-                               
-                               pdEndEffectors(listb);  /* restores copy... */
-                       }
-               }
-       }
-
+       
        psys= ob->particlesystem.first;
        if(psys) {
                ParticleEffectorCache *nec;
@@ -1987,15 +1958,6 @@ static void dag_object_time_update_flags(Object *ob)
                                                ob->shapeflag &= ~OB_SHAPE_TEMPLOCK;
                                        }
                                }
-                               else if(ob->effect.first) {
-                                       Effect *eff= ob->effect.first;
-                                       PartEff *paf= give_parteff(ob);
-                                       
-                                       if(eff->type==EFF_WAVE) 
-                                               ob->recalc |= OB_RECALC_DATA;
-                                       else if(paf && paf->keys==NULL)
-                                               ob->recalc |= OB_RECALC_DATA;
-                               }
                                if((ob->fluidsimFlag & OB_FLUIDSIM_ENABLE) && (ob->fluidsimSettings)) {
                                        // fluidsimSettings might not be initialized during load...
                                        if(ob->fluidsimSettings->type & (OB_FLUIDSIM_DOMAIN|OB_FLUIDSIM_PARTICLE)) {
index 3cb85bcbb20973318e85481cb6dd7d0dbc94042f..4588ef800e1f55c9a4497586a9274ecc1c9d1d6e 100644 (file)
@@ -96,43 +96,19 @@ typedef struct VeNoCo {
        float co[3], no[3];
 } VeNoCo;
 
-Effect *add_effect(int type)
+/* ***************** PARTICLES ***************** */
+
+/* deprecated, only keep this for readfile.c */
+PartEff *give_parteff(Object *ob)
 {
-       Effect *eff=0;
        PartEff *paf;
-       int a;
        
-       switch(type) {
-       case EFF_PARTICLE:
-               paf= MEM_callocN(sizeof(PartEff), "neweff");
-               eff= (Effect *)paf;
-               
-               paf->sta= 1.0;
-               paf->end= 100.0;
-               paf->lifetime= 50.0;
-               for(a=0; a<PAF_MAXMULT; a++) {
-                       paf->life[a]= 50.0;
-                       paf->child[a]= 4;
-                       paf->mat[a]= 1;
-               }
-               
-               paf->totpart= 1000;
-               paf->totkey= 8;
-               paf->staticstep= 5;
-               paf->defvec[2]= 1.0f;
-               paf->nabla= 0.05f;
-               paf->disp = 100;
-               paf->speedtex = 8;
-               paf->omat = 1;
-               paf->flag= PAF_FACE;
-
-               break;
+       paf= ob->effect.first;
+       while(paf) {
+               if(paf->type==EFF_PARTICLE) return paf;
+               paf= paf->next;
        }
-       
-       eff->type= eff->buttype= type;
-       eff->flag |= SELECT;
-       
-       return eff;
+       return 0;
 }
 
 void free_effect(Effect *eff)
@@ -159,172 +135,6 @@ void free_effects(ListBase *lb)
        }
 }
 
-Effect *copy_effect(Effect *eff) 
-{
-       Effect *effn;
-
-       effn= MEM_dupallocN(eff);
-       if(effn->type==EFF_PARTICLE) ((PartEff *)effn)->keys= 0;
-
-       return effn;    
-}
-
-void copy_act_effect(Object *ob)
-{
-       /* return a copy of the active effect */
-       Effect *effn, *eff;
-       
-       eff= ob->effect.first;
-       while(eff) {
-               if(eff->flag & SELECT) {
-                       
-                       effn= copy_effect(eff);
-                       BLI_addtail(&ob->effect, effn);
-                       
-                       eff->flag &= ~SELECT;
-                       return;
-                       
-               }
-               eff= eff->next;
-       }
-       
-       /* when it comes here: add new effect */
-       eff= add_effect(EFF_PARTICLE);
-       BLI_addtail(&ob->effect, eff);
-                       
-}
-
-void copy_effects(ListBase *lbn, ListBase *lb)
-{
-       Effect *eff, *effn;
-
-       lbn->first= lbn->last= 0;
-
-       eff= lb->first;
-       while(eff) {
-               effn= copy_effect(eff);
-               BLI_addtail(lbn, effn);
-               
-               eff= eff->next;
-       }
-       
-}
-
-void deselectall_eff(Object *ob)
-{
-       Effect *eff= ob->effect.first;
-       
-       while(eff) {
-               eff->flag &= ~SELECT;
-               eff= eff->next;
-       }
-}
-
-/* ***************** PARTICLES ***************** */
-
-static Particle *new_particle(PartEff *paf)
-{
-       static Particle *pa;
-       static int cur;
-
-       /* we agree: when paf->keys==0: alloc */        
-       if(paf->keys==NULL) {
-               pa= paf->keys= MEM_callocN( paf->totkey*paf->totpart*sizeof(Particle), "particlekeys" );
-               cur= 0;
-       }
-       else {
-               if(cur && cur<paf->totpart) pa+=paf->totkey;
-               cur++;
-       }
-       return pa;
-}
-
-PartEff *give_parteff(Object *ob)
-{
-       PartEff *paf;
-       
-       paf= ob->effect.first;
-       while(paf) {
-               if(paf->type==EFF_PARTICLE) return paf;
-               paf= paf->next;
-       }
-       return 0;
-}
-
-void where_is_particle(PartEff *paf, Particle *pa, float ctime, float *vec)
-{
-       Particle *p[4];
-       float dt, t[4];
-       int a;
-       
-       if(paf->totkey==1 || ctime < pa->time) {
-               VECCOPY(vec, pa->co);
-               return;
-       }
-       
-       /* first find the first particlekey */
-       a= (int)((paf->totkey-1)*(ctime-pa->time)/pa->lifetime);
-       if(a>=paf->totkey) a= paf->totkey-1;
-       else if(a<0) a= 0;
-       
-       pa+= a;
-       
-       if(a>0) p[0]= pa-1; else p[0]= pa;
-       p[1]= pa;
-       
-       if(a+1<paf->totkey) p[2]= pa+1; else p[2]= pa;
-       if(a+2<paf->totkey) p[3]= pa+2; else p[3]= p[2];
-       
-       if(p[1]==p[2] || p[2]->time == p[1]->time) dt= 0.0;
-       else dt= (ctime-p[1]->time)/(p[2]->time - p[1]->time);
-
-       if(paf->flag & PAF_BSPLINE) set_four_ipo(dt, t, KEY_BSPLINE);
-       else set_four_ipo(dt, t, KEY_CARDINAL);
-
-       vec[0]= t[0]*p[0]->co[0] + t[1]*p[1]->co[0] + t[2]*p[2]->co[0] + t[3]*p[3]->co[0];
-       vec[1]= t[0]*p[0]->co[1] + t[1]*p[1]->co[1] + t[2]*p[2]->co[1] + t[3]*p[3]->co[1];
-       vec[2]= t[0]*p[0]->co[2] + t[1]*p[1]->co[2] + t[2]*p[2]->co[2] + t[3]*p[3]->co[2];
-
-}
-
-static void particle_tex(MTex *mtex, PartEff *paf, float *co, float *no)
-{                              
-       float tin, tr, tg, tb, ta;
-       float old;
-       
-       externtex(mtex, co, &tin, &tr, &tg, &tb, &ta);
-
-       if(paf->texmap==PAF_TEXINT) {
-               tin*= paf->texfac;
-               no[0]+= tin*paf->defvec[0];
-               no[1]+= tin*paf->defvec[1];
-               no[2]+= tin*paf->defvec[2];
-       }
-       else if(paf->texmap==PAF_TEXRGB) {
-               no[0]+= (tr-0.5f)*paf->texfac;
-               no[1]+= (tg-0.5f)*paf->texfac;
-               no[2]+= (tb-0.5f)*paf->texfac;
-       }
-       else {  /* PAF_TEXGRAD */
-               
-               old= tin;
-               co[0]+= paf->nabla;
-               externtex(mtex, co, &tin, &tr, &tg, &tb, &ta);
-               no[0]+= (old-tin)*paf->texfac;
-               
-               co[0]-= paf->nabla;
-               co[1]+= paf->nabla;
-               externtex(mtex, co, &tin, &tr, &tg, &tb, &ta);
-               no[1]+= (old-tin)*paf->texfac;
-               
-               co[1]-= paf->nabla;
-               co[2]+= paf->nabla;
-               externtex(mtex, co, &tin, &tr, &tg, &tb, &ta);
-               no[2]+= (old-tin)*paf->texfac;
-               
-       }
-}
-
 /* -------------------------- Effectors ------------------ */
 
 static void add_to_effectorcache(ListBase *lb, Object *ob, Object *obsrc)
@@ -401,49 +211,6 @@ void pdEndEffectors(ListBase *lb)
        }
 }
 
-/* local for this c file, only for guides now */
-static void precalc_effectors(Object *ob, PartEff *paf, Particle *pa, ListBase *lb)
-{
-       pEffectorCache *ec;
-       
-       for(ec= lb->first; ec; ec= ec->next) {
-               PartDeflect *pd= ec->ob->pd;
-               
-               ec->oldspeed[0]= ec->oldspeed[1]= ec->oldspeed[2]= 0.0f;
-               
-               if(pd->forcefield==PFIELD_GUIDE && ec->ob->type==OB_CURVE) {
-                       float vec[4], dir[3];
-                       
-                       if(!(paf->flag & PAF_STATIC))
-                               where_is_object_time(ec->ob, pa->time);
-                       
-                       /* scale corrects speed vector to curve size */
-                       if(paf->totkey>1) ec->scale= (paf->totkey-1)/pa->lifetime;
-                       else ec->scale= 1.0f;
-                       
-                       /* time_scale is for random life */
-                       if(pa->lifetime>paf->lifetime)
-                               ec->time_scale= paf->lifetime/pa->lifetime;
-                       else
-                               ec->time_scale= pa->lifetime/paf->lifetime;
-
-                       /* distance of first path point to particle origin */
-                       where_on_path(ec->ob, 0.0f, vec, dir);
-                       VECCOPY(ec->oldloc, vec);       /* store local coord for differences */
-                       Mat4MulVecfl(ec->ob->obmat, vec);
-                       
-                       /* for static we need to move to global space */
-                       if(paf->flag & PAF_STATIC) {
-                               VECCOPY(dir, pa->co);
-                               Mat4MulVecfl(ob->obmat, dir);
-                               ec->guide_dist= VecLenf(vec, dir);
-                       }
-                       else 
-                               ec->guide_dist= VecLenf(vec, pa->co);
-               }
-       }
-}
-
 
 /*  -------- pdDoEffectors() --------
     generic force/speed system, now used for particles and softbodies
@@ -658,879 +425,6 @@ void pdDoEffectors(ListBase *lb, float *opco, float *force, float *speed, float
        }
 }
 
-static void cache_object_vertices(Object *ob)
-{
-       Mesh *me;
-       MVert *mvert;
-       float *fp;
-       int a;
-       
-       me= ob->data;
-       if(me->totvert==0) return;
-
-       fp= ob->sumohandle= MEM_mallocN(3*sizeof(float)*me->totvert, "cache particles");
-       mvert= me->mvert;
-       a= me->totvert;
-       while(a--) {
-               VECCOPY(fp, mvert->co);
-               Mat4MulVecfl(ob->obmat, fp);
-               mvert++;
-               fp+= 3;
-       }
-}
-
-static int pdDoDeflection(RNG *rng, float opco[3], float npco[3], float opno[3],
-        float npno[3], float life, float force[3], int def_depth,
-        float cur_time, unsigned int par_layer, int *last_object,
-               int *last_face, int *same_face)
-{
-       /* Particle deflection code */
-       /* The code is in two sections: the first part checks whether a particle has            */
-       /* intersected a face of a deflector mesh, given its old and new co-ords, opco and npco */
-       /* and which face it hit first                                                          */
-       /* The second part calculates the new co-ordinates given that collision and updates     */
-       /* the new co-ordinates accordingly */
-       Base *base;
-       Object *ob, *deflection_object = NULL;
-       Mesh *def_mesh;
-       MFace *mface, *deflection_face = NULL;
-       float *v1, *v2, *v3, *v4, *vcache=NULL;
-       float nv1[3], nv2[3], nv3[3], nv4[3], edge1[3], edge2[3];
-       float dv1[3] = {0}, dv2[3] = {0}, dv3[3] = {0};
-       float vect_to_int[3], refl_vel[3];
-       float d_intersect_co[3], d_intersect_vect[3], d_nvect[3], d_i_co_above[3];
-       float forcec[3];
-       float k_point3, dist_to_plane;
-       float first_dist, ref_plane_mag;
-       float dk_plane=0, dk_point1=0;
-       float icalctop, icalcbot, n_mag;
-       float mag_iv, x_m,y_m,z_m;
-       float damping, perm_thresh;
-       float perm_val, rdamp_val;
-       int a, deflected=0, deflected_now=0;
-       float t,t2, min_t;
-       float mat[3][3], obloc[3] = {0};
-       int cur_frame;
-       float time_before, time_after;
-       float force_mag_norm;
-       int d_object=0, d_face=0, ds_object=0, ds_face=0;
-
-       first_dist = 200000;
-       min_t = 200000;
-
-       /* The first part of the code, finding the first intersected face*/
-       base= G.scene->base.first;
-       while (base) {
-               /*Only proceed for mesh object in same layer */
-               if(base->object->type==OB_MESH && (base->lay & par_layer)) {
-                       ob= base->object;
-                       /* only with deflecting set */
-                       if(ob->pd && ob->pd->deflect) {
-                               def_mesh= ob->data;
-                       
-                               d_object = d_object + 1;
-
-                               d_face = d_face + 1;
-                               mface= def_mesh->mface;
-                               a = def_mesh->totface;
-                               
-                               
-                               if(ob->parent==NULL && ob->ipo==NULL) { // static
-                                       if(ob->sumohandle==NULL) cache_object_vertices(ob);
-                                       vcache= ob->sumohandle;
-                               }
-                               else {
-                                       /*Find out where the object is at this time*/
-                                       cur_frame = G.scene->r.cfra;
-                                       G.scene->r.cfra = (int)cur_time;
-                                       where_is_object_time(ob, cur_time);
-                                       G.scene->r.cfra = cur_frame;
-                                       
-                                       /*Pass the values from ob->obmat to mat*/
-                                       /*and the location values to obloc           */
-                                       Mat3CpyMat4(mat,ob->obmat);
-                                       obloc[0] = ob->obmat[3][0];
-                                       obloc[1] = ob->obmat[3][1];
-                                       obloc[2] = ob->obmat[3][2];
-                                       vcache= NULL;
-
-                               }
-                               
-                               while (a--) {
-
-                                       if(vcache) {
-                                               v1= vcache+ 3*(mface->v1);
-                                               VECCOPY(nv1, v1);
-                                               v1= vcache+ 3*(mface->v2);
-                                               VECCOPY(nv2, v1);
-                                               v1= vcache+ 3*(mface->v3);
-                                               VECCOPY(nv3, v1);
-                                               v1= vcache+ 3*(mface->v4);
-                                               VECCOPY(nv4, v1);
-                                       }
-                                       else {
-                                               /* Calculate the global co-ordinates of the vertices*/
-                                               v1= (def_mesh->mvert+(mface->v1))->co;
-                                               v2= (def_mesh->mvert+(mface->v2))->co;
-                                               v3= (def_mesh->mvert+(mface->v3))->co;
-                                               v4= (def_mesh->mvert+(mface->v4))->co;
-       
-                                               VECCOPY(nv1, v1);
-                                               VECCOPY(nv2, v2);
-                                               VECCOPY(nv3, v3);
-                                               VECCOPY(nv4, v4);
-       
-                                               /*Apply the objects deformation matrix*/
-                                               Mat3MulVecfl(mat, nv1);
-                                               Mat3MulVecfl(mat, nv2);
-                                               Mat3MulVecfl(mat, nv3);
-                                               Mat3MulVecfl(mat, nv4);
-       
-                                               VECADD(nv1, nv1, obloc);
-                                               VECADD(nv2, nv2, obloc);
-                                               VECADD(nv3, nv3, obloc);
-                                               VECADD(nv4, nv4, obloc);
-                                       }
-                                       
-                                       deflected_now = 0;
-
-                                               
-                                               
-//                                     t= 0.5; // this is labda of line, can use it optimize quad intersection
-// sorry but no .. see below (BM)                                      
-                                       if( LineIntersectsTriangle(opco, npco, nv1, nv2, nv3, &t, NULL) ) {
-                                               if (t < min_t) {
-                                                       deflected = 1;
-                                                       deflected_now = 1;
-                                               }
-                                       }
-//                                     else if (mface->v4 && (t>=0.0 && t<=1.0)) {
-// no, you can't skip testing the other triangle
-// it might give a smaller t on (close to) the edge .. this is numerics not esoteric maths :)
-// note: the 2 triangles don't need to share a plane ! (BM)
-                                       if (mface->v4) {
-                                               if( LineIntersectsTriangle(opco, npco, nv1, nv3, nv4, &t2, NULL) ) {
-                                                       if (t2 < min_t) {
-                                                               deflected = 1;
-                                                               deflected_now = 2;
-                                                       }
-                                               }
-                                       }
-                                       
-                                       if ((deflected_now > 0) && ((t < min_t) ||(t2 < min_t))) {
-                       min_t = t;
-                       ds_object = d_object;
-                                               ds_face = d_face;
-                                               deflection_object = ob;
-                                               deflection_face = mface;
-                                               if (deflected_now==1) {
-                       min_t = t;
-                                                       VECCOPY(dv1, nv1);
-                                                       VECCOPY(dv2, nv2);
-                                                       VECCOPY(dv3, nv3);
-                                               }
-                                               else {
-                       min_t = t2;
-                                                       VECCOPY(dv1, nv1);
-                                                       VECCOPY(dv2, nv3);
-                                                       VECCOPY(dv3, nv4);
-                                               }
-                                       }
-                                       mface++;
-                               }
-                       }
-               }
-               base = base->next;
-       }
-
-
-       /* Here's the point to do the permeability calculation */
-       /* Set deflected to 0 if a random number is below the value */
-       /* Get the permeability IPO here*/
-       if (deflected) {
-               
-               if (has_ipo_code(deflection_object->ipo, OB_PD_PERM)) 
-                       perm_val = IPO_GetFloatValue(deflection_object->ipo, OB_PD_PERM, cur_time);
-               else 
-                       perm_val = deflection_object->pd->pdef_perm;
-
-               perm_thresh = rng_getFloat(rng) - perm_val;
-               if (perm_thresh < 0 ) {
-                       deflected = 0;
-               }
-       }
-
-       /* Now for the second part of the deflection code - work out the new speed */
-       /* and position of the particle if a collision occurred */
-       if (deflected) {
-       VECSUB(edge1, dv1, dv2);
-               VECSUB(edge2, dv3, dv2);
-               Crossf(d_nvect, edge2, edge1);
-               n_mag = Normalize(d_nvect);
-               dk_plane = INPR(d_nvect, nv1);
-               dk_point1 = INPR(d_nvect,opco);
-
-               VECSUB(d_intersect_vect, npco, opco);
-
-               d_intersect_co[0] = opco[0] + (min_t * (npco[0] - opco[0]));
-               d_intersect_co[1] = opco[1] + (min_t * (npco[1] - opco[1]));
-               d_intersect_co[2] = opco[2] + (min_t * (npco[2] - opco[2]));
-               
-               d_i_co_above[0] = (d_intersect_co[0] + (0.001f * d_nvect[0]));
-               d_i_co_above[1] = (d_intersect_co[1] + (0.001f * d_nvect[1]));
-               d_i_co_above[2] = (d_intersect_co[2] + (0.001f * d_nvect[2]));
-               mag_iv = Normalize(d_intersect_vect);
-               VECCOPY(npco, d_intersect_co);
-               
-               VECSUB(vect_to_int, opco, d_intersect_co);
-               first_dist = Normalize(vect_to_int);
-
-               /* Work out the lengths of time before and after collision*/
-               time_before = (life*(first_dist / (mag_iv)));
-               time_after =  (life*((mag_iv - first_dist) / (mag_iv)));
-
-               /* We have to recalculate what the speed would have been at the */
-               /* point of collision, not the key frame time */
-               npno[0]= opno[0] + time_before*force[0];
-               npno[1]= opno[1] + time_before*force[1];
-               npno[2]= opno[2] + time_before*force[2];
-
-
-               /* Reflect the speed vector in the face */
-               x_m = (2 * npno[0] * d_nvect[0]);
-               y_m = (2 * npno[1] * d_nvect[1]);
-               z_m = (2 * npno[2] * d_nvect[2]);
-               refl_vel[0] = npno[0] - (d_nvect[0] * (x_m + y_m + z_m));
-               refl_vel[1] = npno[1] - (d_nvect[1] * (x_m + y_m + z_m));
-               refl_vel[2] = npno[2] - (d_nvect[2] * (x_m + y_m + z_m));
-
-               /*A random variation in the damping factor........ */
-               /*Get the IPO values for damping here*/
-               
-               if (has_ipo_code(deflection_object->ipo, OB_PD_SDAMP)) 
-                       damping = IPO_GetFloatValue(deflection_object->ipo, OB_PD_SDAMP, cur_time);
-               else 
-                       damping = deflection_object->pd->pdef_damp;
-               
-               if (has_ipo_code(deflection_object->ipo, OB_PD_RDAMP)) 
-                       rdamp_val = IPO_GetFloatValue(deflection_object->ipo, OB_PD_RDAMP, cur_time);
-               else 
-                       rdamp_val = deflection_object->pd->pdef_rdamp;
-
-               damping = damping + ((1.0f - damping) * rng_getFloat(rng) *rdamp_val);
-               damping = damping * damping;
-        ref_plane_mag = INPR(refl_vel,d_nvect);
-
-               if (damping > 0.999) damping = 0.999f;
-
-               /* Now add in the damping force - only damp in the direction of */
-               /* the faces normal vector */
-               npno[0] = (refl_vel[0] - (d_nvect[0] * ref_plane_mag * damping));
-               npno[1] = (refl_vel[1] - (d_nvect[1] * ref_plane_mag * damping));
-               npno[2] = (refl_vel[2] - (d_nvect[2] * ref_plane_mag * damping));
-
-               /* Now reset opno */
-               VECCOPY(opno,npno);
-               VECCOPY(forcec, force);
-
-               /* If the particle has bounced more than four times on the same */
-               /* face within this cycle (depth > 4, same face > 4 )           */
-               /* Then set the force to be only that component of the force    */
-               /* in the same direction as the face normal                     */
-               /* i.e. subtract the component of the force in the direction    */
-               /* of the face normal from the actual force                     */
-               if ((ds_object == *last_object) && (ds_face == *last_face)) {
-                       /* Increment same_face */
-                       *same_face = *same_face + 1;
-                       if ((*same_face > 3) && (def_depth > 3)) {
-               force_mag_norm = INPR(forcec, d_nvect);
-               forcec[0] = forcec[0] - (d_nvect[0] * force_mag_norm);
-                forcec[1] = forcec[1] - (d_nvect[1] * force_mag_norm);
-                forcec[2] = forcec[2] - (d_nvect[2] * force_mag_norm);
-                       }
-               }
-               else *same_face = 1;
-
-               *last_object = ds_object;
-               *last_face = ds_face;
-
-               /* We have the particles speed at the point of collision    */
-               /* Now we want the particles speed at the current key frame */
-
-               npno[0]= npno[0] + time_after*forcec[0];
-               npno[1]= npno[1] + time_after*forcec[1];
-               npno[2]= npno[2] + time_after*forcec[2];
-
-               /* Now we have to recalculate pa->co for the remainder*/
-               /* of the time since the intersect*/
-               npco[0]= npco[0] + time_after*npno[0];
-               npco[1]= npco[1] + time_after*npno[1];
-               npco[2]= npco[2] + time_after*npno[2];
-
-               /* And set the old co-ordinates back to the point just above the intersection */
-               VECCOPY(opco, d_i_co_above);
-
-               /* Finally update the time */
-               life = time_after;
-               cur_time += time_before;
-
-               /* The particle may have fallen through the face again by now!!*/
-               /* So check if the particle has changed sides of the plane compared*/
-               /* the co-ordinates at the last keyframe*/
-               /* But only do this as a last resort, if we've got to the end of the */
-               /* number of collisions allowed */
-               if (def_depth==9) {
-                       k_point3 = INPR(d_nvect,npco);
-                       if (((dk_plane > k_point3) && (dk_plane < dk_point1))||((dk_plane < k_point3) && (dk_plane > dk_point1))) {
-
-                               /* Yup, the pesky particle may have fallen through a hole!!! */
-                /* So we'll cheat a bit and move the particle along the normal vector */
-                /* until it's just the other side of the plane */
-                icalctop = (dk_plane - d_nvect[0]*npco[0] - d_nvect[1]*npco[1] - d_nvect[2]*npco[2]);
-                icalcbot = (d_nvect[0]*d_nvect[0] + d_nvect[1]*d_nvect[1] + d_nvect[2]*d_nvect[2]);
-                dist_to_plane = icalctop / icalcbot;
-
-                /*  Now just increase the distance a little to place */
-                /* the point the other side of the plane */
-                dist_to_plane *= 1.1f;
-                npco[0]= npco[0] + (dist_to_plane * d_nvect[0]);
-                npco[1]= npco[1] + (dist_to_plane * d_nvect[1]);
-                npco[2]= npco[2] + (dist_to_plane * d_nvect[2]);
-
-                       }
-               }
-       }
-       return deflected;
-}
-
-/*
-       rng= random number generator
-       ob = object that spawns the particles
-       depth = for fireworks
-       nr = index nr of current particle
-       paf = the particle system
-       part = current particle
-       force = force vector
-       deform = flag to indicate lattice deform
- */
-static void make_particle_keys(RNG *rng, Object *ob, int depth, int nr, PartEff *paf, Particle *part, float *force, int deform, MTex *mtex, ListBase *effectorbase)
-{
-       Particle *pa, *opa = NULL;
-       float damp, deltalife, life;
-       float cur_time, maxspeed= paf->maxlen/(float)paf->totkey;
-       float opco[3], opno[3], npco[3], npno[3], new_force[3], new_speed[3];
-       int b, rt1, rt2, deflected, deflection, finish_defs, def_count;
-       int last_ob, last_fc, same_fc;
-
-       damp= 1.0f-paf->damp;
-       pa= part;
-
-       /* start speed: random */
-       if(paf->randfac!=0.0) {
-               pa->no[0]+= paf->randfac*(rng_getFloat(rng) - 0.5f);
-               pa->no[1]+= paf->randfac*(rng_getFloat(rng) - 0.5f);
-               pa->no[2]+= paf->randfac*(rng_getFloat(rng) - 0.5f);
-       }
-
-       /* start speed: texture */
-       if(mtex && paf->texfac!=0.0) {
-               particle_tex(mtex, paf, pa->co, pa->no);
-       }
-
-       /* effectors here? */
-       if(effectorbase)
-               precalc_effectors(ob, paf, pa, effectorbase);
-       
-       if(paf->totkey>1) deltalife= pa->lifetime/(paf->totkey-1);
-       else deltalife= pa->lifetime;
-
-       /* longer lifetime results in longer distance covered */
-       VecMulf(pa->no, deltalife);
-       
-       opa= pa;
-       pa++;
-
-       for(b=1; b<paf->totkey; b++) {
-
-               /* new time */
-               pa->time= opa->time+deltalife;
-               cur_time = pa->time;
-
-               /* set initial variables                                */
-               VECCOPY(opco, opa->co);
-               VECCOPY(new_force, force);
-               VECCOPY(new_speed, opa->no);
-               VecMulf(new_speed, 1.0f/deltalife);
-               //new_speed[0] = new_speed[1] = new_speed[2] = 0.0f;
-
-               /* handle differences between static (local coords, fixed frame) and dynamic */
-               if(effectorbase) {
-                       float loc_time= ((float)b)/(float)(paf->totkey-1);
-                       
-                       if(paf->flag & PAF_STATIC) {
-                               float opco1[3], new_force1[3];
-                               
-                               /* move co and force to global coords */
-                               VECCOPY(opco1, opco);
-                               Mat4MulVecfl(ob->obmat, opco1);
-                               VECCOPY(new_force1, new_force);
-                               Mat4Mul3Vecfl(ob->obmat, new_force1);
-                               Mat4Mul3Vecfl(ob->obmat, new_speed);
-                               
-                               cur_time = G.scene->r.cfra;
-                               
-                               /* force fields */
-                               pdDoEffectors(effectorbase, opco1, new_force1, new_speed, cur_time, loc_time, 0);
-                               
-                               /* move co, force and newspeed back to local */
-                               VECCOPY(opco, opco1);
-                               Mat4MulVecfl(ob->imat, opco);
-                               VECCOPY(new_force, new_force1);
-                               Mat4Mul3Vecfl(ob->imat, new_force);
-                               Mat4Mul3Vecfl(ob->imat, new_speed);
-                       }
-                       else {
-                                /* force fields */
-                               pdDoEffectors(effectorbase, opco, new_force, new_speed, cur_time, loc_time, 0);
-                       }
-               }
-               
-               /* new speed */
-               pa->no[0]= deltalife * (new_speed[0] + new_force[0]);
-               pa->no[1]= deltalife * (new_speed[1] + new_force[1]);
-               pa->no[2]= deltalife * (new_speed[2] + new_force[2]);
-               
-               /* speed limitor */
-               if((paf->flag & PAF_STATIC) && maxspeed!=0.0f) {
-                       float len= VecLength(pa->no);
-                       if(len > maxspeed)
-                               VecMulf(pa->no, maxspeed/len);
-               }
-                       
-               /* new location */
-               pa->co[0]= opa->co[0] + pa->no[0];
-               pa->co[1]= opa->co[1] + pa->no[1];
-               pa->co[2]= opa->co[2] + pa->no[2];
-
-               /* Particle deflection code */
-               if((paf->flag & PAF_STATIC)==0) {
-                       deflection = 0;
-                       finish_defs = 1;
-                       def_count = 0;
-
-                       VECCOPY(opno, opa->no);
-                       VECCOPY(npco, pa->co);
-                       VECCOPY(npno, pa->no);
-
-                       life = deltalife;
-                       cur_time -= deltalife;
-
-                       last_ob = -1;
-                       last_fc = -1;
-                       same_fc = 0;
-
-                       /* First call the particle deflection check for the particle moving   */
-                       /* between the old co-ordinates and the new co-ordinates              */
-                       /* If a deflection occurs, call the code again, this time between the */
-                       /* intersection point and the updated new co-ordinates                */
-                       /* Bail out if we've done the calculation 10 times - this seems ok     */
-                       /* for most scenes I've tested */
-                       while (finish_defs) {
-                               deflected =  pdDoDeflection(rng, opco, npco, opno, npno, life, new_force,
-                                                               def_count, cur_time, ob->lay,
-                                                               &last_ob, &last_fc, &same_fc);
-                               if (deflected) {
-                                       def_count = def_count + 1;
-                                       deflection = 1;
-                                       if (def_count==10) finish_defs = 0;
-                               }
-                               else {
-                                       finish_defs = 0;
-                               }
-                       }
-
-                       /* Only update the particle positions and speed if we had a deflection */
-                       if (deflection) {
-                               pa->co[0] = npco[0];
-                               pa->co[1] = npco[1];
-                               pa->co[2] = npco[2];
-                               pa->no[0] = npno[0];
-                               pa->no[1] = npno[1];
-                               pa->no[2] = npno[2];
-                       }
-               }
-               
-               /* speed: texture */
-               if(mtex && paf->texfac!=0.0) {
-                       particle_tex(mtex, paf, pa->co, pa->no);
-               }
-               if(damp!=1.0) {
-                       pa->no[0]*= damp;
-                       pa->no[1]*= damp;
-                       pa->no[2]*= damp;
-               }
-               
-               opa= pa;
-               pa++;
-               /* opa is used later on too! */
-       }
-
-       if(deform) {
-               /* deform all keys */
-               pa= part;
-               b= paf->totkey;
-               while(b--) {
-                       calc_latt_deform(pa->co, 1.0f);
-                       pa++;
-               }
-       }
-       
-       /* the big multiplication */
-       if(depth<PAF_MAXMULT && paf->mult[depth]!=0.0) {
-               
-               /* new 'child' emerges from an average 'mult' part from 
-                       the particles */
-               damp = (float)nr;
-               rt1= (int)(damp*paf->mult[depth]);
-               rt2= (int)((damp+1.0)*paf->mult[depth]);
-               if(rt1!=rt2) {
-                       
-                       for(b=0; b<paf->child[depth]; b++) {
-                               pa= new_particle(paf);
-                               *pa= *opa;
-                               pa->lifetime= paf->life[depth];
-                               if(paf->randlife!=0.0) {
-                                       pa->lifetime*= 1.0f + paf->randlife*(rng_getFloat(rng) - 0.5f);
-                               }
-                               pa->mat_nr= paf->mat[depth];
-
-                               make_particle_keys(rng, ob, depth+1, b, paf, pa, force, deform, mtex, effectorbase);
-                       }
-               }
-       }
-}
-
-static void init_mv_jit(float *jit, int num, int seed2)
-{
-       RNG *rng;
-       float *jit2, x, rad1, rad2, rad3;
-       int i, num2;
-
-       if(num==0) return;
-
-       rad1= (float)(1.0/sqrt((float)num));
-       rad2= (float)(1.0/((float)num));
-       rad3= (float)sqrt((float)num)/((float)num);
-
-       rng = rng_new(31415926 + num + seed2);
-       x= 0;
-        num2 = 2 * num;
-       for(i=0; i<num2; i+=2) {
-       
-               jit[i]= x + rad1*(0.5f - rng_getFloat(rng));
-               jit[i+1]= i/(2.0f*num) + rad1*(0.5f - rng_getFloat(rng));
-               
-               jit[i]-= (float)floor(jit[i]);
-               jit[i+1]-= (float)floor(jit[i+1]);
-               
-               x+= rad3;
-               x -= (float)floor(x);
-       }
-
-       jit2= MEM_mallocN(12 + 2*sizeof(float)*num, "initjit");
-
-       for (i=0 ; i<4 ; i++) {
-               BLI_jitterate1(jit, jit2, num, rad1);
-               BLI_jitterate1(jit, jit2, num, rad1);
-               BLI_jitterate2(jit, jit2, num, rad2);
-       }
-       MEM_freeN(jit2);
-       rng_free(rng);
-}
-
-#define JIT_RAND       32
-
-/* for a position within a face, tot is total amount of faces */
-static void give_mesh_particle_coord(PartEff *paf, VeNoCo *noco, MFace *mface, int partnr, int subnr, float *co, float *no)
-{
-       static float *jit= NULL;
-       static float *trands= NULL;
-       static int jitlevel= 1;
-       float *v1, *v2, *v3, *v4;
-       float u, v;
-       float *n1, *n2, *n3, *n4;
-       
-       /* free signal */
-       if(paf==NULL) {
-               if(jit) MEM_freeN(jit);
-               jit= NULL;
-               if(trands) MEM_freeN(trands);
-               trands= NULL;
-               return;
-       }
-       
-       /* first time initialize jitter or trand, partnr then is total amount of particles, subnr total amount of faces */
-       if(trands==NULL && jit==NULL) {
-               RNG *rng = rng_new(31415926 + paf->seed);
-               int i, tot;
-
-               if(paf->flag & PAF_TRAND)
-                       tot= partnr;
-               else 
-                       tot= JIT_RAND;  /* arbitrary... allows JIT_RAND times more particles in a face for jittered distro */
-                       
-               trands= MEM_callocN(2+2*tot*sizeof(float), "trands");
-               for(i=0; i<tot; i++) {
-                       trands[2*i]= rng_getFloat(rng);
-                       trands[2*i+1]= rng_getFloat(rng);
-               }
-               rng_free(rng);
-
-               if((paf->flag & PAF_TRAND)==0) {
-                       jitlevel= paf->userjit;
-                       
-                       if(jitlevel == 0) {
-                               jitlevel= partnr/subnr;
-                               if(paf->flag & PAF_EDISTR) jitlevel*= 2;        /* looks better in general, not very scietific */
-                               if(jitlevel<3) jitlevel= 3;
-                               if(jitlevel>100) jitlevel= 100;
-                       }
-                       
-                       jit= MEM_callocN(2+ jitlevel*2*sizeof(float), "jit");
-                       init_mv_jit(jit, jitlevel, paf->seed);
-                       BLI_array_randomize(jit, 2*sizeof(float), jitlevel, paf->seed); /* for custom jit or even distribution */
-               }
-               return;
-       }
-       
-       if(paf->flag & PAF_TRAND) {
-               u= trands[2*partnr];
-               v= trands[2*partnr+1];
-       }
-       else {
-               /* jittered distribution gets fixed random offset */
-               if(subnr>=jitlevel) {
-                       int jitrand= (subnr/jitlevel) % JIT_RAND;
-               
-                       subnr %= jitlevel;
-                       u= jit[2*subnr] + trands[2*jitrand];
-                       v= jit[2*subnr+1] + trands[2*jitrand+1];
-                       if(u > 1.0f) u-= 1.0f;
-                       if(v > 1.0f) v-= 1.0f;
-               }
-               else {
-                       u= jit[2*subnr];
-                       v= jit[2*subnr+1];
-               }
-       }
-       
-       v1= (noco+(mface->v1))->co;
-       v2= (noco+(mface->v2))->co;
-       v3= (noco+(mface->v3))->co;
-       n1= (noco+(mface->v1))->no;
-       n2= (noco+(mface->v2))->no;
-       n3= (noco+(mface->v3))->no;
-       
-       if(mface->v4) {
-               float uv= u*v;
-               float muv= (1.0f-u)*(v);
-               float umv= (u)*(1.0f-v);
-               float mumv= (1.0f-u)*(1.0f-v);
-               
-               v4= (noco+(mface->v4))->co;
-               n4= (noco+(mface->v4))->no;
-               
-               co[0]= mumv*v1[0] + muv*v2[0] + uv*v3[0] + umv*v4[0];
-               co[1]= mumv*v1[1] + muv*v2[1] + uv*v3[1] + umv*v4[1];
-               co[2]= mumv*v1[2] + muv*v2[2] + uv*v3[2] + umv*v4[2];
-
-               no[0]= mumv*n1[0] + muv*n2[0] + uv*n3[0] + umv*n4[0];
-               no[1]= mumv*n1[1] + muv*n2[1] + uv*n3[1] + umv*n4[1];
-               no[2]= mumv*n1[2] + muv*n2[2] + uv*n3[2] + umv*n4[2];
-       }
-       else {
-               /* mirror triangle uv coordinates when on other side */
-               if(u + v > 1.0f) {
-                       u= 1.0f-u;
-                       v= 1.0f-v;
-               }
-               co[0]= v1[0] + u*(v3[0]-v1[0]) + v*(v2[0]-v1[0]);
-               co[1]= v1[1] + u*(v3[1]-v1[1]) + v*(v2[1]-v1[1]);
-               co[2]= v1[2] + u*(v3[2]-v1[2]) + v*(v2[2]-v1[2]);
-               
-               no[0]= n1[0] + u*(n3[0]-n1[0]) + v*(n2[0]-n1[0]);
-               no[1]= n1[1] + u*(n3[1]-n1[1]) + v*(n2[1]-n1[1]);
-               no[2]= n1[2] + u*(n3[2]-n1[2]) + v*(n2[2]-n1[2]);
-       }
-}
-
-
-/* Gets a MDeformVert's weight in group (0 if not in group) */
-/* note; this call could be in mesh.c or deform.c, but OK... it's in armature.c too! (ton) */
-static float vert_weight(MDeformVert *dvert, int group)
-{
-       MDeformWeight *dw;
-       int i;
-       
-       if(dvert) {
-               dw= dvert->dw;
-               for(i= dvert->totweight; i>0; i--, dw++) {
-                       if(dw->def_nr == group) return dw->weight;
-                       if(i==1) break; /*otherwise dw will point to somewhere it shouldn't*/
-               }
-       }
-       return 0.0;
-}
-
-/* Gets a faces average weight in a group, helper for below, face and weights are always set */
-static float face_weight(MFace *face, float *weights)
-{
-       float tweight;
-       
-       tweight = weights[face->v1] + weights[face->v2] + weights[face->v3];
-       
-       if(face->v4) {
-               tweight += weights[face->v4];
-               tweight /= 4.0;
-       }
-       else {
-               tweight /= 3.0;
-       }
-
-       return tweight;
-}
-
-/* helper function for build_particle_system() */
-static void make_weight_tables(PartEff *paf, Mesh *me, int totpart, VeNoCo *vertlist, int totvert, MFace *facelist, int totface, float **vweights, float **fweights)
-{
-       MFace *mface;
-       float *foweights=NULL, *voweights=NULL;
-       float totvweight=0.0f, totfweight=0.0f;
-       int a;
-       
-       if((paf->flag & PAF_FACE)==0) totface= 0;
-       
-       /* collect emitting vertices & faces if vert groups used */
-       if(paf->vertgroup && me->dvert) {
-               
-               /* allocate weights array for all vertices, also for lookup of faces later on. note it's a malloc */
-               *vweights= voweights= MEM_mallocN( totvert*sizeof(float), "pafvoweights" );
-               totvweight= 0.0f;
-               for(a=0; a<totvert; a++) {
-                       voweights[a]= vert_weight(me->dvert+a, paf->vertgroup-1);
-                       totvweight+= voweights[a];
-               }
-               
-               if(totface) {
-                       /* allocate weights array for faces, note it's a malloc */
-                       *fweights= foweights= MEM_mallocN(totface*sizeof(float), "paffoweights" );
-                       for(a=0, mface=facelist; a<totface; a++, mface++) {
-                               foweights[a] = face_weight(mface, voweights);
-                       }
-               }
-       }
-       
-       /* make weights for faces or for even area distribution */
-       if(totface && (paf->flag & PAF_EDISTR)) {
-               float maxfarea= 0.0f, curfarea;
-               
-               /* two cases for area distro, second case we already have group weights */
-               if(foweights==NULL) {
-                       /* allocate weights array for faces, note it's a malloc */
-                       *fweights= foweights= MEM_mallocN(totface*sizeof(float), "paffoweights" );
-                       
-                       for(a=0, mface=facelist; a<totface; a++, mface++) {
-                               if (mface->v4)
-                                       curfarea= AreaQ3Dfl(vertlist[mface->v1].co, vertlist[mface->v2].co, vertlist[mface->v3].co, vertlist[mface->v4].co);
-                               else
-                                       curfarea= AreaT3Dfl(vertlist[mface->v1].co,  vertlist[mface->v2].co, vertlist[mface->v3].co);
-                               if(curfarea>maxfarea)
-                                       maxfarea = curfarea;
-                               foweights[a]= curfarea;
-                       }
-               }
-               else {
-                       for(a=0, mface=facelist; a<totface; a++, mface++) {
-                               if(foweights[a]!=0.0f) {
-                                       if (mface->v4)
-                                               curfarea= AreaQ3Dfl(vertlist[mface->v1].co, vertlist[mface->v2].co, vertlist[mface->v3].co, vertlist[mface->v4].co);
-                                       else
-                                               curfarea= AreaT3Dfl(vertlist[mface->v1].co,  vertlist[mface->v2].co, vertlist[mface->v3].co);
-                                       if(curfarea>maxfarea)
-                                               maxfarea = curfarea;
-                                       foweights[a]*= curfarea;
-                               }
-                       }
-               }
-               
-               /* normalize weights for max face area, calculate tot */
-               if(maxfarea!=0.0f) {
-                       maxfarea= 1.0f/maxfarea;
-                       for(a=0; a< totface; a++) {
-                               if(foweights[a]!=0.0) {
-                                       foweights[a] *= maxfarea;
-                                       totfweight+= foweights[a];
-                               }
-                       }
-               }
-       }
-       else if(foweights) {
-               /* only add totfweight value */
-               for(a=0; a< totface; a++) {
-                       if(foweights[a]!=0.0) {
-                               totfweight+= foweights[a];
-                       }
-               }
-       }
-       
-       /* if weight arrays, we turn these arrays into the amount of particles */
-       if(totvert && voweights) {
-               float mult= (float)totpart/totvweight;
-               
-               for(a=0; a< totvert; a++) {
-                       if(voweights[a]!=0.0)
-                               voweights[a] *= mult;
-               }
-       }
-       
-       if(totface && foweights) {
-               float mult= (float)totpart/totfweight;
-               
-               for(a=0; a< totface; a++) {
-                       if(foweights[a]!=0.0)
-                               foweights[a] *= mult;
-               }
-       }
-}
-
-/* helper function for build_particle_system() */
-static void make_length_tables(PartEff *paf, Mesh *me, int totvert, MFace *facelist, int totface, float **vlengths, float **flengths)
-{
-       MFace *mface;
-       float *folengths=NULL, *volengths=NULL;
-       int a;
-       
-       if((paf->flag & PAF_FACE)==0) totface= 0;
-       
-       /* collect emitting vertices & faces if vert groups used */
-       if(paf->vertgroup_v && me->dvert) {
-               
-               /* allocate lengths array for all vertices, also for lookup of faces later on. note it's a malloc */
-               *vlengths= volengths= MEM_mallocN( totvert*sizeof(float), "pafvolengths" );
-               for(a=0; a<totvert; a++) {
-                       volengths[a]= vert_weight(me->dvert+a, paf->vertgroup_v-1);
-               }
-               
-               if(totface) {
-                       /* allocate lengths array for faces, note it's a malloc */
-                       *flengths= folengths= MEM_mallocN(totface*sizeof(float), "paffolengths" );
-                       for(a=0, mface=facelist; a<totface; a++, mface++) {
-                               folengths[a] = face_weight(mface, volengths);
-                       }
-               }
-       }
-}
-
 
 /* for paf start to end, store all matrices for objects */
 typedef struct pMatrixCache {
@@ -1538,572 +432,7 @@ typedef struct pMatrixCache {
        float imat[3][3];
 } pMatrixCache;
 
-
-/* WARN: this function stores data in ob->id.idnew! */
-/* error: this function changes ob->recalc of other objects... */
-static pMatrixCache *cache_object_matrices(Object *ob, int start, int end)
-{
-       pMatrixCache *mcache, *mc;
-       Group *group= NULL;
-       Object *obcopy;
-       Base *base;
-       float framelenold, cfrao, sfo;
-       
-       /* object can be linked in group... stupid exception */
-       if(NULL==object_in_scene(ob, G.scene))
-               group= find_group(ob, NULL); /* TODO - dont just use the first group! - Campbell */
-       
-       mcache= mc= MEM_mallocN( (end-start+1)*sizeof(pMatrixCache), "ob matrix cache");
-       
-       framelenold= G.scene->r.framelen;
-       G.scene->r.framelen= 1.0f;
-       cfrao= G.scene->r.cfra;
-       sfo= ob->sf; /* warning, dont use sfo, value should be from give_timeoffset if used for anything */
-       ob->sf= 0.0f;
-
-       /* clear storage, copy recalc tag (bad loop) */
-       for(obcopy= G.main->object.first; obcopy; obcopy= obcopy->id.next) {
-               obcopy->id.newid= NULL;
-               obcopy->recalco= obcopy->recalc;
-               obcopy->recalc= 0;
-       }
-       
-       /* all objects get tagged recalc that influence this object (does group too) */
-       /* note that recalco has the real recalc tags, set by callers of this function */
-       ob->recalc |= OB_RECALC_OB; /* make sure a recalc gets flushed */
-       DAG_object_update_flags(G.scene, ob, -1);
-       
-       for(G.scene->r.cfra= start; G.scene->r.cfra<=end; G.scene->r.cfra++, mc++) {
-               
-               if(group) {
-                       GroupObject *go;
-
-                       for(go= group->gobject.first; go; go= go->next) {
-                               if(go->ob->recalc) {
-                                       where_is_object(go->ob);
-                                       
-                                       do_ob_key(go->ob);
-                                       if(go->ob->type==OB_ARMATURE) {
-                                               do_all_pose_actions(go->ob);    // only does this object actions
-                                               where_is_pose(go->ob);
-                                       }
-                               }
-                       }
-               }
-               else {
-                       for(base= G.scene->base.first; base; base= base->next) {
-                               if(base->object->recalc) {
-                                       if(base->object->id.newid==NULL)
-                                               base->object->id.newid= MEM_dupallocN(base->object);
-                                       
-                                       where_is_object(base->object);
-                                       
-                                       do_ob_key(base->object);
-                                       if(base->object->type==OB_ARMATURE) {
-                                               do_all_pose_actions(base->object);      // only does this object actions
-                                               where_is_pose(base->object);
-                                       }
-                               }
-                       }
-               }               
-               Mat4CpyMat4(mc->obmat, ob->obmat);
-               Mat4Invert(ob->imat, ob->obmat);
-               Mat3CpyMat4(mc->imat, ob->imat);
-               Mat3Transp(mc->imat);
-       }
-       
-       /* restore */
-       G.scene->r.cfra= cfrao;
-       G.scene->r.framelen= framelenold;
-       ob->sf= sfo;
-       
-       if(group) {
-               GroupObject *go;
-               
-               for(go= group->gobject.first; go; go= go->next) {
-                       if(go->ob->recalc) {
-                               where_is_object(go->ob);
-                               
-                               do_ob_key(go->ob);
-                               if(go->ob->type==OB_ARMATURE) {
-                                       do_all_pose_actions(go->ob);    // only does this object actions
-                                       where_is_pose(go->ob);
-                               }
-                       }
-               }
-       }
-       else {
-               for(base= G.scene->base.first; base; base= base->next) {
-                       if(base->object->recalc) {
-                               
-                               if(base->object->id.newid) {
-                                       obcopy= (Object *)base->object->id.newid;
-                                       *(base->object) = *(obcopy); 
-                                       MEM_freeN(obcopy);
-                                       base->object->id.newid= NULL;
-                               }
-                               
-                               do_ob_key(base->object);
-                               if(base->object->type==OB_ARMATURE) {
-                                       do_all_pose_actions(base->object);      // only does this object actions
-                                       where_is_pose(base->object);
-                               }
-                       }
-               }
-       }
-       
-       /* copy recalc tag (bad loop) */
-       for(obcopy= G.main->object.first; obcopy; obcopy= obcopy->id.next)
-               obcopy->recalc= obcopy->recalco;
-       
-       return mcache;
-}
-
 /* for fluidsim win32 debug messages */
 #if defined(WIN32) && (!(defined snprintf))
 #define snprintf _snprintf
 #endif
-
-/* main particle building function 
-   one day particles should become dynamic (realtime) with the current method as a 'bake' (ton) */
-void build_particle_system(Object *ob)
-{
-       RNG *rng;
-       PartEff *paf;
-       Particle *pa;
-       Mesh *me;
-       Base *base;
-       MTex *mtexmove=0, *mtextime=0;
-       Material *ma;
-       MFace *facelist= NULL;
-       pMatrixCache *mcache=NULL, *mcnow, *mcprev;
-       ListBase *effectorbase;
-       VeNoCo *vertexcosnos;
-       double startseconds= PIL_check_seconds_timer();
-       float ftime, dtime, force[3], vec[3], fac, co[3], no[3];
-       float *voweights= NULL, *foweights= NULL, maxw=1.0f;
-       float *volengths= NULL, *folengths= NULL;
-       int deform=0, a, totpart, paf_sta, paf_end;
-       int waitcursor_set= 0, totvert, totface, curface, curvert;
-#ifndef DISABLE_ELBEEM
-       int readMask, activeParts, fileParts;
-#endif
-       
-       /* return conditions */
-       if(ob->type!=OB_MESH) return;
-       me= ob->data;
-
-       paf= give_parteff(ob);
-       if(paf==NULL) return;
-       
-       if(G.rendering==0 && paf->disp==0) return;
-       
-       if(paf->keys) MEM_freeN(paf->keys);     /* free as early as possible, for returns */
-       paf->keys= NULL;
-       
-       //printf("build particles\n");
-       
-       /* fluid sim particle import handling, actual loading of particles from file */
-       #ifndef DISABLE_ELBEEM
-       if( (1) && (ob->fluidsimFlag & OB_FLUIDSIM_ENABLE) &&  // broken, disabled for now!
-           (ob->fluidsimSettings) && 
-                 (ob->fluidsimSettings->type == OB_FLUIDSIM_PARTICLE)) {
-               char *suffix  = "fluidsurface_particles_####";
-               char *suffix2 = ".gz";
-               char filename[256];
-               char debugStrBuffer[256];
-               int  curFrame = G.scene->r.cfra -1; // warning - sync with derived mesh fsmesh loading
-               int  j, numFileParts;
-               gzFile gzf;
-               float vel[3];
-
-               if(ob==G.obedit) { // off...
-                       paf->totpart = 0; // 1 or 0?
-                       return;
-               }
-
-               // ok, start loading
-               strcpy(filename, ob->fluidsimSettings->surfdataPath);
-               strcat(filename, suffix);
-               BLI_convertstringcode(filename, G.sce, curFrame); // fixed #frame-no 
-               strcat(filename, suffix2);
-
-               gzf = gzopen(filename, "rb");
-               if (!gzf) {
-                       snprintf(debugStrBuffer,256,"readFsPartData::error - Unable to open file for reading '%s' \n", filename); 
-                       //elbeemDebugOut(debugStrBuffer);
-                       paf->totpart = 0;
-                       return;
-               }
-
-               gzread(gzf, &totpart, sizeof(totpart));
-               numFileParts = totpart;
-               totpart = (G.rendering)?totpart:(paf->disp*totpart)/100;
-               paf->totpart= totpart;
-               paf->totkey= 1;
-               /* initialize particles */
-               new_particle(paf); 
-               ftime = 0.0; // unused...
-
-               // set up reading mask
-               readMask = ob->fluidsimSettings->typeFlags;
-               activeParts=0;
-               fileParts=0;
-               
-               for(a=0; a<totpart; a++) {
-                       int ptype=0;
-                       short shsize=0;
-                       float convertSize=0.0;
-                       gzread(gzf, &ptype, sizeof( ptype )); 
-                       if(ptype&readMask) {
-                               activeParts++;
-                               pa= new_particle(paf);
-                               pa->time= ftime;
-                               pa->lifetime= ftime + 10000.; // add large number to make sure they are displayed, G.scene->r.efra +1.0;
-                               pa->co[0] = 0.0;
-                               pa->co[1] = 
-                               pa->co[2] = 1.0*(float)a / (float)totpart;
-                               pa->no[0] = pa->no[1] = pa->no[2] = 0.0;
-                               pa->mat_nr= paf->omat;
-                               gzread(gzf, &convertSize, sizeof( float )); 
-                               // convert range of  1.0-10.0 to shorts 1000-10000)
-                               shsize = (short)(convertSize*1000.0);
-                               pa->rt = shsize;
-
-                               for(j=0; j<3; j++) {
-                                       float wrf;
-                                       gzread(gzf, &wrf, sizeof( wrf )); 
-                                       pa->co[j] = wrf;
-                                       //fprintf(stderr,"Rj%d ",j);
-                               }
-                               for(j=0; j<3; j++) {
-                                       float wrf;
-                                       gzread(gzf, &wrf, sizeof( wrf )); 
-                                       vel[j] = wrf;
-                               }
-                               //if(a<25) fprintf(stderr,"FSPARTICLE debug set %s , a%d = %f,%f,%f , life=%f \n", filename, a, pa->co[0],pa->co[1],pa->co[2], pa->lifetime );
-                       } else {
-                               // skip...
-                               for(j=0; j<2*3+1; j++) {
-                                       float wrf; gzread(gzf, &wrf, sizeof( wrf )); 
-                               }
-                       }
-                       fileParts++;
-               }
-               gzclose( gzf );
-
-               totpart = paf->totpart = activeParts;
-               snprintf(debugStrBuffer,256,"readFsPartData::done - particles:%d, active:%d, file:%d, mask:%d  \n", paf->totpart,activeParts,fileParts,readMask);
-               elbeemDebugOut(debugStrBuffer);
-               return;
-       } // fluid sim particles done
-       #endif // DISABLE_ELBEEM
-       
-       if(paf->end < paf->sta) return;
-       
-       if( (paf->flag & PAF_OFACE) && (paf->flag & PAF_FACE)==0) return;
-       
-       if(me->totvert==0) return;
-       
-       if(ob==G.obedit) return;
-       totpart= (G.rendering)?paf->totpart:(paf->disp*paf->totpart)/100;
-       if(totpart==0) return;
-       
-       /* No returns after this line! */
-       
-       /* material */
-       ma= give_current_material(ob, paf->omat);
-       if(ma) {
-               if(paf->speedtex)
-                       mtexmove= ma->mtex[paf->speedtex-1];
-               mtextime= ma->mtex[paf->timetex-1];
-       }
-
-       disable_speed_curve(1); /* check this... */
-
-       /* initialize particles */
-       new_particle(paf);
-
-       /* reset deflector cache, sumohandle is free, but its still sorta abuse... (ton) */
-       for(base= G.scene->base.first; base; base= base->next)
-               base->object->sumohandle= NULL;
-
-       /* all object positions from start to end */
-       paf_sta= (int)floor(paf->sta);
-       paf_end= (int)ceil(paf->end);
-       if((paf->flag & PAF_STATIC)==0)
-               mcache= cache_object_matrices(ob, paf_sta, paf_end);
-       
-       /* mult generations? */
-       for(a=0; a<PAF_MAXMULT; a++) {
-               if(paf->mult[a]!=0.0) {
-                       /* interesting formula! this way after 'x' generations the total is paf->totpart */
-                       totpart= (int)(totpart / (1.0+paf->mult[a]*paf->child[a]));
-               }
-               else break;
-       }
-
-       /* for static particles, calculate system on current frame (? ton) */
-       if(ma) do_mat_ipo(ma);
-       
-       /* matrix invert for static too */
-       Mat4Invert(ob->imat, ob->obmat);
-       Mat4CpyMat4(paf->imat, ob->imat);       /* used for duplicators */
-       
-       /* new random generator */
-       rng = rng_new(paf->seed);
-       
-       /* otherwise it goes way too fast */
-       force[0]= paf->force[0]*0.05f;
-       force[1]= paf->force[1]*0.05f;
-       force[2]= paf->force[2]*0.05f;
-       
-       if( paf->flag & PAF_STATIC ) deform= 0;
-       else {
-               Object *parlatt= modifiers_isDeformedByLattice(ob);
-               if(parlatt) {
-                       deform= 1;
-                       init_latt_deform(parlatt, 0);
-               }
-       }
-       
-       /* get the effectors */
-       effectorbase= pdInitEffectors(ob, paf->group);
-       
-       /* init geometry, return is 6 x float * me->totvert in size */
-       vertexcosnos= (VeNoCo *)mesh_get_mapped_verts_nors(ob);
-       facelist= me->mface;
-       totvert= me->totvert;
-       totface= me->totface;
-       
-       /* if vertexweights or even distribution, it makes weight tables, also checks where it emits from */
-       make_weight_tables(paf, me, totpart, vertexcosnos, totvert, facelist, totface, &voweights, &foweights);
-       
-       /* vertexweights can define lengths too */
-       make_length_tables(paf, me, totvert, facelist, totface, &volengths, &folengths);
-       
-       /* now define where to emit from, if there are face weights we skip vertices */
-       if(paf->flag & PAF_OFACE) totvert= 0;
-       if((paf->flag & PAF_FACE)==0) totface= 0;
-       if(foweights) totvert= 0;
-       
-       /* initialize give_mesh_particle_coord */
-       if(totface)
-               give_mesh_particle_coord(paf, vertexcosnos, facelist, totpart, totface, NULL, NULL);
-       
-       /* correction for face timing when using weighted average */
-       if(totface && foweights) {
-               maxw= (paf->end-paf->sta)/foweights[0];
-       }
-       else if(totvert && voweights) {
-               maxw= (paf->end-paf->sta)/voweights[0];
-       }
-       
-       /* for loop below */
-       if (paf->flag & PAF_STATIC) {
-               ftime = G.scene->r.cfra;
-               dtime= 0.0f;
-       } else {
-               ftime= paf->sta;
-               dtime= (paf->end - paf->sta)/(float)totpart;
-       }
-       
-       curface= curvert= 0;
-       for(a=0; a<totpart; a++, ftime+=dtime) {
-               
-               /* we set waitcursor only when a half second expired, particles now are realtime updated */
-               if(waitcursor_set==0 && (a % 256)==255) {
-                       double seconds= PIL_check_seconds_timer();
-                       if(seconds - startseconds > 0.5) {
-                               waitcursor(1);
-                               waitcursor_set= 1;
-                       }
-               }
-               
-               pa= new_particle(paf);
-               pa->time= ftime;
-
-               /* get coordinates from faces, only when vertices set to zero */
-               if(totvert==0 && totface) {
-                       int curjit;
-                       
-                       /* use weight table, we have to do faces in order to be able to use jitter table... */
-                       if(foweights) {
-                               
-                               if(foweights[curface] < 1.0f) {
-                                       float remainder= 0.0f;
-                                       
-                                       while(remainder + foweights[curface] < 1.0f && curface<totface-1) {
-                                               remainder += foweights[curface];
-                                               curface++;
-                                       }
-                                       /* if this is the last face, the foweights[] can be zero, so we don't add a particle extra */
-                                       if(curface!=totface-1)
-                                               foweights[curface] += remainder;
-                                       
-                                       maxw= (paf->end-paf->sta)/foweights[curface];
-                               }
-
-                               if(foweights[curface]==0.0f)
-                                       break;  /* WARN skips here out of particle generating */
-                               else {
-                                       if(foweights[curface] >= 1.0f)          /* note the >= here, this because of the < 1.0f above, it otherwise will stick to 1 face forever */
-                                               foweights[curface] -= 1.0f;
-                                       
-                                       curjit= (int) foweights[curface];
-                                       give_mesh_particle_coord(paf, vertexcosnos, facelist+curface, a, curjit, co, no);
-                                       
-                                       /* time correction to make particles appear evenly, maxw does interframe (0-1) */
-                                       pa->time= paf->sta + maxw*foweights[curface];
-                               }
-                       }
-                       else {
-                               curface= a % totface;
-                               curjit= a/totface;
-                               give_mesh_particle_coord(paf, vertexcosnos, facelist+curface, a, curjit, co, no);
-                       }
-               }
-               /* get coordinates from vertices */
-               if(totvert) {
-                       /* use weight table */
-                       if(voweights) {
-                               
-                               if(voweights[curvert] < 1.0f) {
-                                       float remainder= 0.0f;
-                                       
-                                       while(remainder + voweights[curvert] < 1.0f && curvert<totvert-1) {
-                                               remainder += voweights[curvert];
-                                               curvert++;
-                                       }
-                                       voweights[curvert] += remainder;
-                                       maxw= (paf->end-paf->sta)/voweights[curvert];
-                               }
-                               
-                               if(voweights[curvert]==0.0f)
-                                       break;  /* WARN skips here out of particle generating */
-                               else {
-                                       if(voweights[curvert] > 1.0f)
-                                               voweights[curvert] -= 1.0f;
-                                       
-                                       /* time correction to make particles appear evenly */
-                                       pa->time= paf->sta + maxw*voweights[curvert];
-                               }
-                       }
-                       else {
-                               curvert= a % totvert;
-                               if(a >= totvert && totface)
-                                       totvert= 0;
-                       }
-                       
-                       VECCOPY(co, vertexcosnos[curvert].co);
-                       VECCOPY(no, vertexcosnos[curvert].no);
-               }
-               
-               VECCOPY(pa->co, co);
-               
-               /* dynamic options */
-               if((paf->flag & PAF_STATIC)==0) {
-                       int cur;
-                       
-                       /* particle retiming with texture */
-                       if(mtextime && (paf->flag2 & PAF_TEXTIME)) {
-                               float tin, tr, tg, tb, ta, orco[3];
-                               
-                               /* calculate normalized orco */
-                               orco[0] = (co[0]-me->loc[0])/me->size[0];
-                               orco[1] = (co[1]-me->loc[1])/me->size[1];
-                               orco[2] = (co[2]-me->loc[2])/me->size[2];
-                               externtex(mtextime, orco, &tin, &tr, &tg, &tb, &ta);
-                               
-                               if(paf->flag2neg & PAF_TEXTIME)
-                                       pa->time = paf->sta + (paf->end - paf->sta)*tin;
-                               else
-                                       pa->time = paf->sta + (paf->end - paf->sta)*(1.0f-tin);
-                       }
-
-                       /* set ob at correct time, we use cached matrices */
-                       cur= (int)floor(pa->time) + 1 ;         /* + 1 has a reason: (obmat/prevobmat) otherwise comet-tails start too late */
-                       
-                       if(cur <= paf_end) mcnow= mcache + cur - paf_sta;
-                       else mcnow= mcache + paf_end - paf_sta;
-                       
-                       if(cur > paf_sta) mcprev= mcnow-1;
-                       else mcprev= mcache;
-                       
-                       /* move to global space */
-                       Mat4MulVecfl(mcnow->obmat, pa->co);
-               
-                       VECCOPY(vec, co);
-                       Mat4MulVecfl(mcprev->obmat, vec);
-                       
-                       /* first start speed: object */
-                       VECSUB(pa->no, pa->co, vec);
-
-                       VecMulf(pa->no, paf->obfac);
-                       
-                       /* calculate the correct inter-frame */ 
-                       fac= (pa->time- (float)floor(pa->time));
-                       pa->co[0]= fac*pa->co[0] + (1.0f-fac)*vec[0];
-                       pa->co[1]= fac*pa->co[1] + (1.0f-fac)*vec[1];
-                       pa->co[2]= fac*pa->co[2] + (1.0f-fac)*vec[2];
-
-                       /* start speed: normal */
-                       if(paf->normfac!=0.0) {
-                               /* imat is transpose ! */
-                               VECCOPY(vec, no);
-                               Mat3MulVecfl(mcnow->imat, vec);
-                       
-                               Normalize(vec);
-                               VecMulf(vec, paf->normfac);
-                               VECADD(pa->no, pa->no, vec);
-                       }
-               }
-               else {
-                       if(paf->normfac!=0.0) {
-                               VECCOPY(pa->no, no);
-                               Normalize(pa->no);
-                               VecMulf(pa->no, paf->normfac);
-                       }
-               }
-               
-               pa->lifetime= paf->lifetime;
-               if(paf->randlife!=0.0) {
-                       pa->lifetime*= 1.0f + paf->randlife*(rng_getFloat(rng) - 0.5f);
-               }
-               pa->mat_nr= paf->omat;
-               
-               if(folengths)
-                       pa->lifetime*= folengths[curface];
-
-               make_particle_keys(rng, ob, 0, a, paf, pa, force, deform, mtexmove, effectorbase);
-       }
-       
-       /* free stuff */
-       give_mesh_particle_coord(NULL, NULL, NULL, 0, 0, NULL, NULL);
-       MEM_freeN(vertexcosnos);
-       if(voweights) MEM_freeN(voweights);
-       if(foweights) MEM_freeN(foweights);
-       if(volengths) MEM_freeN(volengths);
-       if(folengths) MEM_freeN(folengths);
-       if(mcache) MEM_freeN(mcache);
-       rng_free(rng);
-
-       if(deform) end_latt_deform();
-       
-       if(effectorbase)
-               pdEndEffectors(effectorbase);   
-       
-       /* reset deflector cache */
-       for(base= G.scene->base.first; base; base= base->next) {
-               if(base->object->sumohandle) {
-                       
-                       MEM_freeN(base->object->sumohandle);
-                       base->object->sumohandle= NULL;
-               }
-       }
-
-       disable_speed_curve(0);
-       
-       if(waitcursor_set) waitcursor(0);
-}
-
index 4b4704d8ba8ce560ef2d0fea0d031c13c93b06e1..09c939629903d40cdb44036c229910dd346cfe41 100644 (file)
@@ -179,7 +179,7 @@ only a single input character is consumed.
 
 */
 
-int utf8towchar_(wchar_t *w, char *c)
+int utf8towchar(wchar_t *w, char *c)
 {
        int len=0;
 
@@ -661,7 +661,7 @@ struct chartrans *text_to_curve(Object *ob, int mode)
        utf8len = utf8slen(cu->str);
        tmp = mem = MEM_callocN(((utf8len + 1) * sizeof(wchar_t)), "convertedmem");
        
-       utf8towchar_(mem, cu->str);
+       utf8towchar(mem, cu->str);
 
        // Count the wchar_t string length
        slen = wcslen(mem);
index 706bdf1245cc41c92f29722cfe5312ebe98ae101..2ffe8590b59b232dcb914a6be0fbafdb60b0b93d 100644 (file)
@@ -41,6 +41,7 @@
 #include "DNA_object_types.h"
 #include "DNA_nla_types.h"
 #include "DNA_scene_types.h"
+#include "DNA_particle_types.h"
 
 #include "BLI_blenlib.h"
 
@@ -77,14 +78,27 @@ void unlink_group(Group *group)
 {
        Material *ma;
        Object *ob;
+       Scene *sce;
+       SceneRenderLayer *srl;
+       ParticleSystem *psys;
        
        for(ma= G.main->mat.first; ma; ma= ma->id.next) {
                if(ma->group==group)
                        ma->group= NULL;
        }
+       for(ma= G.main->mat.first; ma; ma= ma->id.next) {
+               if(ma->group==group)
+                       ma->group= NULL;
+       }
+       for (sce= G.main->scene.first; sce; sce= sce->id.next) {
+               for(srl= sce->r.layers.first; srl; srl= srl->next) {
+                       if (srl->light_override==group)
+                               srl->light_override= NULL;
+               }
+       }
+       
        for(ob= G.main->object.first; ob; ob= ob->id.next) {
                bActionStrip *strip;
-               PartEff *paf;
                
                if(ob->dup_group==group) {
                        ob->dup_group= NULL;
@@ -95,11 +109,12 @@ void unlink_group(Group *group)
                                        strip->object= NULL;
                        }
                }
-               for(paf= ob->effect.first; paf; paf= paf->next) {
-                       if(paf->type==EFF_PARTICLE) {
-                               if(paf->group)
-                                       paf->group= NULL;
-                       }
+               
+               for(psys=ob->particlesystem.first; psys; psys=psys->next){
+                       if(psys->part->dup_group==group)
+                               psys->part->dup_group= NULL;
+                       if(psys->part->eff_group==group)
+                               psys->part->eff_group= NULL;
                }
        }
        group->id.us= 0;
index 3f885017f95a550c39677957df41c56c1d0b6c44..8a982b15df7c6a80682dc08946b786a07802a1d2 100644 (file)
@@ -246,7 +246,6 @@ static void image_free_buffers(Image *ima)
 /* called by library too, do not free ima itself */
 void free_image(Image *ima)
 {
-
        image_free_buffers(ima);
        if (ima->packedfile) {
                freePackedFile(ima->packedfile);
@@ -257,7 +256,6 @@ void free_image(Image *ima)
        if (ima->preview) {
                BKE_previewimg_free(&ima->preview);
        }
-       
 }
 
 /* only image block itself */
@@ -283,15 +281,19 @@ static Image *image_alloc(const char *name, short source, short type)
 /* get the ibuf from an image cache, local use here only */
 static ImBuf *image_get_ibuf(Image *ima, int index, int frame)
 {
+       /* this function is intended to be thread safe. with IMA_NO_INDEX this
+        * should be OK, but when iterating over the list this is more tricky
+        * */
        if(index==IMA_NO_INDEX)
                return ima->ibufs.first;
        else {
                ImBuf *ibuf;
-               
+
                index= IMA_MAKE_INDEX(frame, index);
                for(ibuf= ima->ibufs.first; ibuf; ibuf= ibuf->next)
                        if(ibuf->index==index)
                                return ibuf;
+
                return NULL;
        }
 }
@@ -319,19 +321,16 @@ static void image_assign_ibuf(Image *ima, ImBuf *ibuf, int index, int frame)
                for(link= ima->ibufs.first; link; link= link->next)
                        if(link->index>=index)
                                break;
-               /* now we don't want copies? */
-               if(link && ibuf->index==link->index) {
-                       ImBuf *prev= ibuf->prev;
-                       image_remove_ibuf(ima, link);
-                       link= prev;
-               }
-               
+
+               ibuf->index= index;
+
                /* this function accepts link==NULL */
                BLI_insertlinkbefore(&ima->ibufs, link, ibuf);
-               
-               ibuf->index= index;
+
+               /* now we don't want copies? */
+               if(link && ibuf->index==link->index)
+                       image_remove_ibuf(ima, link);
        }
-       
 }
 
 /* checks if image was already loaded, then returns same image */
@@ -1498,12 +1497,12 @@ static ImBuf *image_load_sequence_file(Image *ima, ImageUser *iuser, int frame)
                        ibuf= NULL;
                }
                else {
-                       image_assign_ibuf(ima, ibuf, 0, frame);
                        image_initialize_after_load(ima, ibuf);
+                       image_assign_ibuf(ima, ibuf, 0, frame);
                }
 #else
-               image_assign_ibuf(ima, ibuf, 0, frame);
                image_initialize_after_load(ima, ibuf);
+               image_assign_ibuf(ima, ibuf, 0, frame);
 #endif
        }
        else
@@ -1539,8 +1538,9 @@ static ImBuf *image_load_sequence_multilayer(Image *ima, ImageUser *iuser, int f
                        // if(oldrr) printf("freed previous result %p\n", oldrr);
                        if(oldrr) RE_FreeRenderResult(oldrr);
                }
-               else
+               else {
                        ima->rr= oldrr;
+               }
 
        }
        if(ima->rr) {
@@ -1555,8 +1555,8 @@ static ImBuf *image_load_sequence_multilayer(Image *ima, ImageUser *iuser, int f
                        ibuf->mall= IB_rectfloat;
                        ibuf->channels= rpass->channels;
                        
-                       image_assign_ibuf(ima, ibuf, iuser->multi_index, frame);
                        image_initialize_after_load(ima, ibuf);
+                       image_assign_ibuf(ima, ibuf, iuser->multi_index, frame);
                        
                }
                // else printf("pass not found\n");
@@ -1602,8 +1602,8 @@ static ImBuf *image_load_movie_file(Image *ima, ImageUser *iuser, int frame)
                ibuf = IMB_anim_absolute(ima->anim, fra);
                
                if(ibuf) {
-                       image_assign_ibuf(ima, ibuf, 0, frame);
                        image_initialize_after_load(ima, ibuf);
+                       image_assign_ibuf(ima, ibuf, 0, frame);
                }
                else
                        ima->ok= 0;
@@ -1622,6 +1622,7 @@ static ImBuf *image_load_image_file(Image *ima, ImageUser *iuser, int cfra)
 {
        struct ImBuf *ibuf;
        char str[FILE_MAX];
+       int assign = 0;
        
        /* always ensure clean ima */
        image_free_buffers(ima);
@@ -1652,8 +1653,8 @@ static ImBuf *image_load_image_file(Image *ima, ImageUser *iuser, int cfra)
                        ibuf= NULL;
                }
                else {
-                       image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0);
                        image_initialize_after_load(ima, ibuf);
+                       assign= 1;
 
                        /* check if the image is a font image... */
                        detectBitmapFont(ibuf);
@@ -1669,6 +1670,9 @@ static ImBuf *image_load_image_file(Image *ima, ImageUser *iuser, int cfra)
        else
                ima->ok= 0;
        
+       if(assign)
+               image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0);
+
        if(iuser)
                iuser->ok= ima->ok;
        
@@ -1692,12 +1696,13 @@ static ImBuf *image_get_ibuf_multilayer(Image *ima, ImageUser *iuser)
                if(rpass) {
                        ibuf= IMB_allocImBuf(ima->rr->rectx, ima->rr->recty, 32, 0, 0);
                        
-                       image_assign_ibuf(ima, ibuf, iuser?iuser->multi_index:IMA_NO_INDEX, 0);
                        image_initialize_after_load(ima, ibuf);
                        
                        ibuf->rect_float= rpass->rect;
                        ibuf->flags |= IB_rectfloat;
                        ibuf->channels= rpass->channels;
+
+                       image_assign_ibuf(ima, ibuf, iuser?iuser->multi_index:IMA_NO_INDEX, 0);
                }
        }
        
@@ -1776,118 +1781,171 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser)
        return NULL;
 }
 
-/* Checks optional ImageUser and verifies/creates ImBuf. */
-/* returns ibuf */
-ImBuf *BKE_image_get_ibuf(Image *ima, ImageUser *iuser)
+static ImBuf *image_get_ibuf_threadsafe(Image *ima, ImageUser *iuser, int *frame_r, int *index_r)
 {
-       ImBuf *ibuf= NULL;
-       float color[] = {0, 0, 0, 1};
+       ImBuf *ibuf = NULL;
+       int frame = 0, index = 0;
 
-       /* quick reject tests */
-       if(ima==NULL) 
-               return NULL;
-       if(iuser) {
-               if(iuser->ok==0)
-                       return NULL;
-       }
-       else if(ima->ok==0)
-               return NULL;
-       
-       BLI_lock_thread(LOCK_IMAGE);
-       
-       /* handle image source and types */
+       /* see if we already have an appropriate ibuf, with image source and type */
        if(ima->source==IMA_SRC_MOVIE) {
-               /* source is from single file, use flipbook to store ibuf */
-               int frame= iuser?iuser->framenr:ima->lastframe;
-               
+               frame= iuser?iuser->framenr:ima->lastframe;
                ibuf= image_get_ibuf(ima, 0, frame);
-               if(ibuf==NULL)
-                       ibuf= image_load_movie_file(ima, iuser, frame);
        }
        else if(ima->source==IMA_SRC_SEQUENCE) {
-               
                if(ima->type==IMA_TYPE_IMAGE) {
-                       /* regular files, ibufs in flipbook, allows saving */
-                       int frame= iuser?iuser->framenr:ima->lastframe;
-                       
+                       frame= iuser?iuser->framenr:ima->lastframe;
                        ibuf= image_get_ibuf(ima, 0, frame);
-                       if(ibuf==NULL)
-                               ibuf= image_load_sequence_file(ima, iuser, frame);
-                       else
-                               BLI_strncpy(ima->name, ibuf->name, sizeof(ima->name));
                }
-               /* no else; on load the ima type can change */
-               if(ima->type==IMA_TYPE_MULTILAYER) {
-                       /* only 1 layer/pass stored in imbufs, no exrhandle anim storage, no saving */
-                       int frame= iuser?iuser->framenr:ima->lastframe;
-                       int index= iuser?iuser->multi_index:IMA_NO_INDEX;
-                       
+               else if(ima->type==IMA_TYPE_MULTILAYER) {
+                       frame= iuser?iuser->framenr:ima->lastframe;
+                       index= iuser?iuser->multi_index:IMA_NO_INDEX;
                        ibuf= image_get_ibuf(ima, index, frame);
-                       if(G.rt) printf("seq multi fra %d id %d ibuf %p %s\n", frame, index, ibuf, ima->id.name);
-                       if(ibuf==NULL)
-                               ibuf= image_load_sequence_multilayer(ima, iuser, frame);
-                       else
-                               BLI_strncpy(ima->name, ibuf->name, sizeof(ima->name));
                }
-
        }
        else if(ima->source==IMA_SRC_FILE) {
-               
-               if(ima->type==IMA_TYPE_IMAGE) {
+               if(ima->type==IMA_TYPE_IMAGE)
                        ibuf= image_get_ibuf(ima, IMA_NO_INDEX, 0);
-                       if(ibuf==NULL)
-                               ibuf= image_load_image_file(ima, iuser, G.scene->r.cfra);       /* cfra only for '#', this global is OK */
-               }
-               /* no else; on load the ima type can change */
-               if(ima->type==IMA_TYPE_MULTILAYER) {
-                       /* keeps render result, stores ibufs in listbase, allows saving */
+               else if(ima->type==IMA_TYPE_MULTILAYER)
                        ibuf= image_get_ibuf(ima, iuser?iuser->multi_index:IMA_NO_INDEX, 0);
-                       if(ibuf==NULL)
-                               ibuf= image_get_ibuf_multilayer(ima, iuser);
-               }
-                       
        }
        else if(ima->source == IMA_SRC_GENERATED) {
-               /* generated is: ibuf is allocated dynamically */
                ibuf= image_get_ibuf(ima, IMA_NO_INDEX, 0);
-               
-               if(ibuf==NULL) {
-                       if(ima->type==IMA_TYPE_VERSE) {
-                               /* todo */
-                       }
-                       else { /* always fall back to IMA_TYPE_UV_TEST */
-                               /* UV testgrid or black or solid etc */
-                               if(ima->gen_x==0) ima->gen_x= 256;
-                               if(ima->gen_y==0) ima->gen_y= 256;
-                               ibuf= add_ibuf_size(ima->gen_x, ima->gen_y, ima->name, 0, ima->gen_type, color);
-                               image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0);
-                               ima->ok= IMA_OK_LOADED;
-                       }
-               }
        }
        else if(ima->source == IMA_SRC_VIEWER) {
                if(ima->type==IMA_TYPE_R_RESULT) {
-                       /* always verify entirely */
-                       ibuf= image_get_render_result(ima, iuser);
+                       /* always verify entirely, not that this shouldn't happen
+                        * during render anyway */
                }
                else if(ima->type==IMA_TYPE_COMPOSITE) {
-                       int frame= iuser?iuser->framenr:0;
-                       
-                       /* Composite Viewer, all handled in compositor */
+                       frame= iuser?iuser->framenr:0;
                        ibuf= image_get_ibuf(ima, 0, frame);
-                       if(ibuf==NULL) {
-                               /* fake ibuf, will be filled in compositor */
-                               ibuf= IMB_allocImBuf(256, 256, 32, IB_rect, 0);
-                               image_assign_ibuf(ima, ibuf, 0, frame);
+               }
+       }
+
+       *frame_r = frame;
+       *index_r = index;
+
+       return ibuf;
+}
+
+/* Checks optional ImageUser and verifies/creates ImBuf. */
+/* returns ibuf */
+ImBuf *BKE_image_get_ibuf(Image *ima, ImageUser *iuser)
+{
+       ImBuf *ibuf= NULL;
+       float color[] = {0, 0, 0, 1};
+       int frame= 0, index= 0;
+
+       /* This function is intended to be thread-safe. It postpones the mutex lock
+        * until it needs to load the image, if the image is already there it
+        * should just get the pointer and return. The reason is that a lot of mutex
+        * locks appears to be very slow on certain multicore macs, causing a render
+        * with image textures to actually slow down as more threads are used.
+        *
+        * Note that all the image loading functions should also make sure they do
+        * things in a threadsafe way for image_get_ibuf_threadsafe to work correct.
+        * That means, the last two steps must be, 1) add the ibuf to the list and
+        * 2) set ima/iuser->ok to 0 to IMA_OK_LOADED */
+
+       /* quick reject tests */
+       if(ima==NULL) 
+               return NULL;
+       if(iuser) {
+               if(iuser->ok==0)
+                       return NULL;
+       }
+       else if(ima->ok==0)
+               return NULL;
+       
+       /* try to get the ibuf without locking */
+       ibuf= image_get_ibuf_threadsafe(ima, iuser, &frame, &index);
+
+       if(ibuf == NULL) {
+               /* couldn't get ibuf and image is not ok, so let's lock and try to
+                * load the image */
+               BLI_lock_thread(LOCK_IMAGE);
+
+               /* need to check ok flag and loading ibuf again, because the situation
+                * might have changed in the meantime */
+               if(iuser) {
+                       if(iuser->ok==0) {
+                               BLI_unlock_thread(LOCK_IMAGE);
+                               return NULL;
                        }
                }
+               else if(ima->ok==0) {
+                       BLI_unlock_thread(LOCK_IMAGE);
+                       return NULL;
+               }
+
+               ibuf= image_get_ibuf_threadsafe(ima, iuser, &frame, &index);
+
+               if(ibuf == NULL) {
+                       /* we are sure we have to load the ibuf, using source and type */
+                       if(ima->source==IMA_SRC_MOVIE) {
+                               /* source is from single file, use flipbook to store ibuf */
+                               ibuf= image_load_movie_file(ima, iuser, frame);
+                       }
+                       else if(ima->source==IMA_SRC_SEQUENCE) {
+                               if(ima->type==IMA_TYPE_IMAGE) {
+                                       /* regular files, ibufs in flipbook, allows saving */
+                                       ibuf= image_load_sequence_file(ima, iuser, frame);
+                               }
+                               /* no else; on load the ima type can change */
+                               if(ima->type==IMA_TYPE_MULTILAYER) {
+                                       /* only 1 layer/pass stored in imbufs, no exrhandle anim storage, no saving */
+                                       ibuf= image_load_sequence_multilayer(ima, iuser, frame);
+                               }
+
+                               if(ibuf)
+                                       BLI_strncpy(ima->name, ibuf->name, sizeof(ima->name));
+                       }
+                       else if(ima->source==IMA_SRC_FILE) {
+                               
+                               if(ima->type==IMA_TYPE_IMAGE)
+                                       ibuf= image_load_image_file(ima, iuser, G.scene->r.cfra);       /* cfra only for '#', this global is OK */
+                               /* no else; on load the ima type can change */
+                               if(ima->type==IMA_TYPE_MULTILAYER)
+                                       /* keeps render result, stores ibufs in listbase, allows saving */
+                                       ibuf= image_get_ibuf_multilayer(ima, iuser);
+                                       
+                       }
+                       else if(ima->source == IMA_SRC_GENERATED) {
+                               /* generated is: ibuf is allocated dynamically */
+                               if(ima->type==IMA_TYPE_VERSE) {
+                                       /* todo */
+                               }
+                               else { /* always fall back to IMA_TYPE_UV_TEST */
+                                       /* UV testgrid or black or solid etc */
+                                       if(ima->gen_x==0) ima->gen_x= 256;
+                                       if(ima->gen_y==0) ima->gen_y= 256;
+                                       ibuf= add_ibuf_size(ima->gen_x, ima->gen_y, ima->name, 0, ima->gen_type, color);
+                                       image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0);
+                                       ima->ok= IMA_OK_LOADED;
+                               }
+                       }
+                       else if(ima->source == IMA_SRC_VIEWER) {
+                               if(ima->type==IMA_TYPE_R_RESULT) {
+                                       /* always verify entirely */
+                                       ibuf= image_get_render_result(ima, iuser);
+                               }
+                               else if(ima->type==IMA_TYPE_COMPOSITE) {
+                                       /* Composite Viewer, all handled in compositor */
+                                       /* fake ibuf, will be filled in compositor */
+                                       ibuf= IMB_allocImBuf(256, 256, 32, IB_rect, 0);
+                                       image_assign_ibuf(ima, ibuf, 0, frame);
+                               }
+                       }
+               }
+
+               BLI_unlock_thread(LOCK_IMAGE);
        }
 
+       /* we assuming that if it is not rendering, it's also not multithreaded
+        * (a somewhat weak assumption) */
        if(G.rendering==0)
                tag_image_time(ima);
 
-       BLI_unlock_thread(LOCK_IMAGE);
-
        return ibuf;
 }
 
index 39fe6ba23bd36ce73d2fbaff07a7e190030e7c11..808984aaa3c985b4e88c3dfff5eaf9e8c2715987 100644 (file)
@@ -1368,7 +1368,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec
        float           gravity[3];
        float           tm2[3][3]       = {{-spring_air,0,0}, {0,-spring_air,0},{0,0,-spring_air}};
        MFace           *mfaces         = cloth->mfaces;
-       ClothVertex     *verts          = cloth->verts;
+       //ClothVertex   *verts          = cloth->verts;
        float wind_normalized[3];
        unsigned int numverts = cloth->numverts;
        LinkNode *search = cloth->springs;
index 6e610eead286621e236330d21f6cf53bc7ad2352..8740a3d1ed4adf86b1a4e1da40fc75cc720a8ba6 100644 (file)
@@ -991,7 +991,7 @@ static void lib_indirect_test_id(ID *id)
                Object *ob= (Object *)id;
                bActionStrip *strip;
                Mesh *me;
-               PartEff *paf;
+
                int a;
 
                for (strip=ob->nlastrips.first; strip; strip=strip->next){
@@ -1003,10 +1003,6 @@ static void lib_indirect_test_id(ID *id)
                for(a=0; a<ob->totcol; a++) {
                        LIBTAG(ob->mat[a]);
                }
-               
-               paf = give_parteff(ob);
-               if (paf) 
-                       LIBTAG(paf->group);
        
                LIBTAG(ob->dup_group);
                LIBTAG(ob->proxy);
index 778dd6f9c7796eadf2ab536bba2b8d83342115ed..3d417565eb19855e0a7f6822c47da856f3bfad59 100644 (file)
@@ -75,7 +75,7 @@ char type_ok(const int type)
 }
 
 /* Copy vdata or fdata from Mesh or EditMesh to Multires. */
-void multires_update_customdata(MultiresLevel *lvl1, CustomData *src, CustomData *dst, const int type)
+void multires_update_customdata(MultiresLevel *lvl1, EditMesh *em, CustomData *src, CustomData *dst, const int type)
 {
        if(src && dst && type_ok(type)) {
                const int tot= (type == CD_MDEFORMVERT ? lvl1->totvert : lvl1->totface);
@@ -84,7 +84,7 @@ void multires_update_customdata(MultiresLevel *lvl1, CustomData *src, CustomData
                CustomData_free(dst, tot);
                
                if(CustomData_has_layer(src, type)) {
-                       if(G.obedit) {
+                       if(em) {
                                EditVert *eve= G.editMesh->verts.first;
                                EditFace *efa= G.editMesh->faces.first;
                                CustomData_copy(src, dst, cdmask(type), CD_CALLOC, tot);
@@ -227,9 +227,9 @@ void multires_del_lower_customdata(Multires *mr, MultiresLevel *cr_lvl)
 void multires_update_first_level(Mesh *me, EditMesh *em)
 {
        if(me && me->mr && me->mr->current == 1) {
-               multires_update_customdata(me->mr->levels.first, em ? &em->vdata : &me->vdata,
+               multires_update_customdata(me->mr->levels.first, em, em ? &em->vdata : &me->vdata,
                                           &me->mr->vdata, CD_MDEFORMVERT);
-               multires_update_customdata(me->mr->levels.first, em ? &em->fdata : &me->fdata,
+               multires_update_customdata(me->mr->levels.first, em, em ? &em->fdata : &me->fdata,
                                           &me->mr->fdata, CD_MTFACE);
                multires_update_edge_flags(me, em);
        }
index 3a8847a5be1885dfb7d6e54e1980305ad7f0c233..9bc7fe28f444b45d820c80844d9318ffae5ca4f3 100644 (file)
@@ -373,7 +373,7 @@ void multires_create(Object *ob, Mesh *me)
        /* Load vertices and vdata (MDeformVerts) */
        lvl->totvert= em ? BLI_countlist(&em->verts) : me->totvert;
        me->mr->verts= MEM_callocN(sizeof(MVert)*lvl->totvert,"multires verts");
-       multires_update_customdata(me->mr->levels.first, em ? &em->vdata : &me->vdata,
+       multires_update_customdata(me->mr->levels.first, em, em ? &em->vdata : &me->vdata,
                                   &me->mr->vdata, CD_MDEFORMVERT);
        if(em) eve= em->verts.first;
        for(i=0; i<lvl->totvert; ++i) {
@@ -384,7 +384,7 @@ void multires_create(Object *ob, Mesh *me)
        /* Load faces and fdata (MTFaces) */
        lvl->totface= em ? BLI_countlist(&em->faces) : me->totface;
        lvl->faces= MEM_callocN(sizeof(MultiresFace)*lvl->totface,"multires faces");
-       multires_update_customdata(me->mr->levels.first, em ? &em->fdata : &me->fdata,
+       multires_update_customdata(me->mr->levels.first, em, em ? &em->fdata : &me->fdata,
                                   &me->mr->fdata, CD_MTFACE);
        if(em) efa= em->faces.first;
        for(i=0; i<lvl->totface; ++i) {
index be790f6b9c17d67dd2a00cbd21b12a99c133fa63..5594a1dfaf7f2d6671dbf84696bfce04f8c1d190 100644 (file)
@@ -90,7 +90,6 @@
 #include "BKE_constraint.h"
 #include "BKE_curve.h"
 #include "BKE_displist.h"
-#include "BKE_effect.h"
 #include "BKE_group.h"
 #include "BKE_icons.h"
 #include "BKE_ipo.h"
@@ -249,7 +248,6 @@ void free_object(Object *ob)
                BLI_freelistN(&ob->defbase);
        if(ob->pose)
                free_pose(ob->pose);
-       free_effects(&ob->effect);
        free_properties(&ob->prop);
        object_free_modifiers(ob);
        
@@ -394,9 +392,7 @@ void unlink_object(Object *ob)
                
                /* object is deflector or field */
                if(ob->pd) {
-                       if(give_parteff(obt))
-                               obt->recalc |= OB_RECALC_DATA;
-                       else if(obt->soft)
+                       if(obt->soft)
                                obt->recalc |= OB_RECALC_DATA;
 
                        /* cloth */
@@ -906,8 +902,10 @@ Object *add_only_object(int type, char *name)
        ob->type= type;
        /* ob->transflag= OB_QUAT; */
 
+#if 0 /* not used yet */
        QuatOne(ob->quat);
        QuatOne(ob->dquat);
+#endif 
 
        ob->col[0]= ob->col[1]= ob->col[2]= 0.0;
        ob->col[3]= 1.0;
@@ -998,11 +996,13 @@ void base_init_from_view3d(Base *base, View3D *v3d)
 
        if (U.flag & USER_ADD_VIEWALIGNED) {
                v3d->viewquat[0]= -v3d->viewquat[0];
-               if (ob->transflag & OB_QUAT) {
+
+               /* Quats arnt used yet */
+               /*if (ob->transflag & OB_QUAT) {
                        QUATCOPY(ob->quat, v3d->viewquat);
-               } else {
+               } else {*/
                        QuatToEul(v3d->viewquat, ob->rot);
-               }
+               /*}*/
                v3d->viewquat[0]= -v3d->viewquat[0];
        }
 }
@@ -1146,7 +1146,6 @@ Object *copy_object(Object *ob)
        obn->path= NULL;
        obn->flag &= ~OB_FROMGROUP;
        
-       copy_effects(&obn->effect, &ob->effect);
        obn->modifiers.first = obn->modifiers.last= NULL;
        
        for (md=ob->modifiers.first; md; md=md->next) {
@@ -1216,6 +1215,7 @@ Object *copy_object(Object *ob)
 void expand_local_object(Object *ob)
 {
        bActionStrip *strip;
+       ParticleSystem *psys;
        int a;
        
        id_lib_extern((ID *)ob->action);
@@ -1229,7 +1229,8 @@ void expand_local_object(Object *ob)
        for (strip=ob->nlastrips.first; strip; strip=strip->next) {
                id_lib_extern((ID *)strip->act);
        }
-
+       for(psys=ob->particlesystem.first; psys; psys=psys->next)
+               id_lib_extern((ID *)psys->part);
 }
 
 void make_local_object(Object *ob)
@@ -1422,7 +1423,7 @@ float bsystem_time(Object *ob, float cfra, float ofs)
        cfra*= G.scene->r.framelen;     
        
        if (ob) {
-               if (no_speed_curve==0 && ob->ipo) 
+               if (no_speed_curve==0 && ob->ipo)
                        cfra= calc_ipo_time(ob->ipo, cfra);
                
                /* ofset frames */
@@ -1439,7 +1440,7 @@ void object_to_mat3(Object *ob, float mat[][3])   /* no parent */
 {
        float smat[3][3], vec[3];
        float rmat[3][3];
-       float q1[4];
+       /*float q1[4];*/
        
        /* size */
        if(ob->ipo) {
@@ -1453,7 +1454,8 @@ void object_to_mat3(Object *ob, float mat[][3])   /* no parent */
        }
 
        /* rot */
-       if(ob->transflag & OB_QUAT) {
+       /* Quats arnt used yet */
+       /*if(ob->transflag & OB_QUAT) {
                if(ob->ipo) {
                        QuatMul(q1, ob->quat, ob->dquat);
                        QuatToMat3(q1, rmat);
@@ -1462,7 +1464,7 @@ void object_to_mat3(Object *ob, float mat[][3])   /* no parent */
                        QuatToMat3(ob->quat, rmat);
                }
        }
-       else {
+       else {*/
                if(ob->ipo) {
                        vec[0]= ob->rot[0]+ob->drot[0];
                        vec[1]= ob->rot[1]+ob->drot[1];
@@ -1472,7 +1474,7 @@ void object_to_mat3(Object *ob, float mat[][3])   /* no parent */
                else {
                        EulToMat3(ob->rot, rmat);
                }
-       }
+       /*}*/
        Mat3MulMat3(mat, rmat, smat);
 }
 
@@ -1629,9 +1631,12 @@ static void give_parvert(Object *par, int nr, float *vec)
                                        }
                                }
 
-                               if(count > 0) {
+                               if (count==0) {
+                                       /* keep as 0,0,0 */
+                               } else if(count > 0) {
                                        VecMulf(vec, 1.0f / count);
                                } else {
+                                       /* use first index if its out of range */
                                        dm->getVertCo(dm, 0, vec);
                                }
                        }
index 207ab56de9b043bdb80680536d93eca1d6a2dcc0..1eb47fa3da058975c9c74776db5543fabfaf19b5 100644 (file)
@@ -2988,7 +2988,7 @@ ParticleSettings *psys_copy_settings(ParticleSettings *part)
        return partn;
 }
 
-void psys_make_local_settings(ParticleSettings *part)
+void make_local_particlesettings(ParticleSettings *part)
 {
        Object *ob;
        ParticleSettings *par;
index 8407dd2b7c3798169e710af58759f9c96f4eb664..3d73ba1e93f7ec59e8507926aaa62b9355df109f 100644 (file)
@@ -172,12 +172,12 @@ static int ptcache_path(PTCacheID *pid, char *filename)
        lib= (pid)? pid->ob->id.lib: NULL;
 
        if (G.relbase_valid || lib) {
-               char dir[FILE_MAX], file[FILE_MAX]; /* we dont want the dir, only the file */
+               char file[FILE_MAX]; /* we dont want the dir, only the file */
                char *blendfilename;
 
                blendfilename= (lib)? lib->filename: G.sce;
 
-               BLI_split_dirfile(blendfilename, dir, file);
+               BLI_split_dirfile_basic(blendfilename, NULL, file);
                i = strlen(file);
                
                /* remove .blend */
index ed030dfad029b1a88ab3738c2f4c27040155c66a..6798c3c47b70bf0e9ed88a91ec0ad566f8281bb7 100644 (file)
@@ -79,6 +79,7 @@
 #include "BKE_utildefines.h"
 
 #include "BIF_previewrender.h"
+#include "BIF_editseq.h"
 
 #include "BPY_extern.h"
 #include "BLI_arithb.h"
@@ -295,6 +296,9 @@ void set_scene_bg(Scene *sce)
        GroupObject *go;
        int flag;
        
+       // Note: this here is defined in editseq.c (BIF_editseq.h), NOT in blenkernel! 
+       set_last_seq(NULL);
+       
        G.scene= sce;
        
        /* check for cyclic sets, for reading old files but also for definite security (py?) */
index 23c3a1eacb602028c1000ae93852517a42a01d39..b6552be93a9859ea4f901e5eba0e73b9a0cf4e5b 100644 (file)
@@ -212,7 +212,6 @@ int reopen_text(Text *text)
        int i, llen, len;
        unsigned char *buffer;
        TextLine *tmp;
-       char sdir[FILE_MAXDIR];
        char sfile[FILE_MAXFILE];
        char str[FILE_MAXDIR+FILE_MAXFILE];
 
@@ -220,7 +219,7 @@ int reopen_text(Text *text)
        
        BLI_strncpy(str, text->name, FILE_MAXDIR+FILE_MAXFILE);
        BLI_convertstringcode(str, G.sce, G.scene->r.cfra);
-       BLI_split_dirfile(str, sdir, sfile);
+       BLI_split_dirfile_basic(str, NULL, sfile);
        
        fp= fopen(str, "r");
        if(fp==NULL) return 0;
@@ -312,14 +311,13 @@ Text *add_text(char *file)
        unsigned char *buffer;
        TextLine *tmp;
        Text *ta;
-       char sdir[FILE_MAXDIR];
        char sfile[FILE_MAXFILE];
        char str[FILE_MAXDIR+FILE_MAXFILE];
 
        BLI_strncpy(str, file, FILE_MAXDIR+FILE_MAXFILE);
        if (G.scene) /* can be NULL (bg mode) */
                BLI_convertstringcode(str, G.sce, G.scene->r.cfra);
-       BLI_split_dirfile(str, sdir, sfile);
+       BLI_split_dirfile_basic(str, NULL, sfile);
        
        fp= fopen(str, "r");
        if(fp==NULL) return NULL;
index 6c0e42fe42af4d35e2827b9f1d7b5d7f72e25cc7..33567d92c992d6c127de981479e9478776bd57c0 100644 (file)
@@ -96,6 +96,7 @@ void BLI_make_file_string(const char *relabase, char *string,  const char *dir,
 void BLI_make_exist(char *dir);
 void BLI_make_existing_file(char *name);
 void BLI_split_dirfile(char *string, char *dir, char *file);
+void BLI_split_dirfile_basic(const char *string, char *dir, char *file);
 void BLI_join_dirfile(char *string, const char *dir, const char *file);
 int BLI_testextensie(const char *str, const char *ext);
 void addlisttolist(ListBase *list1, ListBase *list2);
index 0f2f9346c83caf9c675c677a6e1e792614e91e12..874c8c7828c70312eebc0220c8077046db52a127 100644 (file)
@@ -33,6 +33,7 @@ struct BPathIteratorSeqData {
        int totseq;
        int seq;
        struct Sequence **seqar; /* Sequence */
+       struct Scene *scene;                    /* Current scene */
 };
 
 struct BPathIterator {
index 54d70626dd580b9938c06a556524f27f0344f5c2..9c192ba8b096b3fa56890bc90d9b2d8e4d696446 100644 (file)
@@ -110,7 +110,8 @@ void RegisterBlendExtension(char * str);
 DIR *opendir (const char *path);
 struct dirent *readdir(DIR *dp);
 int closedir (DIR *dp);
-void get_default_root(char* root);
+void get_default_root(char *root);
+int check_file_chars(char *filename);
 
 #endif /* __WINSTUFF_H__ */
 
index 4e4b47b2c927c58762d673e85270746bf1bedb82..66eb63c8dfdecef971f64e870fe9a7fdb364f3a8 100644 (file)
@@ -95,6 +95,7 @@ void BLI_bpathIterator_init( struct BPathIterator *bpi ) {
        bpi->seqdata.totseq = 0;
        bpi->seqdata.seq = 0;
        bpi->seqdata.seqar = NULL;
+       bpi->seqdata.scene = NULL;
        
        BLI_bpathIterator_step(bpi);
 }
@@ -103,6 +104,7 @@ void BLI_bpathIterator_free( struct BPathIterator *bpi ) {
        if (bpi->seqdata.seqar)
                MEM_freeN((void *)bpi->seqdata.seqar);
        bpi->seqdata.seqar = NULL;
+       bpi->seqdata.scene = NULL;
 }
 
 void BLI_bpathIterator_getPath( struct BPathIterator *bpi, char *path) {
@@ -202,34 +204,54 @@ static struct bSound *snd_stepdata__internal(struct bSound *snd, int step_next)
 static struct Sequence *seq_stepdata__internal(struct BPathIterator *bpi, int step_next) {
        Sequence *seq;
        
-       if (G.scene->ed==NULL) {
-               return NULL;
-       }
-       
-       if (bpi->seqdata.seqar == NULL) {
-               /* allocate the sequencer array */
-               build_seqar( &(((Editing *)G.scene->ed)->seqbase), &bpi->seqdata.seqar, &bpi->seqdata.totseq);          
-               bpi->seqdata.seq = 0;
+       /* Initializing */
+       if (bpi->seqdata.scene==NULL) {
+               bpi->seqdata.scene= G.main->scene.first;
        }
        
        if (step_next) {
                bpi->seqdata.seq++;
        }
        
-       if (bpi->seqdata.seq >= bpi->seqdata.totseq) {
-               seq = NULL;
-       } else {
-               seq = bpi->seqdata.seqar[bpi->seqdata.seq];
-               while (!SEQ_HAS_PATH(seq)) {
-                       bpi->seqdata.seq++;
+       while (bpi->seqdata.scene) {
+               
+               if (bpi->seqdata.scene->ed) {
+                       if (bpi->seqdata.seqar == NULL) {
+                               /* allocate the sequencer array */
+                               build_seqar( &(((Editing *)bpi->seqdata.scene->ed)->seqbase), &bpi->seqdata.seqar, &bpi->seqdata.totseq);               
+                               bpi->seqdata.seq = 0;
+                       }
+                       
                        if (bpi->seqdata.seq >= bpi->seqdata.totseq) {
                                seq = NULL;
-                               break;
+                       } else {
+                               seq = bpi->seqdata.seqar[bpi->seqdata.seq];
+                               while (!SEQ_HAS_PATH(seq)) {
+                                       bpi->seqdata.seq++;
+                                       if (bpi->seqdata.seq >= bpi->seqdata.totseq) {
+                                               seq = NULL;
+                                               break;
+                                       }
+                                       seq = bpi->seqdata.seqar[bpi->seqdata.seq];
+                               }
+                       }
+                       if (seq) {
+                               return seq;
+                       } else {
+                               /* keep looking through the next scene, reallocate seq array */
+                               if (bpi->seqdata.seqar) {
+                                       MEM_freeN((void *)bpi->seqdata.seqar);
+                                       bpi->seqdata.seqar = NULL;
+                               }
+                               bpi->seqdata.scene = bpi->seqdata.scene->id.next;
                        }
-                       seq = bpi->seqdata.seqar[bpi->seqdata.seq];
+               } else {
+                       /* no seq data in this scene, next */
+                       bpi->seqdata.scene = bpi->seqdata.scene->id.next;
                }
        }
-       return seq ;
+       
+       return NULL;
 }
 
 void seq_getpath(struct BPathIterator *bpi, char *path) {
@@ -259,22 +281,7 @@ void seq_setpath(struct BPathIterator *bpi, char *path) {
        
        if (SEQ_HAS_PATH(seq)) {
                if (seq->type == SEQ_IMAGE || seq->type == SEQ_MOVIE) {
-                       
-                       int lslash, i = 0;
-                       for (i=0; path[i]!='\0'; i++) {
-                               if (path[i]=='\\' || path[i]=='/')
-                                       lslash = i+1;
-                       }
-                       
-                       if (lslash) {
-                               BLI_strncpy( seq->strip->dir, path, lslash+1); /* +1 to include the slash and the last char */
-                       } else {
-                               path[0] = '\0';
-                       }
-                       
-                       if (seq->strip->stripdata) { /* should always be true! */
-                               BLI_strncpy( seq->strip->stripdata->name, path+lslash, sizeof(seq->strip->stripdata->name));
-                       }
+                       BLI_split_dirfile_basic(path, seq->strip->dir, seq->strip->stripdata->name);
                } else {
                        /* simple case */
                        BLI_strncpy(seq->strip->dir, path, sizeof(seq->strip->dir));
@@ -653,11 +660,11 @@ void findMissingFiles(char *str) {
        char filepath[FILE_MAX], *libpath;
        int filesize, recur_depth;
        
-       char dirname[FILE_MAX], filename[FILE_MAX], filename_new[FILE_MAX], dummyname[FILE_MAX];
+       char dirname[FILE_MAX], filename[FILE_MAX], filename_new[FILE_MAX];
        
        waitcursor( 1 );
        
-       BLI_split_dirfile(str, dirname, dummyname);
+       BLI_split_dirfile_basic(str, dirname, NULL);
        
        BLI_bpathIterator_init(&bpi);
        
@@ -678,7 +685,7 @@ void findMissingFiles(char *str) {
                                /* can the dir be opened? */
                                filesize = -1;
                                recur_depth = 0;
-                               BLI_split_dirfile(filepath, dummyname, filename); /* the file to find */
+                               BLI_split_dirfile_basic(filepath, NULL, filename); /* the file to find */
                                
                                findFileRecursive(filename_new, dirname, filename, &filesize, &recur_depth);
                                if (filesize == -1) { /* could not open dir */
index a678c44d4bf864b63669977de0f783fe37906884..0bd30a69d0505842a8394943cf2e33a93576e77e 100644 (file)
@@ -387,55 +387,521 @@ static char p[512+2]= {
 
 
 float g[512+2][3]= {
-0.33783,0.715698,-0.611206,-0.944031,-0.326599,-0.045624,-0.101074,-0.416443,-0.903503,0.799286,0.49411,-0.341949,-0.854645,0.518036,0.033936,0.42514,-0.437866,-0.792114,-0.358948,0.597046,0.717377,-0.985413,0.144714,0.089294,-0.601776,-0.33728,-0.723907,-0.449921,0.594513,0.666382,0.208313,-0.10791,
-0.972076,0.575317,0.060425,0.815643,0.293365,-0.875702,-0.383453,0.293762,0.465759,0.834686,-0.846008,-0.233398,-0.47934,-0.115814,0.143036,-0.98291,0.204681,-0.949036,-0.239532,0.946716,-0.263947,0.184326,-0.235596,0.573822,0.784332,0.203705,-0.372253,-0.905487,0.756989,-0.651031,0.055298,0.497803,
-0.814697,-0.297363,-0.16214,0.063995,-0.98468,-0.329254,0.834381,0.441925,0.703827,-0.527039,-0.476227,0.956421,0.266113,0.119781,0.480133,0.482849,0.7323,-0.18631,0.961212,-0.203125,-0.748474,-0.656921,-0.090393,-0.085052,-0.165253,0.982544,-0.76947,0.628174,-0.115234,0.383148,0.537659,0.751068,
-0.616486,-0.668488,-0.415924,-0.259979,-0.630005,0.73175,0.570953,-0.087952,0.816223,-0.458008,0.023254,0.888611,-0.196167,0.976563,-0.088287,-0.263885,-0.69812,-0.665527,0.437134,-0.892273,-0.112793,-0.621674,-0.230438,0.748566,0.232422,0.900574,-0.367249,0.22229,-0.796143,0.562744,-0.665497,-0.73764,
-0.11377,0.670135,0.704803,0.232605,0.895599,0.429749,-0.114655,-0.11557,-0.474243,0.872742,0.621826,0.604004,-0.498444,-0.832214,0.012756,0.55426,-0.702484,0.705994,-0.089661,-0.692017,0.649292,0.315399,-0.175995,-0.977997,0.111877,0.096954,-0.04953,0.994019,0.635284,-0.606689,-0.477783,-0.261261,
--0.607422,-0.750153,0.983276,0.165436,0.075958,-0.29837,0.404083,-0.864655,-0.638672,0.507721,0.578156,0.388214,0.412079,0.824249,0.556183,-0.208832,0.804352,0.778442,0.562012,0.27951,-0.616577,0.781921,-0.091522,0.196289,0.051056,0.979187,-0.121216,0.207153,-0.970734,-0.173401,-0.384735,0.906555,
-0.161499,-0.723236,-0.671387,0.178497,-0.006226,-0.983887,-0.126038,0.15799,0.97934,0.830475,-0.024811,0.556458,-0.510132,-0.76944,0.384247,0.81424,0.200104,-0.544891,-0.112549,-0.393311,-0.912445,0.56189,0.152222,-0.813049,0.198914,-0.254517,-0.946381,-0.41217,0.690979,-0.593811,-0.407257,0.324524,
-0.853668,-0.690186,0.366119,-0.624115,-0.428345,0.844147,-0.322296,-0.21228,-0.297546,-0.930756,-0.273071,0.516113,0.811798,0.928314,0.371643,0.007233,0.785828,-0.479218,-0.390778,-0.704895,0.058929,0.706818,0.173248,0.203583,0.963562,0.422211,-0.904297,-0.062469,-0.363312,-0.182465,0.913605,0.254028,
--0.552307,-0.793945,-0.28891,-0.765747,-0.574554,0.058319,0.291382,0.954803,0.946136,-0.303925,0.111267,-0.078156,0.443695,-0.892731,0.182098,0.89389,0.409515,-0.680298,-0.213318,0.701141,0.062469,0.848389,-0.525635,-0.72879,-0.641846,0.238342,-0.88089,0.427673,0.202637,-0.532501,-0.21405,0.818878,
-0.948975,-0.305084,0.07962,0.925446,0.374664,0.055817,0.820923,0.565491,0.079102,0.25882,0.099792,-0.960724,-0.294617,0.910522,0.289978,0.137115,0.320038,-0.937408,-0.908386,0.345276,-0.235718,-0.936218,0.138763,0.322754,0.366577,0.925934,-0.090637,0.309296,-0.686829,-0.657684,0.66983,0.024445,
-0.742065,-0.917999,-0.059113,-0.392059,0.365509,0.462158,-0.807922,0.083374,0.996399,-0.014801,0.593842,0.253143,-0.763672,0.974976,-0.165466,0.148285,0.918976,0.137299,0.369537,0.294952,0.694977,0.655731,0.943085,0.152618,-0.295319,0.58783,-0.598236,0.544495,0.203796,0.678223,0.705994,-0.478821,
--0.661011,0.577667,0.719055,-0.1698,-0.673828,-0.132172,-0.965332,0.225006,-0.981873,-0.14502,0.121979,0.763458,0.579742,0.284546,-0.893188,0.079681,0.442474,-0.795776,-0.523804,0.303802,0.734955,0.67804,-0.007446,0.15506,0.986267,-0.056183,0.258026,0.571503,-0.778931,-0.681549,-0.702087,-0.206116,
--0.96286,-0.177185,0.203613,-0.470978,-0.515106,0.716095,-0.740326,0.57135,0.354095,-0.56012,-0.824982,-0.074982,-0.507874,0.753204,0.417969,-0.503113,0.038147,0.863342,0.594025,0.673553,-0.439758,-0.119873,-0.005524,-0.992737,0.098267,-0.213776,0.971893,-0.615631,0.643951,0.454163,0.896851,-0.441071,
-0.032166,-0.555023,0.750763,-0.358093,0.398773,0.304688,0.864929,-0.722961,0.303589,0.620544,-0.63559,-0.621948,-0.457306,-0.293243,0.072327,0.953278,-0.491638,0.661041,-0.566772,-0.304199,-0.572083,-0.761688,0.908081,-0.398956,0.127014,-0.523621,-0.549683,-0.650848,-0.932922,-0.19986,0.299408,0.099426,
-0.140869,0.984985,-0.020325,-0.999756,-0.002319,0.952667,0.280853,-0.11615,-0.971893,0.082581,0.220337,0.65921,0.705292,-0.260651,0.733063,-0.175537,0.657043,-0.555206,0.429504,-0.712189,0.400421,-0.89859,0.179352,0.750885,-0.19696,0.630341,0.785675,-0.569336,0.241821,-0.058899,-0.464111,0.883789,
-0.129608,-0.94519,0.299622,-0.357819,0.907654,0.219238,-0.842133,-0.439117,-0.312927,-0.313477,0.84433,0.434479,-0.241211,0.053253,0.968994,0.063873,0.823273,0.563965,0.476288,0.862152,-0.172516,0.620941,-0.298126,0.724915,0.25238,-0.749359,-0.612122,-0.577545,0.386566,0.718994,-0.406342,-0.737976,
-0.538696,0.04718,0.556305,0.82959,-0.802856,0.587463,0.101166,-0.707733,-0.705963,0.026428,0.374908,0.68457,0.625092,0.472137,0.208405,-0.856506,-0.703064,-0.581085,-0.409821,-0.417206,-0.736328,0.532623,-0.447876,-0.20285,-0.870728,0.086945,-0.990417,0.107086,0.183685,0.018341,-0.982788,0.560638,
--0.428864,0.708282,0.296722,-0.952576,-0.0672,0.135773,0.990265,0.030243,-0.068787,0.654724,0.752686,0.762604,-0.551758,0.337585,-0.819611,-0.407684,0.402466,-0.727844,-0.55072,-0.408539,-0.855774,-0.480011,0.19281,0.693176,-0.079285,0.716339,0.226013,0.650116,-0.725433,0.246704,0.953369,-0.173553,
--0.970398,-0.239227,-0.03244,0.136383,-0.394318,0.908752,0.813232,0.558167,0.164368,0.40451,0.549042,-0.731323,-0.380249,-0.566711,0.730865,0.022156,0.932739,0.359741,0.00824,0.996552,-0.082306,0.956635,-0.065338,-0.283722,-0.743561,0.008209,0.668579,-0.859589,-0.509674,0.035767,-0.852234,0.363678,
--0.375977,-0.201965,-0.970795,-0.12915,0.313477,0.947327,0.06546,-0.254028,-0.528259,0.81015,0.628052,0.601105,0.49411,-0.494385,0.868378,0.037933,0.275635,-0.086426,0.957336,-0.197937,0.468903,-0.860748,0.895599,0.399384,0.195801,0.560791,0.825012,-0.069214,0.304199,-0.849487,0.43103,0.096375,
-0.93576,0.339111,-0.051422,0.408966,-0.911072,0.330444,0.942841,-0.042389,-0.452362,-0.786407,0.420563,0.134308,-0.933472,-0.332489,0.80191,-0.566711,-0.188934,-0.987946,-0.105988,0.112518,-0.24408,0.892242,-0.379791,-0.920502,0.229095,-0.316376,0.7789,0.325958,0.535706,-0.912872,0.185211,-0.36377,
--0.184784,0.565369,-0.803833,-0.018463,0.119537,0.992615,-0.259247,-0.935608,0.239532,-0.82373,-0.449127,-0.345947,-0.433105,0.659515,0.614349,-0.822754,0.378845,-0.423676,0.687195,-0.674835,-0.26889,-0.246582,-0.800842,0.545715,-0.729187,-0.207794,0.651978,0.653534,-0.610443,-0.447388,0.492584,-0.023346,
-0.869934,0.609039,0.009094,-0.79306,0.962494,-0.271088,-0.00885,0.2659,-0.004913,0.963959,0.651245,0.553619,-0.518951,0.280548,-0.84314,0.458618,-0.175293,-0.983215,0.049805,0.035339,-0.979919,0.196045,-0.982941,0.164307,-0.082245,0.233734,-0.97226,-0.005005,-0.747253,-0.611328,0.260437,0.645599,
-0.592773,0.481384,0.117706,-0.949524,-0.29068,-0.535004,-0.791901,-0.294312,-0.627167,-0.214447,0.748718,-0.047974,-0.813477,-0.57959,-0.175537,0.477264,-0.860992,0.738556,-0.414246,-0.53183,0.562561,-0.704071,0.433289,-0.754944,0.64801,-0.100586,0.114716,0.044525,-0.992371,0.966003,0.244873,-0.082764,
-0.33783,0.715698,-0.611206,-0.944031,-0.326599,-0.045624,-0.101074,-0.416443,-0.903503,0.799286,0.49411,-0.341949,-0.854645,0.518036,0.033936,0.42514,-0.437866,-0.792114,-0.358948,0.597046,0.717377,-0.985413,0.144714,0.089294,-0.601776,-0.33728,-0.723907,-0.449921,0.594513,0.666382,0.208313,-0.10791,
-0.972076,0.575317,0.060425,0.815643,0.293365,-0.875702,-0.383453,0.293762,0.465759,0.834686,-0.846008,-0.233398,-0.47934,-0.115814,0.143036,-0.98291,0.204681,-0.949036,-0.239532,0.946716,-0.263947,0.184326,-0.235596,0.573822,0.784332,0.203705,-0.372253,-0.905487,0.756989,-0.651031,0.055298,0.497803,
-0.814697,-0.297363,-0.16214,0.063995,-0.98468,-0.329254,0.834381,0.441925,0.703827,-0.527039,-0.476227,0.956421,0.266113,0.119781,0.480133,0.482849,0.7323,-0.18631,0.961212,-0.203125,-0.748474,-0.656921,-0.090393,-0.085052,-0.165253,0.982544,-0.76947,0.628174,-0.115234,0.383148,0.537659,0.751068,
-0.616486,-0.668488,-0.415924,-0.259979,-0.630005,0.73175,0.570953,-0.087952,0.816223,-0.458008,0.023254,0.888611,-0.196167,0.976563,-0.088287,-0.263885,-0.69812,-0.665527,0.437134,-0.892273,-0.112793,-0.621674,-0.230438,0.748566,0.232422,0.900574,-0.367249,0.22229,-0.796143,0.562744,-0.665497,-0.73764,
-0.11377,0.670135,0.704803,0.232605,0.895599,0.429749,-0.114655,-0.11557,-0.474243,0.872742,0.621826,0.604004,-0.498444,-0.832214,0.012756,0.55426,-0.702484,0.705994,-0.089661,-0.692017,0.649292,0.315399,-0.175995,-0.977997,0.111877,0.096954,-0.04953,0.994019,0.635284,-0.606689,-0.477783,-0.261261,
--0.607422,-0.750153,0.983276,0.165436,0.075958,-0.29837,0.404083,-0.864655,-0.638672,0.507721,0.578156,0.388214,0.412079,0.824249,0.556183,-0.208832,0.804352,0.778442,0.562012,0.27951,-0.616577,0.781921,-0.091522,0.196289,0.051056,0.979187,-0.121216,0.207153,-0.970734,-0.173401,-0.384735,0.906555,
-0.161499,-0.723236,-0.671387,0.178497,-0.006226,-0.983887,-0.126038,0.15799,0.97934,0.830475,-0.024811,0.556458,-0.510132,-0.76944,0.384247,0.81424,0.200104,-0.544891,-0.112549,-0.393311,-0.912445,0.56189,0.152222,-0.813049,0.198914,-0.254517,-0.946381,-0.41217,0.690979,-0.593811,-0.407257,0.324524,
-0.853668,-0.690186,0.366119,-0.624115,-0.428345,0.844147,-0.322296,-0.21228,-0.297546,-0.930756,-0.273071,0.516113,0.811798,0.928314,0.371643,0.007233,0.785828,-0.479218,-0.390778,-0.704895,0.058929,0.706818,0.173248,0.203583,0.963562,0.422211,-0.904297,-0.062469,-0.363312,-0.182465,0.913605,0.254028,
--0.552307,-0.793945,-0.28891,-0.765747,-0.574554,0.058319,0.291382,0.954803,0.946136,-0.303925,0.111267,-0.078156,0.443695,-0.892731,0.182098,0.89389,0.409515,-0.680298,-0.213318,0.701141,0.062469,0.848389,-0.525635,-0.72879,-0.641846,0.238342,-0.88089,0.427673,0.202637,-0.532501,-0.21405,0.818878,
-0.948975,-0.305084,0.07962,0.925446,0.374664,0.055817,0.820923,0.565491,0.079102,0.25882,0.099792,-0.960724,-0.294617,0.910522,0.289978,0.137115,0.320038,-0.937408,-0.908386,0.345276,-0.235718,-0.936218,0.138763,0.322754,0.366577,0.925934,-0.090637,0.309296,-0.686829,-0.657684,0.66983,0.024445,
-0.742065,-0.917999,-0.059113,-0.392059,0.365509,0.462158,-0.807922,0.083374,0.996399,-0.014801,0.593842,0.253143,-0.763672,0.974976,-0.165466,0.148285,0.918976,0.137299,0.369537,0.294952,0.694977,0.655731,0.943085,0.152618,-0.295319,0.58783,-0.598236,0.544495,0.203796,0.678223,0.705994,-0.478821,
--0.661011,0.577667,0.719055,-0.1698,-0.673828,-0.132172,-0.965332,0.225006,-0.981873,-0.14502,0.121979,0.763458,0.579742,0.284546,-0.893188,0.079681,0.442474,-0.795776,-0.523804,0.303802,0.734955,0.67804,-0.007446,0.15506,0.986267,-0.056183,0.258026,0.571503,-0.778931,-0.681549,-0.702087,-0.206116,
--0.96286,-0.177185,0.203613,-0.470978,-0.515106,0.716095,-0.740326,0.57135,0.354095,-0.56012,-0.824982,-0.074982,-0.507874,0.753204,0.417969,-0.503113,0.038147,0.863342,0.594025,0.673553,-0.439758,-0.119873,-0.005524,-0.992737,0.098267,-0.213776,0.971893,-0.615631,0.643951,0.454163,0.896851,-0.441071,
-0.032166,-0.555023,0.750763,-0.358093,0.398773,0.304688,0.864929,-0.722961,0.303589,0.620544,-0.63559,-0.621948,-0.457306,-0.293243,0.072327,0.953278,-0.491638,0.661041,-0.566772,-0.304199,-0.572083,-0.761688,0.908081,-0.398956,0.127014,-0.523621,-0.549683,-0.650848,-0.932922,-0.19986,0.299408,0.099426,
-0.140869,0.984985,-0.020325,-0.999756,-0.002319,0.952667,0.280853,-0.11615,-0.971893,0.082581,0.220337,0.65921,0.705292,-0.260651,0.733063,-0.175537,0.657043,-0.555206,0.429504,-0.712189,0.400421,-0.89859,0.179352,0.750885,-0.19696,0.630341,0.785675,-0.569336,0.241821,-0.058899,-0.464111,0.883789,
-0.129608,-0.94519,0.299622,-0.357819,0.907654,0.219238,-0.842133,-0.439117,-0.312927,-0.313477,0.84433,0.434479,-0.241211,0.053253,0.968994,0.063873,0.823273,0.563965,0.476288,0.862152,-0.172516,0.620941,-0.298126,0.724915,0.25238,-0.749359,-0.612122,-0.577545,0.386566,0.718994,-0.406342,-0.737976,
-0.538696,0.04718,0.556305,0.82959,-0.802856,0.587463,0.101166,-0.707733,-0.705963,0.026428,0.374908,0.68457,0.625092,0.472137,0.208405,-0.856506,-0.703064,-0.581085,-0.409821,-0.417206,-0.736328,0.532623,-0.447876,-0.20285,-0.870728,0.086945,-0.990417,0.107086,0.183685,0.018341,-0.982788,0.560638,
--0.428864,0.708282,0.296722,-0.952576,-0.0672,0.135773,0.990265,0.030243,-0.068787,0.654724,0.752686,0.762604,-0.551758,0.337585,-0.819611,-0.407684,0.402466,-0.727844,-0.55072,-0.408539,-0.855774,-0.480011,0.19281,0.693176,-0.079285,0.716339,0.226013,0.650116,-0.725433,0.246704,0.953369,-0.173553,
--0.970398,-0.239227,-0.03244,0.136383,-0.394318,0.908752,0.813232,0.558167,0.164368,0.40451,0.549042,-0.731323,-0.380249,-0.566711,0.730865,0.022156,0.932739,0.359741,0.00824,0.996552,-0.082306,0.956635,-0.065338,-0.283722,-0.743561,0.008209,0.668579,-0.859589,-0.509674,0.035767,-0.852234,0.363678,
--0.375977,-0.201965,-0.970795,-0.12915,0.313477,0.947327,0.06546,-0.254028,-0.528259,0.81015,0.628052,0.601105,0.49411,-0.494385,0.868378,0.037933,0.275635,-0.086426,0.957336,-0.197937,0.468903,-0.860748,0.895599,0.399384,0.195801,0.560791,0.825012,-0.069214,0.304199,-0.849487,0.43103,0.096375,
-0.93576,0.339111,-0.051422,0.408966,-0.911072,0.330444,0.942841,-0.042389,-0.452362,-0.786407,0.420563,0.134308,-0.933472,-0.332489,0.80191,-0.566711,-0.188934,-0.987946,-0.105988,0.112518,-0.24408,0.892242,-0.379791,-0.920502,0.229095,-0.316376,0.7789,0.325958,0.535706,-0.912872,0.185211,-0.36377,
--0.184784,0.565369,-0.803833,-0.018463,0.119537,0.992615,-0.259247,-0.935608,0.239532,-0.82373,-0.449127,-0.345947,-0.433105,0.659515,0.614349,-0.822754,0.378845,-0.423676,0.687195,-0.674835,-0.26889,-0.246582,-0.800842,0.545715,-0.729187,-0.207794,0.651978,0.653534,-0.610443,-0.447388,0.492584,-0.023346,
-0.869934,0.609039,0.009094,-0.79306,0.962494,-0.271088,-0.00885,0.2659,-0.004913,0.963959,0.651245,0.553619,-0.518951,0.280548,-0.84314,0.458618,-0.175293,-0.983215,0.049805,0.035339,-0.979919,0.196045,-0.982941,0.164307,-0.082245,0.233734,-0.97226,-0.005005,-0.747253,-0.611328,0.260437,0.645599,
-0.592773,0.481384,0.117706,-0.949524,-0.29068,-0.535004,-0.791901,-0.294312,-0.627167,-0.214447,0.748718,-0.047974,-0.813477,-0.57959,-0.175537,0.477264,-0.860992,0.738556,-0.414246,-0.53183,0.562561,-0.704071,0.433289,-0.754944,0.64801,-0.100586,0.114716,0.044525,-0.992371,0.966003,0.244873,-0.082764,
-0.33783,0.715698,-0.611206,-0.944031,-0.326599,-0.045624};
+       {0.33783, 0.715698, -0.611206},
+       {-0.944031, -0.326599, -0.045624},
+       {-0.101074, -0.416443, -0.903503},
+       {0.799286, 0.49411, -0.341949},
+       {-0.854645, 0.518036, 0.033936},
+       {0.42514, -0.437866, -0.792114},
+       {-0.358948, 0.597046, 0.717377},
+       {-0.985413, 0.144714, 0.089294},
+       {-0.601776, -0.33728, -0.723907},
+       {-0.449921, 0.594513, 0.666382},
+       {0.208313, -0.10791, 0.972076},
+       {0.575317, 0.060425, 0.815643},
+       {0.293365, -0.875702, -0.383453},
+       {0.293762, 0.465759, 0.834686},
+       {-0.846008, -0.233398, -0.47934},
+       {-0.115814, 0.143036, -0.98291},
+       {0.204681, -0.949036, -0.239532},
+       {0.946716, -0.263947, 0.184326},
+       {-0.235596, 0.573822, 0.784332},
+       {0.203705, -0.372253, -0.905487},
+       {0.756989, -0.651031, 0.055298},
+       {0.497803, 0.814697, -0.297363},
+       {-0.16214, 0.063995, -0.98468},
+       {-0.329254, 0.834381, 0.441925},
+       {0.703827, -0.527039, -0.476227},
+       {0.956421, 0.266113, 0.119781},
+       {0.480133, 0.482849, 0.7323},
+       {-0.18631, 0.961212, -0.203125},
+       {-0.748474, -0.656921, -0.090393},
+       {-0.085052, -0.165253, 0.982544},
+       {-0.76947, 0.628174, -0.115234},
+       {0.383148, 0.537659, 0.751068},
+       {0.616486, -0.668488, -0.415924},
+       {-0.259979, -0.630005, 0.73175},
+       {0.570953, -0.087952, 0.816223},
+       {-0.458008, 0.023254, 0.888611},
+       {-0.196167, 0.976563, -0.088287},
+       {-0.263885, -0.69812, -0.665527},
+       {0.437134, -0.892273, -0.112793},
+       {-0.621674, -0.230438, 0.748566},
+       {0.232422, 0.900574, -0.367249},
+       {0.22229, -0.796143, 0.562744},
+       {-0.665497, -0.73764, 0.11377},
+       {0.670135, 0.704803, 0.232605},
+       {0.895599, 0.429749, -0.114655},
+       {-0.11557, -0.474243, 0.872742},
+       {0.621826, 0.604004, -0.498444},
+       {-0.832214, 0.012756, 0.55426},
+       {-0.702484, 0.705994, -0.089661},
+       {-0.692017, 0.649292, 0.315399},
+       {-0.175995, -0.977997, 0.111877},
+       {0.096954, -0.04953, 0.994019},
+       {0.635284, -0.606689, -0.477783},
+       {-0.261261, -0.607422, -0.750153},
+       {0.983276, 0.165436, 0.075958},
+       {-0.29837, 0.404083, -0.864655},
+       {-0.638672, 0.507721, 0.578156},
+       {0.388214, 0.412079, 0.824249},
+       {0.556183, -0.208832, 0.804352},
+       {0.778442, 0.562012, 0.27951},
+       {-0.616577, 0.781921, -0.091522},
+       {0.196289, 0.051056, 0.979187},
+       {-0.121216, 0.207153, -0.970734},
+       {-0.173401, -0.384735, 0.906555},
+       {0.161499, -0.723236, -0.671387},
+       {0.178497, -0.006226, -0.983887},
+       {-0.126038, 0.15799, 0.97934},
+       {0.830475, -0.024811, 0.556458},
+       {-0.510132, -0.76944, 0.384247},
+       {0.81424, 0.200104, -0.544891},
+       {-0.112549, -0.393311, -0.912445},
+       {0.56189, 0.152222, -0.813049},
+       {0.198914, -0.254517, -0.946381},
+       {-0.41217, 0.690979, -0.593811},
+       {-0.407257, 0.324524, 0.853668},
+       {-0.690186, 0.366119, -0.624115},
+       {-0.428345, 0.844147, -0.322296},
+       {-0.21228, -0.297546, -0.930756},
+       {-0.273071, 0.516113, 0.811798},
+       {0.928314, 0.371643, 0.007233},
+       {0.785828, -0.479218, -0.390778},
+       {-0.704895, 0.058929, 0.706818},
+       {0.173248, 0.203583, 0.963562},
+       {0.422211, -0.904297, -0.062469},
+       {-0.363312, -0.182465, 0.913605},
+       {0.254028, -0.552307, -0.793945},
+       {-0.28891, -0.765747, -0.574554},
+       {0.058319, 0.291382, 0.954803},
+       {0.946136, -0.303925, 0.111267},
+       {-0.078156, 0.443695, -0.892731},
+       {0.182098, 0.89389, 0.409515},
+       {-0.680298, -0.213318, 0.701141},
+       {0.062469, 0.848389, -0.525635},
+       {-0.72879, -0.641846, 0.238342},
+       {-0.88089, 0.427673, 0.202637},
+       {-0.532501, -0.21405, 0.818878},
+       {0.948975, -0.305084, 0.07962},
+       {0.925446, 0.374664, 0.055817},
+       {0.820923, 0.565491, 0.079102},
+       {0.25882, 0.099792, -0.960724},
+       {-0.294617, 0.910522, 0.289978},
+       {0.137115, 0.320038, -0.937408},
+       {-0.908386, 0.345276, -0.235718},
+       {-0.936218, 0.138763, 0.322754},
+       {0.366577, 0.925934, -0.090637},
+       {0.309296, -0.686829, -0.657684},
+       {0.66983, 0.024445, 0.742065},
+       {-0.917999, -0.059113, -0.392059},
+       {0.365509, 0.462158, -0.807922},
+       {0.083374, 0.996399, -0.014801},
+       {0.593842, 0.253143, -0.763672},
+       {0.974976, -0.165466, 0.148285},
+       {0.918976, 0.137299, 0.369537},
+       {0.294952, 0.694977, 0.655731},
+       {0.943085, 0.152618, -0.295319},
+       {0.58783, -0.598236, 0.544495},
+       {0.203796, 0.678223, 0.705994},
+       {-0.478821, -0.661011, 0.577667},
+       {0.719055, -0.1698, -0.673828},
+       {-0.132172, -0.965332, 0.225006},
+       {-0.981873, -0.14502, 0.121979},
+       {0.763458, 0.579742, 0.284546},
+       {-0.893188, 0.079681, 0.442474},
+       {-0.795776, -0.523804, 0.303802},
+       {0.734955, 0.67804, -0.007446},
+       {0.15506, 0.986267, -0.056183},
+       {0.258026, 0.571503, -0.778931},
+       {-0.681549, -0.702087, -0.206116},
+       {-0.96286, -0.177185, 0.203613},
+       {-0.470978, -0.515106, 0.716095},
+       {-0.740326, 0.57135, 0.354095},
+       {-0.56012, -0.824982, -0.074982},
+       {-0.507874, 0.753204, 0.417969},
+       {-0.503113, 0.038147, 0.863342},
+       {0.594025, 0.673553, -0.439758},
+       {-0.119873, -0.005524, -0.992737},
+       {0.098267, -0.213776, 0.971893},
+       {-0.615631, 0.643951, 0.454163},
+       {0.896851, -0.441071, 0.032166},
+       {-0.555023, 0.750763, -0.358093},
+       {0.398773, 0.304688, 0.864929},
+       {-0.722961, 0.303589, 0.620544},
+       {-0.63559, -0.621948, -0.457306},
+       {-0.293243, 0.072327, 0.953278},
+       {-0.491638, 0.661041, -0.566772},
+       {-0.304199, -0.572083, -0.761688},
+       {0.908081, -0.398956, 0.127014},
+       {-0.523621, -0.549683, -0.650848},
+       {-0.932922, -0.19986, 0.299408},
+       {0.099426, 0.140869, 0.984985},
+       {-0.020325, -0.999756, -0.002319},
+       {0.952667, 0.280853, -0.11615},
+       {-0.971893, 0.082581, 0.220337},
+       {0.65921, 0.705292, -0.260651},
+       {0.733063, -0.175537, 0.657043},
+       {-0.555206, 0.429504, -0.712189},
+       {0.400421, -0.89859, 0.179352},
+       {0.750885, -0.19696, 0.630341},
+       {0.785675, -0.569336, 0.241821},
+       {-0.058899, -0.464111, 0.883789},
+       {0.129608, -0.94519, 0.299622},
+       {-0.357819, 0.907654, 0.219238},
+       {-0.842133, -0.439117, -0.312927},
+       {-0.313477, 0.84433, 0.434479},
+       {-0.241211, 0.053253, 0.968994},
+       {0.063873, 0.823273, 0.563965},
+       {0.476288, 0.862152, -0.172516},
+       {0.620941, -0.298126, 0.724915},
+       {0.25238, -0.749359, -0.612122},
+       {-0.577545, 0.386566, 0.718994},
+       {-0.406342, -0.737976, 0.538696},
+       {0.04718, 0.556305, 0.82959},
+       {-0.802856, 0.587463, 0.101166},
+       {-0.707733, -0.705963, 0.026428},
+       {0.374908, 0.68457, 0.625092},
+       {0.472137, 0.208405, -0.856506},
+       {-0.703064, -0.581085, -0.409821},
+       {-0.417206, -0.736328, 0.532623},
+       {-0.447876, -0.20285, -0.870728},
+       {0.086945, -0.990417, 0.107086},
+       {0.183685, 0.018341, -0.982788},
+       {0.560638, -0.428864, 0.708282},
+       {0.296722, -0.952576, -0.0672},
+       {0.135773, 0.990265, 0.030243},
+       {-0.068787, 0.654724, 0.752686},
+       {0.762604, -0.551758, 0.337585},
+       {-0.819611, -0.407684, 0.402466},
+       {-0.727844, -0.55072, -0.408539},
+       {-0.855774, -0.480011, 0.19281},
+       {0.693176, -0.079285, 0.716339},
+       {0.226013, 0.650116, -0.725433},
+       {0.246704, 0.953369, -0.173553},
+       {-0.970398, -0.239227, -0.03244},
+       {0.136383, -0.394318, 0.908752},
+       {0.813232, 0.558167, 0.164368},
+       {0.40451, 0.549042, -0.731323},
+       {-0.380249, -0.566711, 0.730865},
+       {0.022156, 0.932739, 0.359741},
+       {0.00824, 0.996552, -0.082306},
+       {0.956635, -0.065338, -0.283722},
+       {-0.743561, 0.008209, 0.668579},
+       {-0.859589, -0.509674, 0.035767},
+       {-0.852234, 0.363678, -0.375977},
+       {-0.201965, -0.970795, -0.12915},
+       {0.313477, 0.947327, 0.06546},
+       {-0.254028, -0.528259, 0.81015},
+       {0.628052, 0.601105, 0.49411},
+       {-0.494385, 0.868378, 0.037933},
+       {0.275635, -0.086426, 0.957336},
+       {-0.197937, 0.468903, -0.860748},
+       {0.895599, 0.399384, 0.195801},
+       {0.560791, 0.825012, -0.069214},
+       {0.304199, -0.849487, 0.43103},
+       {0.096375, 0.93576, 0.339111},
+       {-0.051422, 0.408966, -0.911072},
+       {0.330444, 0.942841, -0.042389},
+       {-0.452362, -0.786407, 0.420563},
+       {0.134308, -0.933472, -0.332489},
+       {0.80191, -0.566711, -0.188934},
+       {-0.987946, -0.105988, 0.112518},
+       {-0.24408, 0.892242, -0.379791},
+       {-0.920502, 0.229095, -0.316376},
+       {0.7789, 0.325958, 0.535706},
+       {-0.912872, 0.185211, -0.36377},
+       {-0.184784, 0.565369, -0.803833},
+       {-0.018463, 0.119537, 0.992615},
+       {-0.259247, -0.935608, 0.239532},
+       {-0.82373, -0.449127, -0.345947},
+       {-0.433105, 0.659515, 0.614349},
+       {-0.822754, 0.378845, -0.423676},
+       {0.687195, -0.674835, -0.26889},
+       {-0.246582, -0.800842, 0.545715},
+       {-0.729187, -0.207794, 0.651978},
+       {0.653534, -0.610443, -0.447388},
+       {0.492584, -0.023346, 0.869934},
+       {0.609039, 0.009094, -0.79306},
+       {0.962494, -0.271088, -0.00885},
+       {0.2659, -0.004913, 0.963959},
+       {0.651245, 0.553619, -0.518951},
+       {0.280548, -0.84314, 0.458618},
+       {-0.175293, -0.983215, 0.049805},
+       {0.035339, -0.979919, 0.196045},
+       {-0.982941, 0.164307, -0.082245},
+       {0.233734, -0.97226, -0.005005},
+       {-0.747253, -0.611328, 0.260437},
+       {0.645599, 0.592773, 0.481384},
+       {0.117706, -0.949524, -0.29068},
+       {-0.535004, -0.791901, -0.294312},
+       {-0.627167, -0.214447, 0.748718},
+       {-0.047974, -0.813477, -0.57959},
+       {-0.175537, 0.477264, -0.860992},
+       {0.738556, -0.414246, -0.53183},
+       {0.562561, -0.704071, 0.433289},
+       {-0.754944, 0.64801, -0.100586},
+       {0.114716, 0.044525, -0.992371},
+       {0.966003, 0.244873, -0.082764},
+       {0.33783, 0.715698, -0.611206},
+       {-0.944031, -0.326599, -0.045624},
+       {-0.101074, -0.416443, -0.903503},
+       {0.799286, 0.49411, -0.341949},
+       {-0.854645, 0.518036, 0.033936},
+       {0.42514, -0.437866, -0.792114},
+       {-0.358948, 0.597046, 0.717377},
+       {-0.985413, 0.144714, 0.089294},
+       {-0.601776, -0.33728, -0.723907},
+       {-0.449921, 0.594513, 0.666382},
+       {0.208313, -0.10791, 0.972076},
+       {0.575317, 0.060425, 0.815643},
+       {0.293365, -0.875702, -0.383453},
+       {0.293762, 0.465759, 0.834686},
+       {-0.846008, -0.233398, -0.47934},
+       {-0.115814, 0.143036, -0.98291},
+       {0.204681, -0.949036, -0.239532},
+       {0.946716, -0.263947, 0.184326},
+       {-0.235596, 0.573822, 0.784332},
+       {0.203705, -0.372253, -0.905487},
+       {0.756989, -0.651031, 0.055298},
+       {0.497803, 0.814697, -0.297363},
+       {-0.16214, 0.063995, -0.98468},
+       {-0.329254, 0.834381, 0.441925},
+       {0.703827, -0.527039, -0.476227},
+       {0.956421, 0.266113, 0.119781},
+       {0.480133, 0.482849, 0.7323},
+       {-0.18631, 0.961212, -0.203125},
+       {-0.748474, -0.656921, -0.090393},
+       {-0.085052, -0.165253, 0.982544},
+       {-0.76947, 0.628174, -0.115234},
+       {0.383148, 0.537659, 0.751068},
+       {0.616486, -0.668488, -0.415924},
+       {-0.259979, -0.630005, 0.73175},
+       {0.570953, -0.087952, 0.816223},
+       {-0.458008, 0.023254, 0.888611},
+       {-0.196167, 0.976563, -0.088287},
+       {-0.263885, -0.69812, -0.665527},
+       {0.437134, -0.892273, -0.112793},
+       {-0.621674, -0.230438, 0.748566},
+       {0.232422, 0.900574, -0.367249},
+       {0.22229, -0.796143, 0.562744},
+       {-0.665497, -0.73764, 0.11377},
+       {0.670135, 0.704803, 0.232605},
+       {0.895599, 0.429749, -0.114655},
+       {-0.11557, -0.474243, 0.872742},
+       {0.621826, 0.604004, -0.498444},
+       {-0.832214, 0.012756, 0.55426},
+       {-0.702484, 0.705994, -0.089661},
+       {-0.692017, 0.649292, 0.315399},
+       {-0.175995, -0.977997, 0.111877},
+       {0.096954, -0.04953, 0.994019},
+       {0.635284, -0.606689, -0.477783},
+       {-0.261261, -0.607422, -0.750153},
+       {0.983276, 0.165436, 0.075958},
+       {-0.29837, 0.404083, -0.864655},
+       {-0.638672, 0.507721, 0.578156},
+       {0.388214, 0.412079, 0.824249},
+       {0.556183, -0.208832, 0.804352},
+       {0.778442, 0.562012, 0.27951},
+       {-0.616577, 0.781921, -0.091522},
+       {0.196289, 0.051056, 0.979187},
+       {-0.121216, 0.207153, -0.970734},
+       {-0.173401, -0.384735, 0.906555},
+       {0.161499, -0.723236, -0.671387},
+       {0.178497, -0.006226, -0.983887},
+       {-0.126038, 0.15799, 0.97934},
+       {0.830475, -0.024811, 0.556458},
+       {-0.510132, -0.76944, 0.384247},
+       {0.81424, 0.200104, -0.544891},
+       {-0.112549, -0.393311, -0.912445},
+       {0.56189, 0.152222, -0.813049},
+       {0.198914, -0.254517, -0.946381},
+       {-0.41217, 0.690979, -0.593811},
+       {-0.407257, 0.324524, 0.853668},
+       {-0.690186, 0.366119, -0.624115},
+       {-0.428345, 0.844147, -0.322296},
+       {-0.21228, -0.297546, -0.930756},
+       {-0.273071, 0.516113, 0.811798},
+       {0.928314, 0.371643, 0.007233},
+       {0.785828, -0.479218, -0.390778},
+       {-0.704895, 0.058929, 0.706818},
+       {0.173248, 0.203583, 0.963562},
+       {0.422211, -0.904297, -0.062469},
+       {-0.363312, -0.182465, 0.913605},
+       {0.254028, -0.552307, -0.793945},
+       {-0.28891, -0.765747, -0.574554},
+       {0.058319, 0.291382, 0.954803},
+       {0.946136, -0.303925, 0.111267},
+       {-0.078156, 0.443695, -0.892731},
+       {0.182098, 0.89389, 0.409515},
+       {-0.680298, -0.213318, 0.701141},
+       {0.062469, 0.848389, -0.525635},
+       {-0.72879, -0.641846, 0.238342},
+       {-0.88089, 0.427673, 0.202637},
+       {-0.532501, -0.21405, 0.818878},
+       {0.948975, -0.305084, 0.07962},
+       {0.925446, 0.374664, 0.055817},
+       {0.820923, 0.565491, 0.079102},
+       {0.25882, 0.099792, -0.960724},
+       {-0.294617, 0.910522, 0.289978},
+       {0.137115, 0.320038, -0.937408},
+       {-0.908386, 0.345276, -0.235718},
+       {-0.936218, 0.138763, 0.322754},
+       {0.366577, 0.925934, -0.090637},
+       {0.309296, -0.686829, -0.657684},
+       {0.66983, 0.024445, 0.742065},
+       {-0.917999, -0.059113, -0.392059},
+       {0.365509, 0.462158, -0.807922},
+       {0.083374, 0.996399, -0.014801},
+       {0.593842, 0.253143, -0.763672},
+       {0.974976, -0.165466, 0.148285},
+       {0.918976, 0.137299, 0.369537},
+       {0.294952, 0.694977, 0.655731},
+       {0.943085, 0.152618, -0.295319},
+       {0.58783, -0.598236, 0.544495},
+       {0.203796, 0.678223, 0.705994},
+       {-0.478821, -0.661011, 0.577667},
+       {0.719055, -0.1698, -0.673828},
+       {-0.132172, -0.965332, 0.225006},
+       {-0.981873, -0.14502, 0.121979},
+       {0.763458, 0.579742, 0.284546},
+       {-0.893188, 0.079681, 0.442474},
+       {-0.795776, -0.523804, 0.303802},
+       {0.734955, 0.67804, -0.007446},
+       {0.15506, 0.986267, -0.056183},
+       {0.258026, 0.571503, -0.778931},
+       {-0.681549, -0.702087, -0.206116},
+       {-0.96286, -0.177185, 0.203613},
+       {-0.470978, -0.515106, 0.716095},
+       {-0.740326, 0.57135, 0.354095},
+       {-0.56012, -0.824982, -0.074982},
+       {-0.507874, 0.753204, 0.417969},
+       {-0.503113, 0.038147, 0.863342},
+       {0.594025, 0.673553, -0.439758},
+       {-0.119873, -0.005524, -0.992737},
+       {0.098267, -0.213776, 0.971893},
+       {-0.615631, 0.643951, 0.454163},
+       {0.896851, -0.441071, 0.032166},
+       {-0.555023, 0.750763, -0.358093},
+       {0.398773, 0.304688, 0.864929},
+       {-0.722961, 0.303589, 0.620544},
+       {-0.63559, -0.621948, -0.457306},
+       {-0.293243, 0.072327, 0.953278},
+       {-0.491638, 0.661041, -0.566772},
+       {-0.304199, -0.572083, -0.761688},
+       {0.908081, -0.398956, 0.127014},
+       {-0.523621, -0.549683, -0.650848},
+       {-0.932922, -0.19986, 0.299408},
+       {0.099426, 0.140869, 0.984985},
+       {-0.020325, -0.999756, -0.002319},
+       {0.952667, 0.280853, -0.11615},
+       {-0.971893, 0.082581, 0.220337},
+       {0.65921, 0.705292, -0.260651},
+       {0.733063, -0.175537, 0.657043},
+       {-0.555206, 0.429504, -0.712189},
+       {0.400421, -0.89859, 0.179352},
+       {0.750885, -0.19696, 0.630341},
+       {0.785675, -0.569336, 0.241821},
+       {-0.058899, -0.464111, 0.883789},
+       {0.129608, -0.94519, 0.299622},
+       {-0.357819, 0.907654, 0.219238},
+       {-0.842133, -0.439117, -0.312927},
+       {-0.313477, 0.84433, 0.434479},
+       {-0.241211, 0.053253, 0.968994},
+       {0.063873, 0.823273, 0.563965},
+       {0.476288, 0.862152, -0.172516},
+       {0.620941, -0.298126, 0.724915},
+       {0.25238, -0.749359, -0.612122},
+       {-0.577545, 0.386566, 0.718994},
+       {-0.406342, -0.737976, 0.538696},
+       {0.04718, 0.556305, 0.82959},
+       {-0.802856, 0.587463, 0.101166},
+       {-0.707733, -0.705963, 0.026428},
+       {0.374908, 0.68457, 0.625092},
+       {0.472137, 0.208405, -0.856506},
+       {-0.703064, -0.581085, -0.409821},
+       {-0.417206, -0.736328, 0.532623},
+       {-0.447876, -0.20285, -0.870728},
+       {0.086945, -0.990417, 0.107086},
+       {0.183685, 0.018341, -0.982788},
+       {0.560638, -0.428864, 0.708282},
+       {0.296722, -0.952576, -0.0672},
+       {0.135773, 0.990265, 0.030243},
+       {-0.068787, 0.654724, 0.752686},
+       {0.762604, -0.551758, 0.337585},
+       {-0.819611, -0.407684, 0.402466},
+       {-0.727844, -0.55072, -0.408539},
+       {-0.855774, -0.480011, 0.19281},
+       {0.693176, -0.079285, 0.716339},
+       {0.226013, 0.650116, -0.725433},
+       {0.246704, 0.953369, -0.173553},
+       {-0.970398, -0.239227, -0.03244},
+       {0.136383, -0.394318, 0.908752},
+       {0.813232, 0.558167, 0.164368},
+       {0.40451, 0.549042, -0.731323},
+       {-0.380249, -0.566711, 0.730865},
+       {0.022156, 0.932739, 0.359741},
+       {0.00824, 0.996552, -0.082306},
+       {0.956635, -0.065338, -0.283722},
+       {-0.743561, 0.008209, 0.668579},
+       {-0.859589, -0.509674, 0.035767},
+       {-0.852234, 0.363678, -0.375977},
+       {-0.201965, -0.970795, -0.12915},
+       {0.313477, 0.947327, 0.06546},
+       {-0.254028, -0.528259, 0.81015},
+       {0.628052, 0.601105, 0.49411},
+       {-0.494385, 0.868378, 0.037933},
+       {0.275635, -0.086426, 0.957336},
+       {-0.197937, 0.468903, -0.860748},
+       {0.895599, 0.399384, 0.195801},
+       {0.560791, 0.825012, -0.069214},
+       {0.304199, -0.849487, 0.43103},
+       {0.096375, 0.93576, 0.339111},
+       {-0.051422, 0.408966, -0.911072},
+       {0.330444, 0.942841, -0.042389},
+       {-0.452362, -0.786407, 0.420563},
+       {0.134308, -0.933472, -0.332489},
+       {0.80191, -0.566711, -0.188934},
+       {-0.987946, -0.105988, 0.112518},
+       {-0.24408, 0.892242, -0.379791},
+       {-0.920502, 0.229095, -0.316376},
+       {0.7789, 0.325958, 0.535706},
+       {-0.912872, 0.185211, -0.36377},
+       {-0.184784, 0.565369, -0.803833},
+       {-0.018463, 0.119537, 0.992615},
+       {-0.259247, -0.935608, 0.239532},
+       {-0.82373, -0.449127, -0.345947},
+       {-0.433105, 0.659515, 0.614349},
+       {-0.822754, 0.378845, -0.423676},
+       {0.687195, -0.674835, -0.26889},
+       {-0.246582, -0.800842, 0.545715},
+       {-0.729187, -0.207794, 0.651978},
+       {0.653534, -0.610443, -0.447388},
+       {0.492584, -0.023346, 0.869934},
+       {0.609039, 0.009094, -0.79306},
+       {0.962494, -0.271088, -0.00885},
+       {0.2659, -0.004913, 0.963959},
+       {0.651245, 0.553619, -0.518951},
+       {0.280548, -0.84314, 0.458618},
+       {-0.175293, -0.983215, 0.049805},
+       {0.035339, -0.979919, 0.196045},
+       {-0.982941, 0.164307, -0.082245},
+       {0.233734, -0.97226, -0.005005},
+       {-0.747253, -0.611328, 0.260437},
+       {0.645599, 0.592773, 0.481384},
+       {0.117706, -0.949524, -0.29068},
+       {-0.535004, -0.791901, -0.294312},
+       {-0.627167, -0.214447, 0.748718},
+       {-0.047974, -0.813477, -0.57959},
+       {-0.175537, 0.477264, -0.860992},
+       {0.738556, -0.414246, -0.53183},
+       {0.562561, -0.704071, 0.433289},
+       {-0.754944, 0.64801, -0.100586},
+       {0.114716, 0.044525, -0.992371},
+       {0.966003, 0.244873, -0.082764},
+       {0.33783, 0.715698, -0.611206},
+       {-0.944031, -0.326599, -0.045624},
+};
 
 
 
index 441484fc88b7cc84f39284e97272a825bd91b69e..8cdc0601c7e5ed5da3aa8409c52ff8f43addc68b 100644 (file)
@@ -256,290 +256,290 @@ static int sp;
 static int savesplines = 1;
 
 static pschar ISOcharlist[NASCII] = {
-       "/space",               040,    0,
-           "/exclam",          041,    0,
-           "/quotedbl",        042,    0,
-           "/numbersign",      043,    0,
-           "/dollar",          044,    0,
-           "/percent",         045,    0,
-           "/ampersand",       046,    0,
-           "/quoteright",      047,    0,
-
-           "/parenleft",       050,    0,
-           "/parenright",      051,    0,
-           "/asterisk",        052,    0,
-           "/plus",            053,    0,
-           "/comma",           054,    0,
-           "/hyphen",          055,    0,
-           "/period",          056,    0,
-           "/slash",           057,    0,
-
-           "/zero",            060,    0,
-           "/one",             061,    0,
-           "/two",             062,    0,
-           "/three",           063,    0,
-           "/four",            064,    0,
-           "/five",            065,    0,
-           "/six",             066,    0,
-           "/seven",           067,    0,
-
-           "/eight",           070,    0,
-           "/nine",            071,    0,
-           "/colon",           072,    0,
-           "/semicolon",       073,    0,
-           "/less",            074,    0,
-           "/equal",           075,    0,
-           "/greater",         076,    0,
-           "/question",        077,    0,
-
-           "/at",              0100,   0,
-           "/A",               0101,   0,
-           "/B",               0102,   0,
-           "/C",               0103,   0,
-           "/D",               0104,   0,
-           "/E",               0105,   0,
-           "/F",               0106,   0,
-           "/G",               0107,   0,
-
-           "/H",               0110,   0,
-           "/I",               0111,   0,
-           "/J",               0112,   0,
-           "/K",               0113,   0,
-           "/L",               0114,   0,
-           "/M",               0115,   0,
-           "/N",               0116,   0,
-           "/O",               0117,   0,
-
-           "/P",               0120,   0,
-           "/Q",               0121,   0,
-           "/R",               0122,   0,
-           "/S",               0123,   0,
-           "/T",               0124,   0,
-           "/U",               0125,   0,
-           "/V",               0126,   0,
-           "/W",               0127,   0,
-
-           "/X",               0130,   0,
-           "/Y",               0131,   0,
-           "/Z",               0132,   0,
-           "/bracketleft",     0133,   0,
-           "/backslash",       0134,   0,
-           "/bracketright",    0135,   0,
-           "/asciicircum",     0136,   0,
-           "/underscore",      0137,   0,
-
-           "/quoteleft",       0140,   0,
-           "/a",               0141,   0,
-           "/b",               0142,   0,
-           "/c",               0143,   0,
-           "/d",               0144,   0,
-           "/e",               0145,   0,
-           "/f",               0146,   0,
-           "/g",               0147,   0,
-
-           "/h",               0150,   0,
-           "/i",               0151,   0,
-           "/j",               0152,   0,
-           "/k",               0153,   0,
-           "/l",               0154,   0,
-           "/m",               0155,   0,
-           "/n",               0156,   0,
-           "/o",               0157,   0,
-
-           "/p",               0160,   0,
-           "/q",               0161,   0,
-           "/r",               0162,   0,
-           "/s",               0163,   0,
-           "/t",               0164,   0,
-           "/u",               0165,   0,
-           "/v",               0166,   0,
-           "/w",               0167,   0,
-
-           "/x",               0170,   0,
-           "/y",               0171,   0,
-           "/z",               0172,   0,
-           "/braceleft",       0173,   0,
-           "/bar",             0174,   0,
-           "/braceright",      0175,   0,
-           "/asciitilde",      0176,   0,
-           "/",                0177,   0,
+       {"/space",                      040,    0},
+           {"/exclam",         041,    0},
+           {"/quotedbl",       042,    0},
+           {"/numbersign", 043,        0},
+           {"/dollar",         044,    0},
+           {"/percent",        045,    0},
+           {"/ampersand",      046,    0},
+           {"/quoteright", 047,        0},
+
+           {"/parenleft",      050,    0},
+           {"/parenright", 051,        0},
+           {"/asterisk",       052,    0},
+           {"/plus",           053,    0},
+           {"/comma",          054,    0},
+           {"/hyphen",         055,    0},
+           {"/period",         056,    0},
+           {"/slash",          057,    0},
+
+           {"/zero",           060,    0},
+           {"/one",            061,    0},
+           {"/two",            062,    0},
+           {"/three",          063,    0},
+           {"/four",           064,    0},
+           {"/five",           065,    0},
+           {"/six",            066,    0},
+           {"/seven",          067,    0},
+
+           {"/eight",          070,    0},
+           {"/nine",           071,    0},
+           {"/colon",          072,    0},
+           {"/semicolon",      073,    0},
+           {"/less",           074,    0},
+           {"/equal",          075,    0},
+           {"/greater",        076,    0},
+           {"/question",       077,    0},
+
+           {"/at",             0100,   0},
+           {"/A",              0101,   0},
+           {"/B",              0102,   0},
+           {"/C",              0103,   0},
+           {"/D",              0104,   0},
+           {"/E",              0105,   0},
+           {"/F",              0106,   0},
+           {"/G",              0107,   0},
+
+           {"/H",              0110,   0},
+           {"/I",              0111,   0},
+           {"/J",              0112,   0},
+           {"/K",              0113,   0},
+           {"/L",              0114,   0},
+           {"/M",              0115,   0},
+           {"/N",              0116,   0},
+           {"/O",              0117,   0},
+
+           {"/P",              0120,   0},
+           {"/Q",              0121,   0},
+           {"/R",              0122,   0},
+           {"/S",              0123,   0},
+           {"/T",              0124,   0},
+           {"/U",              0125,   0},
+           {"/V",              0126,   0},
+           {"/W",              0127,   0},
+
+           {"/X",                              0130,   0},
+           {"/Y",                              0131,   0},
+           {"/Z",                              0132,   0},
+           {"/bracketleft",    0133,   0},
+           {"/backslash",              0134,   0},
+           {"/bracketright",   0135,   0},
+           {"/asciicircum",    0136,   0},
+           {"/underscore",     0137,   0},
+
+           {"/quoteleft",      0140,   0},
+           {"/a",                      0141,   0},
+           {"/b",                      0142,   0},
+           {"/c",                      0143,   0},
+           {"/d",                      0144,   0},
+           {"/e",                      0145,   0},
+           {"/f",                      0146,   0},
+           {"/g",                      0147,   0},
+
+           {"/h",              0150,   0},
+           {"/i",              0151,   0},
+           {"/j",              0152,   0},
+           {"/k",              0153,   0},
+           {"/l",              0154,   0},
+           {"/m",              0155,   0},
+           {"/n",              0156,   0},
+           {"/o",              0157,   0},
+
+           {"/p",              0160,   0},
+           {"/q",              0161,   0},
+           {"/r",              0162,   0},
+           {"/s",              0163,   0},
+           {"/t",              0164,   0},
+           {"/u",              0165,   0},
+           {"/v",              0166,   0},
+           {"/w",              0167,   0},
+
+           {"/x",                      0170,   0},
+           {"/y",                      0171,   0},
+           {"/z",                      0172,   0},
+           {"/braceleft",      0173,   0},
+           {"/bar",            0174,   0},
+           {"/braceright",     0175,   0},
+           {"/asciitilde", 0176,       0},
+           {"/",                       0177,   0},
 
 
            /* nonstandard defs */
 
-       "/quotedblleft",        0200,   0,
-           "/quotedblright",   0201,   0,
-           "/quotedblbase",    0202,   0,
-           "/quotesinglbase",  0203,   0,
-           "/guilsinglleft",   0204,   0,
-           "/guilsinglright",  0205,   0,
-           "/endash",          0206,   0,
-           "/dagger",          0207,   0,
-
-           "/daggerdbl",       0210,   0,
-           "/trademark",       0211,   0,
-           "/bullet",          0212,   0,
-           "/perthousand",     0213,   0,
-           "/Lslash",          0214,   0,
-           "/OE",              0215,   0,
-           "/lslash",          0216,   0,
-           "/oe",              0217,   0,
+       {"/quotedblleft",               0200,   0},
+           {"/quotedblright",  0201,   0},
+           {"/quotedblbase",   0202,   0},
+           {"/quotesinglbase", 0203,   0},
+           {"/guilsinglleft",  0204,   0},
+           {"/guilsinglright", 0205,   0},
+           {"/endash",                 0206,   0},
+           {"/dagger",                 0207,   0},
+
+           {"/daggerdbl",              0210,   0},
+           {"/trademark",              0211,   0},
+           {"/bullet",                 0212,   0},
+           {"/perthousand",    0213,   0},
+           {"/Lslash",                 0214,   0},
+           {"/OE",                             0215,   0},
+           {"/lslash",                 0216,   0},
+           {"/oe",                             0217,   0},
 
            /* endnonstandard defs */
 
-       "/dotlessi",    0220,   0,
-           "/grave",           0221,   0,
-           "/acute",           0222,   0,
-           "/circumflex",      0223,   0,
-           "/tilde",           0224,   0,
-           "/",                0225,   0,
-           "/breve",           0226,   0,
-           "/dotaccent",       0227,   0,
-
-           "/",                0230,   0,
-           "/",                0231,   0,
-           "/ring",            0232,   0,
-           "/",                0233,   0,
-           "/",                0234,   0,
-           "/hungarumlaut",    0235,   0,
-           "/ogonek",          0236,   0,
-           "/caron",           0237,   0,
-
-           "/",                0240,   0,
-           "/exclamdown",      0241,   0,
-           "/cent",            0242,   0,
-           "/sterling",        0243,   0,
-           "/florin",          0244,   0,
-           "/yen",             0245,   0,
-           "/brokenbar",       0246,   0,
-           "/section",         0247,   0,
-
-           "/dieresis",        0250,   0,
-           "/copyright",       0251,   0,
-           "/ordfeminine",     0252,   0,
-           "/guillemotleft",   0253,   0,
-           "/logicalnot",      0254,   0,
-           "/hyphen",          0255,   0,
-           "/registered",      0256,   0,
-           "/macron",          0257,   0,
-
-           "/degree",          0260,   0,
-           "/plusminus",       0261,   0,
-           "/twosuperior",     0262,   0,
-           "/threesuperior",   0263,   0,
-           "/acute",           0264,   0,
-           "/mu",              0265,   0,
-           "/paragraph",       0266,   0,
-           "/periodcentered",  0267,   0,
-
-           "/cedilla",         0270,   0,
-           "/onesuperior",     0271,   0,
-           "/ordmasculine",    0272,   0,
-           "/guillemotright",  0273,   0,
-           "/onequarter",      0274,   0,
-           "/onehalf",         0275,   0,
-           "/threequarters",   0276,   0,
-           "/questiondown",    0277,   0,
-
-           "/Agrave",          0300,   0,
-           "/Aacute",          0301,   0,
-           "/Acircumflex",     0302,   0,
-           "/Atilde",          0303,   0,
-           "/Adieresis",       0304,   0,
-           "/Aring",           0305,   0,
-           "/AE",              0306,   0,
-           "/Ccedilla",        0307,   0,
-
-           "/Egrave",          0310,   0,
-           "/Eacute",          0311,   0,
-           "/Ecircumflex",     0312,   0,
-           "/Edieresis",       0313,   0,
-           "/Igrave",          0314,   0,
-           "/Iacute",          0315,   0,
-           "/Icircumflex",     0316,   0,
-           "/Idieresis",       0317,   0,
-
-           "/Eth",             0320,   0,
-           "/Ntilde",          0321,   0,
-           "/Ograve",          0322,   0,
-           "/Oacute",          0323,   0,
-           "/Ocircumflex",     0324,   0,
-           "/Otilde",          0325,   0,
-           "/Odieresis",       0326,   0,
-           "/multiply",        0327,   0,
-
-           "/Oslash",          0330,   0,
-           "/Ugrave",          0331,   0,
-           "/Uacute",          0332,   0,
-           "/Ucircumflex",     0333,   0,
-           "/Udieresis",       0334,   0,
-           "/Yacute",          0335,   0,
-           "/Thorn",           0336,   0,
-           "/germandbls",      0337,   0,
-
-           "/agrave",          0340,   0,
-           "/aacute",          0341,   0,
-           "/acircumflex",     0342,   0,
-           "/atilde",          0343,   0,
-           "/adieresis",       0344,   0,
-           "/aring",           0345,   0,
-           "/ae",              0346,   0,
-           "/ccedilla",        0347,   0,
-
-           "/egrave",          0350,   0,
-           "/eacute",          0351,   0,
-           "/ecircumflex",     0352,   0,
-           "/edieresis",       0353,   0,
-           "/igrave",          0354,   0,
-           "/iacute",          0355,   0,
-           "/icircumflex",     0356,   0,
-           "/idieresis",       0357,   0,
-
-           "/eth",             0360,   0,
-           "/ntilde",          0361,   0,
-           "/ograve",          0362,   0,
-           "/oacute",          0363,   0,
-           "/ocircumflex",     0364,   0,
-           "/otilde",          0365,   0,
-           "/odieresis",       0366,   0,
-           "/divide",          0367,   0,
-
-           "/oslash",          0370,   0,
-           "/ugrave",          0371,   0,
-           "/uacute",          0372,   0,
-           "/ucircumflex",     0373,   0,
-           "/udieresis",       0374,   0,
-           "/yacute",          0375,   0,
-           "/thorn",           0376,   0,
-           "/ydieresis",       0377,   0,
+       {"/dotlessi",           0220,   0},
+           {"/grave",          0221,   0},
+           {"/acute",          0222,   0},
+           {"/circumflex",     0223,   0},
+           {"/tilde",          0224,   0},
+           {"/",                       0225,   0},
+           {"/breve",          0226,   0},
+           {"/dotaccent",      0227,   0},
+
+           {"/",                               0230,   0},
+           {"/",                               0231,   0},
+           {"/ring",                   0232,   0},
+           {"/",                               0233,   0},
+           {"/",                               0234,   0},
+           {"/hungarumlaut",   0235,   0},
+           {"/ogonek",                 0236,   0},
+           {"/caron",                  0237,   0},
+
+           {"/",                       0240,   0},
+           {"/exclamdown",     0241,   0},
+           {"/cent",           0242,   0},
+           {"/sterling",       0243,   0},
+           {"/florin",         0244,   0},
+           {"/yen",            0245,   0},
+           {"/brokenbar",      0246,   0},
+           {"/section",        0247,   0},
+
+           {"/dieresis",               0250,   0},
+           {"/copyright",              0251,   0},
+           {"/ordfeminine",    0252,   0},
+           {"/guillemotleft",  0253,   0},
+           {"/logicalnot",             0254,   0},
+           {"/hyphen",                 0255,   0},
+           {"/registered",             0256,   0},
+           {"/macron",                 0257,   0},
+
+           {"/degree",                 0260,   0},
+           {"/plusminus",              0261,   0},
+           {"/twosuperior",    0262,   0},
+           {"/threesuperior",  0263,   0},
+           {"/acute",                  0264,   0},
+           {"/mu",                             0265,   0},
+           {"/paragraph",              0266,   0},
+           {"/periodcentered", 0267,   0},
+
+           {"/cedilla",                0270,   0},
+           {"/onesuperior",    0271,   0},
+           {"/ordmasculine",   0272,   0},
+           {"/guillemotright", 0273,   0},
+           {"/onequarter",             0274,   0},
+           {"/onehalf",                0275,   0},
+           {"/threequarters",  0276,   0},
+           {"/questiondown",   0277,   0},
+
+           {"/Agrave",                 0300,   0},
+           {"/Aacute",                 0301,   0},
+           {"/Acircumflex",    0302,   0},
+           {"/Atilde",                 0303,   0},
+           {"/Adieresis",              0304,   0},
+           {"/Aring",                  0305,   0},
+           {"/AE",                             0306,   0},
+           {"/Ccedilla",               0307,   0},
+
+           {"/Egrave",                 0310,   0},
+           {"/Eacute",                 0311,   0},
+           {"/Ecircumflex",    0312,   0},
+           {"/Edieresis",              0313,   0},
+           {"/Igrave",                 0314,   0},
+           {"/Iacute",                 0315,   0},
+           {"/Icircumflex",    0316,   0},
+           {"/Idieresis",              0317,   0},
+
+           {"/Eth",                    0320,&nb