Merged changes from trunk to soc-2008-mxcurioni: svn merge -r 14534:14595 https:...
authorMaxime Curioni <maxime.curioni@gmail.com>
Mon, 28 Apr 2008 16:21:26 +0000 (16:21 +0000)
committerMaxime Curioni <maxime.curioni@gmail.com>
Mon, 28 Apr 2008 16:21:26 +0000 (16:21 +0000)
97 files changed:
CMakeLists.txt
SConstruct
config/darwin-config.py
doc/blender-scons.txt
extern/verse/dist/v_network.c
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/datatoc.c
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/bad_level_call_stubs/stubs.c
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/action.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/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/intern/bpath.c
source/blender/blenlib/intern/util.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/ftfont/intern/FTF_TTFont.cpp
source/blender/imbuf/intern/util.c
source/blender/include/BIF_editaction.h
source/blender/include/BSE_sequence.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/nodes/intern/SHD_nodes/SHD_dynamic.c
source/blender/python/BPY_interface.c
source/blender/python/api2_2x/Blender.c
source/blender/python/api2_2x/Effect.c
source/blender/python/api2_2x/Node.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/render/intern/source/pipeline.c
source/blender/src/B.blend.c
source/blender/src/buttons_object.c
source/blender/src/buttons_scene.c
source/blender/src/drawaction.c
source/blender/src/drawimage.c
source/blender/src/drawimasel.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/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/toets.c
source/blender/src/transform_conversions.c
source/blender/src/usiblender.c
source/blender/src/view.c
source/creator/CMakeLists.txt
source/creator/creator.c
source/gameengine/GameLogic/SCA_IActuator.h
source/gameengine/GameLogic/SCA_IObject.cpp
source/gameengine/GameLogic/SCA_IObject.h
source/gameengine/GameLogic/SCA_LogicManager.cpp
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_Scene.cpp
source/gameengine/Ketsji/KX_TrackToActuator.cpp
source/gameengine/Ketsji/KX_TrackToActuator.h
source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
source/gameengine/Physics/Sumo/Fuzzics/include/SM_Callback.h
tools/btools.py

index fbcc0c933ce905addbfe4960e81b6ad3f62c0c42..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)
@@ -258,7 +258,7 @@ IF(WIN32)
 
   SET(FFMPEG ${LIBDIR}/ffmpeg)
   SET(FFMPEG_INC ${FFMPEG}/include)
-  SET(FFMPEG_LIB avcodec-51 avformat-51 avutil-49)
+  SET(FFMPEG_LIB avcodec-51 avformat-52 avdevice-52 avutil-49 swscale-0)
   SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
 
   SET(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32 vfw32 winmm)
@@ -299,7 +299,7 @@ IF(WIN32)
   SET(WINTAB_INC ${LIBDIR}/wintab/include) 
 
   SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib")
-  SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt.lib ")
+  SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt.lib;libc.lib ")
 ENDIF(WIN32)
 
 IF(APPLE)
index 47914b8853daec8dc0419dcdb5e9ef4165509b91..dcb5cfef3eca2d41b595c961115f524da3eec6a7 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
 
@@ -267,6 +268,11 @@ if not quickie and do_clean:
             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 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 +361,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 +416,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 +438,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 +472,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..b12a93a1da8528c1ccf35ddeb50940f2a54e1853 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'
@@ -143,20 +197,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 +245,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 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 75f789b378a2bc6d06804215c48d4eefe85165ea..2e24a0f92efa83f99c714f424141305b17d43074 100644 (file)
@@ -62,7 +62,7 @@ int main(int argc, char**argv) {
                if (argv[1][i]=='.') argv[1][i]='_';
 
        sprintf(sizest, "%d", (int)size);
-       printf ("Input filesize is %d, Output size should be %d\n", size, ((int)size)*4 + strlen("/* DataToC output of file <> */\n\n") + strlen("char datatoc_[]= {\"") + strlen ("\"};\n") + (strlen(argv[1])*3) + strlen(sizest) + strlen("int datatoc__size= ;\n") +(((int)(size/256)+1)*5));
+       printf ("Input filesize is %ld, Output size should be %ld\n", size, ((int)size)*4 + strlen("/* DataToC output of file <> */\n\n") + strlen("char datatoc_[]= {\"") + strlen ("\"};\n") + (strlen(argv[1])*3) + strlen(sizest) + strlen("int datatoc__size= ;\n") +(((int)(size/256)+1)*5));
        
        fpout= fopen(cname, "w");
        if (!fpout) {
@@ -93,8 +93,8 @@ int main(int argc, char**argv) {
                /* fprintf (fpout, "\\x%02x", getc(fpin)); */
                fprintf (fpout, "%3d,", getc(fpin));
        }
-       
-       fprintf (fpout, "\n};\n\n");
+       /* null terminate for the case it is a string */
+       fprintf (fpout, "\n  0};\n\n");
        
        fclose(fpin);
        fclose(fpout);
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 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 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 f3c698ed2b6dec46ced04ee2a406ceec9b0989cb..09c939629903d40cdb44036c229910dd346cfe41 100644 (file)
@@ -159,41 +159,61 @@ utf8slen(char *src)
        return size;
 }
 
-int utf8towchar_(wchar_t *w, char *c)
+
+/* Converts Unicode to wchar
+
+According to RFC 3629 "UTF-8, a transformation format of ISO 10646"
+(http://tools.ietf.org/html/rfc3629), the valid UTF-8 encoding are:
+
+  Char. number range  |        UTF-8 octet sequence
+      (hexadecimal)    |              (binary)
+   --------------------+---------------------------------------------
+   0000 0000-0000 007F | 0xxxxxxx
+   0000 0080-0000 07FF | 110xxxxx 10xxxxxx
+   0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx
+   0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
+
+If the encoding incidated by the first character is incorrect (because the
+1 to 3 following characters do not match 10xxxxxx), the output is a '?' and
+only a single input character is consumed.
+
+*/
+
+int utf8towchar(wchar_t *w, char *c)
 {
        int len=0;
+
        if(w==NULL || c==NULL) return(0);
-       //printf("%s\n",c);
-       while(*c)
-       {
-               if(*c & 0x80)
-               {
-                       if(*c & 0x40)
-                       {
-                               if(*c & 0x20)
-                               {
-                                       if(*c & 0x10)
-                                       {
-                                               *w=(c[0] & 0x0f)<<18 | (c[1]&0x1f)<<12 | (c[2]&0x3f)<<6 | (c[3]&0x7f);
-                                               c++;
-                                       }
-                                       else
-                                               *w=(c[0] & 0x1f)<<12 | (c[1]&0x3f)<<6 | (c[2]&0x7f);
-                                       c++;
-                               }
-                               else
-                                       *w=(((c[0] &0x3f)<<6) | (c[1]&0x7f));
+
+       while(*c) {
+               if ((*c & 0xe0) == 0xc0) {
+                       if((c[1] & 0x80) && (c[1] & 0x40) == 0x00) {
+                               *w=((c[0] &0x1f)<<6) | (c[1]&0x3f);
                                c++;
+                       } else {
+                               *w = '?';
                        }
-                       else
-                               *w=(c[0] & 0x7f);
+               } else if ((*c & 0xf0) == 0xe0) {
+                       if((c[1] & c[2] & 0x80) && ((c[1] | c[2]) & 0x40) == 0x00) {
+                               *w=((c[0] & 0x0f)<<12) | ((c[1]&0x3f)<<6) | (c[2]&0x3f);
+                               c += 2;
+                       } else {
+                               *w = '?';
                        }
-                       else
-                               *w=(c[0] & 0x7f);
-                       c++;
-                       w++;
-                       len++;
-               }
+               } else if ((*c & 0xf8) == 0xf0) {
+                       if((c[1] & c[2] & c[3] & 0x80) && ((c[1] | c[2] | c[3]) & 0x40) == 0x00) {
+                               *w=((c[0] & 0x07)<<18) | ((c[1]&0x1f)<<12) | ((c[2]&0x3f)<<6) | (c[3]&0x3f);
+                               c += 3;
+                       } else {
+                               *w = '?';
+                       }
+               } else
+                   *w=(c[0] & 0x7f);
+
+               c++;
+               w++;
+               len++;
+       }
        return len;
 }
 
@@ -641,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..459e705eccc489344382856a388fd08cf3658ca0 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 */
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 7a5385def1725186c6e24b7db6cd7acbb788839e..44709ce487d4f76c8f28b502e56335a8c7d4a2d1 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) {
@@ -1422,7 +1421,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 +1438,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 +1452,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 +1462,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 +1472,7 @@ void object_to_mat3(Object *ob, float mat[][3])   /* no parent */
                else {
                        EulToMat3(ob->rot, rmat);
                }
-       }
+       /*}*/
        Mat3MulMat3(mat, rmat, smat);
 }
 
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 e5959e81c28de6b96db8a7cfe669432857a2872b..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;
@@ -1030,7 +1028,8 @@ int txt_find_string(Text *text, char *findstr)
 
 void txt_cut_sel (Text *text)
 {
-       txt_copy_clipboard(text);
+       if (!G.background) /* Python uses txt_cut_sel, which it should not, working around for now  */
+               txt_copy_clipboard(text);
        
        txt_delete_sel(text);
        txt_make_dirty(text);
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 40bb66a227843f2ff40e28d40dadd2df85afd13f..874c8c7828c70312eebc0220c8077046db52a127 100644 (file)
 /* Based on ghash, difference is ghash is not a fixed size,
  * so for BPath we dont need to malloc  */
 
+struct BPathIteratorSeqData {
+       int totseq;
+       int seq;
+       struct Sequence **seqar; /* Sequence */
+       struct Scene *scene;                    /* Current scene */
+};
+
 struct BPathIterator {
        char*   path;
        char*   lib;
@@ -36,17 +43,25 @@ struct BPathIterator {
        void*   data;
        int             len;
        int             type;
+       
+       void (*setpath_callback)(struct BPathIterator *, char *);
+       void (*getpath_callback)(struct BPathIterator *, char *);
+       
+       /* only for seq data */
+       struct BPathIteratorSeqData seqdata;
 };
 
-void                   BLI_bpathIterator_init          (struct BPathIterator *bpi);
-char*                  BLI_bpathIterator_getPath       (struct BPathIterator *bpi);
-char*                  BLI_bpathIterator_getLib        (struct BPathIterator *bpi);
-char*                  BLI_bpathIterator_getName       (struct BPathIterator *bpi);
-int                            BLI_bpathIterator_getType       (struct BPathIterator *bpi);
-int                            BLI_bpathIterator_getPathMaxLen(struct BPathIterator *bpi);
-void                   BLI_bpathIterator_step          (struct BPathIterator *bpi);
-int                            BLI_bpathIterator_isDone        (struct BPathIterator *bpi);
-void                   BLI_bpathIterator_copyPathExpanded( struct BPathIterator *bpi, char *path_expanded);
+void                   BLI_bpathIterator_init                          (struct BPathIterator *bpi);
+void                   BLI_bpathIterator_free                          (struct BPathIterator *bpi);
+char*                  BLI_bpathIterator_getLib                        (struct BPathIterator *bpi);
+char*                  BLI_bpathIterator_getName                       (struct BPathIterator *bpi);
+int                            BLI_bpathIterator_getType                       (struct BPathIterator *bpi);
+int                            BLI_bpathIterator_getPathMaxLen         (struct BPathIterator *bpi);
+void                   BLI_bpathIterator_step                          (struct BPathIterator *bpi);
+int                            BLI_bpathIterator_isDone                        (struct BPathIterator *bpi);
+void                   BLI_bpathIterator_getPath                       (struct BPathIterator *bpi, char *path);
+void                   BLI_bpathIterator_getPathExpanded       (struct BPathIterator *bpi, char *path_expanded);
+void                   BLI_bpathIterator_setPath                       (struct BPathIterator *bpi, char *path);
 
 /* high level funcs */
 
index 92531eb07c49b22142b1346ac1b8bf98122a26b7..d92414cc46b28bce999339febea2af58228cd1eb 100644 (file)
 
 #include "BLI_bpath.h"
 #include "BKE_global.h"
+#include "BIF_screen.h" /* only for wait cursor */
 #include "DNA_ID.h" /* Library */
 #include "DNA_vfont_types.h"
 #include "DNA_image_types.h"
 #include "DNA_sound_types.h"
 #include "DNA_scene_types.h" /* to get the current frame */
+#include "DNA_sequence_types.h"
 #include <stdlib.h>
 #include <string.h>
 
 
 #include "blendef.h"
 #include "BKE_utildefines.h"
+#include "MEM_guardedalloc.h"
+
+/* for sequence */
+#include "BSE_sequence.h"
 
 /* for writing to a textblock */
 #include "BKE_text.h" 
 
 #define FILE_MAX                       240
 
-
 /* TODO - BPATH_PLUGIN, BPATH_SEQ */
 enum BPathTypes {
        BPATH_IMAGE = 0,
        BPATH_SOUND,
        BPATH_FONT,
        BPATH_LIB,
+       BPATH_SEQ,
 
        BPATH_DONE
 };
 
-
 void BLI_bpathIterator_init( struct BPathIterator *bpi ) {
        bpi->type = BPATH_IMAGE;
        bpi->data = NULL;
+       
+       bpi->getpath_callback = NULL;
+       bpi->setpath_callback = NULL;
+       
+       /* Sequencer spesific */
+       bpi->seqdata.totseq = 0;
+       bpi->seqdata.seq = 0;
+       bpi->seqdata.seqar = NULL;
+       bpi->seqdata.scene = NULL;
+       
        BLI_bpathIterator_step(bpi);
 }
 
-char* BLI_bpathIterator_getPath( struct BPathIterator *bpi) {
-       return bpi->path;
+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) {
+       if (bpi->getpath_callback) {
+               bpi->getpath_callback( bpi, path );
+       } else {
+               strcpy(path, bpi->path); /* warning, we assume 'path' are long enough */
+       }
+}
+
+void BLI_bpathIterator_setPath( struct BPathIterator *bpi, char *path) {
+       if (bpi->setpath_callback) {
+               bpi->setpath_callback( bpi, path );
+       } else {
+               strcpy(bpi->path, path); /* warning, we assume 'path' are long enough */
+       }
 }
-void BLI_bpathIterator_copyPathExpanded( struct BPathIterator *bpi, char *path_expanded) {
-       char *filepath, *libpath;
+
+void BLI_bpathIterator_getPathExpanded( struct BPathIterator *bpi, char *path_expanded) {
+       char *libpath;
        
-       filepath = BLI_bpathIterator_getPath(bpi);
+       BLI_bpathIterator_getPath(bpi, path_expanded);
        libpath = BLI_bpathIterator_getLib(bpi);
        
-       BLI_strncpy(path_expanded, filepath, FILE_MAXDIR*2);
-       
        if (libpath) { /* check the files location relative to its library path */
                BLI_convertstringcode(path_expanded, libpath, G.scene->r.cfra);
        } else { /* local data, use the blend files path */
@@ -116,7 +149,7 @@ int BLI_bpathIterator_getPathMaxLen( struct BPathIterator *bpi) {
 }
 
 /* gets the first or the next image that has a path - not a viewer node or generated image */
-static struct Image *ima_getpath__internal(struct Image *ima, int step_next) {
+static struct Image *ima_stepdata__internal(struct Image *ima, int step_next) {
        if (ima==NULL)
                return NULL;
        
@@ -132,7 +165,7 @@ static struct Image *ima_getpath__internal(struct Image *ima, int step_next) {
        return ima;
 }
 
-static struct VFont *vf_getpath__internal(struct VFont *vf, int step_next) {
+static struct VFont *vf_stepdata__internal(struct VFont *vf, int step_next) {
        if (vf==NULL)
                return NULL;
        
@@ -150,7 +183,7 @@ static struct VFont *vf_getpath__internal(struct VFont *vf, int step_next) {
        return vf;
 }
 
-static struct bSound *snd_getpath__internal(struct bSound *snd, int step_next) {
+static struct bSound *snd_stepdata__internal(struct bSound *snd, int step_next) {
        if (snd==NULL)
                return NULL;
        
@@ -168,13 +201,115 @@ static struct bSound *snd_getpath__internal(struct bSound *snd, int step_next) {
        return snd;
 }
 
+static struct Sequence *seq_stepdata__internal(struct BPathIterator *bpi, int step_next) {
+       Sequence *seq;
+       
+       /* Initializing */
+       if (bpi->seqdata.scene==NULL) {
+               bpi->seqdata.scene= G.main->scene.first;
+       }
+       
+       if (step_next) {
+               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;
+                       } 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 */
+                               MEM_freeN((void *)bpi->seqdata.seqar);
+                               bpi->seqdata.seqar = NULL;
+                               bpi->seqdata.scene = bpi->seqdata.scene->id.next;
+                       }
+               } else {
+                       /* no seq data in this scene, next */
+                       bpi->seqdata.scene = bpi->seqdata.scene->id.next;
+               }
+       }
+       
+       return NULL;
+}
+
+void seq_getpath(struct BPathIterator *bpi, char *path) {
+       Sequence *seq = (Sequence *)bpi->data;
+
+       
+       path[0] = '\0'; /* incase we cant get the path */
+       if (seq==NULL) return;
+       if (SEQ_HAS_PATH(seq)) {
+               if (seq->type == SEQ_IMAGE || seq->type == SEQ_MOVIE) {
+                       BLI_strncpy(path, seq->strip->dir, FILE_MAX);
+                       BLI_add_slash(path); /* incase its missing */
+                       if (seq->strip->stripdata) { /* should always be true! */
+                               /* Using the first image is weak for image sequences */
+                               strcat(path, seq->strip->stripdata->name);
+                       } 
+               } else {
+                       /* simple case */
+                       BLI_strncpy(seq->strip->dir, path, sizeof(seq->strip->dir));
+               }
+       }
+}
+
+void seq_setpath(struct BPathIterator *bpi, char *path) {
+       Sequence *seq = (Sequence *)bpi->data;
+       if (seq==NULL) return; 
+       
+       if (SEQ_HAS_PATH(seq)) {
+               if (seq->type == SEQ_IMAGE || seq->type == SEQ_MOVIE) {
+                       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));
+               }
+       }
+}
+
+static void bpi_type_step__internal( struct BPathIterator *bpi) {
+       bpi->type++; /* advance to the next type */
+       bpi->data = NULL;
+       
+       switch (bpi->type) {
+       case BPATH_SEQ:
+               bpi->getpath_callback = seq_getpath;
+               bpi->setpath_callback = seq_setpath;
+               break;
+       default:
+               bpi->getpath_callback = NULL;
+               bpi->setpath_callback = NULL;
+               break;
+       }
+}
+
 void BLI_bpathIterator_step( struct BPathIterator *bpi) {
        while (bpi->type != BPATH_DONE) {
                
                if  ((bpi->type) == BPATH_IMAGE) {
                        /*if (bpi->data)        bpi->data = ((ID *)bpi->data)->next;*/
-                       if (bpi->data)  bpi->data = ima_getpath__internal( (Image *)bpi->data, 1 ); /* must skip images that have no path */
-                       else                    bpi->data = ima_getpath__internal(G.main->image.first, 0);
+                       if (bpi->data)  bpi->data = ima_stepdata__internal( (Image *)bpi->data, 1 ); /* must skip images that have no path */
+                       else                    bpi->data = ima_stepdata__internal(G.main->image.first, 0);
                        
                        if (bpi->data) {
                                /* get the path info from this datatype */
@@ -189,13 +324,13 @@ void BLI_bpathIterator_step( struct BPathIterator *bpi) {
                                break;
                                
                        } else {
-                               bpi->type+=1; /* advance to the next type */
+                               bpi_type_step__internal(bpi);
                        }
                        
                        
                } else if  ((bpi->type) == BPATH_SOUND) {
-                       if (bpi->data)  bpi->data = snd_getpath__internal( (bSound *)bpi->data, 1 ); /* must skip images that have no path */
-                       else                    bpi->data = snd_getpath__internal(G.main->sound.first, 0);
+                       if (bpi->data)  bpi->data = snd_stepdata__internal( (bSound *)bpi->data, 1 ); /* must skip images that have no path */
+                       else                    bpi->data = snd_stepdata__internal(G.main->sound.first, 0);
                        
                        if (bpi->data) {
                                /* get the path info from this datatype */
@@ -209,14 +344,14 @@ void BLI_bpathIterator_step( struct BPathIterator *bpi) {
                                /* we are done, advancing to the next item, this type worked fine */
                                break;
                        } else {
-                               bpi->type+=1; /* advance to the next type */
+                               bpi_type_step__internal(bpi);
                        }
                        
                        
                } else if  ((bpi->type) == BPATH_FONT) {
                        
-                       if (bpi->data)  bpi->data = vf_getpath__internal( (VFont *)bpi->data, 1 );
-                       else                    bpi->data = vf_getpath__internal( G.main->vfont.first, 0 );
+                       if (bpi->data)  bpi->data = vf_stepdata__internal( (VFont *)bpi->data, 1 );
+                       else                    bpi->data = vf_stepdata__internal( G.main->vfont.first, 0 );
                        
                        if (bpi->data) {
                                /* get the path info from this datatype */
@@ -230,12 +365,10 @@ void BLI_bpathIterator_step( struct BPathIterator *bpi) {
                                /* we are done, advancing to the next item, this type worked fine */
                                break;
                        } else {
-                               bpi->type+=1; /* advance to the next type */
+                               bpi_type_step__internal(bpi);
                        }
                        
-                       
                } else if  ((bpi->type) == BPATH_LIB) {
-                       
                        if (bpi->data)  bpi->data = ((ID *)bpi->data)->next;
                        else                    bpi->data = G.main->library.first;
                        
@@ -251,7 +384,19 @@ void BLI_bpathIterator_step( struct BPathIterator *bpi) {
                                /* we are done, advancing to the next item, this type worked fine */
                                break;
                        } else {
-                               bpi->type+=1; /* advance to the next type */
+                               bpi_type_step__internal(bpi);
+                       }
+               } else if  ((bpi->type) == BPATH_SEQ) {
+                       if (bpi->data)  bpi->data = seq_stepdata__internal( bpi, 1 );
+                       else                    bpi->data = seq_stepdata__internal( bpi, 0 );
+                       if (bpi->data) {
+                               Sequence *seq = (Sequence *)bpi->data;
+                               bpi->lib = NULL;
+                               bpi->name = seq->name+2;
+                               bpi->len = sizeof(seq->strip->stripdata->name);
+                               break;
+                       } else {
+                               bpi_type_step__internal(bpi);
                        }
                }
        }
@@ -280,6 +425,9 @@ static void bpathToText(Text *btxt, struct BPathIterator *bpi)
        case BPATH_LIB:
                txt_insert_buf( btxt, "Library \"" );
                break;
+       case BPATH_SEQ:
+               txt_insert_buf( btxt, "Sequence \"" );
+               break;
        default:
                txt_insert_buf( btxt, "Unknown \"" );
                break;
@@ -292,7 +440,7 @@ static void bpathToText(Text *btxt, struct BPathIterator *bpi)
        }
        txt_insert_buf( btxt, "\" " );
        
-       BLI_bpathIterator_copyPathExpanded(bpi, path_expanded);
+       BLI_bpathIterator_getPathExpanded(bpi, path_expanded);
        
        txt_insert_buf( btxt, path_expanded );
        txt_insert_buf( btxt, "\n" );
@@ -306,15 +454,14 @@ void checkMissingFiles( char *txtname ) {
        
        /* be sure there is low chance of the path being too short */
        char filepath_expanded[FILE_MAXDIR*2]; 
-       char *filepath, *libpath;
+       char *libpath;
        int files_missing = 0;
        
        BLI_bpathIterator_init(&bpi);
        while (!BLI_bpathIterator_isDone(&bpi)) {
-               filepath = BLI_bpathIterator_getPath(&bpi);
                libpath = BLI_bpathIterator_getLib(&bpi);
                
-               BLI_bpathIterator_copyPathExpanded( &bpi, filepath_expanded );
+               BLI_bpathIterator_getPathExpanded( &bpi, filepath_expanded );
                
                if (!BLI_exists(filepath_expanded)) {
                        if (!btxt) {
@@ -328,12 +475,13 @@ void checkMissingFiles( char *txtname ) {
                }
                BLI_bpathIterator_step(&bpi);
        }
+       BLI_bpathIterator_free(&bpi);
 }
 
 /* dont log any errors at the moment, should probably do this */
 void makeFilesRelative(char *txtname, int *tot, int *changed, int *failed, int *linked) {
        struct BPathIterator bpi;
-       char *filepath, *libpath;
+       char filepath[FILE_MAX], *libpath;
        
        /* be sure there is low chance of the path being too short */
        char filepath_relative[(FILE_MAXDIR * 2) + FILE_MAXFILE];
@@ -344,7 +492,7 @@ void makeFilesRelative(char *txtname, int *tot, int *changed, int *failed, int *
        
        BLI_bpathIterator_init(&bpi);
        while (!BLI_bpathIterator_isDone(&bpi)) {
-               filepath = BLI_bpathIterator_getPath(&bpi);
+               BLI_bpathIterator_getPath(&bpi, filepath);
                libpath = BLI_bpathIterator_getLib(&bpi);
                
                if(strncmp(filepath, "//", 2)) {
@@ -368,7 +516,7 @@ void makeFilesRelative(char *txtname, int *tot, int *changed, int *failed, int *
                                        (*failed)++;
                                } else {
                                        if(strncmp(filepath_relative, "//", 2)==0) {
-                                               strcpy(filepath, filepath_relative);
+                                               BLI_bpathIterator_setPath(&bpi, filepath_relative);
                                                (*changed)++;
                                        } else {
                                                if (!btxt) {
@@ -386,13 +534,14 @@ void makeFilesRelative(char *txtname, int *tot, int *changed, int *failed, int *
                BLI_bpathIterator_step(&bpi);
                (*tot)++;
        }
+       BLI_bpathIterator_free(&bpi);
 }
 
 /* dont log any errors at the moment, should probably do this -
  * Verry similar to makeFilesRelative - keep in sync! */
 void makeFilesAbsolute(char *txtname, int *tot, int *changed, int *failed, int *linked) {
        struct BPathIterator bpi;
-       char *filepath, *libpath;
+       char filepath[FILE_MAX], *libpath;
        
        /* be sure there is low chance of the path being too short */
        char filepath_absolute[(FILE_MAXDIR * 2) + FILE_MAXFILE];
@@ -403,14 +552,14 @@ void makeFilesAbsolute(char *txtname, int *tot, int *changed, int *failed, int *
        
        BLI_bpathIterator_init(&bpi);
        while (!BLI_bpathIterator_isDone(&bpi)) {
-               filepath = BLI_bpathIterator_getPath(&bpi);
+               BLI_bpathIterator_getPath(&bpi, filepath);
                libpath = BLI_bpathIterator_getLib(&bpi);
                
                if(strncmp(filepath, "//", 2)==0) {
                        if (libpath) { /* cant make absolute if we are library - TODO, LOG THIS */
                                (*linked)++;
                        } else { /* get the expanded path and check it is relative or too long */
-                               BLI_bpathIterator_copyPathExpanded( &bpi, filepath_absolute );
+                               BLI_bpathIterator_getPathExpanded( &bpi, filepath_absolute );
                                BLI_cleanup_file(G.sce, filepath_absolute); /* fix any /foo/../foo/ */
                                /* to be safe, check the length */
                                if (BLI_bpathIterator_getPathMaxLen(&bpi) <= strlen(filepath_absolute)) {
@@ -424,7 +573,7 @@ void makeFilesAbsolute(char *txtname, int *tot, int *changed, int *failed, int *
                                        (*failed)++;
                                } else {
                                        if(strncmp(filepath_absolute, "//", 2)) {
-                                               strcpy(filepath, filepath_absolute);
+                                               BLI_bpathIterator_setPath(&bpi, filepath_absolute);
                                                (*changed)++;
                                        } else {
                                                if (!btxt) {
@@ -442,6 +591,7 @@ void makeFilesAbsolute(char *txtname, int *tot, int *changed, int *failed, int *
                BLI_bpathIterator_step(&bpi);
                (*tot)++;
        }
+       BLI_bpathIterator_free(&bpi);
 }
 
 
@@ -505,28 +655,35 @@ void findMissingFiles(char *str) {
        
        /* be sure there is low chance of the path being too short */
        char filepath_expanded[FILE_MAXDIR*2]; 
-       char *filepath, *libpath;
+       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);
        
        while (!BLI_bpathIterator_isDone(&bpi)) {
-               filepath = BLI_bpathIterator_getPath(&bpi);
+               BLI_bpathIterator_getPath(&bpi, filepath);
                libpath = BLI_bpathIterator_getLib(&bpi);
                
+               /* Check if esc was pressed because searching files can be slow */
+               if (blender_test_break()) {
+                       break;
+               }
+               
                if (libpath==NULL) {
                        
-                       BLI_bpathIterator_copyPathExpanded( &bpi, filepath_expanded );
+                       BLI_bpathIterator_getPathExpanded( &bpi, filepath_expanded );
                        
                        if (!BLI_exists(filepath_expanded)) {
                                /* 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 */
@@ -543,11 +700,14 @@ void findMissingFiles(char *str) {
                                                if (G.relbase_valid)
                                                        BLI_makestringcode(G.sce, filename_new);
                                                
-                                               strcpy( BLI_bpathIterator_getPath( &bpi ), filename_new );
+                                               BLI_bpathIterator_setPath( &bpi, filename_new );
                                        }
                                }
                        }
                }
                BLI_bpathIterator_step(&bpi);
        }
+       BLI_bpathIterator_free(&bpi);
+       
+       waitcursor( 0 );
 }
index d7b9d9905fdcc0c47400e87ae7d84c43760cc745..c79f1b56f1d58d1db849c23b2d49dd5389ca5e82 100644 (file)
@@ -1224,10 +1224,10 @@ char *BLI_gethome(void) {
                                }
                        }
                }
-               /*
+#if 0
                ret = getenv("USERPROFILE");
                if (ret) {
-                       if (BLI_exists(ret)) { /* from fop, also below... 
+                       if (BLI_exists(ret)) { /* from fop, also below...  */
                                sprintf(dir, "%s\\Application Data\\Blender Foundation\\Blender", ret);
                                BLI_recurdir_fileops(dir);
                                if (BLI_exists(dir)) {
@@ -1236,7 +1236,7 @@ char *BLI_gethome(void) {
                                }
                        }
                }
-               */
+#endif
 
                /* 
                   Saving in the Windows dir is less than desirable. 
@@ -1426,8 +1426,41 @@ int BLI_testextensie(const char *str, const char *ext)
        return (retval);
 }
 
+/*
+ * This is a simple version of BLI_split_dirfile that has the following advantages...
+ * 
+ * Converts "/foo/bar.txt" to "/foo/" and "bar.txt"
+ * - wont change 'string'
+ * - wont create any directories
+ * - dosnt use CWD, or deal with relative paths.
+ * - Only fill's in *dir and *file when they are non NULL
+ * */
+void BLI_split_dirfile_basic(const char *string, char *dir, char *file)
+{
+       int lslash=0, i = 0;
+       for (i=0; string[i]!='\0'; i++) {
+               if (string[i]=='\\' || string[i]=='/')
+                       lslash = i+1;
+       }
+       if (dir) {
+               if (lslash) {
+                       BLI_strncpy( dir, string, lslash+1); /* +1 to include the slash and the last char */
+               } else {
+                       dir[0] = '\0';
+               }
+       }
+       
+       if (file) {
+               strcpy( file, string+lslash);
+       }
+}
+
 
-/* warning, can modify 'string' */
+/* Warning,
+ * - May modify 'string' variable
+ * - May create the directory if it dosnt exist
+ * if this is not needed use BLI_split_dirfile_basic(...)
+ */
 void BLI_split_dirfile(char *string, char *dir, char *file)
 {
        int a;
index 71508e10534f37a506a406ceccdad1e05abce5de..fc3ffd2c6dc7a4d5130967ce6f449c4a11707650 100644 (file)
 #include "BKE_customdata.h"
 #include "BKE_deform.h"
 #include "BKE_depsgraph.h"
-#include "BKE_effect.h" // for give_parteff
+#include "BKE_effect.h" /* give_parteff */
 #include "BKE_global.h" // for G
 #include "BKE_group.h"
 #include "BKE_image.h"
@@ -5093,7 +5093,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                while(ob) {
                        ob->mass= 1.0f;
                        ob->damping= 0.1f;
-                       ob->quat[1]= 1.0f;
+                       /*ob->quat[1]= 1.0f;*/ /* quats arnt used yet */
                        ob= ob->id.next;
                }
 
index f25f2d515c2cae36958083918e6362e01d3c592e..47ccd333dd9eadedfb62db4595b762654b421dd7 100644 (file)
@@ -523,25 +523,6 @@ static void write_userdef(WriteData *wd)
        }
 }
 
-static void write_effects(WriteData *wd, ListBase *lb)
-{
-       Effect *eff;
-
-       eff= lb->first;
-       while(eff) {
-
-               switch(eff->type) {
-               case EFF_PARTICLE:
-                       writestruct(wd, DATA, "PartEff", 1, eff);
-                       break;
-               default:
-                       writedata(wd, DATA, MEM_allocN_len(eff), eff);
-               }
-
-               eff= eff->next;
-       }
-}
-
 static void write_particlesettings(WriteData *wd, ListBase *idbase)
 {
        ParticleSettings *part;
@@ -908,7 +889,7 @@ static void write_objects(WriteData *wd, ListBase *idbase)
 
                        /* direct data */
                        writedata(wd, DATA, sizeof(void *)*ob->totcol, ob->mat);
-                       write_effects(wd, &ob->effect);
+                       /* write_effects(wd, &ob->effect); */ /* not used anymore */
                        write_properties(wd, &ob->prop);
                        write_sensors(wd, &ob->sensors);
                        write_controllers(wd, &ob->controllers);
index 77bfff5bd82c3c68f493e419a9c8339f3a40217a..e8f2b82f97017fe368b136bca1d211e5f65e6ba2 100644 (file)
@@ -31,6 +31,7 @@
 #include <locale.h>
 #include "libintl.h"
 #include "BLI_blenlib.h"
+#include "BKE_font.h"
 
 #include "../FTF_Settings.h"
 
 
 #define FTF_MAX_STR_SIZE 512
 
-
-int utf8towchar(wchar_t *w, char *c)
-{
-  int len=0;
-  if(w==NULL || c==NULL) return(0);
-  //printf("%s\n",c);
-  while(*c)
-  {
-    //Converts Unicode to wchar:
-
-    if(*c & 0x80)
-    {
-      if(*c & 0x40)
-      {
-        if(*c & 0x20)
-        {
-          if(*c & 0x10)
-          {
-            *w=(c[0] & 0x0f)<<18 | (c[1]&0x1f)<<12 | (c[2]&0x3f)<<6 | (c[3]&0x7f);
-            c++;
-          }
-          else
-            *w=(c[0] & 0x1f)<<12 | (c[1]&0x3f)<<6 | (c[2]&0x7f);
-          c++;
-        }
-        else
-          *w=(c[0] &0x3f)<<6 | c[1]&0x7f;
-        c++;
-      }
-      else
-        *w=(c[0] & 0x7f);
-    }
-    else
-      *w=(c[0] & 0x7f);
-
-    c++;
-    w++;
-    len++;
-  }
-  return len;
-}
-
-
 FTF_TTFont::FTF_TTFont(void)
 {      
 #ifdef __APPLE__
index 12ab1dd0d9be60fc8060dbac2a9c9f1785eece16..4f2a1da5580c758e154f09999ebde9ecb11e21b1 100644 (file)
@@ -229,6 +229,7 @@ static int isqtime (char *name) {
 #endif
 
 #ifdef WITH_FFMPEG
+extern void do_init_ffmpeg();
 void do_init_ffmpeg()
 {
        static int ffmpeg_init = 0;
index 0bd869d2923c7bbf4adc97aec0418cadd0b3463c..2d751f56fc5b18f732961a16d05e7bc0e31bbf3d 100644 (file)
@@ -141,7 +141,8 @@ void paste_actdata(void);
 /* Group/Channel Operations */
 struct bActionGroup *get_active_actiongroup(struct bAction *act);
 void set_active_actiongroup(struct bAction *act, struct bActionGroup *agrp, short select);
-void verify_pchan2achan_grouping(struct bAction *act, struct bPose *pose, char name[]); 
+void verify_pchan2achan_grouping(struct bAction *act, struct bPose *pose, char name[]);
+void sync_pchan2achan_grouping(void); 
 void action_groups_group(short add_group);
 void action_groups_ungroup(void);
 
@@ -159,6 +160,7 @@ void action_set_ipo_flags(short mode, short event);
 
 /* Select */
 void borderselect_action(void);
+void borderselect_actionchannels(void);
 void deselect_action_keys(short test, short sel);
 void deselect_action_channels(short mode);
 void deselect_actionchannels(struct bAction *act, short mode);
index 70ba4ad8fbd15caf4760eb41a7ba882dadbcf8b6..15a9218b73573778b7878663308a3adfbfd9b884 100644 (file)
@@ -92,6 +92,7 @@ void update_changed_seq_and_deps(struct Sequence *seq, int len_change, int ibuf_
 struct RenderResult;
 void do_render_seq(struct RenderResult *rr, int cfra);
 
+#define SEQ_HAS_PATH(seq) (seq->type==SEQ_MOVIE || seq->type==SEQ_HD_SOUND || seq->type==SEQ_RAM_SOUND || seq->type==SEQ_IMAGE)
 
 #endif
 
index 93e3aaf03dd401f28d61318a85a622a4614527ef..a798224b35b4b20694c3ae08f6bad7e443774c92 100644 (file)
 
 #define TESTBASE(base) ( ((base)->flag & SELECT) && ((base)->lay & G.vd->lay) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0) )
 #define TESTBASELIB(base)      ( ((base)->flag & SELECT) && ((base)->lay & G.vd->lay) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
+
+/* This is a TESTBASELIB that can work without a 3D view */
+#define TESTBASELIB_BGMODE(base)       ( ((base)->flag & SELECT) && ((base)->lay & (G.vd ? G.vd->lay : G.scene->lay)) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
+
 #define BASE_SELECTABLE(base)   ((base->lay & G.vd->lay) && (base->object->restrictflag & (OB_RESTRICT_SELECT|OB_RESTRICT_VIEW))==0)
 #define FIRSTBASE              G.scene->base.first
 #define LASTBASE               G.scene->base.last
index 0a7097bd5a9b9970a11026487af093458c4d9281..8556d47e4abc6eb56b3c3ff0690a91cb999e7d24 100644 (file)
@@ -743,19 +743,12 @@ enum {
 
 #define B_AUTOTIMEOFS          3403 /* see B_OFSTIMEOFS, B_RANDTIMEOFS also */
 #define B_FRAMEMAP             3404
-#define B_NEWEFFECT            3405
 #define B_PREVEFFECT           3406
-#define B_NEXTEFFECT           3407
 #define B_CHANGEEFFECT         3408
-#define B_CALCEFFECT           3409
-#define B_DELEFFECT            3410
 #define B_RECALCAL             3411
 #define B_RECALC_DEFL          3412
-#define B_EFFECT_DEP           3413
 #define B_FIELD_DEP            3414
 #define B_FIELD_CHANGE         3415
-#define B_PAF_SET_VG           3416
-#define B_PAF_SET_VG1          3417
 #define        B_PARTBROWSE            3418
 #define B_PARTDELETE           3419
 #define B_PARTALONE                    3420
index 97796c603afced70ddc86e322e8a1553271f53f6..9488aa513d810c8f24fb30886ea55597e050efe3 100644 (file)
 #ifndef PARTICLE_EFFECT_H
 #define PARTICLE_EFFECT_H
 
-/* effect.c */
-extern Effect *add_effect(int type);
-extern PartEff *give_parteff(Object *ob);
-extern void where_is_particle(PartEff *paf, Particle *pa, float ctime, float *vec);
-extern void free_effect(Effect *eff);
-extern void free_effects(ListBase *lb);
-extern void copy_effects(ListBase *lbn, ListBase *lb);
-extern void build_particle_system(Object *ob);
-
 #endif
 
index 26b7e3c1013ff8e54977ee3165339c330f876e3e..18d2a1cb6f3a61c32497ce67855ec007d8253b0d 100644 (file)
@@ -234,8 +234,8 @@ typedef enum SACTION_FLAG {
        SACTION_HORIZOPTIMISEON = (1<<5),
                /* hack for moving pose-markers (temp flag)  */
        SACTION_POSEMARKERS_MOVE = (1<<6),
-               /* draw action channels using group colours (where applicable) */
-       SACTION_DRAWGCOLORS = (1<<7)
+               /* don't draw action channels using group colours (where applicable) */
+       SACTION_NODRAWGCOLORS = (1<<7)
 } SACTION_FLAG;        
 
 /* SpaceAction AutoSnap Settings (also used by SpaceNLA) */
index be1a7191796d8989c9cc1aab3c81e562971fe2a4..c99dc44cd5ea92bd4e6cdd5220e4900c08c4e35d 100644 (file)
 
 typedef struct ClothSimSettings
 {
-       short   vgroup_mass;    /* optional vertexgroup name for assigning weight.*/
-       short   vgroup_struct;  /* vertex group for scaling structural stiffness */
+       struct  LinkNode *cache; /* UNUSED atm */       
        float   mingoal;        /* see SB */
-       int     preroll;        /* How many frames of simulation to do before we start. */
        float   Cdis;           /* Mechanical damping of springs.               */
        float   Cvi;            /* Viscous/fluid damping.                       */
-       int     stepsPerFrame;  /* Number of time steps per frame.              */
        float   gravity [3];    /* Gravity/external force vector.               */
-       float   ufluid [3];     /* Velocity vector of the fluid.                */
        float   dt;             /* This is the duration of our time step, computed.     */
        float   mass;           /* The mass of the entire cloth.                */
        float   structural;     /* Structural spring stiffness.                 */
        float   shear;          /* Shear spring stiffness.                      */
        float   bending;        /* Flexion spring stiffness.                    */
-       float   padf;
-       int             flags;          /* flags, see CSIMSETT_FLAGS enum above.        */
-       short   solver_type;    /* which solver should be used?         txold   */
-       short   vgroup_bend;    /* vertex group for scaling bending stiffness */
+       float   max_bend;       /* max bending scaling value, min is "bending" */
+       float   max_struct;     /* max structural scaling value, min is "structural" */
+       float   max_shear;      /* max shear scaling value, UNUSED */
+       float   avg_spring_len; /* used for normalized springs */
+       float   timescale; /* parameter how fast cloth runs */
        float   maxgoal;        /* see SB */
        float   eff_force_scale;/* Scaling of effector forces (see softbody_calc_forces).*/
        float   eff_wind_scale; /* Scaling of effector wind (see softbody_calc_forces). */
        float   sim_time_old;
-       struct  LinkNode *cache; /* UNUSED atm */
        float   defgoal;
-       int     goalfrict;
        float   goalspring;
+       float   goalfrict;
+       int     stepsPerFrame;  /* Number of time steps per frame.              */
+       int     flags;          /* flags, see CSIMSETT_FLAGS enum above.        */
+       int     preroll;        /* How many frames of simulation to do before we start. */
        int     maxspringlen;   /* in percent!; if tearing enabled, a spring will get cut */
-       float   max_bend;       /* max bending scaling value, min is "bending" */
-       float   max_struct;     /* max structural scaling value, min is "structural" */
-       float   max_shear;      /* max shear scaling value, UNUSED */
-       float   avg_spring_len; /* used for normalized springs */
+       short   solver_type;    /* which solver should be used?         txold   */
+       short   vgroup_bend;    /* vertex group for scaling bending stiffness */
+       short   vgroup_mass;    /* optional vertexgroup name for assigning weight.*/
+       short   vgroup_struct;  /* vertex group for scaling structural stiffness */
        short   presets; /* used for presets on GUI */
        short   pad;
-       float   timescale; /* parameter how fast cloth runs */
+       int     pad2;
 } ClothSimSettings;
 
 
 typedef struct ClothCollSettings
 {
+       struct  LinkNode *collision_list; /* e.g. pointer to temp memory for collisions */
        float   epsilon;                /* min distance for collisions.         */
        float   self_friction;          /* Fiction/damping with self contact.                   */
        float   friction;               /* Friction/damping applied on contact with other object.*/
+       float   selfepsilon;            /* for selfcollision */
+       int     flags;                  /* collision flags defined in BKE_cloth.h */
        short   self_loop_count;        /* How many iterations for the selfcollision loop       */
        short   loop_count;             /* How many iterations for the collision loop.          */
-       struct  LinkNode *collision_list; /* e.g. pointer to temp memory for collisions */
-       int     flags;                  /* collision flags defined in BKE_cloth.h */
-       float   selfepsilon;            /* for selfcollision */
 } ClothCollSettings;
 
-/**
-* 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;
 
 #endif
index 42378856f55cefb9f9948ba6c406dbdb651624cd..de89c0e51cb9488b8121579c63da1b0bf37f722b 100644 (file)
@@ -97,7 +97,7 @@ typedef struct Object {
        float loc[3], dloc[3], orig[3];
        float size[3], dsize[3];
        float rot[3], drot[3];
-       float quat[4], dquat[4];
+       /* float quat[4], dquat[4]; (not used yet) */
        float obmat[4][4];
        float parentinv[4][4]; /* inverse result of parent, so that object doesn't 'stick' to parent */
        float constinv[4][4]; /* inverse result of constraints. doesn't include effect of parent or object local transform */
@@ -148,10 +148,6 @@ typedef struct Object {
        ListBase sensors;
        ListBase controllers;
        ListBase actuators;
-
-       /* now used to store cache particles,
-        * should be renamed see effect.c (Campbell) */
-    void *sumohandle;          
     
        float bbsize[3];
        short index;                    /* custom index, for renderpasses */
index 36a3bd5b171565c9d08eb140aab149f2be99bd57..37bbb68ba030fa7b0b00ea6fc4e87ec0b321a45a 100644 (file)
@@ -160,11 +160,11 @@ static void node_dynamic_free_storage_cb(bNode *node)
 }
 
 /* Disable pynode when its script fails */
-static void node_dynamic_disable(bNode *node)
+/*static void node_dynamic_disable(bNode *node)
 {
        node->custom1 = 0;
        node->custom1 = BSET(node->custom1, NODE_DYNAMIC_ERROR);
-}
+}*/
 
 /* Disable all pynodes using the given text (script) id */
 static void node_dynamic_disable_all_by_id(ID *id)
@@ -211,6 +211,8 @@ static void node_dynamic_rem_all_links(bNodeType *tinfo)
        in = tinfo->inputs ? 1 : 0;
        out = tinfo->outputs ? 1 : 0;
 
+       if (!in && !out) return;
+
        for (ma= G.main->mat.first; ma; ma= ma->id.next) {
                if (ma->nodetree) {
                        bNode *nd;
@@ -248,6 +250,7 @@ static void node_dynamic_reset(bNode *node, int unlink_text)
                                if (nd->typeinfo == tinfo) {
                                        node_dynamic_free_storage_cb(nd);
                                        node_dynamic_free_sockets(nd);
+                                       //node_dynamic_update_socket_links(nd, ma->nodetree);
                                        nd->typeinfo = tinfo_default;
                                        if (unlink_text) {
                                                nd->id = NULL;
@@ -312,17 +315,69 @@ static void node_dynamic_pyerror_print(bNode *node)
        PyGILState_Release(gilstate);
 }
 
+static void node_dynamic_register_type(bNode *node)
+{
+       nodeRegisterType(&node_all_shaders, node->typeinfo);
+       /* nodeRegisterType copied it to a new one, so we
+        * free the typeinfo itself, but not what it
+        * points to: */
+       MEM_freeN(node->typeinfo);
+       node->typeinfo = node_dynamic_find_typeinfo(&node_all_shaders, node->id);
+       MEM_freeN(node->typeinfo->name);
+       node->typeinfo->name = BLI_strdup(node->name);
+}
+
+/* node_dynamic_get_pynode:
+ * Find the pynode definition from the script */
+static PyObject *node_dynamic_get_pynode(PyObject *dict)
+{
+       PyObject *key= NULL;
+       Py_ssize_t pos = 0;
+       PyObject *value = NULL;
+
+       /* script writer specified a node? */
+       value = PyDict_GetItemString(dict, "__node__");
+
+       if (value) {
+               if (PyObject_TypeCheck(value, &PyType_Type)) {
+                       Py_INCREF(value);
+                       return value;
+               }
+               else {
+                       PyErr_SetString(PyExc_TypeError,
+                               "expected class object derived from Scripted node");
+                       return NULL;
+               }
+       }
+
+       /* case not, search for it in the script's global dictionary */
+       while (PyDict_Next(dict, &pos, &key, &value)) {
+               /* skip names we know belong to other available objects */
+               if (strcmp("Socket", PyString_AsString(key)) == 0)
+                       continue;
+               else if (strcmp("Scripted", PyString_AsString(key)) == 0)
+                       continue;
+               /* naive: we grab the first ob of type 'type': */
+               else if (PyObject_TypeCheck(value, &PyType_Type)) {
+                       Py_INCREF(value);
+                       return value;
+               }
+       }
+
+       PyErr_SetString(PyExc_TypeError,
+               "no PyNode definition found in the script!");
+       return NULL;
+}
+
 static int node_dynamic_parse(struct bNode *node)
 {
        PyObject *dict= NULL;
-       PyObject *key= NULL;
-       PyObject *value= NULL;
+       PyObject *pynode_data= NULL;
        PyObject *pynode= NULL;
        PyObject *args= NULL;
        NodeScriptDict *nsd = NULL;
        PyObject *pyresult = NULL;
        char *buf = NULL;
-       Py_ssize_t pos = 0;
        int is_valid_script = 0;
        PyGILState_STATE gilstate;
 
@@ -346,7 +401,7 @@ static int node_dynamic_parse(struct bNode *node)
        MEM_freeN(buf);
 
        if (!pyresult) {
-               node_dynamic_disable(node);
+               node_dynamic_disable_all_by_id(node->id);
                node_dynamic_pyerror_print(node);
                PyGILState_Release(gilstate);
                return -1;
@@ -354,58 +409,46 @@ static int node_dynamic_parse(struct bNode *node)
 
        Py_DECREF(pyresult);
 
-       while (PyDict_Next( (PyObject *)(nsd->dict), &pos, &key, &value)) {
-               /* look for the node object */
-               if (strcmp("Socket", PyString_AsString(key)) == 0)
-                       continue; /* XXX ugly, fix it */
-               if (PyObject_TypeCheck(value, &PyType_Type)==1) {
-                       BPy_NodeSocketLists *socklists = Node_CreateSocketLists(node);
+       pynode_data = node_dynamic_get_pynode(dict);
 
-                       args = Py_BuildValue("(O)", socklists);
+       if (pynode_data) {
+               BPy_NodeSocketLists *socklists = Node_CreateSocketLists(node);
 
-                       /* init it to get the input and output sockets */
-                       pynode = PyObject_Call(value, args, NULL);
+               args = Py_BuildValue("(O)", socklists);
 
-                       Py_DECREF(socklists);
-                       Py_DECREF(args);
+               /* init it to get the input and output sockets */
+               pynode = PyObject_Call(pynode_data, args, NULL);
 
-                       if (!PyErr_Occurred() && pynode && pytype_is_pynode(pynode)) {
-                               InitNode((BPy_Node *)(pynode), node);
-                               nsd->node = pynode;
-                               node->typeinfo->execfunc = node_dynamic_exec_cb;
-                               is_valid_script = 1;
-
-                               /* for NEW, LOADED, REPARSE */
-                               if (BNTST(node->custom1, NODE_DYNAMIC_ADDEXIST)) {
-                                       node->typeinfo->pydict = dict;
-                                       node->typeinfo->pynode = pynode;
-                                       node->typeinfo->id = node->id;
-                                       if (BNTST(node->custom1, NODE_DYNAMIC_LOADED))
-                                               nodeAddSockets(node, node->typeinfo);
-                                       if (BNTST(node->custom1, NODE_DYNAMIC_REPARSE)) {
-                                               nodeRegisterType(&node_all_shaders, node->typeinfo);
-                                               /* nodeRegisterType copied it to a new one, so we
-                                                * free the typeinfo itself, but not what it
-                                                * points to: */
-                                               MEM_freeN(node->typeinfo);
-                                               node->typeinfo = node_dynamic_find_typeinfo(&node_all_shaders, node->id);
-                                               MEM_freeN(node->typeinfo->name);
-                                               node->typeinfo->name = BLI_strdup(node->name);
-                                       }
-                               }
+               Py_DECREF(pynode_data);
+               Py_DECREF(socklists);
+               Py_DECREF(args);
+
+               if (!PyErr_Occurred() && pynode && pytype_is_pynode(pynode)) {
+                       InitNode((BPy_Node *)(pynode), node);
+                       nsd->node = pynode;
+                       node->typeinfo->execfunc = node_dynamic_exec_cb;
+                       is_valid_script = 1;
 
-                               node->custom1 = 0;
-                               node->custom1 = BSET(node->custom1, NODE_DYNAMIC_READY);
-                               break;
+                       /* for NEW, LOADED, REPARSE */
+                       if (BNTST(node->custom1, NODE_DYNAMIC_ADDEXIST)) {
+                               node->typeinfo->pydict = dict;
+                               node->typeinfo->pynode = pynode;
+                               node->typeinfo->id = node->id;
+                               if (BNTST(node->custom1, NODE_DYNAMIC_LOADED))
+                                       nodeAddSockets(node, node->typeinfo);
+                               if (BNTST(node->custom1, NODE_DYNAMIC_REPARSE))
+                                       node_dynamic_register_type(node);
                        }
-                       //break;
+
+                       node->custom1 = 0;
+                       node->custom1 = BSET(node->custom1, NODE_DYNAMIC_READY);
                }
        }
 
        PyGILState_Release(gilstate);
 
        if (!is_valid_script) { /* not a valid pynode script */
-               node_dynamic_disable(node);
+               node_dynamic_disable_all_by_id(node->id);
                node_dynamic_pyerror_print(node);
                return -1;
        }
@@ -470,6 +513,7 @@ static void node_dynamic_setup(bNode *node)
                        else { nodeMakeDynamicType(node); }
 
                } else {
+                       node_dynamic_rem_all_links(node->typeinfo);
                        node_dynamic_free_typeinfo_sockets(node->typeinfo);
                        node_dynamic_update_socket_links(node, NULL);
                        node_dynamic_free_storage_cb(node);
index 9bdb4425766f552151667c7a095616954ac26444..7cfb30cbc07c7fe3575db946d6dd889beea15b98 100644 (file)
@@ -786,7 +786,7 @@ int BPY_run_script(Script *script)
                
                if (bpyhome) {
                        BLI_strncpy(ftmp, script->scriptname, sizeof(ftmp));
-                       BLI_split_dirfile(ftmp, fpath, fname); /* get the filename only - fname */
+                       BLI_split_dirfile_basic(ftmp, NULL, fname); /* get the filename only - fname */
                        BLI_strncpy(fpath, bpy_gethome(1), sizeof(fpath));
                        BLI_add_slash(fpath);
                        strcat(fpath, fname);
index 6d9c448c16f7ba3c53b2e6f6e048dca40f9804f2..fe5ae25ccb130d18057865845a0d102b0dca30b6 100644 (file)
@@ -927,7 +927,7 @@ static PyObject *Blender_CountPackedFiles( PyObject * self )
 static PyObject *Blender_GetPaths( PyObject * self, PyObject *args, PyObject *keywds )
 {
        struct BPathIterator bpi;
-       PyObject *list = PyList_New(0), *st;
+       PyObject *list = PyList_New(0), *st; /* stupidly big string to be safe */
        /* be sure there is low chance of the path being too short */
        char filepath_expanded[FILE_MAXDIR*2]; 
        
@@ -944,18 +944,18 @@ static PyObject *Blender_GetPaths( PyObject * self, PyObject *args, PyObject *ke
                
                /* build the list */
                if (absolute) {
-                       BLI_bpathIterator_copyPathExpanded( &bpi, filepath_expanded );
-                       st = PyString_FromString(filepath_expanded);
+                       BLI_bpathIterator_getPathExpanded( &bpi, filepath_expanded );
                } else {
-                       st = PyString_FromString(BLI_bpathIterator_getPath(&bpi));
+                       BLI_bpathIterator_getPathExpanded( &bpi, filepath_expanded );
                }
+               st = PyString_FromString(filepath_expanded);
                
                PyList_Append(list, st);
                Py_DECREF(st);
                
                BLI_bpathIterator_step(&bpi);
        }
-       
+       BLI_bpathIterator_free(&bpi);
        return list;
 }
 
index f47221ccc8d0418e6e8a3b0e8cfeabafc72f2693..4d3dce741fc9baa5b7967acf81b72da24f54778a 100644 (file)
@@ -561,34 +561,9 @@ struct PyMethodDef M_Effect_methods[] = {
 /*****************************************************************************/
 PyObject *M_Effect_New( PyObject * self, PyObject * args )
 {
-       Effect *bleffect = 0;
-       Object *ob;
-       char *name = NULL;
-
-       if( !PyArg_ParseTuple( args, "s", &name ) )
-               return EXPP_ReturnPyObjError( PyExc_TypeError,
-                               "expected string argument" );
-
-       for( ob = G.main->object.first; ob; ob = ob->id.next )
-               if( !strcmp( name, ob->id.name + 2 ) )
-                       break;
-
-       if( !ob )
-               return EXPP_ReturnPyObjError( PyExc_AttributeError, 
-                               "object does not exist" );
-
-       if( ob->type != OB_MESH )
-               return EXPP_ReturnPyObjError( PyExc_AttributeError, 
-                               "object is not a mesh" );
-
-       bleffect = add_effect( EFF_PARTICLE );
-       if( !bleffect )
-               return EXPP_ReturnPyObjError( PyExc_RuntimeError,
-                               "couldn't create Effect Data in Blender" );
-
-       BLI_addtail( &ob->effect, bleffect );
-
-       return EffectCreatePyObject( bleffect, ob );
+       printf("warning, static particles api removed\n");
+       Py_INCREF( Py_None );
+       return Py_None;
 }
 
 /*****************************************************************************/
@@ -597,86 +572,7 @@ PyObject *M_Effect_New( PyObject * self, PyObject * args )
 /*****************************************************************************/
 PyObject *M_Effect_Get( PyObject * self, PyObject * args )
 {
-       /*arguments : string object name
-          int : position of effect in the obj's effect list  */
-       char *name = NULL;
-       Object *object_iter;
-       Effect *eff;
-       int num = -1, i;
-
-       if( !PyArg_ParseTuple( args, "|si", &name, &num ) )
-               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
-                                               "expected string int argument" ) );
-
-       object_iter = G.main->object.first;
-
-       if( !object_iter )
-               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
-                                               "Scene contains no object" ) );
-
-       if( name ) { /* (name, num = -1) - try to find the given object */
-
-               while( object_iter ) {
-
-                       if( !strcmp( name, object_iter->id.name + 2 ) ) {
-
-                               eff = object_iter->effect.first; /*can be NULL: None will be returned*/
-
-                               if (num >= 0) { /* return effect in given num position if available */
-
-                                       for( i = 0; i < num; i++ ) {
-                                               if (!eff) break;
-                                               eff = eff->next;
-                                       }
-
-                                       if (eff) {
-                                               return EffectCreatePyObject( eff, object_iter );
-                                       } else { /* didn't find any effect in the given position */
-                                               Py_RETURN_NONE;
-                                       }
-                               }
-
-                               else {/*return a list with all effects linked to the given object*/
-                                                       /* this was pointed by Stephen Swaney */
-                                       PyObject *effectlist = PyList_New( 0 );
-
-                                       while (eff) {
-                                               PyObject *found_eff = EffectCreatePyObject( eff,
-                                                               object_iter );
-                                               PyList_Append( effectlist, found_eff );
-                                               Py_DECREF( found_eff ); /* PyList_Append incref'ed it */
-                                               eff = eff->next;
-                                       }
-                                       return effectlist;
-                               }
-                       }
-                       
-                       object_iter = object_iter->id.next;
-               }
-
-               if (!object_iter)
-                       return EXPP_ReturnPyObjError (PyExc_AttributeError,
-                               "no such object");
-       }
-       
-       else { /* () - return a list with all effects currently in Blender */
-               PyObject *effectlist = PyList_New( 0 );
-
-               while( object_iter ) {
-                       if( object_iter->effect.first != NULL ) {
-                               eff = object_iter->effect.first;
-                               while( eff ) {
-                                       PyObject *found_eff = EffectCreatePyObject( eff,
-                                                       object_iter );
-                                       PyList_Append( effectlist, found_eff );
-                                       Py_DECREF( found_eff );
-                                       eff = eff->next;
-                               }
-                       }
-                       object_iter = object_iter->id.next;
-               }
-               return effectlist;
-       }
+       printf("warning, static particles api removed\n");
        Py_INCREF( Py_None );
        return Py_None;
 }
@@ -688,30 +584,8 @@ static PyObject *Effect_FlagsDict( void )
        PyObject *Flags = PyConstant_New(  );
 
        if( Flags ) {
-               BPy_constant *c = ( BPy_constant * ) Flags;
-
-               PyConstant_Insert( c, "SELECTED",
-                                PyInt_FromLong( EFF_SELECT ) );
-               PyConstant_Insert( c, "BSPLINE",
-                                PyInt_FromLong( PAF_BSPLINE ) );
-               PyConstant_Insert( c, "STATIC",
-                                PyInt_FromLong( PAF_STATIC ) );
-               PyConstant_Insert( c, "FACES",
-                                PyInt_FromLong( PAF_FACE ) );
-               PyConstant_Insert( c, "ANIMATED",
-                                PyInt_FromLong( PAF_ANIMATED ) );
-               PyConstant_Insert( c, "UNBORN",
-                                PyInt_FromLong( PAF_UNBORN ) );
-               PyConstant_Insert( c, "VERTS",
-                                PyInt_FromLong( PAF_OFACE ) );
-               PyConstant_Insert( c, "EMESH",
-                                PyInt_FromLong( PAF_SHOWE ) );
-               PyConstant_Insert( c, "TRUERAND",
-                                PyInt_FromLong( PAF_TRAND ) );
-               PyConstant_Insert( c, "EVENDIST",
-                                PyInt_FromLong( PAF_EDISTR ) );
-               PyConstant_Insert( c, "DIED",
-                                PyInt_FromLong( PAF_DIED ) );
+               //BPy_constant *c = ( BPy_constant * ) Flags;
+               /* removed */
        }
        return Flags;
 }
@@ -1290,134 +1164,7 @@ static int Effect_setStaticStep( BPy_Effect * self , PyObject * args )
 /*****************************************************************************/
 static PyObject *Effect_getParticlesLoc( BPy_Effect * self )
 {
-       Object *ob;
-       Effect *eff;
-       PartEff *paf;
-       Particle *pa=0;
-       PyObject  *list, *strand_list, *pyvec, *pyvec2;
-       float p_time, c_time, vec[3], vec1[3], cfra, m_time, s_time;
-       int a;
-       short disp=100 ;
-       
-       cfra=frame_to_float( G.scene->r.cfra );
-       
-       /* as we need to update the particles system we try to retrieve
-       the object to which the effect is connected */
-       eff =(Effect *) self->effect;
-       
-       ob= self->object;
-       if(!ob)
-               return ( EXPP_ReturnPyObjError (PyExc_AttributeError,
-                                                          "Effect has no object" ) );
-       /*get the particles data */
-       paf= (PartEff *)eff;
-
-       /* particles->disp reduce the  display  number of particles */
-       /* as we want the complete  list ... we backup the disp value and restore later */ 
-       if (paf->disp<100)
-               disp= paf->disp; paf->disp=100;
-       
-       
-       build_particle_system(ob);
-       pa= paf->keys;
-
-       if(!pa)
-               return ( EXPP_ReturnPyObjError (PyExc_AttributeError,
-                                                          "Particles Location : no Keys" ) );
-
-       /* if object is in motion */
-       if( ob->ipoflag & OB_OFFS_PARTICLE )
-               p_time= give_timeoffset(ob);
-       else
-               p_time= 0.0;
-
-       list = PyList_New( 0 );
-       if( !list )
-               return EXPP_ReturnPyObjError( PyExc_MemoryError, "PyList() failed" );
-
-       c_time= bsystem_time( ob, cfra, p_time );
-
-       for( a=0; a < paf->totpart; a++, pa += paf->totkey ) {
-               
-               if(paf->flag & PAF_STATIC ) {
-                       strand_list = PyList_New( 0 );
-                       m_time= pa->time+pa->lifetime+paf->staticstep-1;
-                       for(c_time= pa->time; c_time<m_time; c_time+=paf->staticstep) {
-                               where_is_particle(paf, pa, c_time, vec);
-                               MTC_Mat4MulVecfl(ob->obmat, vec); /* make worldspace like the others */
-                               pyvec = newVectorObject(vec, 3, Py_NEW);
-                               if( PyList_Append( strand_list, pyvec) < 0 ) {
-                                       Py_DECREF( list );
-                                       Py_DECREF( strand_list );
-                                       Py_XDECREF( pyvec );
-                                       
-                                       return EXPP_ReturnPyObjError( PyExc_RuntimeError,
-                                                       "Couldn't append item to PyList" );
-                               }
-                               Py_DECREF( pyvec );
-                               
-                       }
-                       
-                       if( PyList_Append( list, strand_list) < 0 ) {
-                                       Py_DECREF( list );
-                                       Py_DECREF( strand_list );
-                                       return EXPP_ReturnPyObjError( PyExc_RuntimeError,
-                                                       "Couldn't append item to PyList" );
-                       }
-                       Py_DECREF( strand_list );
-               } else {
-                       if(c_time > pa->time && c_time < pa->time+pa->lifetime ) {
-                               /* vector particles are a tuple of 2 vectors */
-                               if( paf->stype==PAF_VECT ) {
-                                       s_time= c_time;
-                                       p_time= c_time+1.0f;
-                                       if(c_time < pa->time) {
-                                               if(paf->flag & PAF_UNBORN)
-                                                       p_time= pa->time+1.0f;
-                                               else
-                                                       continue;
-                                       }
-                                       if(c_time > pa->time+pa->lifetime) {
-                                               if(paf->flag & PAF_DIED)
-                                                       s_time= pa->time+pa->lifetime-1.0f;
-                                               else
-                                                       continue;
-                                       }
-                                       where_is_particle(paf, pa, s_time, vec);
-                                       where_is_particle(paf, pa, p_time, vec1);
-                                       pyvec  = newVectorObject(vec, 3, Py_NEW);
-                                       pyvec2 = newVectorObject(vec1, 3, Py_NEW);
-                                       if( PyList_Append( list, Py_BuildValue("[OO]", pyvec, pyvec2)) < 0 ) {
-                                               Py_DECREF( list );
-                                               Py_XDECREF( pyvec );
-                                               Py_XDECREF( pyvec2 );
-                                               return EXPP_ReturnPyObjError( PyExc_RuntimeError,
-                                                               "Couldn't append item to PyList" );
-                                       }
-                                       Py_DECREF( pyvec );
-                                       Py_DECREF( pyvec2 );
-                               } else { /* not a vector */
-                                       where_is_particle(paf, pa, c_time, vec);
-                                       pyvec = newVectorObject(vec, 3, Py_NEW);
-                                       if( PyList_Append( list, pyvec) < 0 ) {
-                                               Py_DECREF( list );
-                                               Py_XDECREF( pyvec );
-                                               return EXPP_ReturnPyObjError( PyExc_RuntimeError,
-                                                               "Couldn't append item to PyList" );
-                                       }
-                                       Py_DECREF( pyvec );
-                               }
-                       }
-               }
-       }
-
-       /* restore the real disp value */
-       if (disp<100){
-               paf->disp=disp; 
-               build_particle_system(ob);
-       }
-       
-       return list;    
+       return PyList_New( 0 ); 
 }
 
 /*****************************************************************************/
index f66f378b1763a975bdca345306612848f92e038f..ba975a6892f1e9efa28b05ae5ae9ea4f6cc3a3a2 100644 (file)
@@ -1341,7 +1341,7 @@ PyTypeObject Node_Type = {
        PyObject_HEAD_INIT( NULL )  /* required py macro */
        0,                          /* ob_size */
        /*  For printing, in format "<module>.<name>" */
-       "Blender.Node.node",             /* char *tp_name; */
+       "Blender.Node.Scripted",    /* char *tp_name; */
        sizeof( BPy_Node ),         /* int tp_basicsize; */
        0,                          /* tp_itemsize;  For allocation */
 
index 0780d2d483dea8bf9556d5631191d1b36723b0d2..4d8caf5a55ebdc735b60f9e09bed6f5a088d2684 100644 (file)
@@ -466,7 +466,7 @@ static PyObject *Object_upAxis(BPy_Object * self);
 static PyMethodDef BPy_Object_methods[] = {
        /* name, method, flags, doc */
        {"buildParts", ( PyCFunction ) Object_buildParts, METH_NOARGS,
-        "Recalcs particle system (if any) "},
+        "Recalcs particle system (if any), (depricated, will always return an empty list in version 2.46)"},
        {"getIpo", ( PyCFunction ) Object_getIpo, METH_NOARGS,
         "Returns the ipo of this object (if any) "},
        {"clrParent", ( PyCFunction ) Object_clrParent, METH_VARARGS,
@@ -1028,7 +1028,7 @@ static PyObject *M_Object_Duplicate( PyObject * self_unused,
 
 static PyObject *Object_buildParts( BPy_Object * self )
 {
-       build_particle_system( self->object );
+       /* This is now handles by modifiers */
        Py_RETURN_NONE;
 }
 
@@ -2986,12 +2986,7 @@ static PyObject *Object_getDupliObjects( BPy_Object * self )
        
        if(ob->transflag & OB_DUPLI) {
                /* before make duplis, update particle for current frame */
-               if(ob->transflag & OB_DUPLIVERTS) {
-                       PartEff *paf= give_parteff(ob);
-                       if(paf) {
-                               if(paf->flag & PAF_ANIMATED) build_particle_system(ob);
-                       }
-               }
+               /* TODO, build particles for particle dupli's */
                if(ob->type!=OB_MBALL) {
                        PyObject *list;
                        DupliObject *dupob;
@@ -3035,23 +3030,7 @@ static int Object_setDupliGroup( BPy_Object * self, PyObject * value )
 
 static PyObject *Object_getEffects( BPy_Object * self )
 {
-       PyObject *effect_list, *pyval;
-       Effect *eff;
-
-       effect_list = PyList_New( 0 );
-       if( !effect_list )
-               return EXPP_ReturnPyObjError( PyExc_RuntimeError,
-                               "PyList_New() failed" );
-
-       eff = self->object->effect.first;
-
-       while( eff ) {
-               pyval = EffectCreatePyObject( eff, self->object );
-               PyList_Append( effect_list, pyval );
-               Py_DECREF(pyval);
-               eff = eff->next;
-       }
-       return effect_list;
+       return PyList_New( 0 );
 }
 
 static PyObject *Object_getActionStrips( BPy_Object * self )
@@ -5028,7 +5007,7 @@ static PyGetSetDef BPy_Object_getseters[] = {
 
        {"effects",
         (getter)Object_getEffects, (setter)NULL, 
-        "The list of particle effects associated with the object",
+        "The list of particle effects associated with the object, (depricated, will always return an empty list in version 2.46)",
         NULL},
        {"actionStrips",
         (getter)Object_getActionStrips, (setter)NULL, 
index 76c98cb0ccfc434df577e30b5c5cb86ce394b92f..1de0360cd7779298e7174ee882d278ed2166e950 100644 (file)
@@ -262,43 +262,9 @@ struct PyMethodDef M_Particle_methods[] = {
 /*****************************************************************************/
 PyObject *M_Particle_New( PyObject * self, PyObject * args )
 {
-       BPy_Effect *pyeffect;
-       Effect *bleffect = 0;
-       Object *ob;
-       char *name = NULL;
-
-       if( !PyArg_ParseTuple( args, "s", &name ) )
-               return EXPP_ReturnPyObjError( PyExc_TypeError,
-                               "expected string argument" );
-
-       for( ob = G.main->object.first; ob; ob = ob->id.next )
-               if( !strcmp( name, ob->id.name + 2 ) )
-                       break;
-
-       if( !ob )
-               return EXPP_ReturnPyObjError( PyExc_AttributeError, 
-                               "object does not exist" );
-
-       if( ob->type != OB_MESH )
-               return EXPP_ReturnPyObjError( PyExc_AttributeError, 
-                               "object is not a mesh" );
-
-       pyeffect = ( BPy_Effect * ) PyObject_NEW( BPy_Effect, &Effect_Type );
-       if( !pyeffect )
-               return EXPP_ReturnPyObjError( PyExc_MemoryError,
-                               "couldn't create Effect Data object" );
-
-       bleffect = add_effect( EFF_PARTICLE );
-       if( !bleffect ) {
-               Py_DECREF( pyeffect );
-               return EXPP_ReturnPyObjError( PyExc_RuntimeError,
-                               "couldn't create Effect Data in Blender" );
-       }
-
-       pyeffect->effect = (PartEff *)bleffect;
-       BLI_addtail( &ob->effect, bleffect );
-
-       return ( PyObject * ) pyeffect;
+       printf("warning, static particles api removed\n");
+       Py_INCREF( Py_None );
+       return Py_None;
 }
 
 /*****************************************************************************/
@@ -307,48 +273,7 @@ PyObject *M_Particle_New( PyObject * self, PyObject * args )
 /*****************************************************************************/
 PyObject *M_Particle_Get( PyObject * self, PyObject * args )
 {
-       /*arguments : string object name
-          int : position of effect in the obj's effect list  */
-       char *name = 0;
-       Object *object_iter;
-       Effect *eff;
-       BPy_Particle *wanted_eff;
-       int num, i;
-
-       if( !PyArg_ParseTuple( args, "si", &name, &num ) )
-               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
-                                               "expected string int argument" ) );
-
-       object_iter = G.main->object.first;
-       if( !object_iter )
-               return EXPP_ReturnPyObjError( PyExc_AttributeError,
-                                               "Scene contains no object" );
-
-       while( object_iter ) {
-               if( strcmp( name, object_iter->id.name + 2 ) ) {
-                       object_iter = object_iter->id.next;
-                       continue;
-               }
-
-               if( object_iter->effect.first != NULL ) {
-                       eff = object_iter->effect.first;
-                       for( i = 0; i < num; i++ ) {
-                               if( eff->type != EFF_PARTICLE )
-                                       continue;
-                               eff = eff->next;
-                               if( !eff )
-                                       return ( EXPP_ReturnPyObjError
-                                                ( PyExc_AttributeError,
-                                                  "Object" ) );
-                       }
-                       wanted_eff =
-                               ( BPy_Particle * ) PyObject_NEW( BPy_Particle,
-                                                                &Particle_Type );
-                       wanted_eff->particle = eff;
-                       return ( PyObject * ) wanted_eff;
-               }
-               object_iter = object_iter->id.next;
-       }
+       printf("warning, static particles api removed\n");
        Py_INCREF( Py_None );
        return Py_None;
 }
index 70f4287ae36f3b6d869b4195eecd3362fc2fdb18..a7140d51d5029b2afea1eb2b649be5a7a20c8d90 100644 (file)
@@ -3,7 +3,8 @@
 """
 The Blender.Effect submodule
 
-B{new}: now L{Get}('objname') (without specifying second parameter: 'position') returns a list of all effects linked to object "objname".
+B{Deprecated}:
+This module is now maintained but not actively developed.
 
 Effect
 ======
index bb57c0b18522b333a81847a7c4704c4cb6ec442c..a3238f2615e8d63348c71d0578fc38e823c40da9 100644 (file)
@@ -383,7 +383,7 @@ class Object:
        @ivar sel: The selection state of the object in the current scene. 
                True is selected, False is unselected. Setting makes the object active.
        @type sel: boolean
-       @ivar effects: The list of particle effects associated with the object.
+       @ivar effects: The list of particle effects associated with the object. (depricated, will always return an empty list)
                Read-only.
        @type effects: list of Effect objects
        @ivar parentbonename: The string name of the parent bone (if defined).
@@ -645,7 +645,7 @@ class Object:
        def buildParts():
                """
                Recomputes the particle system. This method only applies to an Object of
-               the type Effect.
+               the type Effect. (depricated, does nothing now, use makeDisplayList instead to update the modifier stack)
                """
 
        def insertShapeKey():
@@ -1195,12 +1195,9 @@ class Object:
 
        def makeDisplayList():
                """
-               Updates this object's display list.  Blender uses display lists to store
-               already transformed data (like a mesh with its vertices already modified
-               by coordinate transformations and armature deformation).  If the object
-               isn't modified, there's no need to recalculate this data.  This method is
-               here for the *few cases* where a script may need it, like when toggling
-               the "SubSurf" mode for a mesh:
+               Forces an update to the objects display data. If the object isn't modified,
+               there's no need to recalculate this data.
+               This method is here for the *few cases* where it is needed.
 
                Example::
                        import Blender
index 2c6da8b2cb8bae991d2e35f7c8c0345dd63f72ee..09c850b6252fc3cce7e74e92f27c5bcae5fce5c1 100644 (file)
@@ -1081,6 +1081,10 @@ void RE_InitState(Render *re, Render *source, RenderData *rd, int winx, int winy
                re->ok= 0;
        }
        else {
+#ifndef WITH_OPENEXR
+               /* can't do this without openexr support */
+               re->r.scemode &= ~R_EXR_TILE_FILE;
+#endif
                
                if(!(re->r.scemode & R_EXR_TILE_FILE))
                        re->r.scemode &= ~R_FULL_SAMPLE;        /* clear, so we can use this flag for test both */
index 0a33fc9901349e1962c476f300fd2ee7a7da7b54..526b585c2e5b5c2ece835f7f87c660e63faecbba 100644 (file)
-/* DataToC output of file <B_blend> */
+/* DataToC output of file </home/ideasman42/_B_blend> */
 
-int datatoc_B_blend_size= 98212;
+int datatoc_B_blend_size= 143412;
 char datatoc_B_blend[]= {
- 66, 76, 69, 78,
- 68, 69, 82, 95,118, 50, 52, 49, 82, 69, 78, 68, 32,  0,  0,  0,144,240,255,191,  0,  0,  0,  0,  1,  0,  0,  0,  1,  0,  0,  0,
-250,  0,  0,  0, 83, 99,101,110,101,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  8, 83, 82,  0,  0,
-116,  0,  0,  0,  8,237,195,  8,109,  0,  0,  0,  1,  0,  0,  0, 96, 40,196,  8,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
- 83, 82, 49, 45, 65,110,105,109, 97,116,105,111,110,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0,  0,
-232,150,192,  8,168,240,195,  8,232,240,195,  8, 24,247,195,  8, 96,247,195,  8,152, 31,196,  8,136,251,196,  8,  0,  0,231,  3,
-143,  1,174,  4,232,  3, 32,  3,  1,  0,  1,  0,  0,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-  0,  0,  0,  0, 68, 65, 84, 65, 20,  0,  0,  0,232,150,192,  8,110,  0,  0,  0,  1,  0,  0,  0,168,237,195,  8,  0,  0,  0,  0,
-  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 68, 65, 84, 65, 20,  0,  0,  0,168,237,195,  8,110,  0,  0,  0,  1,  0,  0,  0,
-232,237,195,  8,232,150,192,  8,  0,  0,  0,  0,  0,  0, 32,  3,  0,  0,  0,  0, 68, 65, 84, 65, 20,  0,  0,  0,232,237,195,  8,
-110,  0,  0,  0,  1,  0,  0,  0, 40,238,195,  8,168,237,195,  8,  0,  0,  0,  0,232,  3, 32,  3,  0,  0,  0,  0, 68, 65, 84, 65,
- 20,  0,  0,  0, 40,238,195,  8,110,  0,  0,  0,  1,  0,  0,  0,104,238,195,  8,232,237,195,  8,  0,  0,  0,  0,232,  3,  0,  0,
-  0,  0,  0,  0, 68, 65, 84, 65, 20,  0,  0,  0,104,238,195,  8,110,  0,  0,  0,  1,  0,  0,  0,168,238,195,  8, 40,238,195,  8,
-  0,  0,  0,  0,232,  3,248,  0,  0,  0,  0,  0, 68, 65, 84, 65, 20,  0,  0,  0,168,238,195,  8,110,  0,  0,  0,  1,  0,  0,  0,
-232,238,195,  8,104,238,195,  8,  0,  0,  0,  0,  0,  0,  6,  3,  0,  0,  0,  0, 68, 65, 84, 65, 20,  0,  0,  0,232,238,195,  8,
-110,  0,  0,  0,  1,  0,  0,  0, 40,239,195,  8,168,238,195,  8,  0,  0,  0,  0,232,  3,  6,  3,  0,  0,  0,  0, 68, 65, 84, 65,
- 20,  0,  0,  0, 40,239,195,  8,110,  0,  0,  0,  1,  0,  0,  0,104,239,195,  8,232,238,195,  8,  0,  0,  0,  0,160,  2,248,  0,
-  0,  0,  0,  0, 68, 65, 84, 65, 20,  0,  0,  0,104,239,195,  8,110,  0,  0,  0,  1,  0,  0,  0,168,239,195,  8, 40,239,195,  8,
-  0,  0,  0,  0,160,  2,  6,  3,  0,  0,  0,  0, 68, 65, 84, 65, 20,  0,  0,  0,168,239,195,  8,110,  0,  0,  0,  1,  0,  0,  0,
-232,239,195,  8,104,239,195,  8,  0,  0,  0,  0,  0,  0,188,  0,  0,  0,  0,  0, 68, 65, 84, 65, 20,  0,  0,  0,232,239,195,  8,
-110,  0,  0,  0,  1,  0,  0,  0, 40,240,195,  8,168,239,195,  8,  0,  0,  0,  0,232,  3,188,  0,  0,  0,  0,  0, 68, 65, 84, 65,
- 20,  0,  0,  0, 40,240,195,  8,110,  0,  0,  0,  1,  0,  0,  0,104,240,195,  8,232,239,195,  8,  0,  0,  0,  0,204,  0,248,  0,
-  0,  0,  0,  0, 68, 65, 84, 65, 20,  0,  0,  0,104,240,195,  8,110,  0,  0,  0,  1,  0,  0,  0,168,240,195,  8, 40,240,195,  8,
-  0,  0,  0,  0,204,  0,  6,  3,  0,  0,  0,  0, 68, 65, 84, 65, 20,  0,  0,  0,168,240,195,  8,110,  0,  0,  0,  1,  0,  0,  0,
-  0,  0,  0,  0,104,240,195,  8,  0,  0,  0,  0,204,  0,188,  0,  0,  0,  0,  0, 68, 65, 84, 65, 24,  0,  0,  0,232,240,195,  8,
-111,  0,  0,  0,  1,  0,  0,  0, 48,241,195,  8,  0,  0,  0,  0,168,237,195,  8,232,237,195,  8,  1,  0,  0,  0,  0,  0,  0,  0,
- 68, 65, 84, 65, 24,  0,  0,  0, 48,241,195,  8,111,  0,  0,  0,  1,  0,  0,  0,120,241,195,  8,232,240,195,  8,232,150,192,  8,
- 40,238,195,  8,  1,  0,  0,  0,  0,  0,  0,  0, 68, 65, 84, 65, 24,  0,  0,  0,120,241,195,  8,111,  0,  0,  0,  1,  0,  0,  0,
-192,241,195,  8, 48,241,195,  8,168,237,195,  8,168,238,195,  8,  1,  0,  0,  0,  0,  0,  0,  0, 68, 65, 84, 65, 24,  0,  0,  0,
-192,241,195,  8,111,  0,  0,  0,  1,  0,  0,  0,  8,242,195,  8,120,241,195,  8,232,237,195,  8,232,238,195,  8,  1,  0,  0,  0,
-  0,  0,  0,  0, 68, 65, 84, 65, 24,  0,  0,  0,  8,242,195,  8,111,  0,  0,  0,  1,  0,  0,  0, 80,242,195,  8,192,241,195,  8,
-168,238,195,  8,232,238,195,  8,  0,  0,  0,  0,  0,  0,  0,  0, 68, 65, 84, 65, 24,  0,  0,  0, 80,242,195,  8,111,  0,  0,  0,
-  1,  0,  0,  0,152,242,195,  8,  8,242,195,  8,104,238,195,  8, 40,239,195,  8,  0,  0,  0,  0,  0,  0,  0,  0, 68, 65, 84, 65,
- 24,  0,  0,  0,152,242,195,  8,111,  0,  0,  0,  1,  0,  0,  0,224,242,195,  8, 80,242,195,  8,232,238,195,  8,104,239,195,  8,
-  0,  0,  0,  0,  0,  0,  0,  0, 68, 65, 84, 65, 24,  0,  0,  0,224,242,195,  8,111,  0,  0,  0,  1,  0,  0,  0, 40,243,195,  8,
-152,242,195,  8, 40,239,195,  8,104,239,195,  8,  0,  0,  0,  0,  0,  0,  0,  0, 68, 65, 84, 65, 24,  0,  0,  0, 40,243,195,  8,
-111,  0,  0,  0,  1,  0,  0,  0,112,243,195,  8,224,242,195,  8,104,238,195,  8,232,238,195,  8,  1,  0,  0,  0,  0,  0,  0,  0,
- 68, 65, 84, 65, 24,  0,  0,  0,112,243,195,  8,111,  0,  0,  0,  1,  0,  0,  0,184,243,195,  8, 40,243,195,  8,232,150,192,  8,
-168,239,195,  8,  0,  0,  0,  0,  0,  0,  0,  0, 68, 65, 84, 65, 24,  0,  0,  0,184,243,195,  8,111,  0,  0,  0,  1,  0,  0,  0,
-  0,244,195,  8,112,243,195,  8,104,238,195,  8,232,239,195,  8,  0,  0,  0,  0,  0,  0,  0,  0, 68, 65, 84, 65, 24,  0,  0,  0,
-  0,244,195,  8,111,  0,  0,  0,  1,  0,  0,  0, 72,244,195,  8,184,243,195,  8, 40,238,195,  8,232,239,195,  8,  0,  0,  0,  0,
-  0,  0,  0,  0, 68, 65, 84, 65, 24,  0,  0,  0, 72,244,195,  8,111,  0,  0,  0,  1,  0,  0,  0,144,244,195,  8,  0,244,195,  8,
-168,239,195,  8,232,239,195,  8,  0,  0,  0,  0,  0,  0,  0,  0, 68, 65, 84, 65, 24,  0,  0,  0,144,244,195,  8,111,  0,  0,  0,
-  1,  0,  0,  0,216,244,195,  8, 72,244,195,  8, 40,239,195,  8, 40,240,195,  8,  0,  0,  0,  0,  0,  0,  0,  0, 68, 65, 84, 65,
- 24,  0,  0,  0,216,244,195,  8,111,  0,  0,  0,  1,  0,  0,  0, 32,245,195,  8,144,244,195,  8,168,238,195,  8,104,240,195,  8,
-  0,  0,  0,  0,  0,  0,  0,  0, 68, 65, 84, 65, 24,  0,  0,  0, 32,245,195,  8,111,  0,  0,  0,  1,  0,  0,  0,104,245,195,  8,
-216,244,195,  8,104,239,195,  8,104,240,195,  8,  0,  0,  0,  0,  0,  0,  0,  0, 68, 65, 84, 65, 24,  0,  0,  0,104,245,195,  8,
-111,  0,  0,  0,  1,  0,  0,  0,176,245,195,  8, 32,245,195,  8, 40,240,195,  8,104,240,195,  8,  0,  0,  0,  0,  0,  0,  0,  0,
- 68, 65, 84, 65, 24,  0,  0,  0,176,245,195,  8,111,  0,  0,  0,  1,  0,  0,  0,248,245,195,  8,104,245,195,  8,168,239,195,  8,
-168,240,195,  8,  0,  0,  0,  0,  0,  0,  0,  0, 68, 65, 84, 65, 24,  0,  0,  0,248,245,195,  8,111,  0,  0,  0,  1,  0,  0,  0,
- 64,246,195,  8,176,245,195,  8,232,239,195,  8,168,240,195,  8,  0,  0,  0,  0,  0,  0,  0,  0, 68, 65, 84, 65, 24,  0,  0,  0,
- 64,246,195,  8,111,  0,  0,  0,  1,  0,  0,  0,136,246,195,  8,248,245,195,  8,104,238,195,  8, 40,240,195,  8,  0,  0,  0,  0,
-  0,  0,  0,  0, 68, 65, 84, 65, 24,  0,  0,  0,136,246,195,  8,111,  0,  0,  0,  1,  0,  0,  0,208,246,195,  8, 64,246,195,  8,
- 40,240,195,  8,168,240,195,  8,  0,  0,  0,  0,  0,  0,  0,  0, 68, 65, 84, 65, 24,  0,  0,  0,208,246,195,  8,111,  0,  0,  0,
-  1,  0,  0,  0, 24,247,195,  8,136,246,195,  8,168,238,195,  8,168,239,195,  8,  0,  0,  0,  0,  0,  0,  0,  0, 68, 65, 84, 65,
- 24,  0,  0,  0, 24,247,195,  8,111,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0,  0,208,246,195,  8,104,240,195,  8,168,240,195,  8,
-  0,  0,  0,  0,  0,  0,  0,  0, 68, 65, 84, 65,204,  0,  0,  0, 96,247,195,  8,113,  0,  0,  0,  1,  0,  0,  0,104,  5,196,  8,
-  0,  0,  0,  0,232,150,192,  8,168,239,195,  8,232,239,195,  8, 40,238,195,  8,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+ 66, 76, 69, 78, 68, 69, 82, 45,118, 50, 52, 53, 82, 69, 78, 68, 32,  0,  0,  0,
+144,  7,200, 92,255,127,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  1,  0,  0,  0,250,  0,  0,  0, 83, 99,101,110,101,  0,  0,  0,
+  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 71, 76, 79, 66, 40,  0,  0,  0,144,  7,200, 92,255,127,  0,  0,
+160,  0,  0,  0,  1,  0,  0,  0, 32, 32, 49, 54, 16,  0,  0,  0,240,  0,  0,  0,  1,  0,  0,  1,240,206, 87,  1,  0,  0,  0,  0,
+192,249, 88,  1,  0,  0,  0,  0,  0, 16,  0,  0,128, 32,  4,  0, 83, 82,  0,  0,168,  0,  0,  0,  0,145, 97,  1,  0,  0,  0,  0,
+155,  0,  0,  0,  1,  0,  0,  0,240,206, 87,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+  0,  0,  0,  0,  0,  0,  0,  0, 83, 82, 49, 45, 65,110,105,109, 97,116,105,111,110,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,240,145, 97,  1,  0,  0,  0,  0,208,150, 97,  1,  0,  0,  0,  0,
+ 48,151, 97,  1,  0,  0,  0,  0,208,160, 97,  1,  0,  0,  0,  0, 64,161, 97,  1,  0,  0,  0,  0,224,194, 87,  1,  0,  0,  0,  0,
+192,249, 88,  1,  0,  0,  0,  0,  0,  0,231,  3,143,  1,174,  4,232,  3, 32,  3,  1,  0,  1,  0,  0,  0,  0,  0,  1,  0,  0,  0,
+  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 68, 65, 84, 65, 32,  0,  0,  0,240,145, 97,  1,  0,  0,  0,  0,
+156,  0,  0,  0,  1,  0,  0,  0, 80,146, 97,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+  0,  0,  0,  0,  0,  0,  0,  0, 68, 65, 84, 65, 32,  0,  0,  0, 80,146, 97,  1,  0,  0,  0,  0,156,  0,  0,  0,  1,  0,  0,  0,
+176,146, 97,  1,  0,  0,  0,  0,240,145, 97,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 32,  3,  0,  0,  0,  0,
+ 68, 65, 84, 65, 32,  0,  0,  0,176,146, 97,  1,  0,  0,  0,  0,156,  0,  0,  0,  1,  0,  0,  0, 16,147, 97,  1,  0,  0,  0,  0,
+ 80,146, 97,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,232,  3, 32,  3,  0,  0,  0,  0, 68, 65, 84, 65, 32,  0,  0,  0,
+ 16,147, 97,  1,  0,  0,  0,  0,156,  0,  0,  0,  1,  0,  0,  0,112,147, 97,  1,  0,  0,  0,  0,176,146, 97,  1,  0,  0,  0,  0,
+  0,  0,  0,  0,  0,  0,  0,  0,232,  3,  0,  0,  0,  0,  0,  0, 68, 65, 84, 65, 32,  0,  0,  0,112,147, 97,  1,  0,  0,  0,  0,
+156,  0,  0,  0,  1,  0,  0,  0,208,147, 97,  1,  0,  0,  0,  0, 16,147, 97,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+232,  3,248,  0,  0,  0,  0,  0, 68, 65, 84, 65, 32,  0,  0,  0,208,147, 97,  1,  0,  0,  0,  0,156,  0,  0,  0,  1,  0,  0,  0,
+ 48,148, 97,  1,  0,  0,  0,  0,112,147, 97,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  6,  3,  0,  0,  0,  0,
+ 68, 65, 84, 65, 32,  0,  0,  0, 48,148, 97,  1,  0,  0,  0,  0,156,  0,  0,  0,  1,  0,  0,  0,144,148, 97,  1,  0,  0,  0,  0,
+208,147, 97,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,232,  3,  6,  3,  0,  0,  0,  0, 68, 65, 84, 65, 32,  0,  0,  0,
+144,148, 97,  1,  0,  0,  0,  0,156,  0,  0,  0,  1,  0,  0,  0,240,148, 97,  1,  0,  0,  0,  0, 48,148, 97,  1,  0,  0,  0,  0,
+  0,  0,  0,  0,  0,  0,  0,  0,160,  2,248,  0,  0,  0,  0,  0, 68, 65, 84, 65, 32,  0,  0,  0,240,148, 97,  1,  0,  0,  0,  0,
+156,  0,  0,  0,  1,  0,  0,  0, 80,149, 97,  1,  0,  0,  0,  0,144,148, 97,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+160,  2,  6,  3,  0,  0,  0,  0, 68, 65, 84, 65, 32,  0,  0,  0, 80,149, 97,  1,  0,  0, &nb