Merged changes in the trunk up to revision 41225.

Conflicts resolved:
source/blender/render/intern/source/pipeline.c
This commit is contained in:
Tamito Kajiyama 2011-10-29 15:46:14 +00:00
commit 16702c1729
340 changed files with 8196 additions and 7706 deletions

@ -213,6 +213,7 @@ mark_as_advanced(WITH_CXX_GUARDEDALLOC)
option(WITH_ASSERT_ABORT "Call abort() when raising an assertion through BLI_assert()" OFF)
mark_as_advanced(WITH_ASSERT_ABORT)
if(APPLE)
if(NOT CMAKE_OSX_ARCHITECTURES)
set(CMAKE_OSX_ARCHITECTURES x86_64 CACHE STRING

@ -174,7 +174,7 @@ package_archive:
# Other Targets
#
translations:
$(BUILD_DIR)/bin/blender --background --factory-startup --python po/update_msg.py
$(BUILD_DIR)/bin/blender --background -noaudio --factory-startup --python po/update_msg.py
python3 po/update_pot.py
python3 po/update_po.py
python3 po/update_mo.py
@ -238,12 +238,12 @@ check_sparse:
# Simple version of ./doc/python_api/sphinx_doc_gen.sh with no PDF generation.
doc_py:
$(BUILD_DIR)/bin/blender --background --factory-startup --python doc/python_api/sphinx_doc_gen.py
$(BUILD_DIR)/bin/blender --background -noaudio --factory-startup --python doc/python_api/sphinx_doc_gen.py
cd doc/python_api ; sphinx-build -n -b html sphinx-in sphinx-out
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/contents.html'"
doc_dna:
$(BUILD_DIR)/bin/blender --background --factory-startup --python doc/blender_file_format/BlendFileDnaExporter_25.py
$(BUILD_DIR)/bin/blender --background -noaudio --factory-startup --python doc/blender_file_format/BlendFileDnaExporter_25.py
@echo "docs written into: '$(BLENDER_DIR)/doc/blender_file_format/dna.html'"
doc_man:

@ -30,7 +30,6 @@
# Then read all SConscripts and build
#
# TODO: fix /FORCE:MULTIPLE on windows to get proper debug builds.
# TODO: cleanup CCFLAGS / CPPFLAGS use, often both are set when we only need one.
import platform as pltfrm
@ -210,7 +209,7 @@ opts.Update(env)
if sys.platform=='win32':
if bitness==64:
env.Append(CFLAGS=['-DWIN64']) # -DWIN32 needed too, as it's used all over to target Windows generally
env.Append(CPPFLAGS=['-DWIN64']) # -DWIN32 needed too, as it's used all over to target Windows generally
if not env['BF_FANCY']:
B.bc.disable()
@ -283,22 +282,17 @@ if env['OURPLATFORM']=='darwin':
if env['WITH_BF_OPENMP'] == 1:
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
env['CCFLAGS'].append('/openmp')
env['CPPFLAGS'].append('/openmp')
else:
if env['CC'].endswith('icc'): # to be able to handle CC=/opt/bla/icc case
env.Append(LINKFLAGS=['-openmp', '-static-intel'])
env['CCFLAGS'].append('-openmp')
env['CPPFLAGS'].append('-openmp')
else:
env.Append(CCFLAGS=['-fopenmp'])
env.Append(CPPFLAGS=['-fopenmp'])
if env['WITH_GHOST_COCOA'] == True:
env.Append(CFLAGS=['-DGHOST_COCOA'])
env.Append(CPPFLAGS=['-DGHOST_COCOA'])
env.Append(CPPFLAGS=['-DGHOST_COCOA'])
if env['USE_QTKIT'] == True:
env.Append(CFLAGS=['-DUSE_QTKIT'])
env.Append(CPPFLAGS=['-DUSE_QTKIT'])
#check for additional debug libnames
@ -330,20 +324,15 @@ if 'blendernogame' in B.targets:
# disable elbeem (fluidsim) compilation?
if env['BF_NO_ELBEEM'] == 1:
env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
env['CCFLAGS'].append('-DDISABLE_ELBEEM')
if btools.ENDIAN == "big":
env['CPPFLAGS'].append('-D__BIG_ENDIAN__')
env['CCFLAGS'].append('-D__BIG_ENDIAN__')
else:
env['CPPFLAGS'].append('-D__LITTLE_ENDIAN__')
env['CCFLAGS'].append('-D__LITTLE_ENDIAN__')
# TODO, make optional
env['CPPFLAGS'].append('-DWITH_AUDASPACE')
env['CCFLAGS'].append('-DWITH_AUDASPACE')
# lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
B.root_build_dir = env['BF_BUILDDIR']
@ -505,64 +494,62 @@ dottargetlist = []
scriptinstall = []
if env['OURPLATFORM']!='darwin':
for dp, dn, df in os.walk('release/bin/.blender'):
dp = os.path.normpath(dp)
dotblenderinstall = []
for targetdir,srcfile in zip(dottargetlist, dotblendlist):
td, tf = os.path.split(targetdir)
dotblenderinstall.append(env.Install(dir=td, source=srcfile))
for targetdir,srcfile in zip(datafilestargetlist, datafileslist):
td, tf = os.path.split(targetdir)
dotblenderinstall.append(env.Install(dir=td, source=srcfile))
if env['WITH_BF_PYTHON']:
#-- local/VERSION/scripts
scriptpaths=['release/scripts']
for scriptpath in scriptpaths:
for dp, dn, df in os.walk(scriptpath):
if '.svn' in dn:
dn.remove('.svn')
if '_svn' in dn:
dn.remove('_svn')
if '__pycache__' in dn: # py3.2 cache dir
dn.remove('__pycache__')
if '.svn' in dn:
dn.remove('.svn')
if '_svn' in dn:
dn.remove('_svn')
for f in df:
# This files aren't used anymore
if f in (".bfont.ttf", ):
continue
dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
dir += os.sep + os.path.basename(scriptpath) + dp[len(scriptpath):]
if not env['WITH_BF_INTERNATIONAL']:
if 'locale' in dp:
continue
if not env['WITH_BF_FREETYPE']:
if f.endswith('.ttf'):
continue
if 'locale' in dp or 'fonts' in dp:
datafileslist.append(os.path.join(dp,f))
dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['datafiles'] + dp.split(os.sep)[3:])) # skip bin
datafilestargetlist.append(dir + os.sep + f)
else:
dotblendlist.append(os.path.join(dp, f))
dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['config'] + dp.split(os.sep)[3:])) # skip bin
dottargetlist.append(dir + 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))
for targetdir,srcfile in zip(datafilestargetlist, datafileslist):
td, tf = os.path.split(targetdir)
dotblenderinstall.append(env.Install(dir=td, source=srcfile))
source=[os.path.join(dp, f) for f in df if not f.endswith(".pyc")]
# To ensure empty dirs are created too
if len(source)==0:
env.Execute(Mkdir(dir))
scriptinstall.append(env.Install(dir=dir,source=source))
if env['WITH_BF_INTERNATIONAL']:
internationalpaths=['release' + os.sep + 'datafiles']
if env['WITH_BF_PYTHON']:
#-- local/VERSION/scripts
scriptpaths=['release/scripts']
for scriptpath in scriptpaths:
for dp, dn, df in os.walk(scriptpath):
if '.svn' in dn:
dn.remove('.svn')
if '_svn' in dn:
dn.remove('_svn')
if '__pycache__' in dn: # py3.2 cache dir
dn.remove('__pycache__')
def check_path(path, member):
return (member in path.split(os.sep))
for intpath in internationalpaths:
for dp, dn, df in os.walk(intpath):
if '.svn' in dn:
dn.remove('.svn')
if '_svn' in dn:
dn.remove('_svn')
dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
dir += os.sep + os.path.basename(scriptpath) + dp[len(scriptpath):]
# we only care about release/datafiles/fonts, release/datafiles/locales
if check_path(dp, "fonts") or check_path(dp, "locale"):
pass
else:
continue
dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
dir += os.sep + os.path.basename(intpath) + dp[len(intpath):]
source=[os.path.join(dp, f) for f in df if not f.endswith(".pyc")]
# To ensure empty dirs are created too
if len(source)==0:
env.Execute(Mkdir(dir))
scriptinstall.append(env.Install(dir=dir,source=source))
source=[os.path.join(dp, f) for f in df if not f.endswith(".pyc")]
# To ensure empty dirs are created too
if len(source)==0:
env.Execute(Mkdir(dir))
scriptinstall.append(env.Install(dir=dir,source=source))
#-- icons
if env['OURPLATFORM']=='linux':

@ -94,6 +94,7 @@ WITH_BF_JACK = True
# Compilation and optimization
BF_DEBUG = False
REL_CFLAGS = ['-O2']
REL_CCFLAGS = ['-O2']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-O2'] # C & C++
PLATFORM_LINKFLAGS = ['-L/home/sources/staticlibs/lib32']

@ -85,6 +85,7 @@ WITH_BF_JACK = True
# Compilation and optimization
BF_DEBUG = False
REL_CFLAGS = ['-O2']
REL_CCFLAGS = ['-O2']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-O2'] # C & C++
PLATFORM_LINKFLAGS = ['-L/home/sources/staticlibs/lib32']

@ -85,6 +85,7 @@ WITH_BF_JACK = True
# Compilation and optimization
BF_DEBUG = False
REL_CFLAGS = ['-O2']
REL_CCFLAGS = ['-O2']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-O2'] # C & C++
PLATFORM_LINKFLAGS = ['-L/home/sources/staticlibs/lib64']

@ -94,6 +94,7 @@ WITH_BF_JACK = True
# Compilation and optimization
BF_DEBUG = False
REL_CFLAGS = ['-O2']
REL_CCFLAGS = ['-O2']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-O2'] # C & C++
PLATFORM_LINKFLAGS = ['-L/home/sources/staticlibs/lib64']

@ -1,209 +0,0 @@
import os
LCGDIR = os.getcwd()+"/../lib/aix-4.3-ppc"
LIBDIR = LCGDIR
print LCGDIR
WITH_BF_VERSE = 'false'
BF_VERSE_INCLUDE = "#extern/verse/dist"
BF_PYTHON = LCGDIR+'/python'
BF_PYTHON_VERSION = '3.2'
WITH_BF_STATICPYTHON = 'true'
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' #BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'
BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic']
BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/python${BF_PYTHON_VERSION}/config/libpython${BF_PYTHON_VERSION}.a'
WITH_BF_OPENAL = 'false'
WITH_BF_STATICOPENAL = 'false'
BF_OPENAL = LCGDIR+'/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include'
BF_OPENAL_LIB = 'openal'
BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
BF_OPENAL_LIBPATH = LIBDIR + '/lib'
BF_CXX = '/usr'
WITH_BF_STATICCXX = 'false'
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
WITH_BF_SDL = 'false'
BF_SDL = LCGDIR+'/sdl' #$(shell sdl-config --prefix)
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
BF_SDL_LIB = 'SDL audio iconv charset' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
BF_SDL_LIBPATH = '${BF_SDL}/lib'
WITH_BF_OPENEXR = 'false'
WITH_BF_STATICOPENEXR = 'false'
BF_OPENEXR = '/usr'
# when compiling with your own openexr lib you might need to set...
# BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR'
BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
# BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
WITH_BF_DDS = 'false'
WITH_BF_JPEG = 'false'
BF_JPEG = LCGDIR+'/jpeg'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'jpeg'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
WITH_BF_PNG = 'false'
BF_PNG = LCGDIR+"/png"
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'png'
BF_PNG_LIBPATH = '${BF_PNG}/lib'
BF_TIFF = '/usr/nekoware'
BF_TIFF_INC = '${BF_TIFF}/include'
WITH_BF_ZLIB = 'true'
BF_ZLIB = LCGDIR+"/zlib"
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIB = 'z'
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
WITH_BF_INTERNATIONAL = 'false'
BF_GETTEXT = LCGDIR+'/gettext'
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
BF_GETTEXT_LIB = 'gettextpo intl'
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_GAMEENGINE='false'
WITH_BF_BULLET = 'true'
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
#WITH_BF_NSPR = 'true'
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
#BF_NSPR_LIB =
# Uncomment the following line to use Mozilla inplace of netscape
#CPPFLAGS += -DMOZ_NOT_NET
# Location of MOZILLA/Netscape header files...
#BF_MOZILLA = $(LIBDIR)/mozilla
#BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl
#BF_MOZILLA_LIB =
# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB
# if this is not set.
#
# Be paranoid regarding library creation (do not update archives)
#BF_PARANOID = 'true'
# enable freetype2 support for text objects
BF_FREETYPE = LCGDIR+'/freetype'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
BF_QUICKTIME = '/usr/local'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
WITH_BF_ICONV = 'false'
BF_ICONV = LIBDIR + "/iconv"
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv charset'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
WITH_BF_BINRELOC = 'false'
# enable ffmpeg support
WITH_BF_FFMPEG = 'false' # -DWITH_FFMPEG
# Uncomment the following two lines to use system's ffmpeg
BF_FFMPEG = LCGDIR+'/ffmpeg'
BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice faad faac vorbis x264 ogg mp3lame z'
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
# enable ogg, vorbis and theora in ffmpeg
WITH_BF_OGG = 'false' # -DWITH_OGG
BF_OGG = '/usr'
BF_OGG_INC = '${BF_OGG}/include'
BF_OGG_LIB = 'ogg vorbis theoraenc theoradec'
WITH_BF_OPENJPEG = 'false'
BF_OPENJPEG = '#extern/libopenjpeg'
BF_OPENJPEG_LIB = ''
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
WITH_BF_REDCODE = 'false'
BF_REDCODE = '#extern/libredcode'
BF_REDCODE_LIB = ''
BF_REDCODE_INC = '${BF_REDCODE}/include'
BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = 'false'
BF_OPENGL = '/usr'
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIB = 'GL GLU X11 Xi Xext'
BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
BF_OPENGL_LIB_STATIC = '${BF_OPENGL}/libGL.a ${BF_OPENGL}/libGLU.a ${BF_OPENGL}/libXxf86vm.a ${BF_OPENGL}/libX11.a ${BF_OPENGL}/libXi.a ${BF_OPENGL}/libXext.a ${BF_OPENGL}/libXxf86vm.a'
CC = 'gcc'
CXX = 'g++'
CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
CPPFLAGS = [ '-DXP_UNIX', '-DWIN32', '-DFREE_WINDOWS' ]
CXXFLAGS = ['-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
REL_CFLAGS = ['-DNDEBUG', '-O2' ]
REL_CCFLAGS = ['-DNDEBUG', '-O2' ]
C_WARN = [ '-Wall' , '-Wno-char-subscripts', '-Wdeclaration-after-statement' ]
CC_WARN = [ '-Wall' ]
##BF_DEPEND = 'true'
##
##AR = ar
##ARFLAGS = ruv
##ARFLAGSQUIET = ru
##
##FIX_STUBS_WARNINGS = -Wno-unused
LLIBS = 'c m dl pthread dmedia movie'
##LOPTS = --dynamic
##DYNLDFLAGS = -shared $(LDFLAGS)
BF_PROFILE_FLAGS = ['-pg','-g']
BF_PROFILE = 'false'
BF_DEBUG = 'false'
BF_DEBUG_CCFLAGS = ['-g']
BF_BUILDDIR = '../build/aix4'
BF_INSTALLDIR='../install/aix4'
BF_DOCDIR='../install/doc'
#Link against pthread
LDIRS = []
LDIRS.append(BF_FREETYPE_LIBPATH)
LDIRS.append(BF_PNG_LIBPATH)
LDIRS.append(BF_ZLIB_LIBPATH)
LDIRS.append(BF_SDL_LIBPATH)
LDIRS.append(BF_OPENAL_LIBPATH)
LDIRS.append(BF_ICONV_LIBPATH)
PLATFORM_LINKFLAGS = []
for x in LDIRS:
PLATFORM_LINKFLAGS.append("-L"+x)
PLATFORM_LINKFLAGS += ['-L${LCGDIR}/jpeg/lib' , '-L/usr/lib32', '-n32', '-v', '-no_prelink']
print PLATFORM_LINKFLAGS
LINKFLAGS= PLATFORM_LINKFLAGS

@ -306,11 +306,11 @@ if MACOSX_ARCHITECTURE == 'x86_64' or MACOSX_ARCHITECTURE == 'ppc64':
else:
ARCH_FLAGS = ['-m32']
CFLAGS = ['-pipe','-funsigned-char']+ARCH_FLAGS
CFLAGS = []
CXXFLAGS = []
CCFLAGS = ['-pipe','-funsigned-char']
CPPFLAGS = []+ARCH_FLAGS
CCFLAGS = ['-pipe','-funsigned-char']+ARCH_FLAGS
CXXFLAGS = ['-pipe','-funsigned-char']+ARCH_FLAGS
CPPFLAGS = list(ARCH_FLAGS)
if WITH_GHOST_COCOA:
PLATFORM_LINKFLAGS = ['-fexceptions','-framework','CoreServices','-framework','Foundation','-framework','IOKit','-framework','AppKit','-framework','Cocoa','-framework','Carbon','-framework','AudioUnit','-framework','AudioToolbox','-framework','CoreAudio','-framework','OpenAL']+ARCH_FLAGS
@ -336,9 +336,8 @@ else:
# 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
CCFLAGS = ['-fuse-cxa-atexit'] + CFLAGS
PLATFORM_LINKFLAGS = ['-fuse-cxa-atexit'] + PLATFORM_LINKFLAGS
LLIBS.append('crt3.o')
if USE_SDK:
@ -349,19 +348,18 @@ if USE_SDK:
#Intel Macs are CoreDuo and Up
if MACOSX_ARCHITECTURE == 'i386' or MACOSX_ARCHITECTURE == 'x86_64':
REL_CFLAGS = ['-DNDEBUG', '-O2','-ftree-vectorize','-msse','-msse2','-msse3','-mfpmath=sse']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-DNDEBUG', '-O2','-ftree-vectorize','-msse','-msse2','-msse3','-mfpmath=sse']
else:
CFLAGS = CFLAGS+['-fno-strict-aliasing']
CCFLAGS = CCFLAGS+['-fno-strict-aliasing']
CXXFLAGS = CXXFLAGS+['-fno-strict-aliasing']
REL_CFLAGS = ['-DNDEBUG', '-O2']
CCFLAGS += ['-fno-strict-aliasing']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-DNDEBUG', '-O2']
# Intel 64bit Macs are Core2Duo and up
if MACOSX_ARCHITECTURE == 'x86_64':
REL_CFLAGS = REL_CFLAGS+['-march=core2','-mssse3','-with-tune=core2','-enable-threads']
REL_CCFLAGS = REL_CCFLAGS+['-march=core2','-mssse3','-with-tune=core2','-enable-threads']
REL_CCFLAGS += ['-march=core2','-mssse3','-with-tune=core2','-enable-threads']
CC_WARN = ['-Wall']
C_WARN = ['-Wno-char-subscripts', '-Wpointer-arith', '-Wcast-align', '-Wdeclaration-after-statement', '-Wno-unknown-pragmas', '-Wstrict-prototypes']

@ -172,11 +172,12 @@ BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-pthread']
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE','-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
CPPFLAGS = []
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE','-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
CXXFLAGS = []
if WITH_BF_FFMPEG:
# libavutil needs UINT64_C()
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
REL_CFLAGS = ['-DNDEBUG', '-O2']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-DNDEBUG', '-O2']
##BF_DEPEND = True
##

@ -172,11 +172,12 @@ BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-pthread']
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE','-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
CPPFLAGS = []
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE','-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
CXXFLAGS = []
if WITH_BF_FFMPEG:
# libavutil needs UINT64_C()
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
REL_CFLAGS = ['-DNDEBUG', '-O2']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-DNDEBUG', '-O2']
##BF_DEPEND = True
##

@ -170,13 +170,14 @@ WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-pthread']
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE','-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
CXXFLAGS = []
CPPFLAGS = []
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE','-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
if WITH_BF_FFMPEG:
# libavutil needs UINT64_C()
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
REL_CFLAGS = ['-DNDEBUG', '-O2']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-DNDEBUG', '-O2']
##BF_DEPEND = True
##

@ -97,7 +97,6 @@ BF_BULLET_LIB = 'extern_bullet'
BF_FREETYPE = '/usr'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
#WITH_BF_FREETYPE_STATIC = True
#BF_FREETYPE_LIB_STATIC = '${BF_FREETYPE}/lib/libfreetype.a'
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
@ -200,15 +199,16 @@ CXX = 'g++'
## CFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing -mieee
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
CXXFLAGS = []
CPPFLAGS = []
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
# g++ 4.6, only needed for bullet
CXXFLAGS += ['-fpermissive']
if WITH_BF_FFMPEG:
# libavutil needs UINT64_C()
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
REL_CFLAGS = ['-DNDEBUG', '-O2']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-DNDEBUG', '-O2']
##BF_DEPEND = True
##

@ -170,10 +170,11 @@ WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse']
CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
CXXFLAGS = []
CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE']
CXXFLAGS = ['-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
REL_CFLAGS = ['-DNDEBUG', '-O2']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-DNDEBUG', '-O2']
C_WARN = ['-Wall', '-Wstrict-prototypes', '-Wno-char-subscripts', '-Wdeclaration-after-statement']

@ -1,148 +0,0 @@
LCGDIR = '../lib/openbsd3'
LIBDIR = '${LCGDIR}'
BF_PYTHON = '/usr/local'
BF_PYTHON_VERSION = '3.2'
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib/python${BF_PYTHON_VERSION}/config'
WITH_BF_OPENAL = False
# WITH_BF_STATICOPENAL = False
#BF_OPENAL = LIBDIR + '/openal'
#BF_OPENAL_INC = '${BF_OPENAL}/include'
#BF_OPENAL_LIB = 'openal'
#BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
#BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
WITH_BF_SDL = True
BF_SDL = '/usr/local' #$(shell sdl-config --prefix)
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
BF_SDL_LIBPATH = '${BF_SDL}/lib'
WITH_BF_OPENEXR = False
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = '/usr/local'
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR'
BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
WITH_BF_DDS = True
WITH_BF_JPEG = True
BF_JPEG = '/usr/local'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'jpeg'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
WITH_BF_PNG = True
BF_PNG = '/usr/local'
BF_PNG_INC = '${BF_PNG}/include/libpng'
BF_PNG_LIB = 'png'
BF_PNG_LIBPATH = '${BF_PNG}/lib'
BF_TIFF = '/usr/local'
BF_TIFF_INC = '${BF_TIFF}/include'
WITH_BF_ZLIB = True
BF_ZLIB = '/usr/local'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIB = 'z'
WITH_BF_INTERNATIONAL = True
BF_GETTEXT = '/usr/local'
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
BF_GETTEXT_LIB = 'intl iconv'
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_GAMEENGINE=False
WITH_BF_PLAYER = False
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
#WITH_BF_NSPR = True
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
#BF_NSPR_LIB =
# Uncomment the following line to use Mozilla inplace of netscape
#CPPFLAGS += -DMOZ_NOT_NET
# Location of MOZILLA/Netscape header files...
#BF_MOZILLA = $(LIBDIR)/mozilla
#BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl
#BF_MOZILLA_LIB =
# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB
# if this is not set.
#
# Be paranoid regarding library creation (do not update archives)
#BF_PARANOID = True
# enable freetype2 support for text objects
BF_FREETYPE = '/usr/X11R6'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
WITH_BF_ICONV = False
BF_ICONV = LIBDIR + "/iconv"
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = True
BF_OPENGL = '/usr/X11R6'
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIB = 'GL GLU X11 Xi'
BF_OPENGL_LIBPATH = '${BF_OPENGL}/lib'
BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a'
##
##CC = gcc
##CCC = g++
##ifeq ($CPU),alpha)
## CFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing -mieee
CFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
CPPFLAGS = []
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
REL_CFLAGS = ['-DNDEBUG', '-O2']
REL_CCFLAGS = ['-DNDEBUG', '-O2']
##BF_DEPEND = True
##
##AR = ar
##ARFLAGS = ruv
##ARFLAGSQUIET = ru
##
CC = 'gcc'
CXX = 'g++'
C_WARN = ['-Wdeclaration-after-statement', '-Wstrict-prototypes']
CC_WARN = ['-Wall']
##FIX_STUBS_WARNINGS = -Wno-unused
LLIBS = ['m', 'stdc++', 'pthread', 'util']
##LOPTS = --dynamic
##DYNLDFLAGS = -shared $(LDFLAGS)
BF_PROFILE = False
BF_PROFILE_CCFLAGS = ['-pg','-g']
BF_PROFILE_LINKFLAGS = ['-pg']
BF_DEBUG = False
BF_DEBUG_CCFLAGS = ['-g', '-D_DEBUG']
BF_BUILDDIR='../build/openbsd3'
BF_INSTALLDIR='../install/openbsd3'

@ -1,165 +0,0 @@
LCGDIR = '../lib/sunos5'
LIBDIR = '${LCGDIR}'
BF_PYTHON = '/usr/local'
BF_PYTHON_VERSION = '3.2'
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' #BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'
BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic']
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = False
BF_OPENAL = '/usr/local'
BF_OPENAL_INC = '${BF_OPENAL}/include'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
BF_OPENAL_LIB = 'openal'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_CXX = '/usr'
WITH_BF_STATICCXX = False
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
WITH_BF_SDL = True
BF_SDL = '/usr/local' #$(shell sdl-config --prefix)
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
BF_SDL_LIBPATH = '${BF_SDL}/lib'
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = '/usr/local'
BF_OPENEXR_INC = ['${BF_OPENEXR}/include', '${BF_OPENEXR}/include/OpenEXR' ]
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
WITH_BF_DDS = True
WITH_BF_JPEG = True
BF_JPEG = '/usr/local'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
BF_JPEG_LIB = 'jpeg'
WITH_BF_PNG = True
BF_PNG = '/usr/local'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIBPATH = '${BF_PNG}/lib'
BF_PNG_LIB = 'png'
BF_TIFF = '/usr/local'
BF_TIFF_INC = '${BF_TIFF}/include'
WITH_BF_ZLIB = True
BF_ZLIB = '/usr'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
BF_ZLIB_LIB = 'z'
WITH_BF_INTERNATIONAL = True
BF_GETTEXT = '/usr/local'
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
BF_GETTEXT_LIB = 'gettextlib'
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_GAMEENGINE=False
WITH_BF_PLAYER = False
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
#WITH_BF_NSPR = True
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
#BF_NSPR_LIB =
# Uncomment the following line to use Mozilla inplace of netscape
#CPPFLAGS += -DMOZ_NOT_NET
# Location of MOZILLA/Netscape header files...
#BF_MOZILLA = $(LIBDIR)/mozilla
#BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl
#BF_MOZILLA_LIB =
# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB
# if this is not set.
#
# Be paranoid regarding library creation (do not update archives)
#BF_PARANOID = True
# enable freetype2 support for text objects
BF_FREETYPE = '/usr/local'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
BF_FREETYPE_LIB = 'freetype'
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
BF_QUICKTIME = '/usr/local'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
WITH_BF_ICONV = True
BF_ICONV = "/usr"
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
# enable ffmpeg support
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
BF_FFMPEG = '/usr/local'
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
BF_FFMPEG_LIB = 'avformat avcodec avutil avdevice'
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = False
BF_OPENGL = '/usr/openwin'
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIB = 'GL GLU X11 Xi'
BF_OPENGL_LIBPATH = '${BF_OPENGL}/lib'
BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a'
##
CC = 'gcc'
CXX = 'g++'
##ifeq ($CPU),alpha)
## CFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing -mieee
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
CPPFLAGS = ['-DSUN_OGL_NO_VERTEX_MACROS']
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
REL_CFLAGS = ['-DNDEBUG', '-O2']
REL_CCFLAGS = ['-DNDEBUG', '-O2']
##BF_DEPEND = True
##
##AR = ar
##ARFLAGS = ruv
##ARFLAGSQUIET = ru
##
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement']
CC_WARN = ['-Wall']
##FIX_STUBS_WARNINGS = -Wno-unused
LLIBS = ['c', 'm', 'dl', 'pthread', 'stdc++']
##LOPTS = --dynamic
##DYNLDFLAGS = -shared $(LDFLAGS)
BF_PROFILE_CCFLAGS = ['-pg', '-g ']
BF_PROFILE_LINKFLAGS = ['-pg']
BF_PROFILE = False
BF_DEBUG = False
BF_DEBUG_CCFLAGS = ['-D_DEBUG']
BF_BUILDDIR = '../build/sunos5'
BF_INSTALLDIR='../install/sunos5'
PLATFORM_LINKFLAGS = []

@ -159,10 +159,11 @@ CC = 'gcc'
CXX = 'g++'
CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
CXXFLAGS = []
CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE']
CXXFLAGS = ['-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
REL_CFLAGS = ['-DNDEBUG', '-O2']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-DNDEBUG', '-O2']
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']

@ -171,9 +171,9 @@ BGE_CXXFLAGS = ['/O2', '/EHsc', '/GR', '/fp:fast', '/arch:SSE']
BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr']
CPPFLAGS = ['-DWIN32','-D_CONSOLE', '-D_LIB', '-D_CRT_SECURE_NO_DEPRECATE']
REL_CFLAGS = ['-O2', '-DNDEBUG']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-O2', '-DNDEBUG']
REL_CXXFLAGS = ['-O2', '-DNDEBUG']
C_WARN = []
CC_WARN = []

@ -175,9 +175,9 @@ BGE_CXXFLAGS = ['/O2', '/EHsc', '/GR', '/fp:fast']
BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr', '/Od']
CPPFLAGS = ['-DWIN32', '-D_CONSOLE', '-D_LIB', '-D_CRT_SECURE_NO_DEPRECATE']
REL_CFLAGS = ['-O2', '-DNDEBUG']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-O2', '-DNDEBUG']
REL_CXXFLAGS = ['-O2', '-DNDEBUG']
C_WARN = []
CC_WARN = []

@ -316,8 +316,8 @@ def creator(env):
if env['WITH_BF_TIFF']:
defs.append('WITH_TIFF')
if not env['WITH_BF_SDL']:
defs.append('DISABLE_SDL')
if env['WITH_BF_SDL']:
defs.append('WITH_SDL')
if env['WITH_BF_PYTHON']:
incs.append('#/source/blender/python')
@ -561,9 +561,9 @@ def AppIt(target=None, source=None, env=None):
if binary == 'blender':
cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/datafiles'%(installdir, binary, VERSION)
commands.getoutput(cmd)
cmd = 'cp -R %s/release/bin/.blender/locale %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
cmd = 'cp -R %s/release/datafiles/locale %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
cmd = 'cp -R %s/release/bin/.blender/fonts %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
cmd = 'cp -R %s/release/datafiles/fonts %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)

@ -118,7 +118,7 @@ def validate_arguments(args, bc):
'WITH_BF_ICONV', 'BF_ICONV', 'BF_ICONV_INC', 'BF_ICONV_LIB', 'BF_ICONV_LIBPATH',
'WITH_BF_GAMEENGINE', 'WITH_BF_BULLET', 'WITH_BF_ELTOPO', 'BF_BULLET', 'BF_BULLET_INC', 'BF_BULLET_LIB',
'BF_WINTAB', 'BF_WINTAB_INC',
'WITH_BF_FREETYPE', 'BF_FREETYPE', 'BF_FREETYPE_INC', 'BF_FREETYPE_LIB', 'BF_FREETYPE_LIBPATH', 'BF_FREETYPE_LIB_STATIC', 'WITH_BF_FREETYPE_STATIC',
'BF_FREETYPE', 'BF_FREETYPE_INC', 'BF_FREETYPE_LIB', 'BF_FREETYPE_LIBPATH', 'BF_FREETYPE_LIB_STATIC', 'WITH_BF_FREETYPE_STATIC',
'WITH_BF_QUICKTIME', 'BF_QUICKTIME', 'BF_QUICKTIME_INC', 'BF_QUICKTIME_LIB', 'BF_QUICKTIME_LIBPATH',
'WITH_BF_FFTW3', 'BF_FFTW3', 'BF_FFTW3_INC', 'BF_FFTW3_LIB', 'BF_FFTW3_LIBPATH', 'WITH_BF_STATICFFTW3', 'BF_FFTW3_LIB_STATIC',
'WITH_BF_STATICOPENGL', 'BF_OPENGL', 'BF_OPENGL_INC', 'BF_OPENGL_LIB', 'BF_OPENGL_LIBPATH', 'BF_OPENGL_LIB_STATIC',
@ -385,7 +385,6 @@ def read_opts(env, cfg, args):
(BoolVariable('WITH_BF_STATICCXX', 'static link to stdc++', False)),
('BF_CXX_LIB_STATIC', 'static library path for stdc++', ''),
(BoolVariable('WITH_BF_FREETYPE', 'Use FreeType2 if true', True)),
('BF_FREETYPE', 'Freetype base path', ''),
('BF_FREETYPE_INC', 'Freetype include path', ''),
('BF_FREETYPE_LIB', 'Freetype library', ''),

@ -379,15 +379,15 @@ class DNACatalogHTML:
def usage():
print("\nUsage: \n\tblender2.5 -b -P BlendFileDnaExporter_25.py [-- [options]]")
print("\nUsage: \n\tblender2.5 --background -noaudio --python BlendFileDnaExporter_25.py [-- [options]]")
print("Options:")
print("\t--dna-keep-blend: doesn't delete the produced blend file DNA export to html")
print("\t--dna-debug: sets the logging level to DEBUG (lots of additional info)")
print("\t--dna-versioned saves version informations in the html and blend filenames")
print("\t--dna-overwrite-css overwrite dna.css, useful when modifying css in the script")
print("Examples:")
print("\tdefault: % blender2.5 -b -P BlendFileDnaExporter_25.py")
print("\twith options: % blender2.5 -b -P BlendFileDnaExporter_25.py -- --dna-keep-blend --dna-debug\n")
print("\tdefault: % blender2.5 --background -noaudio --python BlendFileDnaExporter_25.py")
print("\twith options: % blender2.5 --background -noaudio --python BlendFileDnaExporter_25.py -- --dna-keep-blend --dna-debug\n")
######################################################

@ -16,14 +16,14 @@ Below you have the help message with a list of options you can use.
Usage:
blender2.5 -b -P BlendFileDnaExporter_25.py [-- [options]]
blender2.5 --background -noaudio --python BlendFileDnaExporter_25.py [-- [options]]
Options:
--dna-keep-blend: doesn't delete the produced blend file DNA export to html
--dna-debug: sets the logging level to DEBUG (lots of additional info)
--dna-versioned saves version informations in the html and blend filenames
--dna-overwrite-css overwrite dna.css, useful when modifying css in the script
Examples:
default: % blender2.5 -b -P BlendFileDnaExporter_25.py
with options: % blender2.5 -b -P BlendFileDnaExporter_25.py -- --dna-keep-blend --dna-debug
default: % blender2.5 --background -noaudio --python BlendFileDnaExporter_25.py
with options: % blender2.5 --background -noaudio --python BlendFileDnaExporter_25.py -- --dna-keep-blend --dna-debug

@ -27,7 +27,7 @@ For HTML generation
-------------------
- Run this script from blenders root path once you have compiled blender
./blender.bin --background --python doc/python_api/sphinx_doc_gen.py
./blender.bin --background -noaudio --python doc/python_api/sphinx_doc_gen.py
This will generate python files in doc/python_api/sphinx-in/
providing ./blender.bin is or links to the blender executable
@ -95,7 +95,7 @@ else:
# for quick rebuilds
"""
rm -rf /b/doc/python_api/sphinx-* && \
./blender.bin --background --factory-startup --python doc/python_api/sphinx_doc_gen.py && \
./blender.bin --background -noaudio --factory-startup --python doc/python_api/sphinx_doc_gen.py && \
sphinx-build doc/python_api/sphinx-in doc/python_api/sphinx-out
"""

@ -48,7 +48,7 @@ SPHINXBASE=doc/python_api
if $DO_EXE_BLENDER ; then
# dont delete existing docs, now partial updates are used for quick builds.
$BLENDER --background --factory-startup --python $SPHINXBASE/sphinx_doc_gen.py
$BLENDER --background -noaudio --factory-startup --python $SPHINXBASE/sphinx_doc_gen.py
fi

@ -352,7 +352,7 @@ const float AUD_ChannelMapperReader::SURROUND71_ANGLES[] =
0.0f * M_PI / 180.0f,
0.0f * M_PI / 180.0f,
-110.0f * M_PI / 180.0f,
110.0f * M_PI / 180.0f
110.0f * M_PI / 180.0f,
-150.0f * M_PI / 180.0f,
150.0f * M_PI / 180.0f
};

@ -107,8 +107,14 @@ void AUD_SequencerReader::read(int& length, bool& eos, sample_t* buffer)
if(result < 0)
{
handle = new AUD_SequencerHandle(entry, m_device);
handles.push_front(handle);
try
{
handle = new AUD_SequencerHandle(entry, m_device);
handles.push_front(handle);
}
catch(AUD_Exception&)
{
}
eit++;
}
else if(result == 0)

@ -29,7 +29,7 @@
/* check our ffmpeg is new enough, avoids user complaints */
#if (LIBAVFORMAT_VERSION_MAJOR < 52) || ((LIBAVFORMAT_VERSION_MAJOR == 52) && (LIBAVFORMAT_VERSION_MINOR <= 64))
# error "FFmpeg 0.7 or newer is needed, Upgrade you're FFmpeg or disable it"
# error "FFmpeg 0.7 or newer is needed, Upgrade your FFmpeg or disable it"
#endif
/* end sanity check */

@ -466,8 +466,20 @@ typedef struct {
typedef struct {
/** The key code. */
GHOST_TKey key;
/* ascii / utf8: both should always be set when possible,
* - ascii may be '\0' however if the user presses a non ascii key
* - unicode may not be set if the system has no unicode support
*
* These values are intended to be used as follows.
* For text input use unicode when available, fallback to ascii.
* For areas where unicode is not needed, number input for example, always
* use ascii, unicode is ignored - campbell.
*/
/** The ascii code for the key event ('\0' if none). */
char ascii;
/** The unicode character. if the length is 6, not NULL terminated if all 6 are set */
char utf8_buf[6];
} GHOST_TEventKeyData;
typedef struct {

@ -55,6 +55,7 @@ public:
{
m_keyEventData.key = key;
m_keyEventData.ascii = '\0';
m_keyEventData.utf8_buf[0]= '\0';
m_data = &m_keyEventData;
}
@ -65,11 +66,13 @@ public:
* @param key The key code of the key.
* @param ascii The ascii code for the key event.
*/
GHOST_EventKey(GHOST_TUns64 msec, GHOST_TEventType type, GHOST_IWindow* window, GHOST_TKey key, char ascii)
GHOST_EventKey(GHOST_TUns64 msec, GHOST_TEventType type, GHOST_IWindow* window, GHOST_TKey key, char ascii, const char utf8_buf[6])
: GHOST_Event(msec, type, window)
{
m_keyEventData.key = key;
m_keyEventData.ascii = ascii;
if (utf8_buf) memcpy(m_keyEventData.utf8_buf, utf8_buf, sizeof(m_keyEventData.utf8_buf));
else m_keyEventData.utf8_buf[0]= '\0';
m_data = &m_keyEventData;
}

@ -931,7 +931,7 @@ OSStatus GHOST_SystemCarbon::handleKeyEvent(EventRef event)
} else {
type = GHOST_kEventKeyUp;
}
pushEvent( new GHOST_EventKey( getMilliSeconds(), type, window, key, ascii) );
pushEvent( new GHOST_EventKey( getMilliSeconds(), type, window, key, ascii, NULL) );
// }
break;

@ -1654,8 +1654,12 @@ GHOST_TSuccess GHOST_SystemCocoa::handleKeyEvent(void *eventPtr)
//printf("\nW failure for event 0x%x",[event type]);
return GHOST_kFailure;
}
char utf8_buf[6]= {'\0'};
ascii = 0;
switch ([event type]) {
case NSKeyDown:
case NSKeyUp:
charsIgnoringModifiers = [event charactersIgnoringModifiers];
@ -1667,28 +1671,30 @@ GHOST_TSuccess GHOST_SystemCocoa::handleKeyEvent(void *eventPtr)
keyCode = convertKey([event keyCode],0,
[event type] == NSKeyDown?kUCKeyActionDown:kUCKeyActionUp);
/* handling both unicode or ascii */
characters = [event characters];
if ([characters length]>0) { //Check for dead keys
//Convert characters to iso latin 1 encoding
convertedCharacters = [characters dataUsingEncoding:NSISOLatin1StringEncoding];
if ([convertedCharacters length]>0)
ascii =((char*)[convertedCharacters bytes])[0];
else
ascii = 0; //Character not available in iso latin 1 encoding
if ([characters length]>0) {
convertedCharacters = [characters dataUsingEncoding:NSUTF8StringEncoding];
for (int x = 0; x < [convertedCharacters length]; x++) {
utf8_buf[x] = ((char*)[convertedCharacters bytes])[x];
}
/* ascii is a subset of unicode */
if ([convertedCharacters length] == 1) {
ascii = utf8_buf[0];
}
}
else
ascii= 0;
if ((keyCode == GHOST_kKeyQ) && (m_modifierMask & NSCommandKeyMask))
break; //Cmd-Q is directly handled by Cocoa
if ([event type] == NSKeyDown) {
pushEvent( new GHOST_EventKey([event timestamp]*1000, GHOST_kEventKeyDown, window, keyCode, ascii) );
//printf("\nKey down rawCode=0x%x charsIgnoringModifiers=%c keyCode=%u ascii=%i %c",[event keyCode],[charsIgnoringModifiers length]>0?[charsIgnoringModifiers characterAtIndex:0]:' ',keyCode,ascii,ascii);
pushEvent( new GHOST_EventKey([event timestamp]*1000, GHOST_kEventKeyDown, window, keyCode, ascii, utf8_buf) );
//printf("Key down rawCode=0x%x charsIgnoringModifiers=%c keyCode=%u ascii=%i %c utf8=%s\n",[event keyCode],[charsIgnoringModifiers length]>0?[charsIgnoringModifiers characterAtIndex:0]:' ',keyCode,ascii,ascii, utf8_buf);
} else {
pushEvent( new GHOST_EventKey([event timestamp]*1000, GHOST_kEventKeyUp, window, keyCode, ascii) );
//printf("\nKey up rawCode=0x%x charsIgnoringModifiers=%c keyCode=%u ascii=%i %c",[event keyCode],[charsIgnoringModifiers length]>0?[charsIgnoringModifiers characterAtIndex:0]:' ',keyCode,ascii,ascii);
pushEvent( new GHOST_EventKey([event timestamp]*1000, GHOST_kEventKeyUp, window, keyCode, 0, '\0') );
//printf("Key up rawCode=0x%x charsIgnoringModifiers=%c keyCode=%u ascii=%i %c utf8=%s\n",[event keyCode],[charsIgnoringModifiers length]>0?[charsIgnoringModifiers characterAtIndex:0]:' ',keyCode,ascii,ascii, utf8_buf);
}
break;

@ -441,7 +441,7 @@ GHOST_SystemSDL::processEvent(SDL_Event *sdl_event)
}
}
g_event= new GHOST_EventKey(getMilliSeconds(), type, window, gkey, sym);
g_event= new GHOST_EventKey(getMilliSeconds(), type, window, gkey, sym, NULL);
}
break;
}

@ -712,20 +712,23 @@ GHOST_EventKey* GHOST_SystemWin32::processKeyEvent(GHOST_IWindow *window, RAWINP
GHOST_SystemWin32 * system = (GHOST_SystemWin32 *)getSystem();
GHOST_TKey key = system->hardKey(window, raw, &keyDown, &vk);
GHOST_EventKey* event;
if (key != GHOST_kKeyUnknown) {
char ascii = '\0';
char utf8_char[6] = {0} ;
unsigned short utf16[2]={0};
wchar_t utf16[2]={0};
BYTE state[256];
GetKeyboardState((PBYTE)state);
GetKeyboardState((PBYTE)state);
if(ToAsciiEx(vk, 0, state, utf16, 0, system->m_keylayout))
WideCharToMultiByte(CP_ACP, 0x00000400,
if(ToUnicodeEx(vk, 0, state, utf16, 2, 0, system->m_keylayout))
WideCharToMultiByte(CP_UTF8, 0,
(wchar_t*)utf16, 1,
(LPSTR) &ascii, 1,
NULL,NULL);
(LPSTR) utf8_char, 5,
NULL,NULL); else *utf8_char = 0;
event = new GHOST_EventKey(system->getMilliSeconds(), keyDown ? GHOST_kEventKeyDown: GHOST_kEventKeyUp, window, key, ascii);
if(!keyDown) utf8_char[0] = '\0';
event = new GHOST_EventKey(system->getMilliSeconds(), keyDown ? GHOST_kEventKeyDown: GHOST_kEventKeyUp, window, key, (*utf8_char & 0x80)?'?':*utf8_char, utf8_char);
#ifdef GHOST_DEBUG
std::cout << ascii << std::endl;

@ -89,6 +89,11 @@ GHOST_SystemX11(
abort(); //was return before, but this would just mean it will crash later
}
/* Open a connection to the X input manager */
#if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
m_xim = XOpenIM(m_display, NULL, (char *)GHOST_X11_RES_NAME, (char *)GHOST_X11_RES_CLASS);
#endif
m_delete_window_atom
= XInternAtom(m_display, "WM_DELETE_WINDOW", True);
@ -141,6 +146,10 @@ GHOST_SystemX11(
GHOST_SystemX11::
~GHOST_SystemX11()
{
#if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
XCloseIM(m_xim);
#endif
XCloseDisplay(m_display);
}
@ -500,9 +509,9 @@ GHOST_SystemX11::processEvent(XEvent *xe)
case KeyRelease:
{
XKeyEvent *xke = &(xe->xkey);
KeySym key_sym = XLookupKeysym(xke,0);
char ascii;
char utf8_buf[6]; /* 6 is enough for a utf8 char */
GHOST_TKey gkey = convertXKey(key_sym);
GHOST_TEventType type = (xke->type == KeyPress) ?
@ -512,13 +521,55 @@ GHOST_SystemX11::processEvent(XEvent *xe)
ascii = '\0';
}
#if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
/* getting unicode on key-up events gives XLookupNone status */
if (xke->type == KeyPress) {
Status status;
int len;
/* use utf8 because its not locale depentant, from xorg docs */
if (!(len= Xutf8LookupString(window->getX11_XIC(), xke, utf8_buf, sizeof(utf8_buf), &key_sym, &status))) {
utf8_buf[0]= '\0';
}
if ((status == XLookupChars || status == XLookupBoth)) {
if ((unsigned char)utf8_buf[0] >= 32) { /* not an ascii control character */
/* do nothing for now, this is valid utf8 */
}
else {
utf8_buf[0]= '\0';
}
}
else if (status == XLookupKeySym) {
/* this key doesn't have a text representation, it is a command
key of some sort */;
}
else {
printf("Bad keycode lookup. Keysym 0x%x Status: %s\n",
(unsigned int) key_sym,
(status == XBufferOverflow ? "BufferOverflow" :
status == XLookupNone ? "XLookupNone" :
status == XLookupKeySym ? "XLookupKeySym" :
"Unknown status"));
printf("'%.*s' %p %p\n", len, utf8_buf, window->getX11_XIC(), m_xim);
}
}
else {
utf8_buf[0]= '\0';
}
#else
utf8_buf[0]= '\0';
#endif
g_event = new
GHOST_EventKey(
getMilliSeconds(),
type,
window,
gkey,
ascii
ascii,
utf8_buf
);
break;

@ -40,6 +40,12 @@
#include "GHOST_System.h"
#include "../GHOST_Types.h"
#if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
# define GHOST_X11_RES_NAME "Blender" /* res_name */
# define GHOST_X11_RES_CLASS "Blender" /* res_class */
#endif
class GHOST_WindowX11;
/**
@ -203,6 +209,14 @@ public:
return m_display;
}
#if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
XIM
getX11_XIM(
) {
return m_xim;
}
#endif
/* Helped function for get data from the clipboard. */
void getClipboard_xcout(XEvent evt, Atom sel, Atom target,
unsigned char **txt, unsigned long *len,
@ -258,6 +272,9 @@ public:
private :
Display * m_display;
#if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
XIM m_xim;
#endif
/// The vector of windows that need to be updated.
std::vector<GHOST_WindowX11 *> m_dirty_windows;

@ -392,6 +392,13 @@ GHOST_WindowX11(
}
}
#if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
m_xic = XCreateIC(m_system->getX11_XIM(), XNClientWindow, m_window, XNFocusWindow, m_window,
XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
XNResourceName, GHOST_X11_RES_NAME, XNResourceClass,
GHOST_X11_RES_CLASS, NULL);
#endif
// Set the window icon
XWMHints *xwmhints = XAllocWMHints();
XImage *x_image, *mask_image;
@ -1304,6 +1311,13 @@ GHOST_WindowX11::
XSetSelectionOwner(m_display, Clipboard_atom, None, CurrentTime);
}
#if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
if (m_xic) {
XDestroyIC(m_xic);
}
#endif
XDestroyWindow(m_display, m_window);
XFree(m_visual);
}

@ -221,6 +221,10 @@ public:
{ return NULL; }
#endif // WITH_X11_XINPUT
#if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
XIC getX11_XIC() { return m_xic; }
#endif
/*
* Need this in case that we want start the window
* in FullScree or Maximized state.
@ -363,6 +367,10 @@ private :
XTablet m_xtablet;
#endif
#if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
XIC m_xic;
#endif
void icccmSetState(int state);
int icccmGetState() const;

@ -50,9 +50,8 @@
extern int datatoc_bfont_ttf_size;
extern char datatoc_bfont_ttf[];
// XXX, bad, but BLI uses these
char bprogname[160]= "";
char U[1024]= {0};
/* cheat */
char U[1024]= {0};
#endif
#include "Util.h"

@ -49,14 +49,14 @@
* the Standard Template Library but without the painful get()
* semantics to access the internal c style pointer.
*
* It is often useful to explicitely decalre ownership of memory
* It is often useful to explicitly declare ownership of memory
* allocated on the heap within class or function scope. This
* class helps you to encapsulate this ownership within a value
* type. When an instance of this class goes out of scope it
* makes sure that any memory associated with it's internal pointer
* is deleted. It can help to inform users of an aggregate class
* that it owns instances of it's members and these instances
* should not be shared. This is not reliably enforcable in C++
* should not be shared. This is not reliably enforceable in C++
* but this class attempts to make the 1-1 relationship clear.
*
* @section Example usage

@ -16,7 +16,7 @@ This means when string "some message id" is used as operator name, tooltip, menu
and so it'll be displayed on the screen as "translation for this message".
Pretty simple.
This source files are pre-compiled into ../release/bin/.blender/locale/<language>/LC_MESSAGES/blender.mo,
This source files are pre-compiled into ../release/datafiles/locale/<language>/LC_MESSAGES/blender.mo,
so they aren't getting compiled every time Blender is compiling to save some time and prevent
failure on systems which don't have needed tools for compiling .po files.

@ -30,7 +30,7 @@ import sys
GETTEXT_MSGFMT_EXECUTABLE = "msgfmt"
CURRENT_DIR = os.path.abspath(os.path.dirname(__file__))
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.join(CURRENT_DIR, "..")))
LOCALE_DIR = os.path.join(SOURCE_DIR, "release", "bin", ".blender", "locale")
LOCALE_DIR = os.path.join(SOURCE_DIR, "release", "datafiles", "locale")
DOMAIN = "blender"

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 KiB

After

Width:  |  Height:  |  Size: 150 KiB

@ -16,7 +16,7 @@
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
# <pep8-80 compliant>
from _bpy import types as bpy_types
import _bpy
@ -34,7 +34,8 @@ class Context(StructRNA):
def copy(self):
from types import BuiltinMethodType
new_context = {}
generic_attrs = list(StructRNA.__dict__.keys()) + ["bl_rna", "rna_type", "copy"]
generic_attrs = (list(StructRNA.__dict__.keys()) +
["bl_rna", "rna_type", "copy"])
for attr in dir(self):
if not (attr.startswith("_") or attr in generic_attrs):
value = getattr(self, attr)
@ -52,14 +53,19 @@ class Library(bpy_types.ID):
"""ID data blocks which use this library"""
import bpy
# See: readblenentry.c, IDTYPE_FLAGS_ISLINKABLE, we could make this an attribute in rna.
attr_links = "actions", "armatures", "brushes", "cameras", \
"curves", "grease_pencil", "groups", "images", \
"lamps", "lattices", "materials", "metaballs", \
"meshes", "node_groups", "objects", "scenes", \
"sounds", "speakers", "textures", "texts", "fonts", "worlds"
# See: readblenentry.c, IDTYPE_FLAGS_ISLINKABLE,
# we could make this an attribute in rna.
attr_links = ("actions", "armatures", "brushes", "cameras",
"curves", "grease_pencil", "groups", "images",
"lamps", "lattices", "materials", "metaballs",
"meshes", "node_groups", "objects", "scenes",
"sounds", "speakers", "textures", "texts",
"fonts", "worlds")
return tuple(id_block for attr in attr_links for id_block in getattr(bpy.data, attr) if id_block.library == self)
return tuple(id_block
for attr in attr_links
for id_block in getattr(bpy.data, attr)
if id_block.library == self)
class Texture(bpy_types.ID):
@ -69,13 +75,21 @@ class Texture(bpy_types.ID):
def users_material(self):
"""Materials that use this texture"""
import bpy
return tuple(mat for mat in bpy.data.materials if self in [slot.texture for slot in mat.texture_slots if slot])
return tuple(mat for mat in bpy.data.materials
if self in [slot.texture
for slot in mat.texture_slots
if slot]
)
@property
def users_object_modifier(self):
"""Object modifiers that use this texture"""
import bpy
return tuple(obj for obj in bpy.data.objects if self in [mod.texture for mod in obj.modifiers if mod.type == 'DISPLACE'])
return tuple(obj for obj in bpy.data.objects if
self in [mod.texture
for mod in obj.modifiers
if mod.type == 'DISPLACE']
)
class Group(bpy_types.ID):
@ -85,7 +99,8 @@ class Group(bpy_types.ID):
def users_dupli_group(self):
"""The dupli group this group is used in"""
import bpy
return tuple(obj for obj in bpy.data.objects if self == obj.dupli_group)
return tuple(obj for obj in bpy.data.objects
if self == obj.dupli_group)
class Object(bpy_types.ID):
@ -95,19 +110,22 @@ class Object(bpy_types.ID):
def children(self):
"""All the children of this object"""
import bpy
return tuple(child for child in bpy.data.objects if child.parent == self)
return tuple(child for child in bpy.data.objects
if child.parent == self)
@property
def users_group(self):
"""The groups this object is in"""
import bpy
return tuple(group for group in bpy.data.groups if self in group.objects[:])
return tuple(group for group in bpy.data.groups
if self in group.objects[:])
@property
def users_scene(self):
"""The scenes this object is in"""
import bpy
return tuple(scene for scene in bpy.data.scenes if self in scene.objects[:])
return tuple(scene for scene in bpy.data.scenes
if self in scene.objects[:])
class _GenericBone:
@ -118,13 +136,14 @@ class _GenericBone:
__slots__ = ()
def translate(self, vec):
"""Utility function to add *vec* to the head and tail of this bone."""
"""Utility function to add *vec* to the head and tail of this bone"""
self.head += vec
self.tail += vec
def parent_index(self, parent_test):
"""
The same as 'bone in other_bone.parent_recursive' but saved generating a list.
The same as 'bone in other_bone.parent_recursive'
but saved generating a list.
"""
# use the name so different types can be tested.
name = parent_test.name
@ -187,7 +206,9 @@ class _GenericBone:
@property
def length(self):
"""The distance from head to tail, when set the head is moved to fit the length."""
""" The distance from head to tail,
when set the head is moved to fit the length.
"""
return self.vector.length
@length.setter
@ -196,7 +217,9 @@ class _GenericBone:
@property
def vector(self):
"""The direction this bone is pointing. Utility function for (tail - head)"""
""" The direction this bone is pointing.
Utility function for (tail - head)
"""
return (self.tail - self.head)
@property
@ -222,7 +245,8 @@ class _GenericBone:
"""
Returns a chain of children with the same base name as this bone.
Only direct chains are supported, forks caused by multiple children
with matching base names will terminate the function and not be returned.
with matching base names will terminate the function
and not be returned.
"""
basename = self.basename
chain = []
@ -241,7 +265,9 @@ class _GenericBone:
chain.append(child)
else:
if len(children_basename):
print("multiple basenames found, this is probably not what you want!", self.name, children_basename)
print("multiple basenames found, "
"this is probably not what you want!",
self.name, children_basename)
break
@ -284,13 +310,18 @@ class EditBone(StructRNA, _GenericBone, metaclass=StructMetaPropGroup):
def transform(self, matrix, scale=True, roll=True):
"""
Transform the the bones head, tail, roll and envelope (when the matrix has a scale component).
Transform the the bones head, tail, roll and envelope
(when the matrix has a scale component).
:arg matrix: 3x3 or 4x4 transformation matrix.
:type matrix: :class:`mathutils.Matrix`
:arg scale: Scale the bone envelope by the matrix.
:type scale: bool
:arg roll: Correct the roll to point in the same relative direction to the head and tail.
:arg roll:
Correct the roll to point in the same relative
direction to the head and tail.
:type roll: bool
"""
from mathutils import Vector
@ -321,11 +352,23 @@ class Mesh(bpy_types.ID):
Make a mesh from a list of vertices/edges/faces
Until we have a nicer way to make geometry, use this.
:arg vertices: float triplets each representing (X, Y, Z) eg: [(0.0, 1.0, 0.5), ...].
:arg vertices:
float triplets each representing (X, Y, Z)
eg: [(0.0, 1.0, 0.5), ...].
:type vertices: iterable object
:arg edges: int pairs, each pair contains two indices to the *vertices* argument. eg: [(1, 2), ...]
:arg edges:
int pairs, each pair contains two indices to the
*vertices* argument. eg: [(1, 2), ...]
:type edges: iterable object
:arg faces: iterator of faces, each faces contains three or four indices to the *vertices* argument. eg: [(5, 6, 8, 9), (1, 2, 3), ...]
:arg faces:
iterator of faces, each faces contains three or four indices to
the *vertices* argument. eg: [(5, 6, 8, 9), (1, 2, 3), ...]
:type faces: iterable object
"""
self.vertices.add(len(vertices))
@ -419,7 +462,10 @@ class Text(bpy_types.ID):
def users_logic(self):
"""Logic bricks that use this text"""
import bpy
return tuple(obj for obj in bpy.data.objects if self in [cont.text for cont in obj.game.controllers if cont.type == 'PYTHON'])
return tuple(obj for obj in bpy.data.objects
if self in [cont.text for cont in obj.game.controllers
if cont.type == 'PYTHON']
)
# values are module: [(cls, path, line), ...]
TypeMap = {}
@ -510,10 +556,11 @@ class Operator(StructRNA, metaclass=OrderedMeta):
return super().__delattr__(attr)
def as_keywords(self, ignore=()):
""" Return a copy of the properties as a dictionary.
"""
"""Return a copy of the properties as a dictionary"""
ignore = ignore + ("rna_type",)
return {attr: getattr(self, attr) for attr in self.properties.rna_type.properties.keys() if attr not in ignore}
return {attr: getattr(self, attr)
for attr in self.properties.rna_type.properties.keys()
if attr not in ignore}
class Macro(StructRNA, metaclass=OrderedMeta):
@ -553,7 +600,8 @@ class _GenericUI:
operator_context_default = self.layout.operator_context
for func in draw_ls._draw_funcs:
# so bad menu functions don't stop the entire menu from drawing
# so bad menu functions don't stop
# the entire menu from drawing
try:
func(self, context)
except:
@ -569,13 +617,19 @@ class _GenericUI:
@classmethod
def append(cls, draw_func):
"""Append a draw function to this menu, takes the same arguments as the menus draw function."""
"""
Append a draw function to this menu,
takes the same arguments as the menus draw function
"""
draw_funcs = cls._dyn_ui_initialize()
draw_funcs.append(draw_func)
@classmethod
def prepend(cls, draw_func):
"""Prepend a draw function to this menu, takes the same arguments as the menus draw function."""
"""
Prepend a draw function to this menu, takes the same arguments as
the menus draw function
"""
draw_funcs = cls._dyn_ui_initialize()
draw_funcs.insert(0, draw_func)
@ -615,7 +669,8 @@ class Menu(StructRNA, _GenericUI, metaclass=RNAMeta):
# collect paths
files = []
for directory in searchpaths:
files.extend([(f, os.path.join(directory, f)) for f in os.listdir(directory)])
files.extend([(f, os.path.join(directory, f))
for f in os.listdir(directory)])
files.sort()
@ -635,9 +690,11 @@ class Menu(StructRNA, _GenericUI, metaclass=RNAMeta):
props.menu_idname = self.bl_idname
def draw_preset(self, context):
"""Define these on the subclass
- preset_operator
- preset_subdir
"""
Define these on the subclass
- preset_operator
- preset_subdir
"""
import bpy
self.path_menu(bpy.utils.preset_paths(self.preset_subdir), self.preset_operator)
self.path_menu(bpy.utils.preset_paths(self.preset_subdir),
self.preset_operator)

@ -16,11 +16,11 @@
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
# <pep8-80 compliant>
import sys
import bpy
language_id = 'python'
language_id = "python"
# store our own __main__ module, not 100% needed
# but python expects this in some places
@ -28,8 +28,8 @@ _BPY_MAIN_OWN = True
def add_scrollback(text, text_type):
for l in text.split('\n'):
bpy.ops.console.scrollback_append(text=l.replace('\t', ' '),
for l in text.split("\n"):
bpy.ops.console.scrollback_append(text=l.replace("\t", " "),
type=text_type)
@ -81,7 +81,8 @@ def get_console(console_id):
console, stdout, stderr = console_data
# XXX, bug in python 3.1.2, 3.2 ? (worked in 3.1.1)
# seems there is no way to clear StringIO objects for writing, have to make new ones each time.
# seems there is no way to clear StringIO objects for writing, have to
# make new ones each time.
import io
stdout = io.StringIO()
stderr = io.StringIO()
@ -99,7 +100,8 @@ def get_console(console_id):
replace_help(namespace)
console = InteractiveConsole(locals=namespace, filename="<blender_console>")
console = InteractiveConsole(locals=namespace,
filename="<blender_console>")
console.push("from mathutils import *")
console.push("from math import *")
@ -265,7 +267,8 @@ def autocomplete(context):
# Separate autocomplete output by command prompts
if scrollback != '':
bpy.ops.console.scrollback_append(text=sc.prompt + current_line.body, type='INPUT')
bpy.ops.console.scrollback_append(text=sc.prompt + current_line.body,
type='INPUT')
# Now we need to copy back the line from blender back into the
# text editor. This will change when we don't use the text editor
@ -296,10 +299,15 @@ def banner(context):
add_scrollback("Execute: Enter", 'OUTPUT')
add_scrollback("Autocomplete: Ctrl+Space", 'OUTPUT')
add_scrollback("Ctrl +/- Wheel: Zoom", 'OUTPUT')
add_scrollback("Builtin Modules: bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, bpy.utils, bgl, blf, mathutils", 'OUTPUT')
add_scrollback("Convenience Imports: from mathutils import *; from math import *", 'OUTPUT')
add_scrollback("Builtin Modules: bpy, bpy.data, bpy.ops, "
"bpy.props, bpy.types, bpy.context, bpy.utils, "
"bgl, blf, mathutils",
'OUTPUT')
add_scrollback("Convenience Imports: from mathutils import *; "
"from math import *", 'OUTPUT')
add_scrollback("", 'OUTPUT')
# add_scrollback(" WARNING!!! Blender 2.5 API is subject to change, see API reference for more info", 'ERROR')
# add_scrollback(" WARNING!!! Blender 2.5 API is subject to change, "
# "see API reference for more info", 'ERROR')
# add_scrollback("", 'OUTPUT')
sc.prompt = PROMPT

@ -9,5 +9,5 @@ bpy.context.user_preferences.edit.use_insertkey_xyz_to_rgb = False
bpy.context.user_preferences.inputs.select_mouse = 'RIGHT'
bpy.context.user_preferences.inputs.view_zoom_method = 'DOLLY'
bpy.context.user_preferences.inputs.view_zoom_axis = 'VERTICAL'
bpy.context.user_preferences.inputs.view_rotate_method = 'TRACKBALL'
bpy.context.user_preferences.inputs.view_rotate_method = 'TURNTABLE'
bpy.context.user_preferences.inputs.invert_mouse_zoom = False

@ -228,7 +228,7 @@ class BakeAction(Operator):
class ClearUselessActions(Operator):
"""Mark actions with no F-Curves for deletion after save+reload of """ \
"""file preserving "action libraries"""
"""file preserving \"action libraries\""""
bl_idname = "anim.clear_useless_actions"
bl_label = "Clear Useless Actions"
bl_options = {'REGISTER', 'UNDO'}

@ -122,7 +122,7 @@ class SelectCamera(Operator):
class SelectHierarchy(Operator):
'''Select object relative to the active objects position''' \
'''Select object relative to the active object's position''' \
'''in the hierarchy'''
bl_idname = "object.select_hierarchy"
bl_label = "Select Hierarchy"

@ -142,7 +142,7 @@ class AddPresetBase():
class ExecutePreset(Operator):
''' Executes a preset '''
'''Execute a preset'''
bl_idname = "script.execute_preset"
bl_label = "Execute a Python Preset"

@ -66,7 +66,7 @@ def guess_player_path(preset):
class PlayRenderedAnim(Operator):
'''Plays back rendered frames/movies using an external player'''
'''Play back rendered frames/movies using an external player'''
bl_idname = "render.play_rendered_anim"
bl_label = "Play Rendered Animation"
bl_options = {'REGISTER'}

@ -159,7 +159,7 @@ class VertexPaintDirt(Operator):
)
blur_iterations = IntProperty(
name="Blur Iterations",
description="Number times to blur the colors. (higher blurs more)",
description="Number times to blur the colors (higher blurs more)",
min=0, max=40,
default=1,
)

@ -51,8 +51,7 @@ class MESH_MT_shape_key_specials(Menu):
layout.operator("object.shape_key_transfer", icon='COPY_ID') # icon is not ideal
layout.operator("object.join_shapes", icon='COPY_ID') # icon is not ideal
layout.operator("object.shape_key_mirror", icon='ARROW_LEFTRIGHT')
op = layout.operator("object.shape_key_add", icon='ZOOMIN', text="New Shape From Mix")
op.from_mix = True
layout.operator("object.shape_key_add", icon='ZOOMIN', text="New Shape From Mix").from_mix = True
class MeshButtonsPanel():
@ -207,8 +206,7 @@ class DATA_PT_shape_keys(MeshButtonsPanel, Panel):
col = row.column()
sub = col.column(align=True)
op = sub.operator("object.shape_key_add", icon='ZOOMIN', text="")
op.from_mix = False
sub.operator("object.shape_key_add", icon='ZOOMIN', text="").from_mix = False
sub.operator("object.shape_key_remove", icon='ZOOMOUT', text="")
sub.menu("MESH_MT_shape_key_specials", icon='DOWNARROW_HLT', text="")

@ -665,7 +665,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
split = layout.split()
col = split.column()
col.label(text="Texture:")
col.prop(md, "texture", text="")
col.template_ID(md, "texture", new="texture.new")
col = split.column()
col.label(text="Texture Coordinates:")

@ -61,6 +61,10 @@ class PHYSICS_PT_field(PhysicButtonsPanel, Panel):
split = layout.split(percentage=0.2)
split.label(text="Shape:")
split.prop(field, "shape", text="")
elif field.type == 'TEXTURE':
split = layout.split(percentage=0.2)
split.label(text="Texture:")
split.row().template_ID(field, "texture", new="texture.new")
split = layout.split()
@ -103,7 +107,6 @@ class PHYSICS_PT_field(PhysicButtonsPanel, Panel):
elif field.type == 'TEXTURE':
col = split.column()
col.prop(field, "strength")
col.prop(field, "texture", text="")
col.prop(field, "texture_mode", text="")
col.prop(field, "texture_nabla")

@ -115,8 +115,7 @@ class SCENE_PT_keying_sets(SceneButtonsPanel, Panel):
subcol = col.column()
subcol.operator_context = 'INVOKE_DEFAULT'
op = subcol.operator("anim.keying_set_export", text="Export to File")
op.filepath = "keyingset.py"
subcol.operator("anim.keying_set_export", text="Export to File").filepath = "keyingset.py"
col = row.column()
col.label(text="Keyframing Settings:")

@ -157,24 +157,24 @@ class IMAGE_MT_image_invert(Menu):
def draw(self, context):
layout = self.layout
op = layout.operator("image.invert", text="Invert Image Colors")
op.invert_r = True
op.invert_g = True
op.invert_b = True
props = layout.operator("image.invert", text="Invert Image Colors")
props.invert_r = True
props.invert_g = True
props.invert_b = True
layout.separator()
op = layout.operator("image.invert", text="Invert Red Channel")
op.invert_r = True
props = layout.operator("image.invert", text="Invert Red Channel")
props.invert_r = True
op = layout.operator("image.invert", text="Invert Green Channel")
op.invert_g = True
props = layout.operator("image.invert", text="Invert Green Channel")
props.invert_g = True
op = layout.operator("image.invert", text="Invert Blue Channel")
op.invert_b = True
props = layout.operator("image.invert", text="Invert Blue Channel")
props.invert_b = True
op = layout.operator("image.invert", text="Invert Alpha Channel")
op.invert_a = True
props = layout.operator("image.invert", text="Invert Alpha Channel")
props.invert_a = True
class IMAGE_MT_uvs_showhide(Menu):

@ -164,11 +164,9 @@ class InputKeyMapPanel:
row.label()
if (not kmi.is_user_defined) and kmi.is_user_modified:
op = row.operator("wm.keyitem_restore", text="", icon='BACK')
op.item_id = kmi.id
row.operator("wm.keyitem_restore", text="", icon='BACK').item_id = kmi.id
else:
op = row.operator("wm.keyitem_remove", text="", icon='X')
op.item_id = kmi.id
row.operator("wm.keyitem_remove", text="", icon='X').item_id = kmi.id
# Expanded, additional event settings
if kmi.show_expanded:

@ -54,11 +54,10 @@ class VIEW3D_HT_header(Header):
else:
sub.menu("VIEW3D_MT_object")
# Contains buttons like Mode, Pivot, Manipulator, Layer, Mesh Select Mode...
layout.template_header_3D()
row = layout.row()
row = layout.row() # XXX Narrowed down vert/edge/face selector in edit mode/solid drawmode. -DingTo
row.template_header_3D()
if obj:
# Particle edit
if obj.mode == 'PARTICLE_EDIT':

@ -16,6 +16,7 @@ def invert(f):
uuid_store = {}
def slow_value(value, fac, uuid):
""" Delay the value by a factor, use a unique string to allow
use in multiple drivers without conflict:

@ -60,7 +60,8 @@ void BLF_lang_encoding_name(const char *str);
void BLF_lang_encoding(const char *str);
#define _(msgid) BLF_gettext(msgid)
/*#define _(msgid) BLF_gettext(msgid)*/
/* The "translation-marker" macro. */
#define N_(msgid) msgid
#endif /* BLF_TRANSLATION_H */

@ -136,7 +136,7 @@ char *blf_dir_search(const char *file)
for(dir=global_font_dir.first; dir; dir= dir->next) {
BLI_join_dirfile(full_path, sizeof(full_path), dir->path, file);
if (BLI_exist(full_path)) {
if (BLI_exists(full_path)) {
s= BLI_strdup(full_path);
break;
}
@ -144,7 +144,7 @@ char *blf_dir_search(const char *file)
if (!s) {
/* check the current directory, why not ? */
if (BLI_exist(file))
if (BLI_exists(file))
s= BLI_strdup(file);
}
@ -198,13 +198,13 @@ char *blf_dir_metrics_search(const char *filename)
s[2]= 'm';
/* first check .afm */
if (BLI_exist(s))
if (BLI_exists(s))
return s;
/* and now check .pfm */
s[0]= 'p';
if (BLI_exist(s))
if (BLI_exists(s))
return s;
}
MEM_freeN(mfile);

@ -129,7 +129,7 @@ static void blf_font_ensure_ascii_table(FontBLF *font)
g= (glyph_ascii_table)[c]; \
i++; \
} \
else if ((c= blf_utf8_next((unsigned char *)(str), &(i)))) { \
else if ((c= BLI_str_utf8_as_unicode_step((str), &(i))) != BLI_UTF8_ERR) { \
if ((g= blf_glyph_search((font)->glyph_cache, c)) == NULL) { \
g= blf_glyph_add(font, FT_Get_Char_Index((font)->face, c), c); \
} \
@ -141,15 +141,20 @@ static void blf_font_ensure_ascii_table(FontBLF *font)
const FT_UInt kern_mode= (has_kerning == 0) ? 0 : \
(((_font)->flags & BLF_KERNING_DEFAULT) ? \
ft_kerning_default : FT_KERNING_UNFITTED) \
\
#define BLF_KERNING_STEP(_font, kern_mode, g_prev, g, delta, pen_x) \
{ \
if (g_prev) { \
delta.x= delta.y= 0; \
if (FT_Get_Kerning((_font)->face, g_prev->idx, g->idx, kern_mode, &delta) == 0) \
if (FT_Get_Kerning((_font)->face, \
(g_prev)->idx, \
(g)->idx, \
kern_mode, \
&(delta)) == 0) \
{ \
pen_x += delta.x >> 6; \
} \
} \
} \
@ -159,7 +164,7 @@ void blf_font_draw(FontBLF *font, const char *str, unsigned int len)
GlyphBLF *g, *g_prev= NULL;
FT_Vector delta;
int pen_x= 0, pen_y= 0;
unsigned int i= 0;
size_t i= 0;
GlyphBLF **glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
BLF_KERNING_VARS(font, has_kerning, kern_mode);
@ -170,9 +175,9 @@ void blf_font_draw(FontBLF *font, const char *str, unsigned int len)
BLF_UTF8_NEXT_FAST(font, g, str, i, c, glyph_ascii_table);
if (c == 0) break;
if (g == NULL) continue;
if (has_kerning) BLF_KERNING_STEP(font, kern_mode, g_prev, g, delta, pen_x);
if (c == BLI_UTF8_ERR) break;
if (g == NULL) continue;
if (has_kerning) BLF_KERNING_STEP(font, kern_mode, g_prev, g, delta, pen_x);
/* do not return this loop if clipped, we want every character tested */
blf_glyph_render(font, g, (float)pen_x, (float)pen_y);
@ -214,7 +219,7 @@ void blf_font_buffer(FontBLF *font, const char *str)
GlyphBLF *g, *g_prev= NULL;
FT_Vector delta;
int pen_x= (int)font->pos[0], pen_y= 0;
unsigned int i= 0;
size_t i= 0;
GlyphBLF **glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
/* buffer specific vars*/
@ -235,9 +240,9 @@ void blf_font_buffer(FontBLF *font, const char *str)
BLF_UTF8_NEXT_FAST(font, g, str, i, c, glyph_ascii_table);
if (c == 0) break;
if (g == NULL) continue;
if (has_kerning) BLF_KERNING_STEP(font, kern_mode, g_prev, g, delta, pen_x);
if (c == BLI_UTF8_ERR) break;
if (g == NULL) continue;
if (has_kerning) BLF_KERNING_STEP(font, kern_mode, g_prev, g, delta, pen_x);
chx= pen_x + ((int)g->pos_x);
chy= (int)font->pos[1] + g->height;
@ -340,7 +345,7 @@ void blf_font_boundbox(FontBLF *font, const char *str, rctf *box)
GlyphBLF *g, *g_prev= NULL;
FT_Vector delta;
int pen_x= 0, pen_y= 0;
unsigned int i= 0;
size_t i= 0;
GlyphBLF **glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
rctf gbox;
@ -358,9 +363,9 @@ void blf_font_boundbox(FontBLF *font, const char *str, rctf *box)
BLF_UTF8_NEXT_FAST(font, g, str, i, c, glyph_ascii_table);
if (c == 0) break;
if (g == NULL) continue;
if (has_kerning) BLF_KERNING_STEP(font, kern_mode, g_prev, g, delta, pen_x);
if (c == BLI_UTF8_ERR) break;
if (g == NULL) continue;
if (has_kerning) BLF_KERNING_STEP(font, kern_mode, g_prev, g, delta, pen_x);
gbox.xmin= pen_x;
gbox.xmax= pen_x + g->advance;

@ -40,7 +40,6 @@ struct rctf;
unsigned int blf_next_p2(unsigned int x);
unsigned int blf_hash(unsigned int val);
int blf_utf8_next(unsigned char *buf, unsigned int *iindex);
char *blf_dir_search(const char *file);
char *blf_dir_metrics_search(const char *filename);

@ -55,6 +55,7 @@
#include "BLI_linklist.h" /* linknode */
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BLI_path_util.h"
#define DOMAIN_NAME "blender"
@ -103,10 +104,13 @@ void BLF_lang_init(void)
BLI_strncpy(global_encoding_name, SYSTEM_ENCODING_DEFAULT, sizeof(global_encoding_name));
if (messagepath)
if (messagepath) {
BLI_strncpy(global_messagepath, messagepath, sizeof(global_messagepath));
else
}
else {
printf("%s: 'locale' data path for translations not found, continuing\n", __func__);
global_messagepath[0]= '\0';
}
}

@ -38,6 +38,7 @@
#include "MEM_guardedalloc.h"
#include "BLI_utildefines.h"
#include "BLI_path_util.h"
#include "BLI_string.h"
#include "BLI_path_util.h"
@ -54,11 +55,16 @@ unsigned char *BLF_get_unifont(int *unifont_size_r)
{
if(unifont_ttf==NULL) {
char *fontpath = BLI_get_folder(BLENDER_DATAFILES, "fonts");
char unifont_path[1024];
if (fontpath) {
char unifont_path[1024];
BLI_snprintf(unifont_path, sizeof(unifont_path), "%s/%s", fontpath, unifont_filename);
BLI_snprintf(unifont_path, sizeof(unifont_path), "%s/%s", fontpath, unifont_filename);
unifont_ttf= (unsigned char*)BLI_ungzip_to_mem(unifont_path, &unifont_size);
unifont_ttf= (unsigned char*)BLI_file_ungzip_to_mem(unifont_path, &unifont_size);
}
else {
printf("%s: 'fonts' data path not found for international font, continuing\n", __func__);
}
}
*unifont_size_r= unifont_size;

@ -37,6 +37,8 @@
#include "blf_internal.h"
#include "BLI_string_utf8.h"
unsigned int blf_next_p2(unsigned int x)
{
x -= 1;
@ -62,67 +64,3 @@ unsigned int blf_hash(unsigned int val)
key ^= (key >> 17);
return key % 257;
}
/*
* This function is from Imlib2 library (font_main.c), a
* library that does image file loading and saving as well
* as rendering, manipulation, arbitrary polygon support, etc.
*
* Copyright (C) 2000 Carsten Haitzler and various contributors
* The original name: imlib_font_utf8_get_next
* more info here: http://docs.enlightenment.org/api/imlib2/html/
*/
int blf_utf8_next(unsigned char *buf, unsigned int *iindex)
{
/* Reads UTF8 bytes from 'buf', starting at 'index' and
* returns the code point of the next valid code point.
* 'index' is updated ready for the next call.
*
* Returns 0 to indicate an error (e.g. invalid UTF8)
*/
int index= *iindex, len, r;
unsigned char d, d2, d3, d4;
d= buf[index++];
if (!d)
return 0;
while (buf[index] && ((buf[index] & 0xc0) == 0x80))
index++;
len= index - *iindex;
if (len == 1)
r= d;
else if (len == 2) {
/* 2 byte */
d2= buf[*iindex + 1];
r= d & 0x1f; /* copy lower 5 */
r <<= 6;
r |= (d2 & 0x3f); /* copy lower 6 */
}
else if (len == 3) {
/* 3 byte */
d2= buf[*iindex + 1];
d3= buf[*iindex + 2];
r= d & 0x0f; /* copy lower 4 */
r <<= 6;
r |= (d2 & 0x3f);
r <<= 6;
r |= (d3 & 0x3f);
}
else {
/* 4 byte */
d2= buf[*iindex + 1];
d3= buf[*iindex + 2];
d4= buf[*iindex + 3];
r= d & 0x0f; /* copy lower 4 */
r <<= 6;
r |= (d2 & 0x3f);
r <<= 6;
r |= (d3 & 0x3f);
r <<= 6;
r |= (d4 & 0x3f);
}
*iindex= index;
return r;
}

@ -51,9 +51,9 @@ extern "C" {
/* used by packaging tools */
/* can be left blank, otherwise a,b,c... etc with no quotes */
#define BLENDER_VERSION_CHAR
#define BLENDER_VERSION_CHAR a
/* alpha/beta/rc/release, docs use this */
#define BLENDER_VERSION_CYCLE release
#define BLENDER_VERSION_CYCLE alpha
struct ListBase;
struct MemFile;

@ -34,7 +34,6 @@
*/
#include "BLI_kdopbvh.h"
#include "BLI_linklist.h"
/*
* This header encapsulates necessary code to buld a BVH
@ -118,7 +117,7 @@ void free_bvhtree_from_mesh(struct BVHTreeFromMesh *data);
#define BVHTREE_FROM_VERTICES 1
#define BVHTREE_FROM_EDGES 2
typedef LinkNode* BVHCache;
typedef struct LinkNode* BVHCache;
/*

@ -85,11 +85,6 @@ struct chartrans *BKE_text_to_curve(struct Main *bmain, struct Scene *scene, str
int BKE_font_getselection(struct Object *ob, int *start, int *end);
size_t chtoutf8(const unsigned long c, char o[4]);
void wcs2utf8s(char *dst, const wchar_t *src);
size_t wcsleninu8(wchar_t *src);
size_t utf8towchar(wchar_t *w, const char *c);
#ifdef __cplusplus
}
#endif

@ -346,9 +346,8 @@ struct bNode *nodeGetActiveID(struct bNodeTree *ntree, short idtype);
int nodeSetActiveID(struct bNodeTree *ntree, short idtype, struct ID *id);
void nodeClearActiveID(struct bNodeTree *ntree, short idtype);
void NodeTagChanged(struct bNodeTree *ntree, struct bNode *node);
int NodeTagIDChanged(struct bNodeTree *ntree, struct ID *id);
void ntreeClearTags(struct bNodeTree *ntree);
void nodeUpdate(struct bNodeTree *ntree, struct bNode *node);
int nodeUpdateID(struct bNodeTree *ntree, struct ID *id);
void nodeFreePreview(struct bNode *node);
@ -601,7 +600,7 @@ void ntreeCompositTagRender(struct Scene *sce);
int ntreeCompositTagAnimated(struct bNodeTree *ntree);
void ntreeCompositTagGenerators(struct bNodeTree *ntree);
void ntreeCompositForceHidden(struct bNodeTree *ntree, struct Scene *scene);
void ntreeCompositClearTags(struct bNodeTree *ntree);
/* ************** TEXTURE NODES *************** */

@ -51,7 +51,7 @@ struct PackedFile *newPackedFileMemory(void *mem, int memlen);
void packAll(struct Main *bmain, struct ReportList *reports);
/* unpack */
char *unpackFile(struct ReportList *reports, char *abs_name, char *local_name, struct PackedFile *pf, int how);
char *unpackFile(struct ReportList *reports, const char *abs_name, const char *local_name, struct PackedFile *pf, int how);
int unpackVFont(struct ReportList *reports, struct VFont *vfont, int how);
int unpackSound(struct Main *bmain, struct ReportList *reports, struct bSound *sound, int how);
int unpackImage(struct ReportList *reports, struct Image *ima, int how);

@ -41,8 +41,7 @@ if env['WITH_BF_QUICKTIME']:
if env['WITH_BF_SDL']:
incs += ' ' + env['BF_SDL_INC']
else:
defs.append('DISABLE_SDL')
defs.append('WITH_SDL')
if env['WITH_BF_OPENEXR']:
defs.append('WITH_OPENEXR')

@ -44,6 +44,7 @@
#include "DNA_scene_types.h"
#include "BLI_edgehash.h"
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
#include "BKE_mesh.h"

@ -38,6 +38,7 @@
#include "MEM_guardedalloc.h"
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
#include "bmesh_private.h"

@ -37,7 +37,7 @@
*/
#include "BLI_listbase.h"
#include "MEM_guardedalloc.h"
#include "BKE_bmesh.h"
#include "bmesh_private.h"

@ -40,6 +40,7 @@
#include <limits.h>
#include "MEM_guardedalloc.h"
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
#include "BKE_bmesh.h"
/**

@ -50,6 +50,7 @@
#include "BLI_memarena.h"
#include "BLI_pbvh.h"
#include "BLI_utildefines.h"
#include "BLI_linklist.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_displist.h"

@ -59,7 +59,6 @@
#include "BLI_blenlib.h"
#include "BLI_bpath.h"
#include "BLI_dynstr.h"
#include "BLI_path_util.h"
#include "BLI_utildefines.h"
#include "BLI_callbacks.h"
@ -549,7 +548,7 @@ void BKE_write_undo(bContext *C, const char *name)
counter= counter % U.undosteps;
BLI_snprintf(numstr, sizeof(numstr), "%d.blend", counter);
BLI_make_file_string("/", filepath, btempdir, numstr);
BLI_make_file_string("/", filepath, BLI_temporary_dir(), numstr);
/* success= */ /* UNUSED */ BLO_write_file(CTX_data_main(C), filepath, fileflags, NULL, NULL);
@ -719,7 +718,7 @@ void BKE_undo_save_quit(void)
/* no undo state to save */
if(undobase.first==undobase.last) return;
BLI_make_file_string("/", str, btempdir, "quit.blend");
BLI_make_file_string("/", str, BLI_temporary_dir(), "quit.blend");
file = open(str,O_BINARY+O_WRONLY+O_CREAT+O_TRUNC, 0666);
if(file == -1) {

@ -930,7 +930,7 @@ void brush_jitter_pos(Brush *brush, float pos[2], float jitterpos[2])
{
int use_jitter= brush->jitter != 0;
/* jitter-ed brush gives wierd and unpredictable result for this
/* jitter-ed brush gives weird and unpredictable result for this
kinds of stroke, so manyally disable jitter usage (sergey) */
use_jitter&= (brush->flag & (BRUSH_RESTORE_MESH|BRUSH_ANCHORED)) == 0;

@ -40,6 +40,7 @@
#include "BLI_editVert.h"
#include "BLI_utildefines.h"
#include "BLI_linklist.h"
#include "BKE_DerivedMesh.h"

@ -40,6 +40,7 @@
#include "BLI_math.h"
#include "BLI_edgehash.h"
#include "BLI_utildefines.h"
#include "BLI_linklist.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_cloth.h"

@ -41,7 +41,6 @@
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_editVert.h"
#include "BLI_utildefines.h"

@ -47,7 +47,6 @@
#include "DNA_ID.h"
#include "BLI_blenlib.h"
#include "BLI_path_util.h"
#include "BLI_linklist.h"
#include "BLI_math.h"
#include "BLI_mempool.h"

@ -38,6 +38,7 @@
#include "BLI_winstuff.h"
#include "BLI_utildefines.h"
#include "BLI_listbase.h"
#include "BLI_ghash.h"
#include "DNA_anim_types.h"
@ -1962,7 +1963,7 @@ static void dag_tag_renderlayers(Scene *sce, unsigned int lay)
if(node->id==(ID *)sce) {
SceneRenderLayer *srl= BLI_findlink(&sce->r.layers, node->custom1);
if(srl && (srl->lay & lay_changed))
NodeTagChanged(sce->nodetree, node);
nodeUpdate(sce->nodetree, node);
}
}
}

@ -33,7 +33,6 @@
#include <stddef.h>
#include "BLI_storage.h" /* _LARGEFILE_SOURCE */
#include <math.h>
#include <stdlib.h>
@ -59,8 +58,6 @@
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_jitter.h"
#include "BLI_listbase.h"
#include "BLI_noise.h"
#include "BLI_rand.h"
#include "BLI_utildefines.h"

@ -33,7 +33,6 @@
#include <stddef.h>
#include "BLI_storage.h" /* _LARGEFILE_SOURCE */
#include "MEM_guardedalloc.h"

@ -64,142 +64,6 @@
static ListBase ttfdata= {NULL, NULL};
/* UTF-8 <-> wchar transformations */
size_t chtoutf8(const unsigned long c, char o[4])
{
// Variables and initialization
/* memset(o, 0, 4); */
// Create the utf-8 string
if (c < 0x80) {
o[0] = (char) c;
return 1;
}
else if (c < 0x800) {
o[0] = (0xC0 | (c>>6));
o[1] = (0x80 | (c & 0x3f));
return 2;
}
else if (c < 0x10000) {
o[0] = (0xe0 | (c >> 12));
o[1] = (0x80 | (c >>6 & 0x3f));
o[2] = (0x80 | (c & 0x3f));
return 3;
}
else if (c < 0x200000) {
o[0] = (0xf0 | (c>>18));
o[1] = (0x80 | (c >>12 & 0x3f));
o[2] = (0x80 | (c >> 6 & 0x3f));
o[3] = (0x80 | (c & 0x3f));
return 4;
}
/* should we assert here? */
return 0;
}
void wcs2utf8s(char *dst, const wchar_t *src)
{
while(*src) {
dst += chtoutf8(*src++, dst);
}
*dst= '\0';
}
size_t wcsleninu8(wchar_t *src)
{
char ch_dummy[4];
size_t len = 0;
while(*src) {
len += chtoutf8(*src++, ch_dummy);
}
return len;
}
static size_t utf8slen(const char *strc)
{
int len=0;
while(*strc) {
if ((*strc & 0xe0) == 0xc0) {
if((strc[1] & 0x80) && (strc[1] & 0x40) == 0x00)
strc++;
} else if ((*strc & 0xf0) == 0xe0) {
if((strc[1] & strc[2] & 0x80) && ((strc[1] | strc[2]) & 0x40) == 0x00)
strc += 2;
} else if ((*strc & 0xf8) == 0xf0) {
if((strc[1] & strc[2] & strc[3] & 0x80) && ((strc[1] | strc[2] | strc[3]) & 0x40) == 0x00)
strc += 3;
}
strc++;
len++;
}
return len;
}
/* Converts Unicode to wchar
According to RFC 3629 "UTF-8, a transformation format of ISO 10646"
(http://tools.ietf.org/html/rfc3629), the valid UTF-8 encoding are:
Char. number range | UTF-8 octet sequence
(hexadecimal) | (binary)
--------------------+---------------------------------------------
0000 0000-0000 007F | 0xxxxxxx
0000 0080-0000 07FF | 110xxxxx 10xxxxxx
0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx
0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
If the encoding incidated by the first character is incorrect (because the
1 to 3 following characters do not match 10xxxxxx), the output is a '?' and
only a single input character is consumed.
*/
size_t utf8towchar(wchar_t *w, const char *c)
{
int len=0;
if(w==NULL || c==NULL) return(0);
while(*c) {
if ((*c & 0xe0) == 0xc0) {
if((c[1] & 0x80) && (c[1] & 0x40) == 0x00) {
*w=((c[0] &0x1f)<<6) | (c[1]&0x3f);
c++;
} else {
*w = '?';
}
} else if ((*c & 0xf0) == 0xe0) {
if((c[1] & c[2] & 0x80) && ((c[1] | c[2]) & 0x40) == 0x00) {
*w=((c[0] & 0x0f)<<12) | ((c[1]&0x3f)<<6) | (c[2]&0x3f);
c += 2;
} else {
*w = '?';
}
} else if ((*c & 0xf8) == 0xf0) {
if((c[1] & c[2] & c[3] & 0x80) && ((c[1] | c[2] | c[3]) & 0x40) == 0x00) {
*w=((c[0] & 0x07)<<18) | ((c[1]&0x1f)<<12) | ((c[2]&0x3f)<<6) | (c[3]&0x3f);
c += 3;
} else {
*w = '?';
}
} else
*w=(c[0] & 0x7f);
c++;
w++;
len++;
}
return len;
}
/* The vfont code */
void free_vfont(struct VFont *vf)
{
@ -691,10 +555,10 @@ struct chartrans *BKE_text_to_curve(Main *bmain, Scene *scene, Object *ob, int m
if(vfont == NULL) return NULL;
// Create unicode string
utf8len = utf8slen(cu->str);
utf8len = BLI_strlen_utf8(cu->str);
mem = MEM_callocN(((utf8len + 1) * sizeof(wchar_t)), "convertedmem");
utf8towchar(mem, cu->str);
BLI_strncpy_wchar_from_utf8(mem, cu->str, utf8len + 1);
// Count the wchar_t string length
slen = wcslen(mem);

@ -906,8 +906,8 @@ static void stampdata(Scene *scene, Object *camera, StampData *stamp_data, int d
if (scene->r.stamp & R_STAMP_MARKER) {
char *name = scene_find_last_marker_name(scene, CFRA);
if (name) strcpy(text, name);
if (name) BLI_strncpy(text, name, sizeof(text));
else strcpy(text, "<none>");
BLI_snprintf(stamp_data->marker, sizeof(stamp_data->marker), do_prefix ? "Marker %s":"%s", text);
@ -980,7 +980,7 @@ static void stampdata(Scene *scene, Object *camera, StampData *stamp_data, int d
if (scene->r.stamp & R_STAMP_SEQSTRIP) {
Sequence *seq= seq_foreground_frame_get(scene, scene->r.cfra);
if (seq) strcpy(text, seq->name+2);
if (seq) BLI_strncpy(text, seq->name+2, sizeof(text));
else strcpy(text, "<none>");
BLI_snprintf(stamp_data->strip, sizeof(stamp_data->strip), do_prefix ? "Strip %s":"%s", text);
@ -1514,7 +1514,7 @@ void BKE_image_signal(Image *ima, ImageUser *iuser, int signal)
Scene *scene;
for(scene= G.main->scene.first; scene; scene= scene->id.next) {
if(scene->nodetree) {
NodeTagIDChanged(scene->nodetree, &ima->id);
nodeUpdateID(scene->nodetree, &ima->id);
}
}
}

@ -1280,9 +1280,9 @@ static void do_latt_key(Scene *scene, Object *ob, Key *key, char *out, const int
flag= setkeys(ctime, &key->block, k, t, 0);
if(flag==0)
do_key(a, a+1, tot, (char *)out, key, actkb, k, t, KEY_MODE_DUMMY);
do_key(a, a+1, tot, out, key, actkb, k, t, KEY_MODE_DUMMY);
else
cp_key(a, a+1, tot, (char *)out, key, actkb, k[2], NULL, KEY_MODE_DUMMY);
cp_key(a, a+1, tot, out, key, actkb, k[2], NULL, KEY_MODE_DUMMY);
}
}
else {
@ -1292,7 +1292,7 @@ static void do_latt_key(Scene *scene, Object *ob, Key *key, char *out, const int
for(kb= key->block.first; kb; kb= kb->next)
kb->weights= get_weights_array(ob, kb->vgroup);
do_rel_key(0, tot, tot, (char *)out, key, actkb, KEY_MODE_DUMMY);
do_rel_key(0, tot, tot, out, key, actkb, KEY_MODE_DUMMY);
for(kb= key->block.first; kb; kb= kb->next) {
if(kb->weights) MEM_freeN(kb->weights);
@ -1386,7 +1386,7 @@ float *do_ob_key(Scene *scene, Object *ob)
if(ELEM(ob->type, OB_MESH, OB_LATTICE)) {
float *weights= get_weights_array(ob, kb->vgroup);
cp_key(0, tot, tot, (char*)out, key, actkb, kb, weights, 0);
cp_key(0, tot, tot, out, key, actkb, kb, weights, 0);
if(weights) MEM_freeN(weights);
}

@ -130,7 +130,7 @@ static LineStyleModifier *new_modifier(int type, size_t size)
static void add_to_modifier_list(ListBase *lb, LineStyleModifier *m)
{
BLI_addtail(lb, (void *)m);
BLI_uniquename(lb, m, modifier_name[m->type], '.', BLI_STRUCT_OFFSET(LineStyleModifier, name), sizeof(m->name));
BLI_uniquename(lb, m, modifier_name[m->type], '.', offsetof(LineStyleModifier, name), sizeof(m->name));
}
int FRS_add_linestyle_color_modifier(FreestyleLineStyle *linestyle, int type)

@ -52,6 +52,10 @@
#include "DNA_meshdata_types.h"
#include "BLI_utildefines.h"
#include "BLI_path_util.h"
#include "BLI_listbase.h"
#include "BLI_linklist.h"
#include "BLI_string.h"
#include "BKE_bmesh.h"
#include "BKE_cloth.h"
@ -86,8 +90,8 @@ ModifierData *modifier_new(int type)
ModifierTypeInfo *mti = modifierType_getInfo(type);
ModifierData *md = MEM_callocN(mti->structSize, mti->structName);
// FIXME: we need to make the name always be unique somehow...
strcpy(md->name, mti->name);
/* note, this name must be made unique later */
BLI_strncpy(md->name, mti->name, sizeof(md->name));
md->type = type;
md->mode = eModifierMode_Realtime

@ -42,6 +42,9 @@
#include "MEM_guardedalloc.h"
#include "BLI_utildefines.h"
#include "BLI_path_util.h"
#include "BLI_listbase.h"
#include "BLI_string.h"
#include "BLI_ghash.h"
#include "DNA_anim_types.h"

@ -184,7 +184,7 @@ bNodeSocket *nodeAddSocket(bNodeTree *ntree, bNode *node, int in_out, const char
else if (in_out==SOCK_OUT)
BLI_addtail(&node->outputs, sock);
ntree->update |= NTREE_UPDATE_NODES;
node->update |= NODE_UPDATE;
return sock;
}
@ -197,7 +197,7 @@ bNodeSocket *nodeInsertSocket(bNodeTree *ntree, bNode *node, int in_out, bNodeSo
else if (in_out==SOCK_OUT)
BLI_insertlinkbefore(&node->outputs, next_sock, sock);
ntree->update |= NTREE_UPDATE_NODES;
node->update |= NODE_UPDATE;
return sock;
}
@ -221,7 +221,7 @@ void nodeRemoveSocket(bNodeTree *ntree, bNode *node, bNodeSocket *sock)
MEM_freeN(sock->default_value);
MEM_freeN(sock);
ntree->update |= NTREE_UPDATE_NODES;
node->update |= NODE_UPDATE;
}
void nodeRemoveAllSockets(bNodeTree *ntree, bNode *node)
@ -246,7 +246,7 @@ void nodeRemoveAllSockets(bNodeTree *ntree, bNode *node)
BLI_freelistN(&node->outputs);
ntree->update |= NTREE_UPDATE_NODES;
node->update |= NODE_UPDATE;
}
/* finds a node based on its name */
@ -374,7 +374,7 @@ void nodeMakeDynamicType(bNode *node)
/*node->typeinfo= MEM_dupallocN(ntype);*/
bNodeType *newtype= MEM_callocN(sizeof(bNodeType), "dynamic bNodeType");
*newtype= *ntype;
strcpy(newtype->name, ntype->name);
BLI_strncpy(newtype->name, ntype->name, sizeof(newtype->name));
node->typeinfo= newtype;
}
}
@ -823,7 +823,7 @@ void nodeUnlinkNode(bNodeTree *ntree, bNode *node)
if(link->fromnode==node) {
lb= &node->outputs;
if (link->tonode)
NodeTagChanged(ntree, link->tonode);
link->tonode->update |= NODE_UPDATE;
}
else if(link->tonode==node)
lb= &node->inputs;
@ -1495,18 +1495,19 @@ void ntreeUpdateTree(bNodeTree *ntree)
/* update individual nodes */
for (n=0; n < totnodes; ++n) {
node = deplist[n];
if (ntreetype->update_node)
ntreetype->update_node(ntree, node);
else if (node->typeinfo->updatefunc)
node->typeinfo->updatefunc(ntree, node);
/* node tree update tags override individual node update flags */
if ((node->update & NODE_UPDATE) || (ntree->update & NTREE_UPDATE)) {
if (ntreetype->update_node)
ntreetype->update_node(ntree, node);
else if (node->typeinfo->updatefunc)
node->typeinfo->updatefunc(ntree, node);
}
/* clear update flag */
node->update = 0;
}
MEM_freeN(deplist);
/* ensures only a single output node is enabled, texnode allows multiple though */
if(ntree->type!=NTREE_TEXTURE)
ntreeSetOutput(ntree);
}
/* general tree updates */
@ -1518,6 +1519,9 @@ void ntreeUpdateTree(bNodeTree *ntree)
if (ntreetype->update)
ntreetype->update(ntree);
else {
/* Trees can be associated with a specific node type (i.e. group nodes),
* in that case a tree update function may be defined by that node type.
*/
bNodeType *ntype= node_get_type(ntree, ntree->nodetype);
if (ntype && ntype->updatetreefunc)
ntype->updatetreefunc(ntree);
@ -1530,24 +1534,24 @@ void ntreeUpdateTree(bNodeTree *ntree)
ntree->update = 0;
}
void NodeTagChanged(bNodeTree *ntree, bNode *node)
void nodeUpdate(bNodeTree *ntree, bNode *node)
{
bNodeTreeType *ntreetype = ntreeGetType(ntree->type);
bNodeTreeType *ntreetype= ntreeGetType(ntree->type);
/* extra null pointer checks here because this is called when unlinking
unknown nodes on file load, so typeinfo pointers may not be set */
if (ntreetype && ntreetype->update_node)
if (ntreetype->update_node)
ntreetype->update_node(ntree, node);
else if (node->typeinfo && node->typeinfo->updatefunc)
else if (node->typeinfo->updatefunc)
node->typeinfo->updatefunc(ntree, node);
/* clear update flag */
node->update = 0;
}
int NodeTagIDChanged(bNodeTree *ntree, ID *id)
int nodeUpdateID(bNodeTree *ntree, ID *id)
{
bNodeTreeType *ntreetype;
bNode *node;
int change = FALSE;
if(ELEM(NULL, id, ntree))
return change;
@ -1558,6 +1562,8 @@ int NodeTagIDChanged(bNodeTree *ntree, ID *id)
if(node->id==id) {
change = TRUE;
ntreetype->update_node(ntree, node);
/* clear update flag */
node->update = 0;
}
}
}
@ -1567,6 +1573,8 @@ int NodeTagIDChanged(bNodeTree *ntree, ID *id)
change = TRUE;
if (node->typeinfo->updatefunc)
node->typeinfo->updatefunc(ntree, node);
/* clear update flag */
node->update = 0;
}
}
}

@ -182,7 +182,7 @@ PackedFile *newPackedFile(ReportList *reports, const char *filename, const char
// convert relative filenames to absolute filenames
strcpy(name, filename);
BLI_strncpy(name, filename, sizeof(name));
BLI_path_abs(name, basepath);
// open the file
@ -192,7 +192,7 @@ PackedFile *newPackedFile(ReportList *reports, const char *filename, const char
if (file <= 0) {
BKE_reportf(reports, RPT_ERROR, "Unable to pack file, source path not found: \"%s\"", name);
} else {
filelen = BLI_filesize(file);
filelen = BLI_file_descriptor_size(file);
if (filelen == 0) {
// MEM_mallocN complains about MEM_mallocN(0, "bla");
@ -240,7 +240,7 @@ void packAll(Main *bmain, ReportList *reports)
}
/*
#if 0
// attempt to create a function that generates an unique filename
// this will work when all funtions in fileops.c understand relative filenames...
@ -249,6 +249,7 @@ static char *find_new_name(char *name)
{
char tempname[FILE_MAXDIR + FILE_MAXFILE];
char *newname;
size_t len;
if (fop_exists(name)) {
for (number = 1; number <= 999; number++) {
@ -258,14 +259,12 @@ static char *find_new_name(char *name)
}
}
}
newname = mallocN(strlen(tempname) + 1, "find_new_name");
strcpy(newname, tempname);
return(newname);
len= strlen(tempname) + 1;
newname = MEM_mallocN(len, "find_new_name");
memcpy(newname, tempname, len * sizeof(char));
return newname;
}
*/
#endif
int writePackedFile(ReportList *reports, const char *filename, PackedFile *pf, int guimode)
{
@ -277,14 +276,14 @@ int writePackedFile(ReportList *reports, const char *filename, PackedFile *pf, i
if (guimode) {} //XXX waitcursor(1);
strcpy(name, filename);
BLI_strncpy(name, filename, sizeof(name));
BLI_path_abs(name, G.main->name);
if (BLI_exists(name)) {
for (number = 1; number <= 999; number++) {
sprintf(tempname, "%s.%03d_", name, number);
BLI_snprintf(tempname, sizeof(tempname), "%s.%03d_", name, number);
if (! BLI_exists(tempname)) {
if (BLI_copy_fileops(name, tempname) == RET_OK) {
if (BLI_copy(name, tempname) == RET_OK) {
remove_tmp = TRUE;
}
break;
@ -342,7 +341,7 @@ int checkPackedFile(const char *filename, PackedFile *pf)
char buf[4096];
char name[FILE_MAXDIR + FILE_MAXFILE];
strcpy(name, filename);
BLI_strncpy(name, filename, sizeof(name));
BLI_path_abs(name, G.main->name);
if (stat(name, &st)) {
@ -392,9 +391,10 @@ there was an error or when the user desides to cancel the operation.
*/
char *unpackFile(ReportList *reports, char *abs_name, char *local_name, PackedFile *pf, int how)
char *unpackFile(ReportList *reports, const char *abs_name, const char *local_name, PackedFile *pf, int how)
{
char *newname = NULL, *temp = NULL;
char *newname = NULL;
const char *temp = NULL;
// char newabs[FILE_MAXDIR + FILE_MAXFILE];
// char newlocal[FILE_MAXDIR + FILE_MAXFILE];
@ -437,12 +437,11 @@ char *unpackFile(ReportList *reports, char *abs_name, char *local_name, PackedFi
}
if (temp) {
newname = MEM_mallocN(strlen(temp) + 1, "unpack_file newname");
strcpy(newname, temp);
newname= BLI_strdup(temp);
}
}
return (newname);
return newname;
}
@ -453,17 +452,17 @@ int unpackVFont(ReportList *reports, VFont *vfont, int how)
int ret_value = RET_ERROR;
if (vfont != NULL) {
strcpy(localname, vfont->name);
BLI_strncpy(localname, vfont->name, sizeof(localname));
BLI_splitdirstring(localname, fi);
sprintf(localname, "//fonts/%s", fi);
BLI_snprintf(localname, sizeof(localname), "//fonts/%s", fi);
newname = unpackFile(reports, vfont->name, localname, vfont->packedfile, how);
if (newname != NULL) {
ret_value = RET_OK;
freePackedFile(vfont->packedfile);
vfont->packedfile = NULL;
strcpy(vfont->name, newname);
BLI_strncpy(vfont->name, newname, sizeof(vfont->name));
MEM_freeN(newname);
}
}
@ -478,13 +477,13 @@ int unpackSound(Main *bmain, ReportList *reports, bSound *sound, int how)
int ret_value = RET_ERROR;
if (sound != NULL) {
strcpy(localname, sound->name);
BLI_strncpy(localname, sound->name, sizeof(localname));
BLI_splitdirstring(localname, fi);
sprintf(localname, "//sounds/%s", fi);
BLI_snprintf(localname, sizeof(localname), "//sounds/%s", fi);
newname = unpackFile(reports, sound->name, localname, sound->packedfile, how);
if (newname != NULL) {
strcpy(sound->name, newname);
BLI_strncpy(sound->name, newname, sizeof(sound->name));
MEM_freeN(newname);
freePackedFile(sound->packedfile);
@ -506,16 +505,16 @@ int unpackImage(ReportList *reports, Image *ima, int how)
int ret_value = RET_ERROR;
if (ima != NULL) {
strcpy(localname, ima->name);
BLI_strncpy(localname, ima->name, sizeof(localname));
BLI_splitdirstring(localname, fi);
sprintf(localname, "//textures/%s", fi);
BLI_snprintf(localname, sizeof(localname), "//textures/%s", fi);
newname = unpackFile(reports, ima->name, localname, ima->packedfile, how);
if (newname != NULL) {
ret_value = RET_OK;
freePackedFile(ima->packedfile);
ima->packedfile = NULL;
strcpy(ima->name, newname);
BLI_strncpy(ima->name, newname, sizeof(ima->name));
MEM_freeN(newname);
BKE_image_signal(ima, NULL, IMA_SIGNAL_RELOAD);
}

@ -54,6 +54,7 @@
#include "BLI_kdtree.h"
#include "BLI_rand.h"
#include "BLI_threads.h"
#include "BLI_linklist.h"
#include "BKE_anim.h"
#include "BKE_animsys.h"

@ -36,7 +36,6 @@
#include <stddef.h>
#include "BLI_storage.h" /* _LARGEFILE_SOURCE */
#include <stdlib.h>
#include <math.h>
@ -67,11 +66,9 @@
#include "BLI_blenlib.h"
#include "BLI_kdtree.h"
#include "BLI_kdopbvh.h"
#include "BLI_listbase.h"
#include "BLI_threads.h"
#include "BLI_storage.h" /* For _LARGEFILE64_SOURCE; zlib needs this on some systems */
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BLI_linklist.h"
#include "BKE_main.h"
#include "BKE_animsys.h"

@ -910,7 +910,7 @@ static int ptcache_path(PTCacheID *pid, char *filename)
else if (G.relbase_valid || lib) {
char file[MAX_PTCACHE_PATH]; /* we dont want the dir, only the file */
BLI_split_dirfile(blendfilename, NULL, file, 0, sizeof(file));
BLI_split_file_part(blendfilename, file, sizeof(file));
i = strlen(file);
/* remove .blend */
@ -923,8 +923,8 @@ static int ptcache_path(PTCacheID *pid, char *filename)
}
/* use the temp path. this is weak but better then not using point cache at all */
/* btempdir is assumed to exist and ALWAYS has a trailing slash */
BLI_snprintf(filename, MAX_PTCACHE_PATH, "%s"PTCACHE_PATH"%d", btempdir, abs(getpid()));
/* temporary directory is assumed to exist and ALWAYS has a trailing slash */
BLI_snprintf(filename, MAX_PTCACHE_PATH, "%s"PTCACHE_PATH"%d", BLI_temporary_dir(), abs(getpid()));
return BLI_add_slash(filename); /* new strlen() */
}
@ -2363,7 +2363,7 @@ void BKE_ptcache_remove(void)
ptcache_path(NULL, path);
if (BLI_exist(path)) {
if (BLI_exists(path)) {
/* The pointcache dir exists? - remove all pointcache */
DIR *dir;
@ -2891,24 +2891,24 @@ void BKE_ptcache_disk_cache_rename(PTCacheID *pid, char *from, char *to)
char ext[MAX_PTCACHE_PATH];
/* save old name */
strcpy(old_name, pid->cache->name);
BLI_strncpy(old_name, pid->cache->name, sizeof(old_name));
/* get "from" filename */
strcpy(pid->cache->name, from);
BLI_strncpy(pid->cache->name, from, sizeof(pid->cache->name));
len = ptcache_filename(pid, old_filename, 0, 0, 0); /* no path */
ptcache_path(pid, path);
dir = opendir(path);
if(dir==NULL) {
strcpy(pid->cache->name, old_name);
BLI_strncpy(pid->cache->name, old_name, sizeof(pid->cache->name));
return;
}
BLI_snprintf(ext, sizeof(ext), "_%02u"PTCACHE_EXT, pid->stack_index);
/* put new name into cache */
strcpy(pid->cache->name, to);
BLI_strncpy(pid->cache->name, to, sizeof(pid->cache->name));
while ((de = readdir(dir)) != NULL) {
if (strstr(de->d_name, ext)) { /* do we have the right extension?*/
@ -2963,7 +2963,7 @@ void BKE_ptcache_load_external(PTCacheID *pid)
if(cache->index >= 0)
BLI_snprintf(ext, sizeof(ext), "_%02d"PTCACHE_EXT, cache->index);
else
strcpy(ext, PTCACHE_EXT);
BLI_strncpy(ext, PTCACHE_EXT, sizeof(ext));
while ((de = readdir(dir)) != NULL) {
if (strstr(de->d_name, ext)) { /* do we have the right extension?*/

Some files were not shown because too many files have changed in this diff Show More