This commit is contained in:
Daniel Genrich 2008-04-30 18:30:11 +00:00
commit 27afa69c9a
96 changed files with 8548 additions and 8243 deletions

@ -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)

@ -143,7 +143,7 @@ if crossbuild and platform!='win32':
env['OURPLATFORM'] = platform
configfile = B.arguments.get('BF_CONFIG', 'config'+os.sep+platform+'-config.py')
configfile = 'config'+os.sep+platform+'-config.py'
if os.path.exists(configfile):
print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + configfile
@ -157,13 +157,14 @@ if crossbuild and env['PLATFORM'] != 'win32':
# Needed for gui programs, console programs should do without it
env.Append(LINKFLAGS=['-mwindows'])
userconfig = B.arguments.get('BF_CONFIG', 'user-config.py')
# first read platform config. B.arguments will override
optfiles = [configfile]
if os.path.exists('user-config.py'):
print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + 'user-config.py'
optfiles += ['user-config.py']
if os.path.exists(userconfig):
print B.bc.OKGREEN + "Using user-config file: " + B.bc.ENDC + userconfig
optfiles += [userconfig]
else:
print B.bc.WARNING + 'user-config.py' + " not found, no user overrides" + B.bc.ENDC
print B.bc.WARNING + userconfig + " not found, no user overrides" + B.bc.ENDC
opts = btools.read_opts(optfiles, B.arguments)
opts.Update(env)
@ -178,20 +179,20 @@ if env['BF_NO_ELBEEM'] == 1:
env['CCFLAGS'].append('-DDISABLE_ELBEEM')
if env['WITH_BF_OPENMP'] == 1:
if env['OURPLATFORM']=='win32-vc':
env['CCFLAGS'].append('/openmp')
env['CPPFLAGS'].append('/openmp')
env['CXXFLAGS'].append('/openmp')
else:
if env['CC'] == 'icc':
env.Append(LINKFLAGS=['-openmp', '-static-intel'])
env['CCFLAGS'].append('-openmp')
env['CPPFLAGS'].append('-openmp')
env['CXXFLAGS'].append('-openmp')
else:
env['CCFLAGS'].append('-fopenmp')
env['CPPFLAGS'].append('-fopenmp')
env['CXXFLAGS'].append('-fopenmp')
if env['OURPLATFORM']=='win32-vc':
env['CCFLAGS'].append('/openmp')
env['CPPFLAGS'].append('/openmp')
env['CXXFLAGS'].append('/openmp')
else:
if env['CC'] == 'icc':
env.Append(LINKFLAGS=['-openmp', '-static-intel'])
env['CCFLAGS'].append('-openmp')
env['CPPFLAGS'].append('-openmp')
env['CXXFLAGS'].append('-openmp')
else:
env['CCFLAGS'].append('-fopenmp')
env['CPPFLAGS'].append('-fopenmp')
env['CXXFLAGS'].append('-fopenmp')
#check for additional debug libnames
@ -263,10 +264,18 @@ if not quickie and do_clean:
if os.path.exists(B.root_build_dir):
print B.bc.HEADER+'Cleaning...'+B.bc.ENDC
dirs = os.listdir(B.root_build_dir)
for dir in dirs:
if os.path.isdir(B.root_build_dir + dir) == 1:
print "clean dir %s"%(B.root_build_dir+dir)
shutil.rmtree(B.root_build_dir+dir)
for entry in dirs:
if os.path.isdir(B.root_build_dir + entry) == 1:
print "clean dir %s"%(B.root_build_dir+entry)
shutil.rmtree(B.root_build_dir+entry)
else: # remove file
print "remove file %s"%(B.root_build_dir+entry)
os.remove(B.root_build_dir+entry)
for confile in ['extern/ffmpeg/config.mak', 'extern/x264/config.mak',
'extern/xvidcore/build/generic/platform.inc']:
if os.path.exists(confile):
print "clean file %s"%confile
os.remove(confile)
print B.bc.OKGREEN+'...done'+B.bc.ENDC
else:
print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC
@ -355,30 +364,30 @@ dottargetlist = []
scriptinstall = []
if env['OURPLATFORM']!='darwin':
for dp, dn, df in os.walk('bin/.blender'):
if 'CVS' in dn:
dn.remove('CVS')
if '.svn' in dn:
dn.remove('.svn')
for f in df:
dotblendlist.append(dp+os.sep+f)
dottargetlist.append(env['BF_INSTALLDIR']+dp[3:]+os.sep+f)
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))
dotblenderinstall = []
for targetdir,srcfile in zip(dottargetlist, dotblendlist):
td, tf = os.path.split(targetdir)
dotblenderinstall.append(env.Install(dir=td, source=srcfile))
#-- .blender/scripts
scriptpath='release/scripts'
for dp, dn, df in os.walk(scriptpath):
if 'CVS' in dn:
dn.remove('CVS')
if '.svn' in dn:
dn.remove('.svn')
dir=env['BF_INSTALLDIR']+'/.blender/scripts'+dp[len(scriptpath):]
source=[dp+os.sep+f for f in df]
scriptinstall.append(env.Install(dir=dir,source=source))
#-- plugins
pluglist = []
@ -410,9 +419,9 @@ for tp, tn, tf in os.walk('release/text'):
textinstall = env.Install(dir=env['BF_INSTALLDIR'], source=textlist)
if env['OURPLATFORM']=='darwin':
allinstall = [blenderinstall, plugininstall, textinstall]
allinstall = [blenderinstall, plugininstall, textinstall]
else:
allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall]
allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall]
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'):
dllsources = ['${LCGDIR}/gettext/lib/gnu_gettext.dll',
@ -432,10 +441,17 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'):
dllsources += ['${LCGDIR}/pthreads/lib/pthreadVC2.dll']
if env['WITH_BF_ICONV']:
dllsources += ['${LCGDIR}/iconv/lib/iconv.dll']
# if env['WITH_BF_FFMPEG']:
# dllsources += ['${LCGDIR}/ffmpeg/lib/avcodec-51.dll',
# '${LCGDIR}/ffmpeg/lib/avformat-51.dll',
# '${LCGDIR}/ffmpeg/lib/avutil-49.dll']
if env['WITH_BF_FFMPEG']:
dllsources += ['${LCGDIR}/ffmpeg/lib/avcodec-51.dll',
'${LCGDIR}/ffmpeg/lib/avformat-52.dll',
'${LCGDIR}/ffmpeg/lib/avdevice-52.dll',
'${LCGDIR}/ffmpeg/lib/avutil-49.dll',
'${LCGDIR}/ffmpeg/lib/libfaad-0.dll',
'${LCGDIR}/ffmpeg/lib/libfaac-0.dll',
'${LCGDIR}/ffmpeg/lib/libmp3lame-0.dll',
'${LCGDIR}/ffmpeg/lib/libx264-59.dll',
'${LCGDIR}/ffmpeg/lib/xvidcore.dll',
'${LCGDIR}/ffmpeg/lib/swscale-0.dll']
windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
allinstall += windlls
@ -459,7 +475,7 @@ Depends(nsiscmd, allinstall)
Default(B.program_list)
if not env['WITHOUT_BF_INSTALL']:
Default(installtarget)
Default(installtarget)
#------------ RELEASE
# TODO: zipup the installation

@ -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'
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'
WITH_BF_OPENAL = 'true'
# Note : should be true, but openal simply dont work on intel
if MAC_PROC == 'i386':
WITH_BF_OPENAL = 'false'
else:
WITH_BF_OPENAL = 'true'
#different lib must be used following version of gcc
# for gcc 3.3
#BF_OPENAL = LIBDIR + '/openal'
# for gcc 3.4
BF_OPENAL = '#../lib/darwin-8.0.0-powerpc/openal'
# for gcc 3.4 and ulterior
if MAC_PROC == 'powerpc':
BF_OPENAL = '#../lib/darwin-8.0.0-powerpc/openal'
else :
BF_OPENAL = LIBDIR + '/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include'
BF_OPENAL_LIB = 'openal'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
@ -89,6 +143,7 @@ BF_FTGL_LIB = 'extern_ftgl'
WITH_BF_GAMEENGINE='true'
WITH_BF_PLAYER='true'
WITH_BF_GLEXT= '1'
WITH_BF_ODE = 'false'
BF_ODE = LIBDIR + '/ode'
@ -143,20 +198,40 @@ BF_OPENGL_LIB = 'GL GLU'
BF_OPENGL_LIBPATH = '/System/Library/Frameworks/OpenGL.framework/Libraries'
BF_OPENGL_LINKFLAGS = '-framework OpenGL'
##
##CC = gcc
##CCC = g++
##ifeq ($CPU),alpha)
## CFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing -mieee
CFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
CFLAGS = ['-pipe','-fPIC','-funsigned-char']
CPPFLAGS = ['-fpascal-strings']
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing', '-fpascal-strings']
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing', '-fpascal-strings']
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fpascal-strings']
CXXFLAGS = [ '-pipe','-fPIC','-funsigned-char', '-fpascal-strings']
PLATFORM_LINKFLAGS = '-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime'
REL_CFLAGS = ['-O2']
REL_CCFLAGS = ['-O2']
#note to build succesfully on 10.3.9 SDK you need to patch 10.3.9 by adding the SystemStubs.a lib from 10.4
LLIBS = 'stdc++ SystemStubs'
# some flags shuffling for different Os versions
if MAC_MIN_VERS == '10.3':
CFLAGS = ['-fuse-cxa-atexit']+CFLAGS
CXXFLAGS = ['-fuse-cxa-atexit']+CXXFLAGS
PLATFORM_LINKFLAGS = '-fuse-cxa-atexit '+PLATFORM_LINKFLAGS
LLIBS = LLIBS + ' crt3.o'
if USE_SDK=='true':
SDK_FLAGS=['-isysroot', MACOSX_SDK,'-mmacosx-version-min='+MAC_MIN_VERS]
PLATFORM_LINKFLAGS = '-mmacosx-version-min='+MAC_MIN_VERS+ ' -Wl,-syslibroot,' + MACOSX_SDK+" "+PLATFORM_LINKFLAGS
CCFLAGS=SDK_FLAGS+CCFLAGS
CXXFLAGS=SDK_FLAGS+CXXFLAGS
if MAC_PROC == 'i386':
REL_CFLAGS = ['-O2','-ftree-vectorize','-msse','-msse2','-msse3','-mssse3']
REL_CCFLAGS = ['-O2','-ftree-vectorize','-msse','-msse2','-msse3','-mssse3']
else:
CFLAGS = CFLAGS+['-fno-strict-aliasing']
CCFLAGS = CCFLAGS+['-fno-strict-aliasing']
CXXFLAGS = CXXFLAGS+['-fno-strict-aliasing']
REL_CFLAGS = ['-O2']
REL_CCFLAGS = ['-O2']
##BF_DEPEND = 'true'
##
##AR = ar
@ -171,7 +246,6 @@ CC_WARN = ' -Wall -Wno-long-double'
##FIX_STUBS_WARNINGS = -Wno-unused
LLIBS = 'stdc++ SystemStubs'
##LOPTS = --dynamic
##DYNLDFLAGS = -shared $(LDFLAGS)

@ -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:

@ -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"

@ -38,7 +38,10 @@
#include <stdarg.h>
/* mmap exception */
#if defined(AMIGA) || defined(__BeOS) || defined(WIN32)
#if defined(AMIGA) || defined(__BeOS)
#elif defined(WIN32)
#include <sys/types.h>
#include "mmap_win.h"
#else
#include <sys/types.h>
#include <sys/mman.h>
@ -289,7 +292,7 @@ void *MEM_callocN(unsigned int len, const char *str)
/* note; mmap returns zero'd memory */
void *MEM_mapallocN(unsigned int len, const char *str)
{
#if defined(AMIGA) || defined(__BeOS) || defined(WIN32)
#if defined(AMIGA) || defined(__BeOS)
return MEM_callocN(len, str);
#else
MemHead *memh;
@ -586,7 +589,7 @@ static void rem_memblock(MemHead *memh)
totblock--;
mem_in_use -= memh->len;
#if defined(AMIGA) || defined(__BeOS) || defined(WIN32)
#if defined(AMIGA) || defined(__BeOS)
free(memh);
#else

@ -0,0 +1,261 @@
/**
* $Id: $
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* The Original Code is Copyright (C) 2008 Blender Foundation.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): Andrea Weikert.
*
* ***** END GPL LICENSE BLOCK *****
*/
#if defined(WIN32)
#include <windows.h>
#include <errno.h>
#include <io.h>
#include <sys/types.h>
#include <stdio.h>
#include "mmap_win.h"
#ifndef FILE_MAP_EXECUTE
//not defined in earlier versions of the Platform SDK (before February 2003)
#define FILE_MAP_EXECUTE 0x0020
#endif
/* --------------------------------------------------------------------- */
/* local storage definitions */
/* --------------------------------------------------------------------- */
/* all memory mapped chunks are put in linked lists */
typedef struct mmapLink
{
struct mmapLink *next,*prev;
} mmapLink;
typedef struct mmapListBase
{
void *first, *last;
} mmapListBase;
typedef struct MemMap {
struct MemMap *next,*prev;
void *mmap;
HANDLE fhandle;
HANDLE maphandle;
} MemMap;
/* --------------------------------------------------------------------- */
/* local functions */
/* --------------------------------------------------------------------- */
static void mmap_addtail(volatile mmapListBase *listbase, void *vlink);
static void mmap_remlink(volatile mmapListBase *listbase, void *vlink);
static void *mmap_findlink(volatile mmapListBase *listbase, void *ptr);
static int mmap_get_prot_flags (int flags);
static int mmap_get_access_flags (int flags);
/* --------------------------------------------------------------------- */
/* vars */
/* --------------------------------------------------------------------- */
volatile static struct mmapListBase _mmapbase;
volatile static struct mmapListBase *mmapbase = &_mmapbase;
/* --------------------------------------------------------------------- */
/* implementation */
/* --------------------------------------------------------------------- */
/* mmap for windows */
void *mmap(void *start, size_t len, int prot, int flags, int fd, off_t offset)
{
HANDLE fhandle = INVALID_HANDLE_VALUE;
HANDLE maphandle;
int prot_flags = mmap_get_prot_flags(prot);
int access_flags = mmap_get_access_flags(prot);
MemMap *mm = NULL;
void *ptr = NULL;
if ( flags & MAP_FIXED ) {
return MAP_FAILED;
}
/*
if ( fd == -1 ) {
_set_errno( EBADF );
return MAP_FAILED;
}
*/
if ( fd != -1 ) {
fhandle = (HANDLE) _get_osfhandle (fd);
}
if ( fhandle == INVALID_HANDLE_VALUE ) {
if (!(flags & MAP_ANONYMOUS)) {
errno = EBADF;
return MAP_FAILED;
}
} else {
if ( !DuplicateHandle( GetCurrentProcess(), fhandle, GetCurrentProcess(),
&fhandle, 0, FALSE, DUPLICATE_SAME_ACCESS ) ) {
return MAP_FAILED;
}
}
maphandle = CreateFileMapping(fhandle, NULL, prot_flags, 0, len, NULL);
if ( maphandle == 0 ) {
errno = EBADF;
return MAP_FAILED;
}
ptr = MapViewOfFile(maphandle, access_flags, 0, offset, 0);
if ( ptr == NULL ) {
DWORD dwLastErr = GetLastError();
if ( dwLastErr == ERROR_MAPPED_ALIGNMENT )
errno=EINVAL;
else
errno=EACCES;
CloseHandle(maphandle);
return MAP_FAILED;
}
mm= (MemMap *)malloc(sizeof(MemMap));
if (!mm) {
errno=ENOMEM;
}
mm->fhandle = fhandle;
mm->maphandle = maphandle;
mm->mmap = ptr;
mmap_addtail(mmapbase, mm);
return ptr;
}
/* munmap for windows */
long munmap(void *ptr, long size)
{
MemMap *mm = mmap_findlink(mmapbase, ptr);
if (!mm) {
errno=EINVAL;
return -1;
}
UnmapViewOfFile( mm->mmap );
CloseHandle( mm->maphandle );
CloseHandle( mm->fhandle);
mmap_remlink(mmapbase, mm);
return 0;
}
/* --------------------------------------------------------------------- */
/* local functions */
/* --------------------------------------------------------------------- */
static void mmap_addtail(volatile mmapListBase *listbase, void *vlink)
{
struct mmapLink *link= vlink;
if (link == 0) return;
if (listbase == 0) return;
link->next = 0;
link->prev = listbase->last;
if (listbase->last) ((struct mmapLink *)listbase->last)->next = link;
if (listbase->first == 0) listbase->first = link;
listbase->last = link;
}
static void mmap_remlink(volatile mmapListBase *listbase, void *vlink)
{
struct mmapLink *link= vlink;
if (link == 0) return;
if (listbase == 0) return;
if (link->next) link->next->prev = link->prev;
if (link->prev) link->prev->next = link->next;
if (listbase->last == link) listbase->last = link->prev;
if (listbase->first == link) listbase->first = link->next;
}
static void *mmap_findlink(volatile mmapListBase *listbase, void *ptr)
{
MemMap *mmap_ptr = (MemMap*)ptr;
MemMap *mm;
if (ptr == 0) return NULL;
if (listbase == 0) return NULL;
mm = (MemMap *)listbase->first;
while (mm) {
if (mm->mmap == ptr) {
return mm;
}
mm = mm->next;
}
return NULL;
}
static int mmap_get_prot_flags (int flags)
{
int prot = PAGE_NOACCESS;
if ( ( flags & PROT_READ ) == PROT_READ ) {
if ( ( flags & PROT_WRITE ) == PROT_WRITE ) {
prot = (flags & PROT_EXEC) ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE;
} else {
prot = (flags & PROT_EXEC) ? PAGE_EXECUTE_READ : PAGE_READONLY;
}
} else if ( ( flags & PROT_WRITE ) == PROT_WRITE ) {
prot = (flags & PROT_EXEC) ? PAGE_EXECUTE_READ : PAGE_WRITECOPY;
} else if ( ( flags & PROT_EXEC ) == PROT_EXEC ) {
prot = PAGE_EXECUTE_READ;
}
return prot;
}
static int mmap_get_access_flags (int flags)
{
int access = 0;
if ( ( flags & PROT_READ ) == PROT_READ ) {
if ( ( flags & PROT_WRITE ) == PROT_WRITE ) {
access = FILE_MAP_WRITE;
} else {
access = (flags & PROT_EXEC) ? FILE_MAP_EXECUTE : FILE_MAP_READ;
}
} else if ( ( flags & PROT_WRITE ) == PROT_WRITE ) {
access = FILE_MAP_COPY;
} else if ( ( flags & PROT_EXEC ) == PROT_EXEC ) {
access = FILE_MAP_EXECUTE;
}
return access;
}
#endif // WIN32

@ -251,6 +251,9 @@ ECHO Done
<File
RelativePath="..\..\intern\mallocn.c">
</File>
<File
RelativePath="..\..\intern\mmap_win.c">
</File>
</Filter>
<Filter
Name="Header Files"
@ -261,6 +264,13 @@ ECHO Done
<File
RelativePath="..\..\MEM_guardedalloc.h">
</File>
<File
RelativePath="..\..\mmap_win.h">
</File>
</Filter>
<Filter
Name="intern"
Filter="">
</Filter>
</Filter>
</Files>

@ -0,0 +1,52 @@
/**
* $Id: $
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* The Original Code is Copyright (C) 2008 Blender Foundation.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): Andrea Weikert.
*
* ***** END GPL LICENSE BLOCK *****
*/
#ifndef MMAP_WIN_H
#define MMAP_WIN_H
#define PROT_NONE 0
#define PROT_READ 1
#define PROT_WRITE 2
#define PROT_EXEC 4
#define MAP_FILE 0
#define MAP_SHARED 1
#define MAP_PRIVATE 2
#define MAP_TYPE 0xF
#define MAP_FIXED 0x10
#define MAP_ANONYMOUS 0x20
#define MAP_ANON MAP_ANONYMOUS
#define MAP_FAILED ((void *)-1)
void *mmap(void *start, size_t len, int prot, int flags, int fd, off_t offset);
long munmap(void *ptr, long size);
#endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 66 KiB

@ -1309,8 +1309,9 @@ def curve_FILL(Courbe,proprietes):
if not 'fill:none' in pr:
Courbe[n].fill=1
if USE_COLORS:
if '#' in pr:
i= pr.find('fill:#')+6
i= pr.find('fill:#')
if i != -1:
i= i+6
Courbe[n].color=[int(pr[i:i+2],16),int(pr[i+2:i+4],16),int(pr[i+4:i+6],16)]
Courbe[n].mat=1
elif ';fill-opacity' in pr:

@ -2,9 +2,9 @@
"""
Name: 'Raw Faces (.raw)...'
Blender: 242
Blender: 245
Group: 'Export'
Tooltip: 'Export selected mesh to Raw Triangle Format (.raw)'
Tooltip: 'Export selected mesh to Raw Format (.raw)'
"""
__author__ = "Anthony D'Agostino (Scorpius)"
@ -13,10 +13,10 @@ __url__ = ("blender", "blenderartists.org",
__version__ = "Part of IOSuite 0.5"
__bpydoc__ = """\
This script exports meshes to Raw Triangle file format.
This script exports meshes to Raw file format.
The raw triangle format is very simple; it has no verts or faces lists.
It's just a simple ascii text file with the vertices of each triangle
It's just a simple ascii text file with the vertices of each triangle or quad
listed on each line. There were some very old utilities (when the PovRay
forum was in existence on CompuServe) that preformed operations on these
files.
@ -65,24 +65,24 @@ def write(filename):
filename += '.raw'
scn= Blender.Scene.GetCurrent()
object= scn.getActiveObject()
if not object:
ob= scn.objects.active
if not ob:
Blender.Draw.PupMenu('Error%t|Select 1 active object')
return
file = open(filename, 'wb')
mesh = BPyMesh.getMeshFromObject(object, None, True, False, scn)
mesh = BPyMesh.getMeshFromObject(ob, None, True, False, scn)
if not mesh:
Blender.Draw.PupMenu('Error%t|Could not get mesh data from active object')
return
mesh.transform(object.matrixWorld)
mesh.transform(ob.matrixWorld)
file = open(filename, "wb")
for f in mesh.faces:
for v in f.v:
for v in f:
file.write('%.6f %.6f %.6f ' % tuple(v.co))
file.write('\n')
file.close()

@ -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

@ -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.
*/

@ -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);

@ -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,

@ -231,6 +231,7 @@ struct ParticleSystemModifierData *psys_get_modifier(struct Object *ob, struct P
struct ParticleSettings *psys_new_settings(char *name, struct Main *main);
struct ParticleSettings *psys_copy_settings(struct ParticleSettings *part);
void psys_flush_settings(struct ParticleSettings *part, int event, int hair_recalc);
void make_local_particlesettings(struct ParticleSettings *part);
struct LinkNode *psys_using_settings(struct ParticleSettings *part, int flush_update);
void psys_changed_type(struct ParticleSystem *psys);

@ -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,

@ -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);
}
}
}

@ -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);

@ -733,7 +733,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Object *par, float par_
ParticleSystemModifierData *psmd;
float ctime, pa_time, scale = 1.0f;
float tmat[4][4], mat[4][4], obrotmat[4][4], pamat[4][4], size=0.0;
float obmat[4][4], (*obmatlist)[4][4]=0;
float (*obmat)[4];
float xvec[3] = {-1.0, 0.0, 0.0}, q[4];
int lay, a, b, k, step_nbr = 0, counter, hair = 0;
int totpart, totchild, totgroup=0, pa_num;
@ -788,17 +788,12 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Object *par, float par_
}
oblist= MEM_callocN(totgroup*sizeof(Object *), "dupgroup object list");
obmatlist= MEM_callocN(totgroup*sizeof(float)*4*4, "dupgroup obmat list");
go= part->dup_group->gobject.first;
for(a=0; a<totgroup; a++, go=go->next) {
for(a=0; a<totgroup; a++, go=go->next)
oblist[a]=go->ob;
Mat4CpyMat4(obmatlist[a], go->ob->obmat);
}
}
else {
else
ob = part->dup_ob;
Mat4CpyMat4(obmat, ob->obmat);
}
if(totchild==0 || part->draw & PART_DRAW_PARENT)
a=0;
@ -834,8 +829,10 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Object *par, float par_
b= a % totgroup;
ob = oblist[b];
Mat4CpyMat4(obmat, obmatlist[b]);
obmat= oblist[b]->obmat;
}
else
obmat= ob->obmat;
for(k=0; k<=step_nbr; k++, counter++) {
if(hair) {
@ -871,7 +868,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Object *par, float par_
if(part->draw_as==PART_DRAW_GR && psys->part->draw & PART_DRAW_WHOLE_GR) {
for(go= part->dup_group->gobject.first, b=0; go; go= go->next, b++) {
Mat4MulMat4(tmat, obmatlist[b], pamat);
Mat4MulMat4(tmat, obmat, pamat);
Mat4MulFloat3((float *)tmat, size*scale);
if(par_space_mat)
Mat4MulMat4(mat, tmat, par_space_mat);
@ -912,8 +909,6 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Object *par, float par_
}
if(oblist)
MEM_freeN(oblist);
if(obmatlist)
MEM_freeN(obmatlist);
if(psys->lattice) {
end_latt_deform();

@ -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)) {

File diff suppressed because it is too large Load Diff

@ -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;

@ -281,15 +281,19 @@ static Image *image_alloc(const char *name, short source, short type)
/* get the ibuf from an image cache, local use here only */
static ImBuf *image_get_ibuf(Image *ima, int index, int frame)
{
/* this function is intended to be thread safe. with IMA_NO_INDEX this
* should be OK, but when iterating over the list this is more tricky
* */
if(index==IMA_NO_INDEX)
return ima->ibufs.first;
else {
ImBuf *ibuf;
index= IMA_MAKE_INDEX(frame, index);
for(ibuf= ima->ibufs.first; ibuf; ibuf= ibuf->next)
if(ibuf->index==index)
return ibuf;
return NULL;
}
}
@ -317,19 +321,16 @@ static void image_assign_ibuf(Image *ima, ImBuf *ibuf, int index, int frame)
for(link= ima->ibufs.first; link; link= link->next)
if(link->index>=index)
break;
/* now we don't want copies? */
if(link && ibuf->index==link->index) {
ImBuf *prev= ibuf->prev;
image_remove_ibuf(ima, link);
link= prev;
}
ibuf->index= index;
/* this function accepts link==NULL */
BLI_insertlinkbefore(&ima->ibufs, link, ibuf);
ibuf->index= index;
/* now we don't want copies? */
if(link && ibuf->index==link->index)
image_remove_ibuf(ima, link);
}
}
/* checks if image was already loaded, then returns same image */
@ -1496,12 +1497,12 @@ static ImBuf *image_load_sequence_file(Image *ima, ImageUser *iuser, int frame)
ibuf= NULL;
}
else {
image_assign_ibuf(ima, ibuf, 0, frame);
image_initialize_after_load(ima, ibuf);
image_assign_ibuf(ima, ibuf, 0, frame);
}
#else
image_assign_ibuf(ima, ibuf, 0, frame);
image_initialize_after_load(ima, ibuf);
image_assign_ibuf(ima, ibuf, 0, frame);
#endif
}
else
@ -1537,8 +1538,9 @@ static ImBuf *image_load_sequence_multilayer(Image *ima, ImageUser *iuser, int f
// if(oldrr) printf("freed previous result %p\n", oldrr);
if(oldrr) RE_FreeRenderResult(oldrr);
}
else
else {
ima->rr= oldrr;
}
}
if(ima->rr) {
@ -1553,8 +1555,8 @@ static ImBuf *image_load_sequence_multilayer(Image *ima, ImageUser *iuser, int f
ibuf->mall= IB_rectfloat;
ibuf->channels= rpass->channels;
image_assign_ibuf(ima, ibuf, iuser->multi_index, frame);
image_initialize_after_load(ima, ibuf);
image_assign_ibuf(ima, ibuf, iuser->multi_index, frame);
}
// else printf("pass not found\n");
@ -1600,8 +1602,8 @@ static ImBuf *image_load_movie_file(Image *ima, ImageUser *iuser, int frame)
ibuf = IMB_anim_absolute(ima->anim, fra);
if(ibuf) {
image_assign_ibuf(ima, ibuf, 0, frame);
image_initialize_after_load(ima, ibuf);
image_assign_ibuf(ima, ibuf, 0, frame);
}
else
ima->ok= 0;
@ -1620,6 +1622,7 @@ static ImBuf *image_load_image_file(Image *ima, ImageUser *iuser, int cfra)
{
struct ImBuf *ibuf;
char str[FILE_MAX];
int assign = 0;
/* always ensure clean ima */
image_free_buffers(ima);
@ -1650,8 +1653,8 @@ static ImBuf *image_load_image_file(Image *ima, ImageUser *iuser, int cfra)
ibuf= NULL;
}
else {
image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0);
image_initialize_after_load(ima, ibuf);
assign= 1;
/* check if the image is a font image... */
detectBitmapFont(ibuf);
@ -1667,6 +1670,9 @@ static ImBuf *image_load_image_file(Image *ima, ImageUser *iuser, int cfra)
else
ima->ok= 0;
if(assign)
image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0);
if(iuser)
iuser->ok= ima->ok;
@ -1690,12 +1696,13 @@ static ImBuf *image_get_ibuf_multilayer(Image *ima, ImageUser *iuser)
if(rpass) {
ibuf= IMB_allocImBuf(ima->rr->rectx, ima->rr->recty, 32, 0, 0);
image_assign_ibuf(ima, ibuf, iuser?iuser->multi_index:IMA_NO_INDEX, 0);
image_initialize_after_load(ima, ibuf);
ibuf->rect_float= rpass->rect;
ibuf->flags |= IB_rectfloat;
ibuf->channels= rpass->channels;
image_assign_ibuf(ima, ibuf, iuser?iuser->multi_index:IMA_NO_INDEX, 0);
}
}
@ -1774,12 +1781,71 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser)
return NULL;
}
static ImBuf *image_get_ibuf_threadsafe(Image *ima, ImageUser *iuser, int *frame_r, int *index_r)
{
ImBuf *ibuf = NULL;
int frame = 0, index = 0;
/* see if we already have an appropriate ibuf, with image source and type */
if(ima->source==IMA_SRC_MOVIE) {
frame= iuser?iuser->framenr:ima->lastframe;
ibuf= image_get_ibuf(ima, 0, frame);
}
else if(ima->source==IMA_SRC_SEQUENCE) {
if(ima->type==IMA_TYPE_IMAGE) {
frame= iuser?iuser->framenr:ima->lastframe;
ibuf= image_get_ibuf(ima, 0, frame);
}
else if(ima->type==IMA_TYPE_MULTILAYER) {
frame= iuser?iuser->framenr:ima->lastframe;
index= iuser?iuser->multi_index:IMA_NO_INDEX;
ibuf= image_get_ibuf(ima, index, frame);
}
}
else if(ima->source==IMA_SRC_FILE) {
if(ima->type==IMA_TYPE_IMAGE)
ibuf= image_get_ibuf(ima, IMA_NO_INDEX, 0);
else if(ima->type==IMA_TYPE_MULTILAYER)
ibuf= image_get_ibuf(ima, iuser?iuser->multi_index:IMA_NO_INDEX, 0);
}
else if(ima->source == IMA_SRC_GENERATED) {
ibuf= image_get_ibuf(ima, IMA_NO_INDEX, 0);
}
else if(ima->source == IMA_SRC_VIEWER) {
if(ima->type==IMA_TYPE_R_RESULT) {
/* always verify entirely, not that this shouldn't happen
* during render anyway */
}
else if(ima->type==IMA_TYPE_COMPOSITE) {
frame= iuser?iuser->framenr:0;
ibuf= image_get_ibuf(ima, 0, frame);
}
}
*frame_r = frame;
*index_r = index;
return ibuf;
}
/* Checks optional ImageUser and verifies/creates ImBuf. */
/* returns ibuf */
ImBuf *BKE_image_get_ibuf(Image *ima, ImageUser *iuser)
{
ImBuf *ibuf= NULL;
float color[] = {0, 0, 0, 1};
int frame= 0, index= 0;
/* This function is intended to be thread-safe. It postpones the mutex lock
* until it needs to load the image, if the image is already there it
* should just get the pointer and return. The reason is that a lot of mutex
* locks appears to be very slow on certain multicore macs, causing a render
* with image textures to actually slow down as more threads are used.
*
* Note that all the image loading functions should also make sure they do
* things in a threadsafe way for image_get_ibuf_threadsafe to work correct.
* That means, the last two steps must be, 1) add the ibuf to the list and
* 2) set ima/iuser->ok to 0 to IMA_OK_LOADED */
/* quick reject tests */
if(ima==NULL)
@ -1791,101 +1857,95 @@ ImBuf *BKE_image_get_ibuf(Image *ima, ImageUser *iuser)
else if(ima->ok==0)
return NULL;
BLI_lock_thread(LOCK_IMAGE);
/* handle image source and types */
if(ima->source==IMA_SRC_MOVIE) {
/* source is from single file, use flipbook to store ibuf */
int frame= iuser?iuser->framenr:ima->lastframe;
ibuf= image_get_ibuf(ima, 0, frame);
if(ibuf==NULL)
ibuf= image_load_movie_file(ima, iuser, frame);
}
else if(ima->source==IMA_SRC_SEQUENCE) {
if(ima->type==IMA_TYPE_IMAGE) {
/* regular files, ibufs in flipbook, allows saving */
int frame= iuser?iuser->framenr:ima->lastframe;
ibuf= image_get_ibuf(ima, 0, frame);
if(ibuf==NULL)
ibuf= image_load_sequence_file(ima, iuser, frame);
else
BLI_strncpy(ima->name, ibuf->name, sizeof(ima->name));
/* try to get the ibuf without locking */
ibuf= image_get_ibuf_threadsafe(ima, iuser, &frame, &index);
if(ibuf == NULL) {
/* couldn't get ibuf and image is not ok, so let's lock and try to
* load the image */
BLI_lock_thread(LOCK_IMAGE);
/* need to check ok flag and loading ibuf again, because the situation
* might have changed in the meantime */
if(iuser) {
if(iuser->ok==0) {
BLI_unlock_thread(LOCK_IMAGE);
return NULL;
}
}
/* no else; on load the ima type can change */
if(ima->type==IMA_TYPE_MULTILAYER) {
/* only 1 layer/pass stored in imbufs, no exrhandle anim storage, no saving */
int frame= iuser?iuser->framenr:ima->lastframe;
int index= iuser?iuser->multi_index:IMA_NO_INDEX;
ibuf= image_get_ibuf(ima, index, frame);
if(G.rt) printf("seq multi fra %d id %d ibuf %p %s\n", frame, index, ibuf, ima->id.name);
if(ibuf==NULL)
ibuf= image_load_sequence_multilayer(ima, iuser, frame);
else
BLI_strncpy(ima->name, ibuf->name, sizeof(ima->name));
else if(ima->ok==0) {
BLI_unlock_thread(LOCK_IMAGE);
return NULL;
}
}
else if(ima->source==IMA_SRC_FILE) {
if(ima->type==IMA_TYPE_IMAGE) {
ibuf= image_get_ibuf(ima, IMA_NO_INDEX, 0);
if(ibuf==NULL)
ibuf= image_load_image_file(ima, iuser, G.scene->r.cfra); /* cfra only for '#', this global is OK */
}
/* no else; on load the ima type can change */
if(ima->type==IMA_TYPE_MULTILAYER) {
/* keeps render result, stores ibufs in listbase, allows saving */
ibuf= image_get_ibuf(ima, iuser?iuser->multi_index:IMA_NO_INDEX, 0);
if(ibuf==NULL)
ibuf= image_get_ibuf_multilayer(ima, iuser);
}
}
else if(ima->source == IMA_SRC_GENERATED) {
/* generated is: ibuf is allocated dynamically */
ibuf= image_get_ibuf(ima, IMA_NO_INDEX, 0);
if(ibuf==NULL) {
if(ima->type==IMA_TYPE_VERSE) {
/* todo */
ibuf= image_get_ibuf_threadsafe(ima, iuser, &frame, &index);
if(ibuf == NULL) {
/* we are sure we have to load the ibuf, using source and type */
if(ima->source==IMA_SRC_MOVIE) {
/* source is from single file, use flipbook to store ibuf */
ibuf= image_load_movie_file(ima, iuser, frame);
}
else { /* always fall back to IMA_TYPE_UV_TEST */
/* UV testgrid or black or solid etc */
if(ima->gen_x==0) ima->gen_x= 256;
if(ima->gen_y==0) ima->gen_y= 256;
ibuf= add_ibuf_size(ima->gen_x, ima->gen_y, ima->name, 0, ima->gen_type, color);
image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0);
ima->ok= IMA_OK_LOADED;
}
}
}
else if(ima->source == IMA_SRC_VIEWER) {
if(ima->type==IMA_TYPE_R_RESULT) {
/* always verify entirely */
ibuf= image_get_render_result(ima, iuser);
}
else if(ima->type==IMA_TYPE_COMPOSITE) {
int frame= iuser?iuser->framenr:0;
/* Composite Viewer, all handled in compositor */
ibuf= image_get_ibuf(ima, 0, frame);
if(ibuf==NULL) {
/* fake ibuf, will be filled in compositor */
ibuf= IMB_allocImBuf(256, 256, 32, IB_rect, 0);
image_assign_ibuf(ima, ibuf, 0, frame);
else if(ima->source==IMA_SRC_SEQUENCE) {
if(ima->type==IMA_TYPE_IMAGE) {
/* regular files, ibufs in flipbook, allows saving */
ibuf= image_load_sequence_file(ima, iuser, frame);
}
/* no else; on load the ima type can change */
if(ima->type==IMA_TYPE_MULTILAYER) {
/* only 1 layer/pass stored in imbufs, no exrhandle anim storage, no saving */
ibuf= image_load_sequence_multilayer(ima, iuser, frame);
}
if(ibuf)
BLI_strncpy(ima->name, ibuf->name, sizeof(ima->name));
}
else if(ima->source==IMA_SRC_FILE) {
if(ima->type==IMA_TYPE_IMAGE)
ibuf= image_load_image_file(ima, iuser, G.scene->r.cfra); /* cfra only for '#', this global is OK */
/* no else; on load the ima type can change */
if(ima->type==IMA_TYPE_MULTILAYER)
/* keeps render result, stores ibufs in listbase, allows saving */
ibuf= image_get_ibuf_multilayer(ima, iuser);
}
else if(ima->source == IMA_SRC_GENERATED) {
/* generated is: ibuf is allocated dynamically */
if(ima->type==IMA_TYPE_VERSE) {
/* todo */
}
else { /* always fall back to IMA_TYPE_UV_TEST */
/* UV testgrid or black or solid etc */
if(ima->gen_x==0) ima->gen_x= 256;
if(ima->gen_y==0) ima->gen_y= 256;
ibuf= add_ibuf_size(ima->gen_x, ima->gen_y, ima->name, 0, ima->gen_type, color);
image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0);
ima->ok= IMA_OK_LOADED;
}
}
else if(ima->source == IMA_SRC_VIEWER) {
if(ima->type==IMA_TYPE_R_RESULT) {
/* always verify entirely */
ibuf= image_get_render_result(ima, iuser);
}
else if(ima->type==IMA_TYPE_COMPOSITE) {
/* Composite Viewer, all handled in compositor */
/* fake ibuf, will be filled in compositor */
ibuf= IMB_allocImBuf(256, 256, 32, IB_rect, 0);
image_assign_ibuf(ima, ibuf, 0, frame);
}
}
}
BLI_unlock_thread(LOCK_IMAGE);
}
/* we assuming that if it is not rendering, it's also not multithreaded
* (a somewhat weak assumption) */
if(G.rendering==0)
tag_image_time(ima);
BLI_unlock_thread(LOCK_IMAGE);
return ibuf;
}

@ -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;

@ -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);

@ -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);
}

@ -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) {

@ -90,7 +90,6 @@
#include "BKE_constraint.h"
#include "BKE_curve.h"
#include "BKE_displist.h"
#include "BKE_effect.h"
#include "BKE_group.h"
#include "BKE_icons.h"
#include "BKE_ipo.h"
@ -249,7 +248,6 @@ void free_object(Object *ob)
BLI_freelistN(&ob->defbase);
if(ob->pose)
free_pose(ob->pose);
free_effects(&ob->effect);
free_properties(&ob->prop);
object_free_modifiers(ob);
@ -394,9 +392,7 @@ void unlink_object(Object *ob)
/* object is deflector or field */
if(ob->pd) {
if(give_parteff(obt))
obt->recalc |= OB_RECALC_DATA;
else if(obt->soft)
if(obt->soft)
obt->recalc |= OB_RECALC_DATA;
/* cloth */
@ -906,8 +902,10 @@ Object *add_only_object(int type, char *name)
ob->type= type;
/* ob->transflag= OB_QUAT; */
#if 0 /* not used yet */
QuatOne(ob->quat);
QuatOne(ob->dquat);
#endif
ob->col[0]= ob->col[1]= ob->col[2]= 0.0;
ob->col[3]= 1.0;
@ -998,11 +996,13 @@ void base_init_from_view3d(Base *base, View3D *v3d)
if (U.flag & USER_ADD_VIEWALIGNED) {
v3d->viewquat[0]= -v3d->viewquat[0];
if (ob->transflag & OB_QUAT) {
/* Quats arnt used yet */
/*if (ob->transflag & OB_QUAT) {
QUATCOPY(ob->quat, v3d->viewquat);
} else {
} else {*/
QuatToEul(v3d->viewquat, ob->rot);
}
/*}*/
v3d->viewquat[0]= -v3d->viewquat[0];
}
}
@ -1146,7 +1146,6 @@ Object *copy_object(Object *ob)
obn->path= NULL;
obn->flag &= ~OB_FROMGROUP;
copy_effects(&obn->effect, &ob->effect);
obn->modifiers.first = obn->modifiers.last= NULL;
for (md=ob->modifiers.first; md; md=md->next) {
@ -1216,6 +1215,7 @@ Object *copy_object(Object *ob)
void expand_local_object(Object *ob)
{
bActionStrip *strip;
ParticleSystem *psys;
int a;
id_lib_extern((ID *)ob->action);
@ -1229,7 +1229,8 @@ void expand_local_object(Object *ob)
for (strip=ob->nlastrips.first; strip; strip=strip->next) {
id_lib_extern((ID *)strip->act);
}
for(psys=ob->particlesystem.first; psys; psys=psys->next)
id_lib_extern((ID *)psys->part);
}
void make_local_object(Object *ob)
@ -1422,7 +1423,7 @@ float bsystem_time(Object *ob, float cfra, float ofs)
cfra*= G.scene->r.framelen;
if (ob) {
if (no_speed_curve==0 && ob->ipo)
if (no_speed_curve==0 && ob->ipo)
cfra= calc_ipo_time(ob->ipo, cfra);
/* ofset frames */
@ -1439,7 +1440,7 @@ void object_to_mat3(Object *ob, float mat[][3]) /* no parent */
{
float smat[3][3], vec[3];
float rmat[3][3];
float q1[4];
/*float q1[4];*/
/* size */
if(ob->ipo) {
@ -1453,7 +1454,8 @@ void object_to_mat3(Object *ob, float mat[][3]) /* no parent */
}
/* rot */
if(ob->transflag & OB_QUAT) {
/* Quats arnt used yet */
/*if(ob->transflag & OB_QUAT) {
if(ob->ipo) {
QuatMul(q1, ob->quat, ob->dquat);
QuatToMat3(q1, rmat);
@ -1462,7 +1464,7 @@ void object_to_mat3(Object *ob, float mat[][3]) /* no parent */
QuatToMat3(ob->quat, rmat);
}
}
else {
else {*/
if(ob->ipo) {
vec[0]= ob->rot[0]+ob->drot[0];
vec[1]= ob->rot[1]+ob->drot[1];
@ -1472,7 +1474,7 @@ void object_to_mat3(Object *ob, float mat[][3]) /* no parent */
else {
EulToMat3(ob->rot, rmat);
}
}
/*}*/
Mat3MulMat3(mat, rmat, smat);
}
@ -1629,9 +1631,12 @@ static void give_parvert(Object *par, int nr, float *vec)
}
}
if(count > 0) {
if (count==0) {
/* keep as 0,0,0 */
} else if(count > 0) {
VecMulf(vec, 1.0f / count);
} else {
/* use first index if its out of range */
dm->getVertCo(dm, 0, vec);
}
}

@ -2988,7 +2988,7 @@ ParticleSettings *psys_copy_settings(ParticleSettings *part)
return partn;
}
void psys_make_local_settings(ParticleSettings *part)
void make_local_particlesettings(ParticleSettings *part)
{
Object *ob;
ParticleSettings *par;

@ -172,7 +172,7 @@ 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;

@ -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?) */

@ -33,6 +33,7 @@ struct BPathIteratorSeqData {
int totseq;
int seq;
struct Sequence **seqar; /* Sequence */
struct Scene *scene; /* Current scene */
};
struct BPathIterator {

@ -110,7 +110,8 @@ void RegisterBlendExtension(char * str);
DIR *opendir (const char *path);
struct dirent *readdir(DIR *dp);
int closedir (DIR *dp);
void get_default_root(char* root);
void get_default_root(char *root);
int check_file_chars(char *filename);
#endif /* __WINSTUFF_H__ */

@ -95,6 +95,7 @@ void BLI_bpathIterator_init( struct BPathIterator *bpi ) {
bpi->seqdata.totseq = 0;
bpi->seqdata.seq = 0;
bpi->seqdata.seqar = NULL;
bpi->seqdata.scene = NULL;
BLI_bpathIterator_step(bpi);
}
@ -103,6 +104,7 @@ void BLI_bpathIterator_free( struct BPathIterator *bpi ) {
if (bpi->seqdata.seqar)
MEM_freeN((void *)bpi->seqdata.seqar);
bpi->seqdata.seqar = NULL;
bpi->seqdata.scene = NULL;
}
void BLI_bpathIterator_getPath( struct BPathIterator *bpi, char *path) {
@ -202,34 +204,54 @@ static struct bSound *snd_stepdata__internal(struct bSound *snd, int step_next)
static struct Sequence *seq_stepdata__internal(struct BPathIterator *bpi, int step_next) {
Sequence *seq;
if (G.scene->ed==NULL) {
return NULL;
}
if (bpi->seqdata.seqar == NULL) {
/* allocate the sequencer array */
build_seqar( &(((Editing *)G.scene->ed)->seqbase), &bpi->seqdata.seqar, &bpi->seqdata.totseq);
bpi->seqdata.seq = 0;
/* Initializing */
if (bpi->seqdata.scene==NULL) {
bpi->seqdata.scene= G.main->scene.first;
}
if (step_next) {
bpi->seqdata.seq++;
}
if (bpi->seqdata.seq >= bpi->seqdata.totseq) {
seq = NULL;
} else {
seq = bpi->seqdata.seqar[bpi->seqdata.seq];
while (!SEQ_HAS_PATH(seq)) {
bpi->seqdata.seq++;
while (bpi->seqdata.scene) {
if (bpi->seqdata.scene->ed) {
if (bpi->seqdata.seqar == NULL) {
/* allocate the sequencer array */
build_seqar( &(((Editing *)bpi->seqdata.scene->ed)->seqbase), &bpi->seqdata.seqar, &bpi->seqdata.totseq);
bpi->seqdata.seq = 0;
}
if (bpi->seqdata.seq >= bpi->seqdata.totseq) {
seq = NULL;
break;
} else {
seq = bpi->seqdata.seqar[bpi->seqdata.seq];
while (!SEQ_HAS_PATH(seq)) {
bpi->seqdata.seq++;
if (bpi->seqdata.seq >= bpi->seqdata.totseq) {
seq = NULL;
break;
}
seq = bpi->seqdata.seqar[bpi->seqdata.seq];
}
}
seq = bpi->seqdata.seqar[bpi->seqdata.seq];
if (seq) {
return seq;
} else {
/* keep looking through the next scene, reallocate seq array */
if (bpi->seqdata.seqar) {
MEM_freeN((void *)bpi->seqdata.seqar);
bpi->seqdata.seqar = NULL;
}
bpi->seqdata.scene = bpi->seqdata.scene->id.next;
}
} else {
/* no seq data in this scene, next */
bpi->seqdata.scene = bpi->seqdata.scene->id.next;
}
}
return seq ;
return NULL;
}
void seq_getpath(struct BPathIterator *bpi, char *path) {
@ -638,7 +660,7 @@ void findMissingFiles(char *str) {
char filepath[FILE_MAX], *libpath;
int filesize, recur_depth;
char dirname[FILE_MAX], filename[FILE_MAX], filename_new[FILE_MAX], dummyname[FILE_MAX];
char dirname[FILE_MAX], filename[FILE_MAX], filename_new[FILE_MAX];
waitcursor( 1 );

@ -387,55 +387,521 @@ static char p[512+2]= {
float g[512+2][3]= {
0.33783,0.715698,-0.611206,-0.944031,-0.326599,-0.045624,-0.101074,-0.416443,-0.903503,0.799286,0.49411,-0.341949,-0.854645,0.518036,0.033936,0.42514,-0.437866,-0.792114,-0.358948,0.597046,0.717377,-0.985413,0.144714,0.089294,-0.601776,-0.33728,-0.723907,-0.449921,0.594513,0.666382,0.208313,-0.10791,
0.972076,0.575317,0.060425,0.815643,0.293365,-0.875702,-0.383453,0.293762,0.465759,0.834686,-0.846008,-0.233398,-0.47934,-0.115814,0.143036,-0.98291,0.204681,-0.949036,-0.239532,0.946716,-0.263947,0.184326,-0.235596,0.573822,0.784332,0.203705,-0.372253,-0.905487,0.756989,-0.651031,0.055298,0.497803,
0.814697,-0.297363,-0.16214,0.063995,-0.98468,-0.329254,0.834381,0.441925,0.703827,-0.527039,-0.476227,0.956421,0.266113,0.119781,0.480133,0.482849,0.7323,-0.18631,0.961212,-0.203125,-0.748474,-0.656921,-0.090393,-0.085052,-0.165253,0.982544,-0.76947,0.628174,-0.115234,0.383148,0.537659,0.751068,
0.616486,-0.668488,-0.415924,-0.259979,-0.630005,0.73175,0.570953,-0.087952,0.816223,-0.458008,0.023254,0.888611,-0.196167,0.976563,-0.088287,-0.263885,-0.69812,-0.665527,0.437134,-0.892273,-0.112793,-0.621674,-0.230438,0.748566,0.232422,0.900574,-0.367249,0.22229,-0.796143,0.562744,-0.665497,-0.73764,
0.11377,0.670135,0.704803,0.232605,0.895599,0.429749,-0.114655,-0.11557,-0.474243,0.872742,0.621826,0.604004,-0.498444,-0.832214,0.012756,0.55426,-0.702484,0.705994,-0.089661,-0.692017,0.649292,0.315399,-0.175995,-0.977997,0.111877,0.096954,-0.04953,0.994019,0.635284,-0.606689,-0.477783,-0.261261,
-0.607422,-0.750153,0.983276,0.165436,0.075958,-0.29837,0.404083,-0.864655,-0.638672,0.507721,0.578156,0.388214,0.412079,0.824249,0.556183,-0.208832,0.804352,0.778442,0.562012,0.27951,-0.616577,0.781921,-0.091522,0.196289,0.051056,0.979187,-0.121216,0.207153,-0.970734,-0.173401,-0.384735,0.906555,
0.161499,-0.723236,-0.671387,0.178497,-0.006226,-0.983887,-0.126038,0.15799,0.97934,0.830475,-0.024811,0.556458,-0.510132,-0.76944,0.384247,0.81424,0.200104,-0.544891,-0.112549,-0.393311,-0.912445,0.56189,0.152222,-0.813049,0.198914,-0.254517,-0.946381,-0.41217,0.690979,-0.593811,-0.407257,0.324524,
0.853668,-0.690186,0.366119,-0.624115,-0.428345,0.844147,-0.322296,-0.21228,-0.297546,-0.930756,-0.273071,0.516113,0.811798,0.928314,0.371643,0.007233,0.785828,-0.479218,-0.390778,-0.704895,0.058929,0.706818,0.173248,0.203583,0.963562,0.422211,-0.904297,-0.062469,-0.363312,-0.182465,0.913605,0.254028,
-0.552307,-0.793945,-0.28891,-0.765747,-0.574554,0.058319,0.291382,0.954803,0.946136,-0.303925,0.111267,-0.078156,0.443695,-0.892731,0.182098,0.89389,0.409515,-0.680298,-0.213318,0.701141,0.062469,0.848389,-0.525635,-0.72879,-0.641846,0.238342,-0.88089,0.427673,0.202637,-0.532501,-0.21405,0.818878,
0.948975,-0.305084,0.07962,0.925446,0.374664,0.055817,0.820923,0.565491,0.079102,0.25882,0.099792,-0.960724,-0.294617,0.910522,0.289978,0.137115,0.320038,-0.937408,-0.908386,0.345276,-0.235718,-0.936218,0.138763,0.322754,0.366577,0.925934,-0.090637,0.309296,-0.686829,-0.657684,0.66983,0.024445,
0.742065,-0.917999,-0.059113,-0.392059,0.365509,0.462158,-0.807922,0.083374,0.996399,-0.014801,0.593842,0.253143,-0.763672,0.974976,-0.165466,0.148285,0.918976,0.137299,0.369537,0.294952,0.694977,0.655731,0.943085,0.152618,-0.295319,0.58783,-0.598236,0.544495,0.203796,0.678223,0.705994,-0.478821,
-0.661011,0.577667,0.719055,-0.1698,-0.673828,-0.132172,-0.965332,0.225006,-0.981873,-0.14502,0.121979,0.763458,0.579742,0.284546,-0.893188,0.079681,0.442474,-0.795776,-0.523804,0.303802,0.734955,0.67804,-0.007446,0.15506,0.986267,-0.056183,0.258026,0.571503,-0.778931,-0.681549,-0.702087,-0.206116,
-0.96286,-0.177185,0.203613,-0.470978,-0.515106,0.716095,-0.740326,0.57135,0.354095,-0.56012,-0.824982,-0.074982,-0.507874,0.753204,0.417969,-0.503113,0.038147,0.863342,0.594025,0.673553,-0.439758,-0.119873,-0.005524,-0.992737,0.098267,-0.213776,0.971893,-0.615631,0.643951,0.454163,0.896851,-0.441071,
0.032166,-0.555023,0.750763,-0.358093,0.398773,0.304688,0.864929,-0.722961,0.303589,0.620544,-0.63559,-0.621948,-0.457306,-0.293243,0.072327,0.953278,-0.491638,0.661041,-0.566772,-0.304199,-0.572083,-0.761688,0.908081,-0.398956,0.127014,-0.523621,-0.549683,-0.650848,-0.932922,-0.19986,0.299408,0.099426,
0.140869,0.984985,-0.020325,-0.999756,-0.002319,0.952667,0.280853,-0.11615,-0.971893,0.082581,0.220337,0.65921,0.705292,-0.260651,0.733063,-0.175537,0.657043,-0.555206,0.429504,-0.712189,0.400421,-0.89859,0.179352,0.750885,-0.19696,0.630341,0.785675,-0.569336,0.241821,-0.058899,-0.464111,0.883789,
0.129608,-0.94519,0.299622,-0.357819,0.907654,0.219238,-0.842133,-0.439117,-0.312927,-0.313477,0.84433,0.434479,-0.241211,0.053253,0.968994,0.063873,0.823273,0.563965,0.476288,0.862152,-0.172516,0.620941,-0.298126,0.724915,0.25238,-0.749359,-0.612122,-0.577545,0.386566,0.718994,-0.406342,-0.737976,
0.538696,0.04718,0.556305,0.82959,-0.802856,0.587463,0.101166,-0.707733,-0.705963,0.026428,0.374908,0.68457,0.625092,0.472137,0.208405,-0.856506,-0.703064,-0.581085,-0.409821,-0.417206,-0.736328,0.532623,-0.447876,-0.20285,-0.870728,0.086945,-0.990417,0.107086,0.183685,0.018341,-0.982788,0.560638,
-0.428864,0.708282,0.296722,-0.952576,-0.0672,0.135773,0.990265,0.030243,-0.068787,0.654724,0.752686,0.762604,-0.551758,0.337585,-0.819611,-0.407684,0.402466,-0.727844,-0.55072,-0.408539,-0.855774,-0.480011,0.19281,0.693176,-0.079285,0.716339,0.226013,0.650116,-0.725433,0.246704,0.953369,-0.173553,
-0.970398,-0.239227,-0.03244,0.136383,-0.394318,0.908752,0.813232,0.558167,0.164368,0.40451,0.549042,-0.731323,-0.380249,-0.566711,0.730865,0.022156,0.932739,0.359741,0.00824,0.996552,-0.082306,0.956635,-0.065338,-0.283722,-0.743561,0.008209,0.668579,-0.859589,-0.509674,0.035767,-0.852234,0.363678,
-0.375977,-0.201965,-0.970795,-0.12915,0.313477,0.947327,0.06546,-0.254028,-0.528259,0.81015,0.628052,0.601105,0.49411,-0.494385,0.868378,0.037933,0.275635,-0.086426,0.957336,-0.197937,0.468903,-0.860748,0.895599,0.399384,0.195801,0.560791,0.825012,-0.069214,0.304199,-0.849487,0.43103,0.096375,
0.93576,0.339111,-0.051422,0.408966,-0.911072,0.330444,0.942841,-0.042389,-0.452362,-0.786407,0.420563,0.134308,-0.933472,-0.332489,0.80191,-0.566711,-0.188934,-0.987946,-0.105988,0.112518,-0.24408,0.892242,-0.379791,-0.920502,0.229095,-0.316376,0.7789,0.325958,0.535706,-0.912872,0.185211,-0.36377,
-0.184784,0.565369,-0.803833,-0.018463,0.119537,0.992615,-0.259247,-0.935608,0.239532,-0.82373,-0.449127,-0.345947,-0.433105,0.659515,0.614349,-0.822754,0.378845,-0.423676,0.687195,-0.674835,-0.26889,-0.246582,-0.800842,0.545715,-0.729187,-0.207794,0.651978,0.653534,-0.610443,-0.447388,0.492584,-0.023346,
0.869934,0.609039,0.009094,-0.79306,0.962494,-0.271088,-0.00885,0.2659,-0.004913,0.963959,0.651245,0.553619,-0.518951,0.280548,-0.84314,0.458618,-0.175293,-0.983215,0.049805,0.035339,-0.979919,0.196045,-0.982941,0.164307,-0.082245,0.233734,-0.97226,-0.005005,-0.747253,-0.611328,0.260437,0.645599,
0.592773,0.481384,0.117706,-0.949524,-0.29068,-0.535004,-0.791901,-0.294312,-0.627167,-0.214447,0.748718,-0.047974,-0.813477,-0.57959,-0.175537,0.477264,-0.860992,0.738556,-0.414246,-0.53183,0.562561,-0.704071,0.433289,-0.754944,0.64801,-0.100586,0.114716,0.044525,-0.992371,0.966003,0.244873,-0.082764,
0.33783,0.715698,-0.611206,-0.944031,-0.326599,-0.045624,-0.101074,-0.416443,-0.903503,0.799286,0.49411,-0.341949,-0.854645,0.518036,0.033936,0.42514,-0.437866,-0.792114,-0.358948,0.597046,0.717377,-0.985413,0.144714,0.089294,-0.601776,-0.33728,-0.723907,-0.449921,0.594513,0.666382,0.208313,-0.10791,
0.972076,0.575317,0.060425,0.815643,0.293365,-0.875702,-0.383453,0.293762,0.465759,0.834686,-0.846008,-0.233398,-0.47934,-0.115814,0.143036,-0.98291,0.204681,-0.949036,-0.239532,0.946716,-0.263947,0.184326,-0.235596,0.573822,0.784332,0.203705,-0.372253,-0.905487,0.756989,-0.651031,0.055298,0.497803,
0.814697,-0.297363,-0.16214,0.063995,-0.98468,-0.329254,0.834381,0.441925,0.703827,-0.527039,-0.476227,0.956421,0.266113,0.119781,0.480133,0.482849,0.7323,-0.18631,0.961212,-0.203125,-0.748474,-0.656921,-0.090393,-0.085052,-0.165253,0.982544,-0.76947,0.628174,-0.115234,0.383148,0.537659,0.751068,
0.616486,-0.668488,-0.415924,-0.259979,-0.630005,0.73175,0.570953,-0.087952,0.816223,-0.458008,0.023254,0.888611,-0.196167,0.976563,-0.088287,-0.263885,-0.69812,-0.665527,0.437134,-0.892273,-0.112793,-0.621674,-0.230438,0.748566,0.232422,0.900574,-0.367249,0.22229,-0.796143,0.562744,-0.665497,-0.73764,
0.11377,0.670135,0.704803,0.232605,0.895599,0.429749,-0.114655,-0.11557,-0.474243,0.872742,0.621826,0.604004,-0.498444,-0.832214,0.012756,0.55426,-0.702484,0.705994,-0.089661,-0.692017,0.649292,0.315399,-0.175995,-0.977997,0.111877,0.096954,-0.04953,0.994019,0.635284,-0.606689,-0.477783,-0.261261,
-0.607422,-0.750153,0.983276,0.165436,0.075958,-0.29837,0.404083,-0.864655,-0.638672,0.507721,0.578156,0.388214,0.412079,0.824249,0.556183,-0.208832,0.804352,0.778442,0.562012,0.27951,-0.616577,0.781921,-0.091522,0.196289,0.051056,0.979187,-0.121216,0.207153,-0.970734,-0.173401,-0.384735,0.906555,
0.161499,-0.723236,-0.671387,0.178497,-0.006226,-0.983887,-0.126038,0.15799,0.97934,0.830475,-0.024811,0.556458,-0.510132,-0.76944,0.384247,0.81424,0.200104,-0.544891,-0.112549,-0.393311,-0.912445,0.56189,0.152222,-0.813049,0.198914,-0.254517,-0.946381,-0.41217,0.690979,-0.593811,-0.407257,0.324524,
0.853668,-0.690186,0.366119,-0.624115,-0.428345,0.844147,-0.322296,-0.21228,-0.297546,-0.930756,-0.273071,0.516113,0.811798,0.928314,0.371643,0.007233,0.785828,-0.479218,-0.390778,-0.704895,0.058929,0.706818,0.173248,0.203583,0.963562,0.422211,-0.904297,-0.062469,-0.363312,-0.182465,0.913605,0.254028,
-0.552307,-0.793945,-0.28891,-0.765747,-0.574554,0.058319,0.291382,0.954803,0.946136,-0.303925,0.111267,-0.078156,0.443695,-0.892731,0.182098,0.89389,0.409515,-0.680298,-0.213318,0.701141,0.062469,0.848389,-0.525635,-0.72879,-0.641846,0.238342,-0.88089,0.427673,0.202637,-0.532501,-0.21405,0.818878,
0.948975,-0.305084,0.07962,0.925446,0.374664,0.055817,0.820923,0.565491,0.079102,0.25882,0.099792,-0.960724,-0.294617,0.910522,0.289978,0.137115,0.320038,-0.937408,-0.908386,0.345276,-0.235718,-0.936218,0.138763,0.322754,0.366577,0.925934,-0.090637,0.309296,-0.686829,-0.657684,0.66983,0.024445,
0.742065,-0.917999,-0.059113,-0.392059,0.365509,0.462158,-0.807922,0.083374,0.996399,-0.014801,0.593842,0.253143,-0.763672,0.974976,-0.165466,0.148285,0.918976,0.137299,0.369537,0.294952,0.694977,0.655731,0.943085,0.152618,-0.295319,0.58783,-0.598236,0.544495,0.203796,0.678223,0.705994,-0.478821,
-0.661011,0.577667,0.719055,-0.1698,-0.673828,-0.132172,-0.965332,0.225006,-0.981873,-0.14502,0.121979,0.763458,0.579742,0.284546,-0.893188,0.079681,0.442474,-0.795776,-0.523804,0.303802,0.734955,0.67804,-0.007446,0.15506,0.986267,-0.056183,0.258026,0.571503,-0.778931,-0.681549,-0.702087,-0.206116,
-0.96286,-0.177185,0.203613,-0.470978,-0.515106,0.716095,-0.740326,0.57135,0.354095,-0.56012,-0.824982,-0.074982,-0.507874,0.753204,0.417969,-0.503113,0.038147,0.863342,0.594025,0.673553,-0.439758,-0.119873,-0.005524,-0.992737,0.098267,-0.213776,0.971893,-0.615631,0.643951,0.454163,0.896851,-0.441071,
0.032166,-0.555023,0.750763,-0.358093,0.398773,0.304688,0.864929,-0.722961,0.303589,0.620544,-0.63559,-0.621948,-0.457306,-0.293243,0.072327,0.953278,-0.491638,0.661041,-0.566772,-0.304199,-0.572083,-0.761688,0.908081,-0.398956,0.127014,-0.523621,-0.549683,-0.650848,-0.932922,-0.19986,0.299408,0.099426,
0.140869,0.984985,-0.020325,-0.999756,-0.002319,0.952667,0.280853,-0.11615,-0.971893,0.082581,0.220337,0.65921,0.705292,-0.260651,0.733063,-0.175537,0.657043,-0.555206,0.429504,-0.712189,0.400421,-0.89859,0.179352,0.750885,-0.19696,0.630341,0.785675,-0.569336,0.241821,-0.058899,-0.464111,0.883789,
0.129608,-0.94519,0.299622,-0.357819,0.907654,0.219238,-0.842133,-0.439117,-0.312927,-0.313477,0.84433,0.434479,-0.241211,0.053253,0.968994,0.063873,0.823273,0.563965,0.476288,0.862152,-0.172516,0.620941,-0.298126,0.724915,0.25238,-0.749359,-0.612122,-0.577545,0.386566,0.718994,-0.406342,-0.737976,
0.538696,0.04718,0.556305,0.82959,-0.802856,0.587463,0.101166,-0.707733,-0.705963,0.026428,0.374908,0.68457,0.625092,0.472137,0.208405,-0.856506,-0.703064,-0.581085,-0.409821,-0.417206,-0.736328,0.532623,-0.447876,-0.20285,-0.870728,0.086945,-0.990417,0.107086,0.183685,0.018341,-0.982788,0.560638,
-0.428864,0.708282,0.296722,-0.952576,-0.0672,0.135773,0.990265,0.030243,-0.068787,0.654724,0.752686,0.762604,-0.551758,0.337585,-0.819611,-0.407684,0.402466,-0.727844,-0.55072,-0.408539,-0.855774,-0.480011,0.19281,0.693176,-0.079285,0.716339,0.226013,0.650116,-0.725433,0.246704,0.953369,-0.173553,
-0.970398,-0.239227,-0.03244,0.136383,-0.394318,0.908752,0.813232,0.558167,0.164368,0.40451,0.549042,-0.731323,-0.380249,-0.566711,0.730865,0.022156,0.932739,0.359741,0.00824,0.996552,-0.082306,0.956635,-0.065338,-0.283722,-0.743561,0.008209,0.668579,-0.859589,-0.509674,0.035767,-0.852234,0.363678,
-0.375977,-0.201965,-0.970795,-0.12915,0.313477,0.947327,0.06546,-0.254028,-0.528259,0.81015,0.628052,0.601105,0.49411,-0.494385,0.868378,0.037933,0.275635,-0.086426,0.957336,-0.197937,0.468903,-0.860748,0.895599,0.399384,0.195801,0.560791,0.825012,-0.069214,0.304199,-0.849487,0.43103,0.096375,
0.93576,0.339111,-0.051422,0.408966,-0.911072,0.330444,0.942841,-0.042389,-0.452362,-0.786407,0.420563,0.134308,-0.933472,-0.332489,0.80191,-0.566711,-0.188934,-0.987946,-0.105988,0.112518,-0.24408,0.892242,-0.379791,-0.920502,0.229095,-0.316376,0.7789,0.325958,0.535706,-0.912872,0.185211,-0.36377,
-0.184784,0.565369,-0.803833,-0.018463,0.119537,0.992615,-0.259247,-0.935608,0.239532,-0.82373,-0.449127,-0.345947,-0.433105,0.659515,0.614349,-0.822754,0.378845,-0.423676,0.687195,-0.674835,-0.26889,-0.246582,-0.800842,0.545715,-0.729187,-0.207794,0.651978,0.653534,-0.610443,-0.447388,0.492584,-0.023346,
0.869934,0.609039,0.009094,-0.79306,0.962494,-0.271088,-0.00885,0.2659,-0.004913,0.963959,0.651245,0.553619,-0.518951,0.280548,-0.84314,0.458618,-0.175293,-0.983215,0.049805,0.035339,-0.979919,0.196045,-0.982941,0.164307,-0.082245,0.233734,-0.97226,-0.005005,-0.747253,-0.611328,0.260437,0.645599,
0.592773,0.481384,0.117706,-0.949524,-0.29068,-0.535004,-0.791901,-0.294312,-0.627167,-0.214447,0.748718,-0.047974,-0.813477,-0.57959,-0.175537,0.477264,-0.860992,0.738556,-0.414246,-0.53183,0.562561,-0.704071,0.433289,-0.754944,0.64801,-0.100586,0.114716,0.044525,-0.992371,0.966003,0.244873,-0.082764,
0.33783,0.715698,-0.611206,-0.944031,-0.326599,-0.045624};
{0.33783, 0.715698, -0.611206},
{-0.944031, -0.326599, -0.045624},
{-0.101074, -0.416443, -0.903503},
{0.799286, 0.49411, -0.341949},
{-0.854645, 0.518036, 0.033936},
{0.42514, -0.437866, -0.792114},
{-0.358948, 0.597046, 0.717377},
{-0.985413, 0.144714, 0.089294},
{-0.601776, -0.33728, -0.723907},
{-0.449921, 0.594513, 0.666382},
{0.208313, -0.10791, 0.972076},
{0.575317, 0.060425, 0.815643},
{0.293365, -0.875702, -0.383453},
{0.293762, 0.465759, 0.834686},
{-0.846008, -0.233398, -0.47934},
{-0.115814, 0.143036, -0.98291},
{0.204681, -0.949036, -0.239532},
{0.946716, -0.263947, 0.184326},
{-0.235596, 0.573822, 0.784332},
{0.203705, -0.372253, -0.905487},
{0.756989, -0.651031, 0.055298},
{0.497803, 0.814697, -0.297363},
{-0.16214, 0.063995, -0.98468},
{-0.329254, 0.834381, 0.441925},
{0.703827, -0.527039, -0.476227},
{0.956421, 0.266113, 0.119781},
{0.480133, 0.482849, 0.7323},
{-0.18631, 0.961212, -0.203125},
{-0.748474, -0.656921, -0.090393},
{-0.085052, -0.165253, 0.982544},
{-0.76947, 0.628174, -0.115234},
{0.383148, 0.537659, 0.751068},
{0.616486, -0.668488, -0.415924},
{-0.259979, -0.630005, 0.73175},
{0.570953, -0.087952, 0.816223},
{-0.458008, 0.023254, 0.888611},
{-0.196167, 0.976563, -0.088287},
{-0.263885, -0.69812, -0.665527},
{0.437134, -0.892273, -0.112793},
{-0.621674, -0.230438, 0.748566},
{0.232422, 0.900574, -0.367249},
{0.22229, -0.796143, 0.562744},
{-0.665497, -0.73764, 0.11377},
{0.670135, 0.704803, 0.232605},
{0.895599, 0.429749, -0.114655},
{-0.11557, -0.474243, 0.872742},
{0.621826, 0.604004, -0.498444},
{-0.832214, 0.012756, 0.55426},
{-0.702484, 0.705994, -0.089661},
{-0.692017, 0.649292, 0.315399},
{-0.175995, -0.977997, 0.111877},
{0.096954, -0.04953, 0.994019},
{0.635284, -0.606689, -0.477783},
{-0.261261, -0.607422, -0.750153},
{0.983276, 0.165436, 0.075958},
{-0.29837, 0.404083, -0.864655},
{-0.638672, 0.507721, 0.578156},
{0.388214, 0.412079, 0.824249},
{0.556183, -0.208832, 0.804352},
{0.778442, 0.562012, 0.27951},
{-0.616577, 0.781921, -0.091522},
{0.196289, 0.051056, 0.979187},
{-0.121216, 0.207153, -0.970734},
{-0.173401, -0.384735, 0.906555},
{0.161499, -0.723236, -0.671387},
{0.178497, -0.006226, -0.983887},
{-0.126038, 0.15799, 0.97934},
{0.830475, -0.024811, 0.556458},
{-0.510132, -0.76944, 0.384247},
{0.81424, 0.200104, -0.544891},
{-0.112549, -0.393311, -0.912445},
{0.56189, 0.152222, -0.813049},
{0.198914, -0.254517, -0.946381},
{-0.41217, 0.690979, -0.593811},
{-0.407257, 0.324524, 0.853668},
{-0.690186, 0.366119, -0.624115},
{-0.428345, 0.844147, -0.322296},
{-0.21228, -0.297546, -0.930756},
{-0.273071, 0.516113, 0.811798},
{0.928314, 0.371643, 0.007233},
{0.785828, -0.479218, -0.390778},
{-0.704895, 0.058929, 0.706818},
{0.173248, 0.203583, 0.963562},
{0.422211, -0.904297, -0.062469},
{-0.363312, -0.182465, 0.913605},
{0.254028, -0.552307, -0.793945},
{-0.28891, -0.765747, -0.574554},
{0.058319, 0.291382, 0.954803},
{0.946136, -0.303925, 0.111267},
{-0.078156, 0.443695, -0.892731},
{0.182098, 0.89389, 0.409515},
{-0.680298, -0.213318, 0.701141},
{0.062469, 0.848389, -0.525635},
{-0.72879, -0.641846, 0.238342},
{-0.88089, 0.427673, 0.202637},
{-0.532501, -0.21405, 0.818878},
{0.948975, -0.305084, 0.07962},
{0.925446, 0.374664, 0.055817},
{0.820923, 0.565491, 0.079102},
{0.25882, 0.099792, -0.960724},
{-0.294617, 0.910522, 0.289978},
{0.137115, 0.320038, -0.937408},
{-0.908386, 0.345276, -0.235718},
{-0.936218, 0.138763, 0.322754},
{0.366577, 0.925934, -0.090637},
{0.309296, -0.686829, -0.657684},
{0.66983, 0.024445, 0.742065},
{-0.917999, -0.059113, -0.392059},
{0.365509, 0.462158, -0.807922},
{0.083374, 0.996399, -0.014801},
{0.593842, 0.253143, -0.763672},
{0.974976, -0.165466, 0.148285},
{0.918976, 0.137299, 0.369537},
{0.294952, 0.694977, 0.655731},
{0.943085, 0.152618, -0.295319},
{0.58783, -0.598236, 0.544495},
{0.203796, 0.678223, 0.705994},
{-0.478821, -0.661011, 0.577667},
{0.719055, -0.1698, -0.673828},
{-0.132172, -0.965332, 0.225006},
{-0.981873, -0.14502, 0.121979},
{0.763458, 0.579742, 0.284546},
{-0.893188, 0.079681, 0.442474},
{-0.795776, -0.523804, 0.303802},
{0.734955, 0.67804, -0.007446},
{0.15506, 0.986267, -0.056183},
{0.258026, 0.571503, -0.778931},
{-0.681549, -0.702087, -0.206116},
{-0.96286, -0.177185, 0.203613},
{-0.470978, -0.515106, 0.716095},
{-0.740326, 0.57135, 0.354095},
{-0.56012, -0.824982, -0.074982},
{-0.507874, 0.753204, 0.417969},
{-0.503113, 0.038147, 0.863342},
{0.594025, 0.673553, -0.439758},
{-0.119873, -0.005524, -0.992737},
{0.098267, -0.213776, 0.971893},
{-0.615631, 0.643951, 0.454163},
{0.896851, -0.441071, 0.032166},
{-0.555023, 0.750763, -0.358093},
{0.398773, 0.304688, 0.864929},
{-0.722961, 0.303589, 0.620544},
{-0.63559, -0.621948, -0.457306},
{-0.293243, 0.072327, 0.953278},
{-0.491638, 0.661041, -0.566772},
{-0.304199, -0.572083, -0.761688},
{0.908081, -0.398956, 0.127014},
{-0.523621, -0.549683, -0.650848},
{-0.932922, -0.19986, 0.299408},
{0.099426, 0.140869, 0.984985},
{-0.020325, -0.999756, -0.002319},
{0.952667, 0.280853, -0.11615},
{-0.971893, 0.082581, 0.220337},
{0.65921, 0.705292, -0.260651},
{0.733063, -0.175537, 0.657043},
{-0.555206, 0.429504, -0.712189},
{0.400421, -0.89859, 0.179352},
{0.750885, -0.19696, 0.630341},
{0.785675, -0.569336, 0.241821},
{-0.058899, -0.464111, 0.883789},
{0.129608, -0.94519, 0.299622},
{-0.357819, 0.907654, 0.219238},
{-0.842133, -0.439117, -0.312927},
{-0.313477, 0.84433, 0.434479},
{-0.241211, 0.053253, 0.968994},
{0.063873, 0.823273, 0.563965},
{0.476288, 0.862152, -0.172516},
{0.620941, -0.298126, 0.724915},
{0.25238, -0.749359, -0.612122},
{-0.577545, 0.386566, 0.718994},
{-0.406342, -0.737976, 0.538696},
{0.04718, 0.556305, 0.82959},
{-0.802856, 0.587463, 0.101166},
{-0.707733, -0.705963, 0.026428},
{0.374908, 0.68457, 0.625092},
{0.472137, 0.208405, -0.856506},
{-0.703064, -0.581085, -0.409821},
{-0.417206, -0.736328, 0.532623},
{-0.447876, -0.20285, -0.870728},
{0.086945, -0.990417, 0.107086},
{0.183685, 0.018341, -0.982788},
{0.560638, -0.428864, 0.708282},
{0.296722, -0.952576, -0.0672},
{0.135773, 0.990265, 0.030243},
{-0.068787, 0.654724, 0.752686},
{0.762604, -0.551758, 0.337585},
{-0.819611, -0.407684, 0.402466},
{-0.727844, -0.55072, -0.408539},
{-0.855774, -0.480011, 0.19281},
{0.693176, -0.079285, 0.716339},
{0.226013, 0.650116, -0.725433},
{0.246704, 0.953369, -0.173553},
{-0.970398, -0.239227, -0.03244},
{0.136383, -0.394318, 0.908752},
{0.813232, 0.558167, 0.164368},
{0.40451, 0.549042, -0.731323},
{-0.380249, -0.566711, 0.730865},
{0.022156, 0.932739, 0.359741},
{0.00824, 0.996552, -0.082306},
{0.956635, -0.065338, -0.283722},
{-0.743561, 0.008209, 0.668579},
{-0.859589, -0.509674, 0.035767},
{-0.852234, 0.363678, -0.375977},
{-0.201965, -0.970795, -0.12915},
{0.313477, 0.947327, 0.06546},
{-0.254028, -0.528259, 0.81015},
{0.628052, 0.601105, 0.49411},
{-0.494385, 0.868378, 0.037933},
{0.275635, -0.086426, 0.957336},
{-0.197937, 0.468903, -0.860748},
{0.895599, 0.399384, 0.195801},
{0.560791, 0.825012, -0.069214},
{0.304199, -0.849487, 0.43103},
{0.096375, 0.93576, 0.339111},
{-0.051422, 0.408966, -0.911072},
{0.330444, 0.942841, -0.042389},
{-0.452362, -0.786407, 0.420563},
{0.134308, -0.933472, -0.332489},
{0.80191, -0.566711, -0.188934},
{-0.987946, -0.105988, 0.112518},
{-0.24408, 0.892242, -0.379791},
{-0.920502, 0.229095, -0.316376},
{0.7789, 0.325958, 0.535706},
{-0.912872, 0.185211, -0.36377},
{-0.184784, 0.565369, -0.803833},
{-0.018463, 0.119537, 0.992615},
{-0.259247, -0.935608, 0.239532},
{-0.82373, -0.449127, -0.345947},
{-0.433105, 0.659515, 0.614349},
{-0.822754, 0.378845, -0.423676},
{0.687195, -0.674835, -0.26889},
{-0.246582, -0.800842, 0.545715},
{-0.729187, -0.207794, 0.651978},
{0.653534, -0.610443, -0.447388},
{0.492584, -0.023346, 0.869934},
{0.609039, 0.009094, -0.79306},
{0.962494, -0.271088, -0.00885},
{0.2659, -0.004913, 0.963959},
{0.651245, 0.553619, -0.518951},
{0.280548, -0.84314, 0.458618},
{-0.175293, -0.983215, 0.049805},
{0.035339, -0.979919, 0.196045},
{-0.982941, 0.164307, -0.082245},
{0.233734, -0.97226, -0.005005},
{-0.747253, -0.611328, 0.260437},
{0.645599, 0.592773, 0.481384},
{0.117706, -0.949524, -0.29068},
{-0.535004, -0.791901, -0.294312},
{-0.627167, -0.214447, 0.748718},
{-0.047974, -0.813477, -0.57959},
{-0.175537, 0.477264, -0.860992},
{0.738556, -0.414246, -0.53183},
{0.562561, -0.704071, 0.433289},
{-0.754944, 0.64801, -0.100586},
{0.114716, 0.044525, -0.992371},
{0.966003, 0.244873, -0.082764},
{0.33783, 0.715698, -0.611206},
{-0.944031, -0.326599, -0.045624},
{-0.101074, -0.416443, -0.903503},
{0.799286, 0.49411, -0.341949},
{-0.854645, 0.518036, 0.033936},
{0.42514, -0.437866, -0.792114},
{-0.358948, 0.597046, 0.717377},
{-0.985413, 0.144714, 0.089294},
{-0.601776, -0.33728, -0.723907},
{-0.449921, 0.594513, 0.666382},
{0.208313, -0.10791, 0.972076},
{0.575317, 0.060425, 0.815643},
{0.293365, -0.875702, -0.383453},
{0.293762, 0.465759, 0.834686},
{-0.846008, -0.233398, -0.47934},
{-0.115814, 0.143036, -0.98291},
{0.204681, -0.949036, -0.239532},
{0.946716, -0.263947, 0.184326},
{-0.235596, 0.573822, 0.784332},
{0.203705, -0.372253, -0.905487},
{0.756989, -0.651031, 0.055298},
{0.497803, 0.814697, -0.297363},
{-0.16214, 0.063995, -0.98468},
{-0.329254, 0.834381, 0.441925},
{0.703827, -0.527039, -0.476227},
{0.956421, 0.266113, 0.119781},
{0.480133, 0.482849, 0.7323},
{-0.18631, 0.961212, -0.203125},
{-0.748474, -0.656921, -0.090393},
{-0.085052, -0.165253, 0.982544},
{-0.76947, 0.628174, -0.115234},
{0.383148, 0.537659, 0.751068},
{0.616486, -0.668488, -0.415924},
{-0.259979, -0.630005, 0.73175},
{0.570953, -0.087952, 0.816223},
{-0.458008, 0.023254, 0.888611},
{-0.196167, 0.976563, -0.088287},
{-0.263885, -0.69812, -0.665527},
{0.437134, -0.892273, -0.112793},
{-0.621674, -0.230438, 0.748566},
{0.232422, 0.900574, -0.367249},
{0.22229, -0.796143, 0.562744},
{-0.665497, -0.73764, 0.11377},
{0.670135, 0.704803, 0.232605},
{0.895599, 0.429749, -0.114655},
{-0.11557, -0.474243, 0.872742},
{0.621826, 0.604004, -0.498444},
{-0.832214, 0.012756, 0.55426},
{-0.702484, 0.705994, -0.089661},
{-0.692017, 0.649292, 0.315399},
{-0.175995, -0.977997, 0.111877},
{0.096954, -0.04953, 0.994019},
{0.635284, -0.606689, -0.477783},
{-0.261261, -0.607422, -0.750153},
{0.983276, 0.165436, 0.075958},
{-0.29837, 0.404083, -0.864655},
{-0.638672, 0.507721, 0.578156},
{0.388214, 0.412079, 0.824249},
{0.556183, -0.208832, 0.804352},
{0.778442, 0.562012, 0.27951},
{-0.616577, 0.781921, -0.091522},
{0.196289, 0.051056, 0.979187},
{-0.121216, 0.207153, -0.970734},
{-0.173401, -0.384735, 0.906555},
{0.161499, -0.723236, -0.671387},
{0.178497, -0.006226, -0.983887},
{-0.126038, 0.15799, 0.97934},
{0.830475, -0.024811, 0.556458},
{-0.510132, -0.76944, 0.384247},
{0.81424, 0.200104, -0.544891},
{-0.112549, -0.393311, -0.912445},
{0.56189, 0.152222, -0.813049},
{0.198914, -0.254517, -0.946381},
{-0.41217, 0.690979, -0.593811},
{-0.407257, 0.324524, 0.853668},
{-0.690186, 0.366119, -0.624115},
{-0.428345, 0.844147, -0.322296},
{-0.21228, -0.297546, -0.930756},
{-0.273071, 0.516113, 0.811798},
{0.928314, 0.371643, 0.007233},
{0.785828, -0.479218, -0.390778},
{-0.704895, 0.058929, 0.706818},
{0.173248, 0.203583, 0.963562},
{0.422211, -0.904297, -0.062469},
{-0.363312, -0.182465, 0.913605},
{0.254028, -0.552307, -0.793945},
{-0.28891, -0.765747, -0.574554},
{0.058319, 0.291382, 0.954803},
{0.946136, -0.303925, 0.111267},
{-0.078156, 0.443695, -0.892731},
{0.182098, 0.89389, 0.409515},
{-0.680298, -0.213318, 0.701141},
{0.062469, 0.848389, -0.525635},
{-0.72879, -0.641846, 0.238342},
{-0.88089, 0.427673, 0.202637},
{-0.532501, -0.21405, 0.818878},
{0.948975, -0.305084, 0.07962},
{0.925446, 0.374664, 0.055817},
{0.820923, 0.565491, 0.079102},
{0.25882, 0.099792, -0.960724},
{-0.294617, 0.910522, 0.289978},
{0.137115, 0.320038, -0.937408},
{-0.908386, 0.345276, -0.235718},
{-0.936218, 0.138763, 0.322754},
{0.366577, 0.925934, -0.090637},
{0.309296, -0.686829, -0.657684},
{0.66983, 0.024445, 0.742065},
{-0.917999, -0.059113, -0.392059},
{0.365509, 0.462158, -0.807922},
{0.083374, 0.996399, -0.014801},
{0.593842, 0.253143, -0.763672},
{0.974976, -0.165466, 0.148285},
{0.918976, 0.137299, 0.369537},
{0.294952, 0.694977, 0.655731},
{0.943085, 0.152618, -0.295319},
{0.58783, -0.598236, 0.544495},
{0.203796, 0.678223, 0.705994},
{-0.478821, -0.661011, 0.577667},
{0.719055, -0.1698, -0.673828},
{-0.132172, -0.965332, 0.225006},
{-0.981873, -0.14502, 0.121979},
{0.763458, 0.579742, 0.284546},
{-0.893188, 0.079681, 0.442474},
{-0.795776, -0.523804, 0.303802},
{0.734955, 0.67804, -0.007446},
{0.15506, 0.986267, -0.056183},
{0.258026, 0.571503, -0.778931},
{-0.681549, -0.702087, -0.206116},
{-0.96286, -0.177185, 0.203613},
{-0.470978, -0.515106, 0.716095},
{-0.740326, 0.57135, 0.354095},
{-0.56012, -0.824982, -0.074982},
{-0.507874, 0.753204, 0.417969},
{-0.503113, 0.038147, 0.863342},
{0.594025, 0.673553, -0.439758},
{-0.119873, -0.005524, -0.992737},
{0.098267, -0.213776, 0.971893},
{-0.615631, 0.643951, 0.454163},
{0.896851, -0.441071, 0.032166},
{-0.555023, 0.750763, -0.358093},
{0.398773, 0.304688, 0.864929},
{-0.722961, 0.303589, 0.620544},
{-0.63559, -0.621948, -0.457306},
{-0.293243, 0.072327, 0.953278},
{-0.491638, 0.661041, -0.566772},
{-0.304199, -0.572083, -0.761688},
{0.908081, -0.398956, 0.127014},
{-0.523621, -0.549683, -0.650848},
{-0.932922, -0.19986, 0.299408},
{0.099426, 0.140869, 0.984985},
{-0.020325, -0.999756, -0.002319},
{0.952667, 0.280853, -0.11615},
{-0.971893, 0.082581, 0.220337},
{0.65921, 0.705292, -0.260651},
{0.733063, -0.175537, 0.657043},
{-0.555206, 0.429504, -0.712189},
{0.400421, -0.89859, 0.179352},
{0.750885, -0.19696, 0.630341},
{0.785675, -0.569336, 0.241821},
{-0.058899, -0.464111, 0.883789},
{0.129608, -0.94519, 0.299622},
{-0.357819, 0.907654, 0.219238},
{-0.842133, -0.439117, -0.312927},
{-0.313477, 0.84433, 0.434479},
{-0.241211, 0.053253, 0.968994},
{0.063873, 0.823273, 0.563965},
{0.476288, 0.862152, -0.172516},
{0.620941, -0.298126, 0.724915},
{0.25238, -0.749359, -0.612122},
{-0.577545, 0.386566, 0.718994},
{-0.406342, -0.737976, 0.538696},
{0.04718, 0.556305, 0.82959},
{-0.802856, 0.587463, 0.101166},
{-0.707733, -0.705963, 0.026428},
{0.374908, 0.68457, 0.625092},
{0.472137, 0.208405, -0.856506},
{-0.703064, -0.581085, -0.409821},
{-0.417206, -0.736328, 0.532623},
{-0.447876, -0.20285, -0.870728},
{0.086945, -0.990417, 0.107086},
{0.183685, 0.018341, -0.982788},
{0.560638, -0.428864, 0.708282},
{0.296722, -0.952576, -0.0672},
{0.135773, 0.990265, 0.030243},
{-0.068787, 0.654724, 0.752686},
{0.762604, -0.551758, 0.337585},
{-0.819611, -0.407684, 0.402466},
{-0.727844, -0.55072, -0.408539},
{-0.855774, -0.480011, 0.19281},
{0.693176, -0.079285, 0.716339},
{0.226013, 0.650116, -0.725433},
{0.246704, 0.953369, -0.173553},
{-0.970398, -0.239227, -0.03244},
{0.136383, -0.394318, 0.908752},
{0.813232, 0.558167, 0.164368},
{0.40451, 0.549042, -0.731323},
{-0.380249, -0.566711, 0.730865},
{0.022156, 0.932739, 0.359741},
{0.00824, 0.996552, -0.082306},
{0.956635, -0.065338, -0.283722},
{-0.743561, 0.008209, 0.668579},
{-0.859589, -0.509674, 0.035767},
{-0.852234, 0.363678, -0.375977},
{-0.201965, -0.970795, -0.12915},
{0.313477, 0.947327, 0.06546},
{-0.254028, -0.528259, 0.81015},
{0.628052, 0.601105, 0.49411},
{-0.494385, 0.868378, 0.037933},
{0.275635, -0.086426, 0.957336},
{-0.197937, 0.468903, -0.860748},
{0.895599, 0.399384, 0.195801},
{0.560791, 0.825012, -0.069214},
{0.304199, -0.849487, 0.43103},
{0.096375, 0.93576, 0.339111},
{-0.051422, 0.408966, -0.911072},
{0.330444, 0.942841, -0.042389},
{-0.452362, -0.786407, 0.420563},
{0.134308, -0.933472, -0.332489},
{0.80191, -0.566711, -0.188934},
{-0.987946, -0.105988, 0.112518},
{-0.24408, 0.892242, -0.379791},
{-0.920502, 0.229095, -0.316376},
{0.7789, 0.325958, 0.535706},
{-0.912872, 0.185211, -0.36377},
{-0.184784, 0.565369, -0.803833},
{-0.018463, 0.119537, 0.992615},
{-0.259247, -0.935608, 0.239532},
{-0.82373, -0.449127, -0.345947},
{-0.433105, 0.659515, 0.614349},
{-0.822754, 0.378845, -0.423676},
{0.687195, -0.674835, -0.26889},
{-0.246582, -0.800842, 0.545715},
{-0.729187, -0.207794, 0.651978},
{0.653534, -0.610443, -0.447388},
{0.492584, -0.023346, 0.869934},
{0.609039, 0.009094, -0.79306},
{0.962494, -0.271088, -0.00885},
{0.2659, -0.004913, 0.963959},
{0.651245, 0.553619, -0.518951},
{0.280548, -0.84314, 0.458618},
{-0.175293, -0.983215, 0.049805},
{0.035339, -0.979919, 0.196045},
{-0.982941, 0.164307, -0.082245},
{0.233734, -0.97226, -0.005005},
{-0.747253, -0.611328, 0.260437},
{0.645599, 0.592773, 0.481384},
{0.117706, -0.949524, -0.29068},
{-0.535004, -0.791901, -0.294312},
{-0.627167, -0.214447, 0.748718},
{-0.047974, -0.813477, -0.57959},
{-0.175537, 0.477264, -0.860992},
{0.738556, -0.414246, -0.53183},
{0.562561, -0.704071, 0.433289},
{-0.754944, 0.64801, -0.100586},
{0.114716, 0.044525, -0.992371},
{0.966003, 0.244873, -0.082764},
{0.33783, 0.715698, -0.611206},
{-0.944031, -0.326599, -0.045624},
};

@ -256,290 +256,290 @@ static int sp;
static int savesplines = 1;
static pschar ISOcharlist[NASCII] = {
"/space", 040, 0,
"/exclam", 041, 0,
"/quotedbl", 042, 0,
"/numbersign", 043, 0,
"/dollar", 044, 0,
"/percent", 045, 0,
"/ampersand", 046, 0,
"/quoteright", 047, 0,
{"/space", 040, 0},
{"/exclam", 041, 0},
{"/quotedbl", 042, 0},
{"/numbersign", 043, 0},
{"/dollar", 044, 0},
{"/percent", 045, 0},
{"/ampersand", 046, 0},
{"/quoteright", 047, 0},
"/parenleft", 050, 0,
"/parenright", 051, 0,
"/asterisk", 052, 0,
"/plus", 053, 0,
"/comma", 054, 0,
"/hyphen", 055, 0,
"/period", 056, 0,
"/slash", 057, 0,
{"/parenleft", 050, 0},
{"/parenright", 051, 0},
{"/asterisk", 052, 0},
{"/plus", 053, 0},
{"/comma", 054, 0},
{"/hyphen", 055, 0},
{"/period", 056, 0},
{"/slash", 057, 0},
"/zero", 060, 0,
"/one", 061, 0,
"/two", 062, 0,
"/three", 063, 0,
"/four", 064, 0,
"/five", 065, 0,
"/six", 066, 0,
"/seven", 067, 0,
{"/zero", 060, 0},
{"/one", 061, 0},
{"/two", 062, 0},
{"/three", 063, 0},
{"/four", 064, 0},
{"/five", 065, 0},
{"/six", 066, 0},
{"/seven", 067, 0},
"/eight", 070, 0,
"/nine", 071, 0,
"/colon", 072, 0,
"/semicolon", 073, 0,
"/less", 074, 0,
"/equal", 075, 0,
"/greater", 076, 0,
"/question", 077, 0,
{"/eight", 070, 0},
{"/nine", 071, 0},
{"/colon", 072, 0},
{"/semicolon", 073, 0},
{"/less", 074, 0},
{"/equal", 075, 0},
{"/greater", 076, 0},
{"/question", 077, 0},
"/at", 0100, 0,
"/A", 0101, 0,
"/B", 0102, 0,
"/C", 0103, 0,
"/D", 0104, 0,
"/E", 0105, 0,
"/F", 0106, 0,
"/G", 0107, 0,
{"/at", 0100, 0},
{"/A", 0101, 0},
{"/B", 0102, 0},
{"/C", 0103, 0},
{"/D", 0104, 0},
{"/E", 0105, 0},
{"/F", 0106, 0},
{"/G", 0107, 0},
"/H", 0110, 0,
"/I", 0111, 0,
"/J", 0112, 0,
"/K", 0113, 0,
"/L", 0114, 0,
"/M", 0115, 0,
"/N", 0116, 0,
"/O", 0117, 0,
{"/H", 0110, 0},
{"/I", 0111, 0},
{"/J", 0112, 0},
{"/K", 0113, 0},
{"/L", 0114, 0},
{"/M", 0115, 0},
{"/N", 0116, 0},
{"/O", 0117, 0},
"/P", 0120, 0,
"/Q", 0121, 0,
"/R", 0122, 0,
"/S", 0123, 0,
"/T", 0124, 0,
"/U", 0125, 0,
"/V", 0126, 0,
"/W", 0127, 0,
{"/P", 0120, 0},
{"/Q", 0121, 0},
{"/R", 0122, 0},
{"/S", 0123, 0},
{"/T", 0124, 0},
{"/U", 0125, 0},
{"/V", 0126, 0},
{"/W", 0127, 0},
"/X", 0130, 0,
"/Y", 0131, 0,
"/Z", 0132, 0,
"/bracketleft", 0133, 0,
"/backslash", 0134, 0,
"/bracketright", 0135, 0,
"/asciicircum", 0136, 0,
"/underscore", 0137, 0,
{"/X", 0130, 0},
{"/Y", 0131, 0},
{"/Z", 0132, 0},
{"/bracketleft", 0133, 0},
{"/backslash", 0134, 0},
{"/bracketright", 0135, 0},
{"/asciicircum", 0136, 0},
{"/underscore", 0137, 0},
"/quoteleft", 0140, 0,
"/a", 0141, 0,
"/b", 0142, 0,
"/c", 0143, 0,
"/d", 0144, 0,
"/e", 0145, 0,
"/f", 0146, 0,
"/g", 0147, 0,
{"/quoteleft", 0140, 0},
{"/a", 0141, 0},
{"/b", 0142, 0},
{"/c", 0143, 0},
{"/d", 0144, 0},
{"/e", 0145, 0},
{"/f", 0146, 0},
{"/g", 0147, 0},
"/h", 0150, 0,
"/i", 0151, 0,
"/j", 0152, 0,
"/k", 0153, 0,
"/l", 0154, 0,
"/m", 0155, 0,
"/n", 0156, 0,
"/o", 0157, 0,
{"/h", 0150, 0},
{"/i", 0151, 0},
{"/j", 0152, 0},
{"/k", 0153, 0},
{"/l", 0154, 0},
{"/m", 0155, 0},
{"/n", 0156, 0},
{"/o", 0157, 0},
"/p", 0160, 0,
"/q", 0161, 0,
"/r", 0162, 0,
"/s", 0163, 0,
"/t", 0164, 0,
"/u", 0165, 0,
"/v", 0166, 0,
"/w", 0167, 0,
{"/p", 0160, 0},
{"/q", 0161, 0},
{"/r", 0162, 0},
{"/s", 0163, 0},
{"/t", 0164, 0},
{"/u", 0165, 0},
{"/v", 0166, 0},
{"/w", 0167, 0},
"/x", 0170, 0,
"/y", 0171, 0,
"/z", 0172, 0,
"/braceleft", 0173, 0,
"/bar", 0174, 0,
"/braceright", 0175, 0,
"/asciitilde", 0176, 0,
"/", 0177, 0,
{"/x", 0170, 0},
{"/y", 0171, 0},
{"/z", 0172, 0},
{"/braceleft", 0173, 0},
{"/bar", 0174, 0},
{"/braceright", 0175, 0},
{"/asciitilde", 0176, 0},
{"/", 0177, 0},
/* nonstandard defs */
"/quotedblleft", 0200, 0,
"/quotedblright", 0201, 0,
"/quotedblbase", 0202, 0,
"/quotesinglbase", 0203, 0,
"/guilsinglleft", 0204, 0,
"/guilsinglright", 0205, 0,
"/endash", 0206, 0,
"/dagger", 0207, 0,
{"/quotedblleft", 0200, 0},
{"/quotedblright", 0201, 0},
{"/quotedblbase", 0202, 0},
{"/quotesinglbase", 0203, 0},
{"/guilsinglleft", 0204, 0},
{"/guilsinglright", 0205, 0},
{"/endash", 0206, 0},
{"/dagger", 0207, 0},
"/daggerdbl", 0210, 0,
"/trademark", 0211, 0,
"/bullet", 0212, 0,
"/perthousand", 0213, 0,
"/Lslash", 0214, 0,
"/OE", 0215, 0,
"/lslash", 0216, 0,
"/oe", 0217, 0,
{"/daggerdbl", 0210, 0},
{"/trademark", 0211, 0},
{"/bullet", 0212, 0},
{"/perthousand", 0213, 0},
{"/Lslash", 0214, 0},
{"/OE", 0215, 0},
{"/lslash", 0216, 0},
{"/oe", 0217, 0},
/* endnonstandard defs */
"/dotlessi", 0220, 0,
"/grave", 0221, 0,
"/acute", 0222, 0,
"/circumflex", 0223, 0,
"/tilde", 0224, 0,
"/", 0225, 0,
"/breve", 0226, 0,
"/dotaccent", 0227, 0,
{"/dotlessi", 0220, 0},
{"/grave", 0221, 0},
{"/acute", 0222, 0},
{"/circumflex", 0223, 0},
{"/tilde", 0224, 0},
{"/", 0225, 0},
{"/breve", 0226, 0},
{"/dotaccent", 0227, 0},
"/", 0230, 0,
"/", 0231, 0,
"/ring", 0232, 0,
"/", 0233, 0,
"/", 0234, 0,
"/hungarumlaut", 0235, 0,
"/ogonek", 0236, 0,
"/caron", 0237, 0,
{"/", 0230, 0},
{"/", 0231, 0},
{"/ring", 0232, 0},
{"/", 0233, 0},
{"/", 0234, 0},
{"/hungarumlaut", 0235, 0},
{"/ogonek", 0236, 0},
{"/caron", 0237, 0},
"/", 0240, 0,
"/exclamdown", 0241, 0,
"/cent", 0242, 0,
"/sterling", 0243, 0,
"/florin", 0244, 0,
"/yen", 0245, 0,
"/brokenbar", 0246, 0,
"/section", 0247, 0,
{"/", 0240, 0},
{"/exclamdown", 0241, 0},
{"/cent", 0242, 0},
{"/sterling", 0243, 0},
{"/florin", 0244, 0},
{"/yen", 0245, 0},
{"/brokenbar", 0246, 0},
{"/section", 0247, 0},
"/dieresis", 0250, 0,
"/copyright", 0251, 0,
"/ordfeminine", 0252, 0,
"/guillemotleft", 0253, 0,
"/logicalnot", 0254, 0,
"/hyphen", 0255, 0,
"/registered", 0256, 0,
"/macron", 0257, 0,
{"/dieresis", 0250, 0},
{"/copyright", 0251, 0},
{"/ordfeminine", 0252, 0},
{"/guillemotleft", 0253, 0},
{"/logicalnot", 0254, 0},
{"/hyphen", 0255, 0},
{"/registered", 0256, 0},
{"/macron", 0257, 0},
"/degree", 0260, 0,
"/plusminus", 0261, 0,
"/twosuperior", 0262, 0,
"/threesuperior", 0263, 0,
"/acute", 0264, 0,
"/mu", 0265, 0,
"/paragraph", 0266, 0,
"/periodcentered", 0267, 0,
{"/degree", 0260, 0},
{"/plusminus", 0261, 0},
{"/twosuperior", 0262, 0},
{"/threesuperior", 0263, 0},
{"/acute", 0264, 0},
{"/mu", 0265, 0},
{"/paragraph", 0266, 0},
{"/periodcentered", 0267, 0},
"/cedilla", 0270, 0,
"/onesuperior", 0271, 0,
"/ordmasculine", 0272, 0,
"/guillemotright", 0273, 0,
"/onequarter", 0274, 0,
"/onehalf", 0275, 0,
"/threequarters", 0276, 0,
"/questiondown", 0277, 0,
{"/cedilla", 0270, 0},
{"/onesuperior", 0271, 0},
{"/ordmasculine", 0272, 0},
{"/guillemotright", 0273, 0},
{"/onequarter", 0274, 0},
{"/onehalf", 0275, 0},
{"/threequarters", 0276, 0},
{"/questiondown", 0277, 0},
"/Agrave", 0300, 0,
"/Aacute", 0301, 0,
"/Acircumflex", 0302, 0,
"/Atilde", 0303, 0,
"/Adieresis", 0304, 0,
"/Aring", 0305, 0,
"/AE", 0306, 0,
"/Ccedilla", 0307, 0,
{"/Agrave", 0300, 0},
{"/Aacute", 0301, 0},
{"/Acircumflex", 0302, 0},
{"/Atilde", 0303, 0},
{"/Adieresis", 0304, 0},
{"/Aring", 0305, 0},
{"/AE", 0306, 0},
{"/Ccedilla", 0307, 0},
"/Egrave", 0310, 0,
"/Eacute", 0311, 0,
"/Ecircumflex", 0312, 0,
"/Edieresis", 0313, 0,
"/Igrave", 0314, 0,
"/Iacute", 0315, 0,
"/Icircumflex", 0316, 0,
"/Idieresis", 0317, 0,
{"/Egrave", 0310, 0},
{"/Eacute", 0311, 0},
{"/Ecircumflex", 0312, 0},
{"/Edieresis", 0313, 0},
{"/Igrave", 0314, 0},
{"/Iacute", 0315, 0},
{"/Icircumflex", 0316, 0},
{"/Idieresis", 0317, 0},
"/Eth", 0320, 0,
"/Ntilde", 0321, 0,
"/Ograve", 0322, 0,
"/Oacute", 0323, 0,
"/Ocircumflex", 0324, 0,
"/Otilde", 0325, 0,
"/Odieresis", 0326, 0,
"/multiply", 0327, 0,
{"/Eth", 0320, 0},
{"/Ntilde", 0321, 0},
{"/Ograve", 0322, 0},
{"/Oacute", 0323, 0},
{"/Ocircumflex", 0324, 0},
{"/Otilde", 0325, 0},
{"/Odieresis", 0326, 0},
{"/multiply", 0327, 0},
"/Oslash", 0330, 0,
"/Ugrave", 0331, 0,
"/Uacute", 0332, 0,
"/Ucircumflex", 0333, 0,
"/Udieresis", 0334, 0,
"/Yacute", 0335, 0,
"/Thorn", 0336, 0,
"/germandbls", 0337, 0,
{"/Oslash", 0330, 0},
{"/Ugrave", 0331, 0},
{"/Uacute", 0332, 0},
{"/Ucircumflex",0333, 0},
{"/Udieresis", 0334, 0},
{"/Yacute", 0335, 0},
{"/Thorn", 0336, 0},
{"/germandbls", 0337, 0},
"/agrave", 0340, 0,
"/aacute", 0341, 0,
"/acircumflex", 0342, 0,
"/atilde", 0343, 0,
"/adieresis", 0344, 0,
"/aring", 0345, 0,
"/ae", 0346, 0,
"/ccedilla", 0347, 0,
{"/agrave", 0340, 0},
{"/aacute", 0341, 0},
{"/acircumflex",0342, 0},
{"/atilde", 0343, 0},
{"/adieresis", 0344, 0},
{"/aring", 0345, 0},
{"/ae", 0346, 0},
{"/ccedilla", 0347, 0},
"/egrave", 0350, 0,
"/eacute", 0351, 0,
"/ecircumflex", 0352, 0,
"/edieresis", 0353, 0,
"/igrave", 0354, 0,
"/iacute", 0355, 0,
"/icircumflex", 0356, 0,
"/idieresis", 0357, 0,
{"/egrave", 0350, 0},
{"/eacute", 0351, 0},
{"/ecircumflex", 0352, 0},
{"/edieresis", 0353, 0},
{"/igrave", 0354, 0},
{"/iacute", 0355, 0},
{"/icircumflex", 0356, 0},
{"/idieresis", 0357, 0},
"/eth", 0360, 0,
"/ntilde", 0361, 0,
"/ograve", 0362, 0,
"/oacute", 0363, 0,
"/ocircumflex", 0364, 0,
"/otilde", 0365, 0,
"/odieresis", 0366, 0,
"/divide", 0367, 0,
{"/eth", 0360, 0},
{"/ntilde", 0361, 0},
{"/ograve", 0362, 0},
{"/oacute", 0363, 0},
{"/ocircumflex",0364, 0},
{"/otilde", 0365, 0},
{"/odieresis", 0366, 0},
{"/divide", 0367, 0},
"/oslash", 0370, 0,
"/ugrave", 0371, 0,
"/uacute", 0372, 0,
"/ucircumflex", 0373, 0,
"/udieresis", 0374, 0,
"/yacute", 0375, 0,
"/thorn", 0376, 0,
"/ydieresis", 0377, 0,
{"/oslash", 0370, 0},
{"/ugrave", 0371, 0},
{"/uacute", 0372, 0},
{"/ucircumflex",0373, 0},
{"/udieresis", 0374, 0},
{"/yacute", 0375, 0},
{"/thorn", 0376, 0},
{"/ydieresis", 0377, 0},
};
static short STDvsISO [][2] = {
0341, 0306, /* AE */
0351, 0330, /* Oslash */
0302, 0222, /* acute */
0361, 0346, /* ae */
0306, 0226, /* breve */
0317, 0237, /* caron */
0313, 0270, /* cedilla */
0303, 0223, /* circumflex */
0250, 0244, /* currency */
0310, 0250, /* dieresis */
0307, 0227, /* dotaccent */
0365, 0220, /* dotlessi */
0373, 0337, /* germandbls */
0301, 0221, /* grave */
0315, 0235, /* hungarumlaut */
0055, 0255, /* hyphen */
0305, 0257, /* macron */
0316, 0236, /* ogenek */
0343, 0252, /* ordfeminine */
0353, 0272, /* ordmasculine */
0371, 0370, /* oslash */
0264, 0267, /* periodcentered */
0312, 0232, /* ring */
0304, 0224, /* tilde */
{0341, 0306}, /* AE */
{0351, 0330}, /* Oslash */
{0302, 0222}, /* acute */
{0361, 0346}, /* ae */
{0306, 0226}, /* breve */
{0317, 0237}, /* caron */
{0313, 0270}, /* cedilla */
{0303, 0223}, /* circumflex */
{0250, 0244}, /* currency */
{0310, 0250}, /* dieresis */
{0307, 0227}, /* dotaccent */
{0365, 0220}, /* dotlessi */
{0373, 0337}, /* germandbls */
{0301, 0221}, /* grave */
{0315, 0235}, /* hungarumlaut */
{0055, 0255}, /* hyphen */
{0305, 0257}, /* macron */
{0316, 0236}, /* ogenek */
{0343, 0252}, /* ordfeminine */
{0353, 0272}, /* ordmasculine */
{0371, 0370}, /* oslash */
{0264, 0267}, /* periodcentered */
{0312, 0232}, /* ring */
{0304, 0224}, /* tilde */
};
/* from objfont.c, rest is in lfm_s !!*/

@ -858,6 +858,8 @@ int BLI_strcaseeq(char *a, char *b) {
* take the dir name, make it absolute, and clean it up, replacing
* excess file entry stuff (like /tmp/../tmp/../)
* note that dir isn't protected for max string names...
*
* If relbase is NULL then its ignored
*/
void BLI_cleanup_dir(const char *relabase, char *dir)
@ -874,9 +876,9 @@ void BLI_cleanup_file(const char *relabase, char *dir)
{
short a;
char *start, *eind;
BLI_convertstringcode(dir, relabase, 0);
if (relabase) {
BLI_convertstringcode(dir, relabase, 0);
}
#ifdef WIN32
if(dir[0]=='.') { /* happens for example in FILE_MAIN */
get_default_root(dir);
@ -954,7 +956,7 @@ void BLI_makestringcode(const char *relfile, char *file)
char * lslash;
char temp[FILE_MAXDIR+FILE_MAXFILE];
char res[FILE_MAXDIR+FILE_MAXFILE];
/* if file is already relative, bail out */
if(file[0]=='/' && file[1]=='/') return;
@ -986,7 +988,11 @@ void BLI_makestringcode(const char *relfile, char *file)
BLI_char_switch(temp, '\\', '/');
BLI_char_switch(file, '\\', '/');
/* remove /./ which confuse the following slash counting... */
BLI_cleanup_file(NULL, file);
BLI_cleanup_file(NULL, temp);
/* the last slash in the file indicates where the path part ends */
lslash = BLI_last_slash(temp);
@ -1065,6 +1071,8 @@ int BLI_convertstringcode(char *path, const char *basepath, int framenum)
BLI_strncpy(base, basepath, FILE_MAX);
BLI_cleanup_file(NULL, base);
/* push slashes into unix mode - strings entering this part are
potentially messed up: having both back- and forward slashes.
Here we push into one conform direction, and at the end we
@ -1147,7 +1155,7 @@ int BLI_convertstringcode(char *path, const char *basepath, int framenum)
*/
BLI_char_switch(path+2, '/', '\\');
#endif
return wasrelative;
}

@ -196,6 +196,27 @@ void get_default_root(char* root) {
}
}
int check_file_chars(char *filename)
{
char *p = filename;
while (*p) {
switch (*p) {
case ':':
case '?':
case '*':
case '|':
case '\\':
case '/':
case '\"':
return 0;
break;
}
p++;
}
return 1;
}
#else
static void BLI_WINSTUFF_C_IS_EMPTY_FOR_UNIX(void)

@ -121,7 +121,7 @@
#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"
@ -720,7 +720,7 @@ BHead *blo_firstbhead(FileData *fd)
BHead *blo_prevbhead(FileData *fd, BHead *thisblock)
{
BHeadN *bheadn= (BHeadN *) (((char *) thisblock) - (int) (&((BHeadN*)0)->bhead));
BHeadN *bheadn= (BHeadN *) (((char *) thisblock) - GET_INT_FROM_POINTER( &((BHeadN*)0)->bhead) );
BHeadN *prev= bheadn->prev;
return prev?&prev->bhead:NULL;
@ -734,7 +734,7 @@ BHead *blo_nextbhead(FileData *fd, BHead *thisblock)
if (thisblock) {
// bhead is actually a sub part of BHeadN
// We calculate the BHeadN pointer from the BHead pointer below
new_bhead = (BHeadN *) (((char *) thisblock) - (int) (&((BHeadN*)0)->bhead));
new_bhead = (BHeadN *) (((char *) thisblock) - GET_INT_FROM_POINTER( &((BHeadN*)0)->bhead) );
// get the next BHeadN. If it doesn't exist we read in the next one
new_bhead = new_bhead->next;
@ -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;
}
@ -7593,6 +7593,31 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
idproperties_fix_group_lengths(main->brush);
idproperties_fix_group_lengths(main->particle);
}
/* only needed until old bad svn/RC1,2 files are saved with a > 17 version -dg */
if(main->versionfile == 245 && main->subversionfile < 17) {
ModifierData *md;
Object *ob;
for(ob = main->object.first; ob; ob= ob->id.next) {
for(md=ob->modifiers.first; md; ) {
if(md->type==eModifierType_Cloth) {
ModifierData *next;
MEM_freeN(((ClothModifierData *)md)->sim_parms);
MEM_freeN(((ClothModifierData *)md)->coll_parms);
MEM_freeN(((ClothModifierData *)md)->point_cache);
((ClothModifierData *)md)->sim_parms = NULL;
((ClothModifierData *)md)->coll_parms = NULL;
((ClothModifierData *)md)->point_cache = NULL;
next=md->next;
BLI_remlink(&ob->modifiers, md);
md = next;
}
else
md = md->next;
}
}
}
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
/* WATCH IT 2!: Userdef struct init has to be in src/usiblender.c! */

@ -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);

@ -53,6 +53,7 @@
#include "BLI_blenlib.h" /* util and noise functions */
#include "BLI_threads.h" /* For threadsfe guardedalloc malloc/calloc/free */
#include "IMB_imbuf.h" /* image buffer stuff */
#define GET_INT_FROM_POINTER(i) ((int)(long)(i)) /* should use BKE_utildefines.h */
/* -------------------------------------------------------------------------- */
/* stuff from util.h */
@ -321,42 +322,43 @@ int pluginapi_force_ref(void);
int pluginapi_force_ref(void)
{
return (int) mallocN +
(int) callocN +
(int) freeN +
(int) mallocT +
(int) callocT +
(int) freeT +
(int) allocImBuf +
(int) dupImBuf +
(int) freeImBuf +
(int) converttocmap +
(int) saveiff +
(int) loadiffmem +
(int) loadifffile +
(int) loadiffname +
(int) testiffname +
(int) onehalf +
(int) onethird +
(int) halflace +
(int) half_x +
(int) half_y +
(int) double_x +
(int) double_y +
(int) double_fast_x +
(int) double_fast_y +
(int) ispic +
(int) dit2 +
(int) dit0 +
(int) scaleImBuf +
(int) scalefastImBuf +
(int) scalefieldImBuf +
(int) scalefastfieldImBuf +
(int) hnoise +
(int) hnoisep +
(int) turbulence +
(int) turbulence1 +
(int) de_interlace +
(int) interlace +
(int) gamwarp;
return
GET_INT_FROM_POINTER( mallocN ) +
GET_INT_FROM_POINTER( callocN ) +
GET_INT_FROM_POINTER( freeN ) +
GET_INT_FROM_POINTER( mallocT ) +
GET_INT_FROM_POINTER( callocT ) +
GET_INT_FROM_POINTER( freeT ) +
GET_INT_FROM_POINTER( allocImBuf ) +
GET_INT_FROM_POINTER( dupImBuf ) +
GET_INT_FROM_POINTER( freeImBuf ) +
GET_INT_FROM_POINTER( converttocmap ) +
GET_INT_FROM_POINTER( saveiff ) +
GET_INT_FROM_POINTER( loadiffmem ) +
GET_INT_FROM_POINTER( loadifffile ) +
GET_INT_FROM_POINTER( loadiffname ) +
GET_INT_FROM_POINTER( testiffname ) +
GET_INT_FROM_POINTER( onehalf ) +
GET_INT_FROM_POINTER( onethird ) +
GET_INT_FROM_POINTER( halflace ) +
GET_INT_FROM_POINTER( half_x ) +
GET_INT_FROM_POINTER( half_y ) +
GET_INT_FROM_POINTER( double_x ) +
GET_INT_FROM_POINTER( double_y ) +
GET_INT_FROM_POINTER( double_fast_x ) +
GET_INT_FROM_POINTER( double_fast_y ) +
GET_INT_FROM_POINTER( ispic ) +
GET_INT_FROM_POINTER( dit2 ) +
GET_INT_FROM_POINTER( dit0 ) +
GET_INT_FROM_POINTER( scaleImBuf ) +
GET_INT_FROM_POINTER( scalefastImBuf ) +
GET_INT_FROM_POINTER( scalefieldImBuf ) +
GET_INT_FROM_POINTER( scalefastfieldImBuf ) +
GET_INT_FROM_POINTER( hnoise ) +
GET_INT_FROM_POINTER( hnoisep ) +
GET_INT_FROM_POINTER( turbulence ) +
GET_INT_FROM_POINTER( turbulence1 ) +
GET_INT_FROM_POINTER( de_interlace ) +
GET_INT_FROM_POINTER( interlace ) +
GET_INT_FROM_POINTER( gamwarp );
}

@ -180,7 +180,7 @@ static void openexr_header_compression(Header *header, int compression)
static short imb_save_openexr_half(struct ImBuf *ibuf, char *name, int flags)
{
int channels = ibuf->channels;
int width = ibuf->x;
int height = ibuf->y;
int write_zbuf = (flags & IB_zbuffloat) && ibuf->zbuf_float != NULL; // summarize
@ -194,7 +194,7 @@ static short imb_save_openexr_half(struct ImBuf *ibuf, char *name, int flags)
header.channels().insert ("R", Channel (HALF));
header.channels().insert ("G", Channel (HALF));
header.channels().insert ("B", Channel (HALF));
if (ibuf->depth==32)
if (ibuf->depth==32 && channels >= 4)
header.channels().insert ("A", Channel (HALF));
if (write_zbuf) // z we do as float always
header.channels().insert ("Z", Channel (FLOAT));
@ -207,29 +207,29 @@ static short imb_save_openexr_half(struct ImBuf *ibuf, char *name, int flags)
RGBAZ *to = pixels;
int xstride= sizeof (RGBAZ);
int ystride= xstride*width;
/* indicate used buffers */
frameBuffer.insert ("R", Slice (HALF, (char *) &pixels[0].r, xstride, ystride));
frameBuffer.insert ("G", Slice (HALF, (char *) &pixels[0].g, xstride, ystride));
frameBuffer.insert ("B", Slice (HALF, (char *) &pixels[0].b, xstride, ystride));
if (ibuf->depth==32)
if (ibuf->depth==32 && channels >= 4)
frameBuffer.insert ("A", Slice (HALF, (char *) &pixels[0].a, xstride, ystride));
if (write_zbuf)
frameBuffer.insert ("Z", Slice (FLOAT, (char *) ibuf->zbuf_float + 4*(height-1)*width,
frameBuffer.insert ("Z", Slice (FLOAT, (char *)(ibuf->zbuf_float + (height-1)*width),
sizeof(float), sizeof(float) * -width));
if(ibuf->rect_float) {
float *from;
for (int i = ibuf->y-1; i >= 0; i--)
{
from= ibuf->rect_float + 4*i*width;
from= ibuf->rect_float + channels*i*width;
for (int j = ibuf->x; j > 0; j--)
{
to->r = from[0];
to->g = from[1];
to->b = from[2];
to->a = from[3];
to->g = (channels >= 2)? from[1]: from[0];
to->b = (channels >= 3)? from[2]: from[0];
to->a = (channels >= 4)? from[3]: from[0];
to++; from += 4;
}
}
@ -239,14 +239,14 @@ static short imb_save_openexr_half(struct ImBuf *ibuf, char *name, int flags)
for (int i = ibuf->y-1; i >= 0; i--)
{
from= (unsigned char *)(ibuf->rect + i*width);
from= (unsigned char *)ibuf->rect + channels*i*width;
for (int j = ibuf->x; j > 0; j--)
{
to->r = (float)(from[0])/255.0;
to->g = (float)(from[1])/255.0;
to->b = (float)(from[2])/255.0;
to->a = (float)(from[3])/255.0;
to->g = (float)((channels >= 2)? from[1]: from[0])/255.0;
to->b = (float)((channels >= 3)? from[2]: from[0])/255.0;
to->a = (float)((channels >= 4)? from[3]: from[0])/255.0;
to++; from += 4;
}
}
@ -272,7 +272,7 @@ static short imb_save_openexr_half(struct ImBuf *ibuf, char *name, int flags)
static short imb_save_openexr_float(struct ImBuf *ibuf, char *name, int flags)
{
int channels = ibuf->channels;
int width = ibuf->x;
int height = ibuf->y;
int write_zbuf = (flags & IB_zbuffloat) && ibuf->zbuf_float != NULL; // summarize
@ -286,24 +286,29 @@ static short imb_save_openexr_float(struct ImBuf *ibuf, char *name, int flags)
header.channels().insert ("R", Channel (FLOAT));
header.channels().insert ("G", Channel (FLOAT));
header.channels().insert ("B", Channel (FLOAT));
if (ibuf->depth==32)
if (ibuf->depth==32 && channels >= 4)
header.channels().insert ("A", Channel (FLOAT));
if (write_zbuf)
header.channels().insert ("Z", Channel (FLOAT));
FrameBuffer frameBuffer;
OutputFile *file = new OutputFile(name, header);
float *first= ibuf->rect_float + 4*(height-1)*width;
int xstride = sizeof(float) * 4;
int xstride = sizeof(float) * channels;
int ystride = - xstride*width;
float *rect[4] = {NULL, NULL, NULL, NULL};
frameBuffer.insert ("R", Slice (FLOAT, (char *) first, xstride, ystride));
frameBuffer.insert ("G", Slice (FLOAT, (char *) (first+1), xstride, ystride));
frameBuffer.insert ("B", Slice (FLOAT, (char *) (first+2), xstride, ystride));
if (ibuf->depth==32)
frameBuffer.insert ("A", Slice (FLOAT, (char *) (first+3), xstride, ystride));
rect[0]= ibuf->rect_float + channels*(height-1)*width;
rect[1]= (channels >= 2)? rect[0]+1: rect[0];
rect[2]= (channels >= 3)? rect[0]+2: rect[0];
rect[3]= (channels >= 4)? rect[0]+3: rect[0];
frameBuffer.insert ("R", Slice (FLOAT, (char *)rect[0], xstride, ystride));
frameBuffer.insert ("G", Slice (FLOAT, (char *)rect[1], xstride, ystride));
frameBuffer.insert ("B", Slice (FLOAT, (char *)rect[2], xstride, ystride));
if (ibuf->depth==32 && channels >= 4)
frameBuffer.insert ("A", Slice (FLOAT, (char *)rect[3], xstride, ystride));
if (write_zbuf)
frameBuffer.insert ("Z", Slice (FLOAT, (char *) ibuf->zbuf_float + 4*(height-1)*width,
frameBuffer.insert ("Z", Slice (FLOAT, (char *) (ibuf->zbuf_float + (height-1)*width),
sizeof(float), sizeof(float) * -width));
file->setFrameBuffer (frameBuffer);
file->writePixels (height);

@ -251,7 +251,7 @@ struct ImBuf *imb_loadhdr(unsigned char *mem, int size, int flags)
}
/* ImBuf write */
static int fwritecolrs(FILE* file, int width, unsigned char* ibufscan, float* fpscan)
static int fwritecolrs(FILE* file, int width, int channels, unsigned char* ibufscan, float* fpscan)
{
int x, i, j, beg, c2, cnt=0;
fCOLOR fcol;
@ -266,16 +266,16 @@ static int fwritecolrs(FILE* file, int width, unsigned char* ibufscan, float* fp
for (i=0;i<width;i++) {
if (fpscan) {
fcol[RED] = fpscan[j];
fcol[GRN] = fpscan[j+1];
fcol[BLU] = fpscan[j+2];
fcol[GRN] = (channels >= 2)? fpscan[j+1]: fpscan[j];
fcol[BLU] = (channels >= 3)? fpscan[j+2]: fpscan[j];
} else {
fcol[RED] = (float)ibufscan[j] / 255.f;
fcol[GRN] = (float)ibufscan[j+1] / 255.f;
fcol[BLU] = (float)ibufscan[j+2] /255.f;
fcol[GRN] = (float)((channels >= 2)? ibufscan[j+1]: ibufscan[j]) / 255.f;
fcol[BLU] = (float)((channels >= 3)? ibufscan[j+2]: ibufscan[j]) / 255.f;
}
FLOAT2RGBE(fcol, rgbe);
copy_rgbe(rgbe, rgbe_scan[i]);
j+=4;
j+=channels;
}
if ((width < MINELEN) | (width > MAXELEN)) { /* OOBs, write out flat */
@ -348,18 +348,18 @@ short imb_savehdr(struct ImBuf *ibuf, char *name, int flags)
writeHeader(file, width, height);
if(ibuf->rect)
cp= (unsigned char *)(ibuf->rect + (height-1)*width);
cp= (unsigned char *)ibuf->rect + ibuf->channels*(height-1)*width;
if(ibuf->rect_float)
fp= ibuf->rect_float + 4*(height-1)*width;
fp= ibuf->rect_float + ibuf->channels*(height-1)*width;
for (y=height-1;y>=0;y--) {
if (fwritecolrs(file, width, cp, fp) < 0) {
if (fwritecolrs(file, width, ibuf->channels, cp, fp) < 0) {
fclose(file);
printf("HDR write error\n");
return 0;
}
if(cp) cp-= 4*width;
if(fp) fp-= 4*width;
if(cp) cp-= ibuf->channels*width;
if(fp) fp-= ibuf->channels*width;
}
fclose(file);

@ -31,6 +31,9 @@
#ifdef WIN32
#include <io.h>
#include <stddef.h>
#include <sys/types.h>
#include "mmap_win.h"
#endif
#include "BLI_blenlib.h"
@ -229,7 +232,7 @@ struct ImBuf *IMB_loadifffile(int file, int flags) {
size = BLI_filesize(file);
#if defined(AMIGA) || defined(__BeOS) || defined(WIN32)
#if defined(AMIGA) || defined(__BeOS)
mem= (int *)malloc(size);
if (mem==0) {
printf("Out of mem\n");

@ -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);

@ -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

@ -31,14 +31,5 @@
#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

@ -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) */

@ -43,80 +43,53 @@
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 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;
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 */
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;
float defgoal;
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 */
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

@ -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 */

@ -24,7 +24,7 @@
#
# ***** END GPL LICENSE BLOCK *****
SET(SRC makesdna.c ../../../../intern/guardedalloc/intern/mallocn.c)
SET(SRC makesdna.c ../../../../intern/guardedalloc/intern/mallocn.c ../../../../intern/guardedalloc/intern/mmap_win.c)
INCLUDE_DIRECTORIES(../../../../intern/guardedalloc ..)

@ -8,6 +8,7 @@ defines = []
root_build_dir=env['BF_BUILDDIR']
source_files = ['makesdna.c']
header_files = env.Glob('../*.h')
makesdna_tool = env.Copy()
dna = env.Copy()
@ -25,6 +26,7 @@ if sys.platform != 'cygwin':
makesdna_tool.Append (CCFLAGS = cflags)
makesdna_tool.Append (CPPDEFINES = defines)
makesdna_tool.Append (LIBPATH = '#'+root_build_dir+'/lib')
makesdna_tool.Append (LINKFLAGS = env['PLATFORM_LINKFLAGS'])
if env['BF_PROFILE']:
makesdna_tool.Append (LINKFLAGS = env['BF_PROFILE_FLAGS'])
@ -35,6 +37,7 @@ else:
dna_dict = dna.Dictionary()
dna.Depends ('dna.c', makesdna)
dna.Depends ('dna.c', header_files)
if env['OURPLATFORM'] != 'linuxcross':
dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna $TARGET")
else:

@ -639,11 +639,13 @@ int BPY_txt_do_python_Text( struct Text *text )
if( !strcmp( script->id.name + 2, text->id.name + 2 ) ) {
/* if this text is already a running script,
* just move to it: */
SpaceScript *sc;
newspace( curarea, SPACE_SCRIPT );
sc = curarea->spacedata.first;
sc->script = script;
return 1;
if (!G.background) {
SpaceScript *sc;
newspace( curarea, SPACE_SCRIPT );
sc = curarea->spacedata.first;
sc->script = script;
return 1;
}
}
script = script->id.next;
}
@ -943,10 +945,12 @@ int BPY_run_script(Script *script)
/* special case: called from the menu in the Scripts window
* we have to change sc->script pointer, since it'll be freed here.*/
if( curarea->spacetype == SPACE_SCRIPT ) {
SpaceScript *sc = curarea->spacedata.first;
sc->script = G.main->script.first; /* can be null, which is ok ... */
/* ... meaning no other script is running right now. */
if (!G.background) {
if( curarea->spacetype == SPACE_SCRIPT ) {
SpaceScript *sc = curarea->spacedata.first;
sc->script = G.main->script.first; /* can be null, which is ok ... */
/* ... meaning no other script is running right now. */
}
}
}

@ -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 );
}
/*****************************************************************************/

@ -143,8 +143,11 @@ static PyGetSetDef MTex_getseters[] = {
"Correct normal mapping for Texture space and Object space",
(void*) MTEX_VIEWSPACE },
{ "fromDupli", (getter) MTex_getFlag, (setter) MTex_setFlag,
"If object is duplicated by vertices, faces or particles, inherit texture coordinate from parent object",
"Dupli's instanced from verts, faces or particles, inherit texture coordinate from their parent",
(void*) MTEX_DUPLI_MAPTO },
{ "fromOrig", (getter) MTex_getFlag, (setter) MTex_setFlag,
"Dupli's derive their object coordinates from the original objects transformation",
(void*) MTEX_OB_DUPLI_ORIG },
{ "xproj", (getter) MTex_getProjX, (setter) MTex_setProjX,
"Projection of X axis to Texture space", NULL },
{ "yproj", (getter) MTex_getProjY, (setter) MTex_setProjY,

@ -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,

@ -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;
}

@ -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
======

@ -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

@ -515,7 +515,8 @@ class MTex:
@ivar neg: Negate texture values mode
@ivar noRGB: Convert texture RGB values to intensity values
@ivar correctNor: Correct normal mapping for Texture space and Object space
@ivar fromDupli: If object is duplicated by vertices, faces or particles, inherit texture coordinate from parent object
@ivar fromDupli: Dupli's instanced from verts, faces or particles, inherit texture coordinate from their parent
@ivar fromOrig: Dupli's derive their object coordinates from the original objects transformation
@ivar xproj: Projection of X axis to Texture space. L{Proj}
@ivar yproj: Projection of Y axis to Texture space. L{Proj}
@ivar zproj: Projection of Z axis to Texture space. L{Proj}

@ -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 */

@ -117,7 +117,7 @@ void makeraytree(Render *re)
VlakRen *vlr= NULL;
float min[3], max[3], co1[3], co2[3], co3[3], co4[3];
double lasttime= PIL_check_seconds_timer();
int v, totface = 0;
int v, totv = 0, totface = 0;
INIT_MINMAX(min, max);
@ -175,7 +175,7 @@ void makeraytree(Render *re)
if(re->excludeob && obr->ob == re->excludeob)
continue;
for(v=0; v<obr->totvlak; v++) {
for(v=0; v<obr->totvlak; v++, totv++) {
if((v & 255)==0) {
double time= PIL_check_seconds_timer();
@ -184,7 +184,7 @@ void makeraytree(Render *re)
break;
if(time-lasttime>1.0f) {
char str[32];
sprintf(str, "Filling Octree: %d", v);
sprintf(str, "Filling Octree: %d", totv);
re->i.infostr= str;
re->stats_draw(&re->i);
re->i.infostr= NULL;

@ -319,22 +319,27 @@ static void halo_tile(RenderPart *pa, RenderLayer *rl)
static void lamphalo_tile(RenderPart *pa, RenderLayer *rl)
{
RenderLayer *rlpp[RE_MAX_OSA];
ShadeInput shi;
float *pass= rl->rectf;
float fac;
float *pass;
float fac, col[4];
long *rd= pa->rectdaps;
int x, y, *rz= pa->rectz;
int *rz= pa->rectz;
int x, y, sample, totsample, fullsample, od;
totsample= get_sample_layers(pa, rl, rlpp);
fullsample= (totsample > 1);
shade_input_initialize(&shi, pa, rl, 0); /* this zero's ShadeInput for us */
for(y=pa->disprect.ymin; y<pa->disprect.ymax; y++) {
for(x=pa->disprect.xmin; x<pa->disprect.xmax; x++, rz++, pass+=4) {
for(od=0, y=pa->disprect.ymin; y<pa->disprect.ymax; y++) {
for(x=pa->disprect.xmin; x<pa->disprect.xmax; x++, rz++, od++) {
calc_view_vector(shi.view, x, y);
if(rd && *rd) {
PixStr *ps= (PixStr *)*rd;
int samp, totsamp= 0;
int count, totsamp= 0, mask= 0;
while(ps) {
if(R.r.mode & R_ORTHO)
@ -342,15 +347,64 @@ static void lamphalo_tile(RenderPart *pa, RenderLayer *rl)
else
calc_renderco_zbuf(shi.co, shi.view, ps->z);
totsamp+= samp= count_mask(ps->mask);
fac= ((float)samp)/(float)R.osa;
renderspothalo(&shi, pass, fac);
totsamp+= count= count_mask(ps->mask);
mask |= ps->mask;
col[0]= col[1]= col[2]= col[3]= 0.0f;
renderspothalo(&shi, col, 1.0f);
if(fullsample) {
for(sample=0; sample<totsample; sample++) {
if(ps->mask & (1 << sample)) {
pass= rlpp[sample]->rectf + od*4;
pass[0]+= col[0];
pass[1]+= col[1];
pass[2]+= col[2];
pass[3]+= col[3];
if(pass[3]>1.0f) pass[3]= 1.0f;
}
}
}
else {
fac= ((float)count)/(float)R.osa;
pass= rl->rectf + od*4;
pass[0]+= fac*col[0];
pass[1]+= fac*col[1];
pass[2]+= fac*col[2];
pass[3]+= fac*col[3];
if(pass[3]>1.0f) pass[3]= 1.0f;
}
ps= ps->next;
}
if(totsamp<R.osa) {
fac= ((float)R.osa-totsamp)/(float)R.osa;
shi.co[2]= 0.0f;
renderspothalo(&shi, pass, fac);
col[0]= col[1]= col[2]= col[3]= 0.0f;
renderspothalo(&shi, col, 1.0f);
if(fullsample) {
for(sample=0; sample<totsample; sample++) {
if(!(mask & (1 << sample))) {
pass= rlpp[sample]->rectf + od*4;
pass[0]+= col[0];
pass[1]+= col[1];
pass[2]+= col[2];
pass[3]+= col[3];
if(pass[3]>1.0f) pass[3]= 1.0f;
}
}
}
else {
fac= ((float)R.osa-totsamp)/(float)R.osa;
pass= rl->rectf + od*4;
pass[0]+= fac*col[0];
pass[1]+= fac*col[1];
pass[2]+= fac*col[2];
pass[3]+= fac*col[3];
if(pass[3]>1.0f) pass[3]= 1.0f;
}
}
}
else {
@ -359,7 +413,17 @@ static void lamphalo_tile(RenderPart *pa, RenderLayer *rl)
else
calc_renderco_zbuf(shi.co, shi.view, *rz);
renderspothalo(&shi, pass, 1.0f);
col[0]= col[1]= col[2]= col[3]= 0.0f;
renderspothalo(&shi, col, 1.0f);
for(sample=0; sample<totsample; sample++) {
pass= rlpp[sample]->rectf + od*4;
pass[0]+= col[0];
pass[1]+= col[1];
pass[2]+= col[2];
pass[3]+= col[3];
if(pass[3]>1.0f) pass[3]= 1.0f;
}
}
if(rd) rd++;
@ -1366,19 +1430,8 @@ static void shade_sample_sss(ShadeSample *ssamp, Material *mat, ObjectInstanceRe
/* texture blending */
texfac= shi->mat->sss_texfac;
alpha= shr.col[3];
alpha= shr.combined[3];
*area *= alpha;
if(texfac == 0.0f) {
if(shr.col[0]!=0.0f) color[0] *= alpha/shr.col[0];
if(shr.col[1]!=0.0f) color[1] *= alpha/shr.col[1];
if(shr.col[2]!=0.0f) color[2] *= alpha/shr.col[2];
}
else if(texfac != 1.0f && (alpha > FLT_EPSILON)) {
if(shr.col[0]!=0.0f) color[0] *= alpha*pow(shr.col[0]/alpha, texfac)/shr.col[0];
if(shr.col[1]!=0.0f) color[1] *= alpha*pow(shr.col[1]/alpha, texfac)/shr.col[1];
if(shr.col[2]!=0.0f) color[2] *= alpha*pow(shr.col[2]/alpha, texfac)/shr.col[2];
}
}
static void zbufshade_sss_free(RenderPart *pa)
@ -2242,8 +2295,11 @@ static void do_bake_shade(void *handle, int x, int y, float u, float v)
}
}
if (hit && bs->type==RE_BAKE_DISPLACEMENT) {;
bake_displacement(handle, shi, (dir==-1)? mindist:-mindist, x, y);
if (bs->type==RE_BAKE_DISPLACEMENT) {
if(hit)
bake_displacement(handle, shi, (dir==-1)? mindist:-mindist, x, y);
else
bake_displacement(handle, shi, 0.0f, x, y);
return;
}

@ -1236,6 +1236,7 @@ static void shade_one_light(LampRen *lar, ShadeInput *shi, ShadeResult *shr, int
else {
Crossf(cross, lv, vn);
Crossf(vnor, cross, vn);
Normalize(vnor);
}
if(ma->strand_surfnor > 0.0f) {
@ -1253,6 +1254,7 @@ static void shade_one_light(LampRen *lar, ShadeInput *shi, ShadeResult *shr, int
float cross[3];
Crossf(cross, lv, shi->tang);
Crossf(vnor, cross, shi->tang);
Normalize(vnor);
vnor[0]= -vnor[0];vnor[1]= -vnor[1];vnor[2]= -vnor[2];
vn= vnor;
}
@ -1550,6 +1552,24 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr)
shr->col[1]= shi->g*shi->alpha;
shr->col[2]= shi->b*shi->alpha;
shr->col[3]= shi->alpha;
if((ma->sss_flag & MA_DIFF_SSS) && !has_sss_tree(&R, ma)) {
if(ma->sss_texfac == 0.0f) {
shi->r= shi->g= shi->b= shi->alpha= 1.0f;
shr->col[0]= shr->col[1]= shr->col[2]= shr->col[3]= 1.0f;
}
else {
shi->r= pow(shi->r, ma->sss_texfac);
shi->g= pow(shi->g, ma->sss_texfac);
shi->b= pow(shi->b, ma->sss_texfac);
shi->alpha= pow(shi->alpha, ma->sss_texfac);
shr->col[0]= pow(shr->col[0], ma->sss_texfac);
shr->col[1]= pow(shr->col[1], ma->sss_texfac);
shr->col[2]= pow(shr->col[2], ma->sss_texfac);
shr->col[3]= pow(shr->col[3], ma->sss_texfac);
}
}
}
if(ma->mode & MA_SHLESS) {
@ -1616,29 +1636,31 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr)
if (shr->shad[2] < 0) shr->shad[2] = 0;
if(ma->sss_flag & MA_DIFF_SSS) {
float sss[3], col[3], alpha, invalpha, texfac= ma->sss_texfac;
float sss[3], col[3], invalpha, texfac= ma->sss_texfac;
/* this will return false in the preprocess stage */
if(sample_sss(&R, ma, shi->co, sss)) {
alpha= shr->col[3];
invalpha= (alpha > FLT_EPSILON)? 1.0f/alpha: 1.0f;
invalpha= (shr->col[3] > FLT_EPSILON)? 1.0f/shr->col[3]: 1.0f;
if(texfac==0.0f) {
VECCOPY(col, shr->col);
VecMulf(col, invalpha);
}
else if(texfac==1.0f) {
col[0]= col[1]= col[2]= 1.0f;
VecMulf(col, invalpha);
}
else {
VECCOPY(col, shr->col);
col[0]= alpha*pow(col[0]*invalpha, 1.0f-texfac);
col[1]= alpha*pow(col[1]*invalpha, 1.0f-texfac);
col[2]= alpha*pow(col[2]*invalpha, 1.0f-texfac);
VecMulf(col, invalpha);
col[0]= pow(col[0], 1.0f-texfac);
col[1]= pow(col[1], 1.0f-texfac);
col[2]= pow(col[2], 1.0f-texfac);
}
shr->diff[0]= sss[0]*col[0]*invalpha;
shr->diff[1]= sss[1]*col[1]*invalpha;
shr->diff[2]= sss[2]*col[2]*invalpha;
shr->diff[0]= sss[0]*col[0];
shr->diff[1]= sss[1]*col[1];
shr->diff[2]= sss[2]*col[2];
if(shi->combinedflag & SCE_PASS_SHADOW) {
shr->shad[0]= shr->diff[0];

File diff suppressed because it is too large Load Diff

@ -2289,7 +2289,6 @@ void fluidsimFilesel(char *selection)
void do_object_panels(unsigned short event)
{
Object *ob;
Effect *eff;
ob= OBACT;
if(ob==NULL)
@ -2477,21 +2476,6 @@ void do_object_panels(unsigned short event)
allqueue(REDRAWVIEW3D, 0);
}
break;
default:
if(event>=B_SELEFFECT && event<B_SELEFFECT+MAX_EFFECT) {
int a=B_SELEFFECT;
eff= ob->effect.first;
while(eff) {
if(event==a) eff->flag |= SELECT;
else eff->flag &= ~SELECT;
a++;
eff= eff->next;
}
allqueue(REDRAWBUTSOBJECT, 0);
}
}
}
@ -2856,9 +2840,6 @@ void object_panel_constraint(char *context)
void do_effects_panels(unsigned short event)
{
Object *ob;
Base *base;
Effect *eff, *effn;
PartEff *paf;
ModifierData *md;
ParticleSystemModifierData *psmd;
ParticleSystem *psys;
@ -2887,114 +2868,6 @@ void do_effects_panels(unsigned short event)
G.scene->r.framelen/= G.scene->r.images;
allqueue(REDRAWALL, 0);
break;
case B_NEWEFFECT:
if(ob) {
if(ob->fluidsimFlag & OB_FLUIDSIM_ENABLE) {
// NT particles and fluid meshes currently dont work together -> switch off beforehand
if(ob->fluidsimSettings->type == OB_FLUIDSIM_DOMAIN) {
pupmenu("Fluidsim Particle Error%t|Please disable the fluidsim domain before activating particles.%x0");
break;
//ob->fluidsimFlag = 0; ob->fluidsimSettings->type = 0; allqueue(REDRAWVIEW3D, 0);
}
}
if (BLI_countlist(&ob->effect)==MAX_EFFECT)
error("Unable to add: effect limit reached");
else
copy_act_effect(ob);
}
DAG_scene_sort(G.scene);
BIF_undo_push("New effect");
allqueue(REDRAWBUTSOBJECT, 0);
break;
case B_DELEFFECT:
if(ob==NULL || ob->type!=OB_MESH) break;
eff= ob->effect.first;
while(eff) {
effn= eff->next;
if(eff->flag & SELECT) {
BLI_remlink(&ob->effect, eff);
free_effect(eff);
break;
}
eff= effn;
}
BIF_undo_push("Delete effect");
allqueue(REDRAWVIEW3D, 0);
allqueue(REDRAWBUTSOBJECT, 0);
break;
case B_NEXTEFFECT:
if(ob==0 || ob->type!=OB_MESH) break;
eff= ob->effect.first;
while(eff) {
if(eff->flag & SELECT) {
if(eff->next) {
eff->flag &= ~SELECT;
eff->next->flag |= SELECT;
}
break;
}
eff= eff->next;
}
allqueue(REDRAWBUTSOBJECT, 0);
break;
case B_PREVEFFECT:
if(ob==0 || ob->type!=OB_MESH) break;
eff= ob->effect.first;
while(eff) {
if(eff->flag & SELECT) {
if(eff->prev) {
eff->flag &= ~SELECT;
eff->prev->flag |= SELECT;
}
break;
}
eff= eff->next;
}
allqueue(REDRAWBUTSOBJECT, 0);
break;
case B_EFFECT_DEP:
DAG_scene_sort(G.scene);
/* no break, pass on */
case B_CALCEFFECT:
if(ob==NULL || ob->type!=OB_MESH) break;
eff= ob->effect.first;
while(eff) {
if(eff->flag & SELECT) {
if(eff->type==EFF_PARTICLE) build_particle_system(ob);
}
eff= eff->next;
}
allqueue(REDRAWVIEW3D, 0);
allqueue(REDRAWBUTSOBJECT, 0);
break;
case B_PAF_SET_VG:
paf= give_parteff(ob);
if(paf) {
bDeformGroup *dg= get_named_vertexgroup(ob, paf->vgroupname);
if(dg)
paf->vertgroup= get_defgroup_num(ob, dg)+1;
else
paf->vertgroup= 0;
DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
allqueue(REDRAWVIEW3D, 0);
}
break;
case B_PAF_SET_VG1:
paf= give_parteff(ob);
if(paf) {
bDeformGroup *dg= get_named_vertexgroup(ob, paf->vgroupname_v);
if(dg)
paf->vertgroup_v= get_defgroup_num(ob, dg)+1;
else
paf->vertgroup_v= 0;
DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
allqueue(REDRAWVIEW3D, 0);
}
break;
case B_PARTBROWSE:
if(G.buts->menunr== -2) {
activate_databrowse((ID *)G.buts->lockpoin, ID_PA, 0, B_PARTBROWSE, &G.buts->menunr, do_effects_panels);
@ -3288,43 +3161,6 @@ void do_effects_panels(unsigned short event)
DAG_object_flush_update(G.scene, ob, OB_RECALC_OB);
allqueue(REDRAWVIEW3D, 0);
break;
case B_RECALCAL:
if (G.vd==NULL)
break;
base= FIRSTBASE;
while(base) {
if(base->lay & G.vd->lay) {
ob= base->object;
eff= ob->effect.first;
while(eff) {
if(eff->flag & SELECT) {
if(eff->type==EFF_PARTICLE) build_particle_system(ob);
}
eff= eff->next;
}
}
base= base->next;
}
allqueue(REDRAWVIEW3D, 0);
break;
default:
if(event>=B_SELEFFECT && event<B_SELEFFECT+MAX_EFFECT) {
ob= OBACT;
if(ob) {
int a=B_SELEFFECT;
eff= ob->effect.first;
while(eff) {
if(event==a) eff->flag |= SELECT;
else eff->flag &= ~SELECT;
a++;
eff= eff->next;
}
allqueue(REDRAWBUTSOBJECT, 0);
}
}
}
}

@ -2043,12 +2043,15 @@ static void render_panel_output(void)
for(b=2; b>=0; b--)
for(a=0; a<3; a++)
uiDefButBitS(block, TOG, 1<<(3*b+a), 800,"", (short)(10+18*a),(short)(10+14*b),16,12, &G.winpos, 0, 0, 0, 0, "Render window placement on screen");
uiBlockEndAlign(block);
#ifdef WITH_OPENEXR
uiBlockBeginAlign(block);
uiDefButBitI(block, TOG, R_EXR_TILE_FILE, B_REDR, "Save Buffers", 72, 31, 120, 19, &G.scene->r.scemode, 0.0, 0.0, 0, 0, "Save tiles for all RenderLayers and used SceneNodes to files in the temp directory (saves memory, allows Full Sampling)");
if(G.scene->r.scemode & R_EXR_TILE_FILE)
uiDefButBitI(block, TOG, R_FULL_SAMPLE, B_REDR, "FullSample", 192, 31, 118, 19, &G.scene->r.scemode, 0.0, 0.0, 0, 0, "Saves for every OSA sample the entire RenderLayer results (Higher quality sampling but slower)");
uiBlockEndAlign(block);
#endif
uiDefButS(block, MENU, B_REDR, "Render Display %t|Render Window %x1|Image Editor %x0|Full Screen %x2",
72, 10, 120, 19, &G.displaymode, 0.0, (float)R_DISPLAYWIN, 0, 0, "Sets render output display");

@ -3440,9 +3440,9 @@ static void material_panel_map_input(Object *ob, Material *ma)
uiBlockEndAlign(block);
if(ELEM(mtex->texco, TEXCO_UV, TEXCO_ORCO))
uiDefButBitS(block, TOG, MTEX_DUPLI_MAPTO, B_MATPRV, "From Dupli", 820,140,88,18, &(mtex->texflag), 0, 0, 0, 0, "If object is duplicated by vertices, faces or particles, inherit texture coordinate from parent object");
uiDefButBitS(block, TOG, MTEX_DUPLI_MAPTO, B_MATPRV, "From Dupli", 820,140,88,18, &(mtex->texflag), 0, 0, 0, 0, "Dupli's instanced from verts, faces or particles, inherit texture coordinate from their parent");
else if(mtex->texco == TEXCO_OBJECT)
uiDefButBitS(block, TOG, MTEX_OB_DUPLI_ORIG, B_MATPRV, "From Original", 820,140,88,18, &(mtex->texflag), 0, 0, 0, 0, "If object is duplicated, use object coordinates as if the object was in its original position");
uiDefButBitS(block, TOG, MTEX_OB_DUPLI_ORIG, B_MATPRV, "From Original", 820,140,88,18, &(mtex->texflag), 0, 0, 0, 0, "Dupli's derive their object coordinates from the original objects transformation");
/* COORDS */

@ -635,9 +635,11 @@ static void draw_channel_names(void)
else {
/* for normal channels
* - use 3 shades of color group/standard colour for 3 indention level
* - use standard colour if enabled
* - only use group colors if allowed to, and if actually feasible
*/
if ((G.saction->flag & SACTION_DRAWGCOLORS) && (grp)) {
if ( !(G.saction->flag & SACTION_NODRAWGCOLORS) &&
(grp) && (grp->customCol) )
{
char cp[3];
if (indent == 2) {

@ -2238,7 +2238,7 @@ void drawimagespace(ScrArea *sa, void *spacedata)
else if(ibuf->rect_float && ibuf->channels==4)
sima_draw_alpha_pixelsf(x1_rep, y1_rep, ibuf->x, ibuf->y, ibuf->rect_float);
}
else if(sima->flag & SI_SHOW_ZBUF && ((ibuf->zbuf || ibuf->zbuf_float || (ibuf->channels==1)) == 0)) {
else if(sima->flag & SI_SHOW_ZBUF && (ibuf->zbuf || ibuf->zbuf_float || (ibuf->channels==1))) {
if(ibuf->zbuf)
sima_draw_zbuf_pixels(x1_rep, y1_rep, ibuf->x, ibuf->y, ibuf->zbuf);
else if(ibuf->zbuf_float)

@ -53,6 +53,7 @@
#include "BLI_winstuff.h"
#endif
#include "BMF_Api.h"
#include "BKE_global.h"
#include "BKE_library.h"
@ -217,17 +218,40 @@ static void draw_file(SpaceImaSel *simasel, short sx, short sy, struct direntry
short soffs;
char fname[FILE_MAXFILE];
float sw;
float x,y;
BLI_strncpy(fname,file->relname, FILE_MAXFILE);
sw = shorten_string(simasel, fname, simasel->prv_w );
soffs = (simasel->prv_w + TILE_BORDER_X*4 - sw) / 2;
ui_rasterpos_safe(sx+soffs, sy - simasel->prv_h - TILE_BORDER_Y*2 - U.fontsize, simasel->aspect);
x = (float)(sx+soffs);
y = (float)(sy - simasel->prv_h - TILE_BORDER_Y*2 - U.fontsize);
ui_rasterpos_safe(x, y, simasel->aspect);
/* handling of international fonts.
TODO: proper support for utf8 in languages different from ja_JP abd zh_CH
needs update of iconv in lib/windows to support getting the system language string
*/
#ifdef WITH_ICONV
{
struct LANGMenuEntry *lme;
lme = find_language(U.language);
if ((lme !=NULL) && (!strcmp(lme->code, "ja_JP") ||
!strcmp(lme->code, "zh_CN")))
{
BIF_RasterPos(x, y);
#ifdef WIN32
BIF_DrawString(simasel->curfont, fname, ((U.transopts & USER_TR_MENUS) | CONVERT_TO_UTF8));
BIF_DrawString(simasel->curfont, fname, ((U.transopts & USER_TR_MENUS) | CONVERT_TO_UTF8));
#else
BIF_DrawString(simasel->curfont, fname, (U.transopts & USER_TR_MENUS));
BIF_DrawString(simasel->curfont, fname, (U.transopts & USER_TR_MENUS));
#endif
} else {
BMF_DrawString(simasel->curfont, fname);
}
}
#else
BMF_DrawString(simasel->curfont, fname);
#endif /* WITH_ICONV */
}
static void draw_imasel_bookmarks(ScrArea *sa, SpaceImaSel *simasel)

@ -1851,11 +1851,17 @@ static void ipo_editvertex_buts(uiBlock *block, SpaceIpo *si, float min, float m
void do_ipobuts(unsigned short event)
{
Object *ob= OBACT;
Object *ob;
EditIpo *ei;
if(G.sipo->from==NULL) return;
/* use G.sipo->from (which should be an object) so that pinning ipo's will still work ok */
if(GS(G.sipo->from->name) == ID_OB)
ob= (Object *)(G.sipo->from);
else
ob= OBACT;
switch(event) {
case B_IPO_REDR:
ei= get_active_editipo();

@ -2866,143 +2866,6 @@ static int drawDispList(Base *base, int dt)
return retval;
}
/* ******************************** */
static void draw_particle_system(Base *base, PartEff *paf)
{
Object *ob= base->object;
Particle *pa;
float ptime, ctime, vec[3], vec1[3], mat[4][4];
int a, totpart;
pa= paf->keys;
// FSPARTICLE always rebuild fluid particle system upon change...
if( (pa==NULL)
|| ( (ob->fluidsimFlag & OB_FLUIDSIM_ENABLE) && (ob->fluidsimSettings) && (ob->fluidsimSettings->type == OB_FLUIDSIM_PARTICLE))
) {
build_particle_system(ob);
pa= paf->keys;
if(pa==NULL) return;
}
myloadmatrix(G.vd->viewmat);
/* flag abuse... but I need working code too now. This feature doesnt work for per frame animated objects */
if( (base->flag & OB_FROMDUPLI) && (ob->flag & OB_FROMGROUP) ) {
Mat4MulMat4(mat, paf->imat, ob->obmat);
mymultmatrix(mat);
}
if(ob->ipoflag & OB_OFFS_PARTICLE) ptime= give_timeoffset(ob);
else ptime= 0.0;
ctime= bsystem_time(ob, (float)(G.scene->r.cfra), ptime);
glPointSize(1.0);
if(paf->stype==PAF_VECT) glBegin(GL_LINES);
else glBegin(GL_POINTS);
totpart= (paf->disp*paf->totpart)/100;
for(a=0; a<totpart; a++, pa+=paf->totkey) {
if(ctime > pa->time) {
if(ctime < pa->time+pa->lifetime) {
if(paf->stype==PAF_VECT) {
where_is_particle(paf, pa, ctime, vec);
where_is_particle(paf, pa, ctime+1.0, vec1);
glVertex3fv(vec);
glVertex3fv(vec1);
}
else {
where_is_particle(paf, pa, ctime, vec);
glVertex3fv(vec);
}
}
}
}
glEnd();
myloadmatrix(G.vd->viewmat);
mymultmatrix(ob->obmat); // bring back local matrix for dtx
}
static void draw_static_particle_system(Object *ob, PartEff *paf, int dt)
{
Particle *pa;
float ctime, mtime, vec[3], veco[3];
int a, use_norm=0, totpart;
pa= paf->keys;
// FSPARTICLE always rebuild upon change...
if( (pa==NULL)
|| ( (ob->fluidsimFlag & OB_FLUIDSIM_ENABLE) && (ob->fluidsimSettings) && (ob->fluidsimSettings->type == OB_FLUIDSIM_PARTICLE))
) {
build_particle_system(ob);
pa= paf->keys;
if(pa==NULL) return;
}
if(paf->stype==PAF_VECT) {
if(dt>OB_WIRE) {
/* shaded/texture mode: we still draw solid, so have to set materials */
if(dt>OB_SOLID) init_gl_materials(ob, 0);
glEnable(GL_LIGHTING);
set_gl_material(paf->omat);
use_norm= 1;
}
}
else {
glPointSize(1.0);
glBegin(GL_POINTS);
}
totpart= (paf->disp*paf->totpart)/100;
for(a=0; a<totpart; a++, pa+=paf->totkey) {
if(paf->stype==PAF_VECT) {
glBegin(GL_LINE_STRIP);
where_is_particle(paf, pa, pa->time, veco);
mtime= pa->time+pa->lifetime+paf->staticstep;
for(ctime= pa->time+paf->staticstep; ctime<mtime; ctime+=paf->staticstep) {
where_is_particle(paf, pa, ctime, vec);
if(use_norm) {
float no[3];
VECSUB(no, vec, veco);
glNormal3fv(no);
}
glVertex3fv(veco);
VECCOPY(veco, vec);
}
glVertex3fv(veco);
glEnd();
}
else {
mtime= pa->time+pa->lifetime+paf->staticstep-1;
for(ctime= pa->time; ctime<mtime; ctime+=paf->staticstep) {
where_is_particle(paf, pa, ctime, vec);
glVertex3fv(vec);
}
}
}
if(paf->stype==PAF_VECT) {
glDisable(GL_LIGHTING);
}
else {
glEnd();
}
}
/* unified drawing of all new particle systems draw types except dupli ob & group */
/* mostly tries to use vertex arrays for speed */
@ -4983,17 +4846,6 @@ void draw_object(Base *base, int flag)
if (!(base->flag&OB_RADIO)) {
empty_object= draw_mesh_object(base, dt, flag);
if(flag!=DRAW_CONSTCOLOR) dtx &= ~OB_DRAWWIRE; // mesh draws wire itself
if(G.obedit!=ob && warning_recursive==0) {
PartEff *paf = give_parteff(ob);
if(paf) {
if(col || (ob->flag & SELECT)) cpack(0xFFFFFF); /* for visibility, also while wpaint */
if(paf->flag & PAF_STATIC) draw_static_particle_system(ob, paf, dt);
else if((flag & DRAW_PICKING) == 0) draw_particle_system(base, paf); // selection errors happen to easy
if(col) cpack(col);
}
}
}
break;

@ -50,6 +50,7 @@
#include "BIF_space.h"
#include "BIF_drawscene.h"
#include "BIF_editseq.h"
#include "BIF_poseobject.h"
#include "BSE_view.h"
@ -73,6 +74,8 @@ void set_scene(Scene *sce) /* also see scene.c: set_scene_bg() */
exit_paint_modes();
set_last_seq(NULL);
G.scene= sce;
sc= G.main->screen.first;

@ -1178,6 +1178,7 @@ void verify_pchan2achan_grouping (bAction *act, bPose *pose, char name[])
}
}
}
grp->customCol= agrp->customCol;
BLI_addtail(&act->groups, grp);
}
@ -1188,6 +1189,50 @@ void verify_pchan2achan_grouping (bAction *act, bPose *pose, char name[])
}
}
/* This function is used when the user specifically requests to sync changes of pchans + bone groups
* to achans + action groups. All achans are detached from their groups, and all groups are destroyed.
* They are then recreated when the achans are reassigned to groups.
*
* Note: This doesn't preserve hand-created groups, and will operate on ALL action-channels regardless of
* whether they were selected or active. More specific filtering can be added later.
*/
void sync_pchan2achan_grouping ()
{
void *data;
short datatype;
bAction *act;
bActionChannel *achan, *next, *last;
bPose *pose;
/* determine what type of data we are operating on */
data = get_action_context(&datatype);
if ((datatype != ACTCONT_ACTION) || (data==NULL)) return;
if ((G.saction->pin) || (OBACT==NULL) || (OBACT->type != OB_ARMATURE)) {
error("Action doesn't belong to active armature");
return;
}
/* get data */
act= (bAction *)data;
pose= OBACT->pose;
/* remove achan->group links, then delete all groups */
for (achan= act->chanbase.first; achan; achan= achan->next)
achan->grp = NULL;
BLI_freelistN(&act->groups);
/* loop through all achans, reassigning them to groups (colours are resyncronised) */
last= act->chanbase.last;
for (achan= act->chanbase.first; achan && achan!=last; achan= next) {
next= achan->next;
verify_pchan2achan_grouping(act, pose, achan->name);
}
/* undo and redraw */
BIF_undo_push("Sync Armature-Data and Action");
allqueue(REDRAWACTION, 0);
}
/* **************************************************** */
/* TRANSFORM TOOLS */
@ -3162,6 +3207,106 @@ void column_select_action_keys (int mode)
BLI_freelistN(&elems);
}
/* borderselect: for action-channels */
void borderselect_actionchannels (void)
{
ListBase act_data = {NULL, NULL};
bActListElem *ale;
int filter;
void *data;
short datatype;
rcti rect;
rctf rectf;
int val, selectmode;
short mval[2];
float ymin, ymax;
/* determine what type of data we are operating on */
data = get_action_context(&datatype);
if (data == NULL) return;
if (datatype != ACTCONT_ACTION) return;
/* draw and handle the borderselect stuff (ui) and get the select rect */
if ( (val = get_border(&rect, 3)) ) {
selectmode= ((val==LEFTMOUSE) ? SELECT_ADD : SELECT_SUBTRACT);
mval[0]= rect.xmin;
mval[1]= rect.ymin+2;
areamouseco_to_ipoco(G.v2d, mval, &rectf.xmin, &rectf.ymin);
mval[0]= rect.xmax;
mval[1]= rect.ymax-2;
areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax);
ymax = CHANNELHEIGHT/2;
/* filter data */
filter= (ACTFILTER_VISIBLE | ACTFILTER_CHANNELS);
actdata_filter(&act_data, filter, data, datatype);
/* loop over data, doing border select */
for (ale= act_data.first; ale; ale= ale->next) {
ymin=ymax-(CHANNELHEIGHT+CHANNELSKIP);
/* if channel is within border-select region, alter it */
if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))) {
/* only the following types can be selected */
switch (ale->type) {
case ACTTYPE_GROUP: /* action group */
{
bActionGroup *agrp= (bActionGroup *)ale->data;
if (selectmode == SELECT_ADD)
agrp->flag |= AGRP_SELECTED;
else
agrp->flag &= ~AGRP_SELECTED;
}
break;
case ACTTYPE_ACHAN: /* action channel */
{
bActionChannel *achan= (bActionChannel *)ale->data;
if (selectmode == SELECT_ADD)
achan->flag |= ACHAN_SELECTED;
else
achan->flag &= ~ACHAN_SELECTED;
}
break;
case ACTTYPE_CONCHAN: /* constraint channel */
{
bConstraintChannel *conchan = (bConstraintChannel *)ale->data;
if (selectmode == SELECT_ADD)
conchan->flag |= CONSTRAINT_CHANNEL_SELECT;
else
conchan->flag &= ~CONSTRAINT_CHANNEL_SELECT;
}
break;
case ACTTYPE_ICU: /* ipo-curve channel */
{
IpoCurve *icu = (IpoCurve *)ale->data;
if (selectmode == SELECT_ADD)
icu->flag |= IPO_SELECT;
else
icu->flag &= ~IPO_SELECT;
}
break;
}
}
ymax=ymin;
}
/* cleanup */
BLI_freelistN(&act_data);
BIF_undo_push("Border Select Action");
allqueue(REDRAWIPO, 0);
allqueue(REDRAWACTION, 0);
allqueue(REDRAWNLA, 0);
}
}
/* some quick defines for borderselect modes */
enum {
@ -4365,7 +4510,9 @@ void winqreadactionspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
borderselect_markers();
}
else {
if (mval[0] >= ACTWIDTH)
if (mval[0] <= ACTWIDTH)
borderselect_actionchannels();
else
borderselect_action();
}
break;

@ -2032,15 +2032,17 @@ IpoCurve *verify_ipocurve(ID *from, short blocktype, char *actname, char *constn
#define BEZT_INSERT_THRESH 0.00001
/* Binary search algorithm for finding where to insert BezTriple. (for use by insert_bezt_icu)
* Returns the index to insert before, OR the -(index + 1) to replace.
* Caller will need to decrement index if > 0 to add to right place (and avoid segfaults)
* Returns the index to insert at (data already at that index will be offset if replace is 0)
*/
static int binarysearch_bezt_index (BezTriple array[], BezTriple *item, int arraylen)
static int binarysearch_bezt_index (BezTriple array[], BezTriple *item, int arraylen, short *replace)
{
int start=0, end=arraylen;
int loopbreaker= 0, maxloop= arraylen * 2;
const float frame= (item)? item->vec[1][0] : 0.0f;
/* initialise replace-flag first */
*replace= 0;
/* sneaky optimisations (don't go through searching process if...):
* - keyframe to be added is to be added out of current bounds
* - keyframe to be added would replace one of the existing ones on bounds
@ -2053,17 +2055,21 @@ static int binarysearch_bezt_index (BezTriple array[], BezTriple *item, int arra
/* check whether to add before/after/on */
float framenum;
/* 'First' Keyframe */
/* 'First' Keyframe (when only one keyframe, this case is used) */
framenum= array[0].vec[1][0];
if (IS_EQT(frame, framenum, BEZT_INSERT_THRESH))
return -1;
if (IS_EQT(frame, framenum, BEZT_INSERT_THRESH)) {
*replace = 1;
return 0;
}
else if (frame < framenum)
return 0;
/* 'Last' Keyframe */
framenum= array[(arraylen-1)].vec[1][0];
if (IS_EQT(frame, framenum, BEZT_INSERT_THRESH))
return -(arraylen);
if (IS_EQT(frame, framenum, BEZT_INSERT_THRESH)) {
*replace= 1;
return (arraylen - 1);
}
else if (frame > framenum)
return arraylen;
}
@ -2078,8 +2084,10 @@ static int binarysearch_bezt_index (BezTriple array[], BezTriple *item, int arra
float midfra= array[mid].vec[1][0];
/* check if exactly equal to midpoint */
if (IS_EQT(frame, midfra, BEZT_INSERT_THRESH))
return -(mid + 1);
if (IS_EQT(frame, midfra, BEZT_INSERT_THRESH)) {
*replace = 1;
return mid;
}
/* repeat in upper/lower half */
if (frame > midfra)
@ -2118,19 +2126,17 @@ int insert_bezt_icu (IpoCurve *icu, BezTriple *bezt)
icu->totvert= 1;
}
else {
i = binarysearch_bezt_index(icu->bezt, bezt, icu->totvert);
short replace = -1;
i = binarysearch_bezt_index(icu->bezt, bezt, icu->totvert, &replace);
if (i < 0) {
/* replace existing item (need to 'invert' i first and decremement by 1) */
i = -i - 1;
if (replace) {
/* sanity check: 'i' may in rare cases exceed arraylen */
if (i < icu->totvert)
if ((i >= 0) && (i < icu->totvert))
*(icu->bezt + i) = *bezt;
}
else {
/* add new */
newb= MEM_callocN( (icu->totvert+1)*sizeof(BezTriple), "beztriple");
newb= MEM_callocN((icu->totvert+1)*sizeof(BezTriple), "beztriple");
/* add the beztriples that should occur before the beztriple to be pasted (originally in ei->icu) */
if (i > 0)

@ -907,15 +907,15 @@ void apply_obmat(Object *ob)
Mat3CpyMat4(mat, ob->obmat);
VECCOPY(ob->loc, ob->obmat[3]);
if(ob->transflag & OB_QUAT) {
/* Quats arnt used yet */
/*if(ob->transflag & OB_QUAT) {
Mat3ToQuat(mat, ob->quat);
QuatToMat3(ob->quat, tmat);
}
else {
else {*/
Mat3ToEul(mat, ob->rot);
EulToMat3(ob->rot, tmat);
}
/*}*/
Mat3Inv(imat, tmat);
Mat3MulMat3(tmat, imat, mat);
@ -1050,8 +1050,8 @@ void clear_object(char mode)
/* quats here are not really used anymore anywhere, so it probably doesn't
* matter to not clear them whether the euler-based rotation is used
*/
QuatOne(ob->quat);
QuatOne(ob->dquat);
/*QuatOne(ob->quat);
QuatOne(ob->dquat);*/
#ifdef WITH_VERSE
if(ob->vnode) {
@ -3422,8 +3422,9 @@ void copy_attr(short event)
else if(event==2) { /* rot */
VECCOPY(base->object->rot, ob->rot);
VECCOPY(base->object->drot, ob->drot);
VECCOPY(base->object->quat, ob->quat);
VECCOPY(base->object->dquat, ob->dquat);
/* Quats arnt used yet */
/*VECCOPY(base->object->quat, ob->quat);
VECCOPY(base->object->dquat, ob->dquat);*/
}
else if(event==3) { /* size */
VECCOPY(base->object->size, ob->size);
@ -3534,32 +3535,6 @@ void copy_attr(short event)
base->object->recalc |= OB_RECALC_DATA;
}
}
else if(event==20) { /* particle settings */
PartEff *pa1, *pa2;
char *p1, *p2;
pa1= give_parteff(ob);
pa2= give_parteff(base->object);
if(pa1==0 && pa2) {
BLI_remlink( &(base->object->effect), pa2);
free_effect( (Effect *) pa2);
}
else if(pa1 && pa2==0) {
free_effects(&(base->object->effect));
copy_effects(&(base->object->effect), &ob->effect);
build_particle_system(base->object);
}
else if(pa1 && pa2) {
if(pa2->keys) MEM_freeN(pa2->keys);
p1= (char *)pa1; p2= (char *)pa2;
memcpy( p2+8, p1+8, sizeof(PartEff) - 8);
pa2->keys= 0;
build_particle_system(base->object);
}
}
else if(event==21){
if (base->object->type==OB_MESH) {
ModifierData *md = modifiers_findByType(ob, eModifierType_Subsurf);
@ -3690,8 +3665,6 @@ void copy_attr_menu()
strcat(str, "|Subsurf Settings%x21|AutoSmooth%x27");
}
if( give_parteff(ob) ) strcat(str, "|Particle Settings%x20");
if(ob->soft) strcat(str, "|Soft Body Settings%x23");
strcat(str, "|Pass Index%x30");
@ -3966,7 +3939,7 @@ void apply_objects_locrot( void )
}
ob->size[0]= ob->size[1]= ob->size[2]= 1.0;
ob->rot[0]= ob->rot[1]= ob->rot[2]= 0.0;
QuatOne(ob->quat);
/*QuatOne(ob->quat);*/ /* Quats arnt used yet */
where_is_object(ob);
@ -3989,7 +3962,7 @@ void apply_objects_locrot( void )
/* Reset the object's transforms */
ob->size[0]= ob->size[1]= ob->size[2]= 1.0;
ob->rot[0]= ob->rot[1]= ob->rot[2]= 0.0;
QuatOne(ob->quat);
/*QuatOne(ob->quat); (not used anymore)*/
where_is_object(ob);
@ -4029,7 +4002,7 @@ void apply_objects_locrot( void )
ob->size[0]= ob->size[1]= ob->size[2]= 1.0;
ob->rot[0]= ob->rot[1]= ob->rot[2]= 0.0;
QuatOne(ob->quat);
/*QuatOne(ob->quat); (quats arnt used anymore)*/
where_is_object(ob);
@ -4810,6 +4783,7 @@ void make_local(int mode)
Base *base;
Object *ob;
bActionStrip *strip;
ParticleSystem *psys;
Material *ma, ***matarar;
Lamp *la;
Curve *cu;
@ -4896,6 +4870,9 @@ void make_local(int mode)
make_local_armature ((bArmature *)id);
break;
}
for(psys=ob->particlesystem.first; psys; psys=psys->next)
make_local_particlesettings(psys->part);
}
id= (ID *)ob->ipo;
if(id && id->lib) make_local_ipo(ob->ipo);
@ -4903,11 +4880,10 @@ void make_local(int mode)
id= (ID *)ob->action;
if(id && id->lib) make_local_action(ob->action);
for (strip=ob->nlastrips.first; strip; strip=strip->next) {
for(strip=ob->nlastrips.first; strip; strip=strip->next) {
if(strip->act && strip->act->id.lib)
make_local_action(strip->act);
}
}
base= base->next;
}

@ -1420,6 +1420,16 @@ static void filesel_execute(SpaceFile *sfile)
return;
}
#ifdef WIN32
if ( (sfile->type!=FILE_LOADLIB) && (sfile->type!=FILE_MAIN) ) {
if (!check_file_chars(sfile->file)) {
error("You have illegal characters in the filename. Check console for more info.");
printf("Characters '*?:|\"<>\\/' are illegal in a filename.\n");
return;
}
}
#endif
filesel_prevspace();
if(sfile->type==FILE_LOADLIB) {

@ -100,6 +100,7 @@ enum {
enum {
ACTMENU_SEL_BORDER = 0,
ACTMENU_SEL_BORDERC,
ACTMENU_SEL_BORDERM,
ACTMENU_SEL_ALL_KEYS,
ACTMENU_SEL_ALL_CHAN,
@ -136,7 +137,8 @@ enum {
enum {
ACTMENU_CHANNELS_GROUP_ADD_TOACTIVE = 0,
ACTMENU_CHANNELS_GROUP_ADD_TONEW,
ACTMENU_CHANNELS_GROUP_REMOVE
ACTMENU_CHANNELS_GROUP_REMOVE,
ACTMENU_CHANNELS_GROUP_SYNCPOSE
};
enum {
@ -346,7 +348,7 @@ static void do_action_viewmenu(void *arg, int event)
G.saction->flag ^= SACTION_HORIZOPTIMISEON;
break;
case ACTMENU_VIEW_GCOLORS: /* Draw grouped-action channels using its group's color */
G.saction->flag ^= SACTION_DRAWGCOLORS;
G.saction->flag ^= SACTION_NODRAWGCOLORS;
break;
}
allqueue(REDRAWVIEW3D, 0);
@ -394,7 +396,7 @@ static uiBlock *action_viewmenu(void *arg_unused)
menuwidth, 19, NULL, 0.0, 0.0, 1,
ACTMENU_VIEW_NOHIDE, "");
uiDefIconTextBut(block, BUTM, 1, (G.saction->flag & SACTION_DRAWGCOLORS)?ICON_CHECKBOX_HLT:ICON_CHECKBOX_DEHLT,
uiDefIconTextBut(block, BUTM, 1, (G.saction->flag & SACTION_NODRAWGCOLORS)?ICON_CHECKBOX_DEHLT:ICON_CHECKBOX_HLT,
"Use Group Colors|", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 1,
ACTMENU_VIEW_GCOLORS, "");
@ -549,10 +551,14 @@ static void do_action_selectmenu(void *arg, int event)
borderselect_action();
break;
case ACTMENU_SEL_BORDERC: /* Border Select */
borderselect_actionchannels();
break;
case ACTMENU_SEL_BORDERM: /* Border Select */
borderselect_markers();
break;
case ACTMENU_SEL_ALL_KEYS: /* Select/Deselect All Keys */
deselect_action_keys(1, 1);
BIF_undo_push("(De)Select Keys");
@ -560,7 +566,7 @@ static void do_action_selectmenu(void *arg, int event)
allqueue(REDRAWNLA, 0);
allqueue(REDRAWIPO, 0);
break;
case ACTMENU_SEL_ALL_CHAN: /* Select/Deselect All Channels */
deselect_action_channels(1);
BIF_undo_push("(De)Select Action Channels");
@ -622,6 +628,10 @@ static uiBlock *action_selectmenu(void *arg_unused)
"Border Select Keys|B", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 0,
ACTMENU_SEL_BORDER, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
"Border Select Channels|B", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 0,
ACTMENU_SEL_BORDERC, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
"Border Select Markers|Ctrl B", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 0,
@ -762,6 +772,9 @@ static void do_action_channelmenu_groupmenu(void *arg, int event)
case ACTMENU_CHANNELS_GROUP_REMOVE:
action_groups_ungroup();
break;
case ACTMENU_CHANNELS_GROUP_SYNCPOSE: /* Syncronise Pose-data and Action-data */
sync_pchan2achan_grouping();
break;
}
}
@ -782,7 +795,7 @@ static uiBlock *action_channelmenu_groupmenu(void *arg_unused)
"Add to New Group|Ctrl Shift G", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 0,
ACTMENU_CHANNELS_GROUP_ADD_TONEW, "");
uiDefBut(block, SEPR, 0, "", 0, yco-=6,
menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
@ -790,6 +803,14 @@ static uiBlock *action_channelmenu_groupmenu(void *arg_unused)
"Remove From Group|Alt G", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 0,
ACTMENU_CHANNELS_GROUP_REMOVE, "");
uiDefBut(block, SEPR, 0, "", 0, yco-=6,
menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
"Synchronise with Armature", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 0,
ACTMENU_CHANNELS_GROUP_SYNCPOSE, "");
uiBlockSetDirection(block, UI_RIGHT);
uiTextBoundsBlock(block, 60);

@ -1286,7 +1286,7 @@ void image_buttons(void)
}
if(ibuf) {
if(ibuf->zbuf || ibuf->zbuf_float || (ibuf->channels==1)) {
uiDefIconButBitI(block, TOG, SI_SHOW_ZBUF, B_SIMA_SHOW_ZBUF, ICON_SOLID, xco,0,XIC,YIC, &G.sima->flag, 0, 0, 0, 0, "Draws zbuffer values");
uiDefIconButBitI(block, TOG, SI_SHOW_ZBUF, B_SIMA_SHOW_ZBUF, ICON_SOLID, xco,0,XIC,YIC, &G.sima->flag, 0, 0, 0, 0, "Draws zbuffer values (mapped from camera clip start to end)");
xco+= XIC;
}
}

@ -2213,11 +2213,6 @@ static uiBlock *view3d_edit_object_copyattrmenu(void *arg_unused)
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Subsurf Settings|Ctrl C", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 21, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Modifiers ...|Ctrl C", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 24, "");
}
if( give_parteff(ob) ) {
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Particle Settings|Ctrl C", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 20, "");
}
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Object Pass Index|Ctrl C", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 30, "");
}

@ -830,15 +830,16 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
IpoCurve *icu;
Object *lastadded= NULL;
for(icu= ipo->curve.first; icu; icu= icu->next) {
if(icu->driver && icu->driver->ob) {
if(lastadded!=icu->driver->ob) {
for (icu= ipo->curve.first; icu; icu= icu->next) {
if (icu->driver && icu->driver->ob) {
if (lastadded != icu->driver->ob) {
outliner_add_element(soops, &te->subtree, icu->driver->ob, te, TSE_LINKED_OB, 0);
lastadded= icu->driver->ob;
}
}
}
}
break;
case ID_AC:
{
bAction *act= (bAction *)id;

@ -374,8 +374,9 @@ void poselib_add_current_pose (Object *ob, int val)
/* check if available */
if ((pchan->bone) && (arm->layer & pchan->bone->layer)) {
if (pchan->bone->flag & (BONE_SELECTED|BONE_ACTIVE)) {
/* make action-channel if needed */
/* make action-channel if needed (action groups are also created) */
achan= verify_action_channel(act, pchan->name);
verify_pchan2achan_grouping(act, pose, pchan->name);
/* make ipo if needed... */
if (achan->ipo == NULL)

File diff suppressed because it is too large Load Diff

@ -3188,7 +3188,7 @@ void autokeyframe_ob_cb_func(Object *ob, int tmode)
actname= "Object";
if (IS_AUTOKEY_FLAG(INSERTAVAIL)) {
if (ob->ipo || ob->action) {
if ((ob->ipo) || (ob->action)) {
ID *id= (ID *)(ob);
if (ob->ipo) {
@ -3215,6 +3215,7 @@ void autokeyframe_ob_cb_func(Object *ob, int tmode)
}
}
else if (IS_AUTOKEY_FLAG(INSERTNEEDED)) {
ID *id= (ID *)(ob);
short doLoc=0, doRot=0, doScale=0;
/* filter the conditions when this happens (assume that curarea->spacetype==SPACE_VIE3D) */
@ -3245,33 +3246,35 @@ void autokeyframe_ob_cb_func(Object *ob, int tmode)
}
if (doLoc) {
insertkey_smarter(&ob->id, ID_OB, actname, NULL, OB_LOC_X);
insertkey_smarter(&ob->id, ID_OB, actname, NULL, OB_LOC_Y);
insertkey_smarter(&ob->id, ID_OB, actname, NULL, OB_LOC_Z);
insertkey_smarter(id, ID_OB, actname, NULL, OB_LOC_X);
insertkey_smarter(id, ID_OB, actname, NULL, OB_LOC_Y);
insertkey_smarter(id, ID_OB, actname, NULL, OB_LOC_Z);
}
if (doRot) {
insertkey_smarter(&ob->id, ID_OB, actname, NULL, OB_ROT_X);
insertkey_smarter(&ob->id, ID_OB, actname, NULL, OB_ROT_Y);
insertkey_smarter(&ob->id, ID_OB, actname, NULL, OB_ROT_Z);
insertkey_smarter(id, ID_OB, actname, NULL, OB_ROT_X);
insertkey_smarter(id, ID_OB, actname, NULL, OB_ROT_Y);
insertkey_smarter(id, ID_OB, actname, NULL, OB_ROT_Z);
}
if (doScale) {
insertkey_smarter(&ob->id, ID_OB, actname, NULL, OB_SIZE_X);
insertkey_smarter(&ob->id, ID_OB, actname, NULL, OB_SIZE_Y);
insertkey_smarter(&ob->id, ID_OB, actname, NULL, OB_SIZE_Z);
insertkey_smarter(id, ID_OB, actname, NULL, OB_SIZE_X);
insertkey_smarter(id, ID_OB, actname, NULL, OB_SIZE_Y);
insertkey_smarter(id, ID_OB, actname, NULL, OB_SIZE_Z);
}
}
else {
insertkey(&ob->id, ID_OB, actname, NULL, OB_LOC_X, 0);
insertkey(&ob->id, ID_OB, actname, NULL, OB_LOC_Y, 0);
insertkey(&ob->id, ID_OB, actname, NULL, OB_LOC_Z, 0);
ID *id= (ID *)(ob);
insertkey(&ob->id, ID_OB, actname, NULL, OB_ROT_X, 0);
insertkey(&ob->id, ID_OB, actname, NULL, OB_ROT_Y, 0);
insertkey(&ob->id, ID_OB, actname, NULL, OB_ROT_Z, 0);
insertkey(&ob->id, ID_OB, actname, NULL, OB_SIZE_X, 0);
insertkey(&ob->id, ID_OB, actname, NULL, OB_SIZE_Y, 0);
insertkey(&ob->id, ID_OB, actname, NULL, OB_SIZE_Z, 0);
insertkey(id, ID_OB, actname, NULL, OB_LOC_X, 0);
insertkey(id, ID_OB, actname, NULL, OB_LOC_Y, 0);
insertkey(id, ID_OB, actname, NULL, OB_LOC_Z, 0);
insertkey(id, ID_OB, actname, NULL, OB_ROT_X, 0);
insertkey(id, ID_OB, actname, NULL, OB_ROT_Y, 0);
insertkey(id, ID_OB, actname, NULL, OB_ROT_Z, 0);
insertkey(id, ID_OB, actname, NULL, OB_SIZE_X, 0);
insertkey(id, ID_OB, actname, NULL, OB_SIZE_Y, 0);
insertkey(id, ID_OB, actname, NULL, OB_SIZE_Z, 0);
}
remake_object_ipos(ob);
@ -3286,6 +3289,7 @@ void autokeyframe_ob_cb_func(Object *ob, int tmode)
*/
void autokeyframe_pose_cb_func(Object *ob, int tmode, short targetless_ik)
{
ID *id= (ID *)(ob);
bArmature *arm= ob->data;
bAction *act;
bPose *pose;
@ -3348,36 +3352,36 @@ void autokeyframe_pose_cb_func(Object *ob, int tmode, short targetless_ik)
}
if (doLoc) {
insertkey_smarter(&ob->id, ID_PO, pchan->name, NULL, AC_LOC_X);
insertkey_smarter(&ob->id, ID_PO, pchan->name, NULL, AC_LOC_Y);
insertkey_smarter(&ob->id, ID_PO, pchan->name, NULL, AC_LOC_Z);
insertkey_smarter(id, ID_PO, pchan->name, NULL, AC_LOC_X);
insertkey_smarter(id, ID_PO, pchan->name, NULL, AC_LOC_Y);
insertkey_smarter(id, ID_PO, pchan->name, NULL, AC_LOC_Z);
}
if (doRot) {
insertkey_smarter(&ob->id, ID_PO, pchan->name, NULL, AC_QUAT_W);
insertkey_smarter(&ob->id, ID_PO, pchan->name, NULL, AC_QUAT_X);
insertkey_smarter(&ob->id, ID_PO, pchan->name, NULL, AC_QUAT_Y);
insertkey_smarter(&ob->id, ID_PO, pchan->name, NULL, AC_QUAT_Z);
insertkey_smarter(id, ID_PO, pchan->name, NULL, AC_QUAT_W);
insertkey_smarter(id, ID_PO, pchan->name, NULL, AC_QUAT_X);
insertkey_smarter(id, ID_PO, pchan->name, NULL, AC_QUAT_Y);
insertkey_smarter(id, ID_PO, pchan->name, NULL, AC_QUAT_Z);
}
if (doScale) {
insertkey_smarter(&ob->id, ID_PO, pchan->name, NULL, AC_SIZE_X);
insertkey_smarter(&ob->id, ID_PO, pchan->name, NULL, AC_SIZE_Y);
insertkey_smarter(&ob->id, ID_PO, pchan->name, NULL, AC_SIZE_Z);
insertkey_smarter(id, ID_PO, pchan->name, NULL, AC_SIZE_X);
insertkey_smarter(id, ID_PO, pchan->name, NULL, AC_SIZE_Y);
insertkey_smarter(id, ID_PO, pchan->name, NULL, AC_SIZE_Z);
}
}
/* insert keyframe in any channel that's appropriate */
else {
insertkey(&ob->id, ID_PO, pchan->name, NULL, AC_SIZE_X, 0);
insertkey(&ob->id, ID_PO, pchan->name, NULL, AC_SIZE_Y, 0);
insertkey(&ob->id, ID_PO, pchan->name, NULL, AC_SIZE_Z, 0);
insertkey(id, ID_PO, pchan->name, NULL, AC_SIZE_X, 0);
insertkey(id, ID_PO, pchan->name, NULL, AC_SIZE_Y, 0);
insertkey(id, ID_PO, pchan->name, NULL, AC_SIZE_Z, 0);
insertkey(&ob->id, ID_PO, pchan->name, NULL, AC_QUAT_W, 0);
insertkey(&ob->id, ID_PO, pchan->name, NULL, AC_QUAT_X, 0);
insertkey(&ob->id, ID_PO, pchan->name, NULL, AC_QUAT_Y, 0);
insertkey(&ob->id, ID_PO, pchan->name, NULL, AC_QUAT_Z, 0);
insertkey(id, ID_PO, pchan->name, NULL, AC_QUAT_W, 0);
insertkey(id, ID_PO, pchan->name, NULL, AC_QUAT_X, 0);
insertkey(id, ID_PO, pchan->name, NULL, AC_QUAT_Y, 0);
insertkey(id, ID_PO, pchan->name, NULL, AC_QUAT_Z, 0);
insertkey(&ob->id, ID_PO, pchan->name, NULL, AC_LOC_X, 0);
insertkey(&ob->id, ID_PO, pchan->name, NULL, AC_LOC_Y, 0);
insertkey(&ob->id, ID_PO, pchan->name, NULL, AC_LOC_Z, 0);
insertkey(id, ID_PO, pchan->name, NULL, AC_LOC_X, 0);
insertkey(id, ID_PO, pchan->name, NULL, AC_LOC_Y, 0);
insertkey(id, ID_PO, pchan->name, NULL, AC_LOC_Z, 0);
}
}
}

@ -1529,11 +1529,12 @@ void setcameratoview3d(void)
VECCOPY(ob->loc, dvec);
VecSubf(ob->loc, ob->loc, G.vd->ofs);
G.vd->viewquat[0]= -G.vd->viewquat[0];
if (ob->transflag & OB_QUAT) {
/* */
/*if (ob->transflag & OB_QUAT) {
QUATCOPY(ob->quat, G.vd->viewquat);
} else {
} else {*/
QuatToEul(G.vd->viewquat, ob->rot);
}
/*}*/
G.vd->viewquat[0]= -G.vd->viewquat[0];
}

@ -33,6 +33,7 @@
#include <windows.h>
#endif
#ifdef __APPLE__
# define GL_GLEXT_LEGACY 1
#include <OpenGL/gl.h>
#else
#include <GL/gl.h>

@ -0,0 +1,132 @@
#ifndef __mac_compat_glext_h_
#define __mac_compat_glext_h_
#ifdef __cplusplus
extern "C" {
#endif
#define APIENTRYP *
# define GL_GLEXT_LEGACY 1
# include <OpenGL/gl.h>
//#if GL_ARB_shader_objects
typedef char GLcharARB;
typedef void *GLhandleARB;
//#endif
//#if GL_ARB_vertex_buffer_object
typedef long GLintptrARB;
typedef long GLsizeiptrARB;
//#endif
// GL_ARB_multitexture
typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
//GL_ARB_shader_objects
typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (unsigned int obj);
typedef unsigned int (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname);
typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (unsigned int containerObj, unsigned int attachedObj);
typedef unsigned int (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);
typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (unsigned int shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length);
typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (unsigned int shaderObj);
typedef unsigned int (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (unsigned int containerObj, unsigned int obj);
typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (unsigned int programObj);
typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (unsigned int programObj);
typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (unsigned int programObj);
typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);
typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);
typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);
typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);
typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);
typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value);
typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value);
typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value);
typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value);
typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (unsigned int obj, GLenum pname, GLfloat *params);
typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (unsigned int obj, GLenum pname, GLint *params);
typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (unsigned int obj, GLsizei maxLength, GLsizei *length, void *infoLog);
typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (unsigned int containerObj, GLsizei maxCount, GLsizei *count, unsigned int *obj);
typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (unsigned int programObj, const void *name);
typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (unsigned int programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (unsigned int programObj, GLint location, GLfloat *params);
typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (unsigned int programObj, GLint location, GLint *params);
typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (unsigned int obj, GLsizei maxLength, GLsizei *length, void *source);
//GL_ARB_vertex_shader
typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (unsigned int programObj, GLuint index, const GLcharARB *name);
typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (unsigned int programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (unsigned int programObj, const GLcharARB *name);
//GL_ARB_vertex_program
typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);
typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string);
typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);
typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);
typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);
#define GL_FRAGMENT_SHADER 0x8B30
#define GL_COMPILE_STATUS 0x8B81
#define GL_LINK_STATUS 0x8B82
#define GL_VALIDATE_STATUS 0x8B83
#ifdef __cplusplus
}
#endif
#endif

@ -33,6 +33,7 @@ incs = ['.',
'#source/blender',
'#source/blender/include',
'#source/blender/makesdna',
'#source/gameengine/BlenderRoutines',
'#source/gameengine/Rasterizer',
'#source/gameengine/GameLogic',
'#source/gameengine/Expressions',

@ -27,6 +27,7 @@ incs = ['.',
'#source/blender',
'#source/blender/include',
'#source/blender/makesdna',
'#source/gameengine/BlenderRoutines',
'#source/gameengine/Rasterizer',
'#source/gameengine/GameLogic',
'#source/gameengine/Expressions',

@ -35,7 +35,6 @@
# include <GL/gl.h>
#elif defined(__APPLE__)
# define __glext_h_
# define GL_GLEXT_LEGACY 1
# include <OpenGL/gl.h>
# include <OpenGL/glu.h>
@ -52,8 +51,8 @@
#ifdef WIN32
# include <GL/glext.h>
#elif defined(__APPLE__)
# include "mac_compat_glext.h"
# include <OpenGL/glext.h>
# undef __glext_h_
# else
# include <GL/glext.h>
# endif

@ -6,7 +6,7 @@ if env['WITH_BF_GLEXT'] == 1:
sources = env.Glob('*.cpp') #'RAS_GLExtensionManager.cpp RAS_ListRasterizer.cpp RAS_OpenGLRasterizer.cpp RAS_VAOpenGLRasterizer.cpp'
incs = '. #source/kernel/gen_system #intern/string #intern/moto/include #source/gameengine/Rasterizer'
incs = '. #source/kernel/gen_system #intern/string #intern/moto/include #source/gameengine/Rasterizer #source/gameengine/BlenderRoutines'
incs += ' ' + env['BF_OPENGL_INC']
env.BlenderLib ( 'bf_oglrasterizer', Split(sources), Split(incs), [], libtype=['game','player'], priority=[40, 120] )

@ -7,7 +7,7 @@ if env['WITH_BF_GLEXT'] == 1:
env['CPPFLAGS'].append('-DWITH_GLEXT')
incs = '. #source/kernel/gen_system #intern/string #intern/moto/include'
incs = '. #source/kernel/gen_system #intern/string #intern/moto/include #source/gameengine/BlenderRoutines'
if env['OURPLATFORM']=='win32-vc':
cflags = []

@ -2,7 +2,10 @@
import os
import os.path
import SCons.Options
import SCons.Options.BoolOption
try:
import SCons.Options.BoolOption
except ImportError:
pass
try:
import subprocess
except ImportError:
@ -31,7 +34,7 @@ def validate_arguments(args, bc):
'WITH_BF_FMOD',
'WITH_BF_OPENEXR', 'BF_OPENEXR', 'BF_OPENEXR_INC', 'BF_OPENEXR_LIB', 'BF_OPENEXR_LIBPATH',
'WITH_BF_DDS',
'WITH_BF_FFMPEG', 'BF_FFMPEG_LIB', 'BF_FFMPEG', 'BF_FFMPEG_INC',
'WITH_BF_FFMPEG', 'BF_FFMPEG_LIB','BF_FFMPEG_EXTRA', 'BF_FFMPEG', 'BF_FFMPEG_INC',
'WITH_BF_JPEG', 'BF_JPEG', 'BF_JPEG_INC', 'BF_JPEG_LIB', 'BF_JPEG_LIBPATH',
'WITH_BF_PNG', 'BF_PNG', 'BF_PNG_INC', 'BF_PNG_LIB', 'BF_PNG_LIBPATH',
'BF_TIFF', 'BF_TIFF_INC',
@ -60,14 +63,17 @@ def validate_arguments(args, bc):
'WITHOUT_BF_INSTALL',
'WITH_BF_OPENMP',
'WITHOUT_BF_INSTALL',
'BF_FANCY', 'BF_QUIET'
'BF_FANCY', 'BF_QUIET',
'BF_X264_CONFIG',
'BF_XVIDCORE_CONFIG',
]
arg_list = ['BF_DEBUG', 'BF_QUIET', 'BF_CROSS', 'BF_UPDATE',
'BF_INSTALLDIR', 'BF_TOOLSET', 'BF_BINNAME',
'BF_BUILDDIR', 'BF_FANCY', 'BF_QUICK', 'BF_PROFILE',
'BF_DEBUG_FLAGS', 'BF_BSC',
'BF_PRIORITYLIST', 'BF_BUILDINFO','CC', 'CXX', "BF_QUICKDEBUG", "BF_LISTDEBUG", 'LCGDIR']
'BF_DEBUG_FLAGS', 'BF_BSC', 'BF_CONFIG',
'BF_PRIORITYLIST', 'BF_BUILDINFO','CC', 'CXX', 'BF_QUICKDEBUG',
'BF_LISTDEBUG', 'LCGDIR', 'BF_X264_CONFIG', 'BF_XVIDCORE_CONFIG']
all_list = opts_list + arg_list
okdict = {}
@ -174,6 +180,7 @@ def read_opts(cfg, args):
(BoolOption('WITH_BF_FFMPEG', 'Use FFMPEG if true', 'false')),
('BF_FFMPEG', 'FFMPEG base path', ''),
('BF_FFMPEG_LIB', 'FFMPEG library', ''),
('BF_FFMPEG_EXTRA', 'FFMPEG flags that must be preserved', ''),
('BF_FFMPEG_INC', 'FFMPEG includes', ''),
('BF_FFMPEG_LIBPATH', 'FFMPEG library path', ''),
@ -311,6 +318,9 @@ def read_opts(cfg, args):
(BoolOption('BF_QUIET', 'Enable silent output if true', 'true')),
(BoolOption('WITH_BF_BINRELOC', 'Enable relocatable binary (linux only)', 'false')),
('BF_X264_CONFIG', 'configuration flags for x264', ''),
('BF_XVIDCORE_CONFIG', 'configuration flags for xvidcore', ''),
) # end of opts.AddOptions()
return localopts