Merge with trunk r41197

This commit is contained in:
Miika Hamalainen 2011-10-22 16:43:23 +00:00
commit d4541fd891
409 changed files with 3818 additions and 3035 deletions

@ -213,6 +213,10 @@ 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)
option(WITH_PYTHON_UI_INFO "Allow navigating to UI source from the context menu" OFF)
mark_as_advanced(WITH_PYTHON_UI_INFO)
if(APPLE)
if(NOT CMAKE_OSX_ARCHITECTURES)
set(CMAKE_OSX_ARCHITECTURES x86_64 CACHE STRING
@ -774,7 +778,7 @@ elseif(WIN32)
set(PLATFORM_LINKFLAGS_DEBUG "/NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libc.lib")
else()
# keep GCC spesific stuff here
# keep GCC specific stuff here
if(CMAKE_COMPILER_IS_GNUCC)
set(PLATFORM_LINKLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32")
set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing")
@ -1326,6 +1330,10 @@ if(WITH_ASSERT_ABORT)
add_definitions(-DWITH_ASSERT_ABORT)
endif()
if(WITH_PYTHON_UI_INFO)
add_definitions(-DWITH_PYTHON_UI_INFO)
endif()
# message(STATUS "Using CFLAGS: ${CMAKE_C_FLAGS}")
# message(STATUS "Using CXXFLAGS: ${CMAKE_CXX_FLAGS}")

@ -34,10 +34,13 @@ OS_NCASE:=$(shell uname -s | tr '[A-Z]' '[a-z]')
# Source and Build DIR's
BLENDER_DIR:=$(shell pwd -P)
BUILD_DIR:=$(shell dirname $(BLENDER_DIR))/build/$(OS_NCASE)
BUILD_TYPE:=Release
BUILD_CMAKE_ARGS:=
ifndef BUILD_DIR
BUILD_DIR:=$(shell dirname $(BLENDER_DIR))/build/$(OS_NCASE)
endif
# -----------------------------------------------------------------------------
# additional targets for the build configuration
@ -120,6 +123,9 @@ help:
@echo " * headless - build without an interface (renderfarm or server automation)"
@echo " * bpy - build as a python module which can be loaded from python directly"
@echo ""
@echo " Note, passing the argument 'BUILD_DIR=path' when calling make will override the default build dir."
@echo ""
@echo ""
@echo "Project Files for IDE's"
@echo " * project_qtcreator - QtCreator Project Files"
@echo " * project_netbeans - NetBeans Project Files"
@ -130,9 +136,8 @@ help:
@echo " * package_pacman - build an arch linux pacmanpackage"
@echo " * package_archive - build an archive package"
@echo ""
@echo "Other Targets"
@echo "Other Targets (not assosiated with building blender)"
@echo " * translations - update blenders translation files in po/"
# TODO, doxygen and sphinx docs
@echo ""
@echo "Testing Targets (not assosiated with building blender)"
@echo " * test - run ctest, currently tests import/export, operator execution and that python modules load"
@ -145,8 +150,10 @@ help:
@echo " * check_splint - run blenders source through splint (C only)"
@echo " * check_sparse - run blenders source through sparse (C only)"
@echo ""
@echo "Documentation Targets"
@echo "Documentation Targets (not assosiated with building blender)"
@echo " * doc_py - generate sphinx python api docs"
@echo " * doc_dna - generate blender file format reference"
@echo " * doc_man - generate manpage"
@echo ""
# -----------------------------------------------------------------------------
@ -167,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
@ -231,9 +238,16 @@ 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: 'doc/python_api/sphinx-out/index.html'"
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/contents.html'"
doc_dna:
$(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:
python3 doc/manpage/blender.1.py $(BUILD_DIR)/bin/blender
clean:

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

@ -51,9 +51,9 @@ ELSE (WIN32)
ENDIF (WIN32)
IF (GLEW_INCLUDE_PATH)
SET( GLEW_FOUND 1 CACHE STRING "Set to 1 if GLEW is found, 0 otherwise")
SET(GLEW_FOUND TRUE)
ELSE (GLEW_INCLUDE_PATH)
SET( GLEW_FOUND 0 CACHE STRING "Set to 1 if GLEW is found, 0 otherwise")
SET(GLEW_FOUND FALSE)
ENDIF (GLEW_INCLUDE_PATH)
MARK_AS_ADVANCED( GLEW_FOUND )

@ -3,17 +3,24 @@
# Authors: Rohit Yadav <rohityadav89@gmail.com>
#
find_program(RPMBUILD
NAMES rpmbuild
PATHS "/usr/bin")
if(NOT DEFINED RPMBUILD)
mark_as_advanced(RPMBUILD)
find_program(RPMBUILD
NAMES rpmbuild
PATHS "/usr/bin")
mark_as_advanced(RPMBUILD)
if(RPMBUILD)
message(STATUS "RPM Build Found: ${RPMBUILD}")
else(RPMBUILD)
message(STATUS "RPM Build Not Found (rpmbuild). RPM generation will not be available")
endif()
endif()
if(RPMBUILD)
get_filename_component(RPMBUILD_PATH ${RPMBUILD} ABSOLUTE)
message(STATUS "Found rpmbuild : ${RPMBUILD_PATH}")
set(RPMBUILD_FOUND "YES")
set(RPMBUILD_FOUND TRUE)
else(RPMBUILD)
message(STATUS "rpmbuild NOT found. RPM generation will not be available")
set(RPMBUILD_FOUND "NO")
endif()
set(RPMBUILD_FOUND FALSE)
endif()

@ -27,6 +27,10 @@ IGNORE = (
"extern/eltopo/common/openglutils.cpp",
"extern/eltopo/eltopo3d/broadphase_blenderbvh.cpp",
"source/blender/imbuf/intern/imbuf_cocoa.m",
"extern/recastnavigation/Recast/Source/RecastLog.cpp",
"extern/recastnavigation/Recast/Source/RecastTimer.cpp",
"entern/audaspace/SRC/AUD_SRCResampleFactory.cpp",
"entern/audaspace/SRC/AUD_SRCResampleReader.cpp",
"extern/bullet2/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h",
"extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h",
@ -41,6 +45,10 @@ IGNORE = (
"extern/eltopo/common/meshes/TriangleIndex.hpp",
"extern/eltopo/common/meshes/meshloader.h",
"extern/eltopo/eltopo3d/broadphase_blenderbvh.h"
"extern/recastnavigation/Recast/Include/RecastLog.h",
"extern/recastnavigation/Recast/Include/RecastTimer.h",
"intern/audaspace/SRC/AUD_SRCResampleFactory.h",
"intern/audaspace/SRC/AUD_SRCResampleReader.h",
)
UTF8_CHECK = True

@ -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)
@ -582,6 +582,20 @@ def AppIt(target=None, source=None, env=None):
commands.getoutput(cmd)
cmd = 'find %s/%s.app -name __MACOSX -exec rm -rf {} \;'%(installdir, binary)
commands.getoutput(cmd)
if env['CC'].endswith('4.6.1'): # for correct errorhandling with gcc 4.6.1 we need the gcc.dylib to link, thus distribute in app-bundle
cmd = 'mkdir %s/%s.app/Contents/MacOS/lib'%(installdir, binary)
commands.getoutput(cmd)
instname = env['BF_CXX']
cmd = 'cp %s/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/lib/'%(instname, installdir, binary)
commands.getoutput(cmd)
cmd = 'install_name_tool -id @executable_path/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/lib/libgcc_s.1.dylib'%(installdir, binary)
commands.getoutput(cmd)
cmd = 'install_name_tool -change %s/lib/libgcc_s.1.dylib @executable_path/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/%s'%(instname, installdir, binary, binary)
commands.getoutput(cmd)
cmd = 'rm -rf %s/set_simulation_threads.app'%(installdir) # first clear omp_num_threads applescript
commands.getoutput(cmd)
cmd = 'cp -R %s/source/darwin/set_simulation_threads.app %s/'%(bldroot, installdir) # copy the omp_num_threads applescript
commands.getoutput(cmd)
# extract copy system python, be sure to update other build systems
# when making changes to the files that are copied.

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

@ -1,4 +1,4 @@
.TH "BLENDER" "1" "September 22, 2011" "Blender Blender 2\&.59 (sub 3)"
.TH "BLENDER" "1" "October 17, 2011" "Blender Blender 2\&.60 (sub 0)"
.SH NAME
blender \- a 3D modelling and rendering package
@ -15,7 +15,7 @@ Use Blender to create TV commercials, to make technical visualizations, business
http://www.blender.org
.SH OPTIONS
Blender 2.59 (sub 3)
Blender 2.59 (sub 4)
Usage: blender [args ...] [file] [args ...]
.br
.SS "Render Options:"
@ -382,6 +382,7 @@ Arguments are executed in the order they are given. eg
\fIBLENDER_SYSTEM_DATAFILES\fR Directory for system wide data files.
\fIBLENDER_SYSTEM_PYTHON\fR Directory for system python libraries.
\fITMP\fR or \fITMPDIR\fR Store temporary files here.
\fISDL_AUDIODRIVER\fR LibSDL audio driver \- alsa, esd, dma.
\fIPYTHONHOME\fR Path to the python directory, eg. /usr/lib/python.
.br
.br

@ -22,6 +22,7 @@
import subprocess
import os
import sys
import time
import datetime
@ -43,10 +44,15 @@ def man_format(data):
return data
# allow passing blender as argument
if sys.argv[-1].endswith(os.sep + "blender"):
blender_bin = sys.argv[-1]
else:
blender_bin = os.path.join(os.path.dirname(__file__), "../../blender.bin")
blender_bin = os.path.join(os.path.dirname(__file__), "../../blender.bin")
blender_help = subprocess.Popen([blender_bin, "--help"], stdout=subprocess.PIPE).communicate()[0].decode()
cmd = [blender_bin, "--help"]
print(" executing:", " ".join(cmd))
blender_help = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0].decode()
blender_version = subprocess.Popen([blender_bin, "--version"], stdout=subprocess.PIPE).communicate()[0].decode().strip()
blender_version = blender_version.split("Build")[0]

@ -0,0 +1,30 @@
import mathutils
# color values are represented as RGB values from 0 - 1, this is blue
col = mathutils.Color((0.0, 0.0, 1.0))
# as well as r/g/b attribute access you can adjust them by h/s/v
col.s *= 0.5
# you can access its components by attribute or index
print("Color R:", col.r)
print("Color G:", col[1])
print("Color B:", col[-1])
print("Color HSV: %.2f, %.2f, %.2f", col[:])
# components of an existing color can be set
col[:] = 0.0, 0.5, 1.0
# components of an existing color can use slice notation to get a tuple
print("Values: %f, %f, %f" % col[:])
# colors can be added and subtracted
col += mathutils.Color((0.25, 0.0, 0.0))
# Color can be multiplied, in this example color is scaled to 0-255
# can printed as integers
print("Color: %d, %d, %d" % (col * 255.0)[:])
# This example prints the color as hexidecimal
print("Hexidecimal: %.2x%.2x%.2x" % (col * 255.0)[:])

@ -1,3 +1,32 @@
import mathutils
import math
# todo
# create a new euler with default axis rotation order
eul = mathutils.Euler((0.0, math.radians(45.0), 0.0), 'XYZ')
# rotate the euler
eul.rotate_axis(math.radians(10.0), 'Z')
# you can access its components by attribute or index
print("Euler X", eul.x)
print("Euler Y", eul[1])
print("Euler Z", eul[-1])
# components of an existing euler can be set
eul[:] = 1.0, 2.0, 3.0
# components of an existing euler can use slice notation to get a tuple
print("Values: %f, %f, %f" % eul[:])
# the order can be set at any time too
eul.order = 'ZYX'
# eulers can be used to rotate vectors
vec = mathutils.Vector((0.0, 0.0, 1.0))
vec.rotate(eul)
# often its useful to convert the euler into a matrix so it can be used as
# transformations with more flexibility
mat_rot = eul.to_matrix()
mat_loc = mathutils.Matrix.Translation((2.0, 3.0, 4.0))
mat = mat_loc * mat_rot.to_4x4()

@ -1,3 +1,28 @@
import mathutils
import math
# todo
# create a location matrix
mat_loc = mathutils.Matrix.Translation((2.0, 3.0, 4.0))
# create an identitiy matrix
mat_sca = mathutils.Matrix.Scale(0.5, 4, (0.0, 0.0, 1.0))
# create a rotation matrix
mat_rot = mathutils.Matrix.Rotation(math.radians(45.0), 4, 'X')
# combine transformations
mat_out = mat_loc * mat_rot * mat_sca
print(mat_out)
# extract components back out of the matrix
loc, rot, sca = mat_out.decompose()
print(loc, rot, sca)
# it can also be useful to access components of a matrix directly
mat = mathutils.Matrix()
mat[0][0], mat[1][0], mat[2][0] = 0.0, 1.0, 2.0
mat[0][0:3] = 0.0, 1.0, 2.0
# each item in a matrix is a vector so vector utility functions can be used
mat[0].xyz = 0.0, 1.0, 2.0

@ -1,3 +1,23 @@
import mathutils
import math
# todo
# a new rotation 90 degrees about the Y axis
quat_a = mathutils.Quaternion((0.7071068, 0.0, 0.7071068, 0.0))
# passing values to Quaternion's directly can be confusing so axis, angle
# is supported for initializing too
quat_b = mathutils.Quaternion((0.0, 1.0, 0.0), math.radians(90.0))
print("Check quaternions match", quat_a == quat_b)
# like matrices, quaternions can be multiplied to accumulate rotational values
quat_a = mathutils.Quaternion((0.0, 1.0, 0.0), math.radians(90.0))
quat_b = mathutils.Quaternion((0.0, 0.0, 1.0), math.radians(45.0))
quat_out = quat_a * quat_b
# print the quat, euler degrees for mear mortals and (axis, angle)
print("Final Rotation:")
print(quat_out)
print("%.2f, %.2f, %.2f" % tuple(math.degrees(a) for a in quat_out.to_euler()))
print("(%.2f, %.2f, %.2f), %.2f" % (quat_out.axis[:] +
(math.degrees(quat_out.angle), )))

@ -106,7 +106,7 @@ There are also methods to access the current :class:`bge.types.KX_Scene`
Matricies as used by the game engine are **row major**
``matrix[row][col] = float``
:class:`bge.types.KX_Camera` has some examples using matricies.
:class:`bge.types.KX_Camera` has some examples using matrices.
*********
Variables

@ -20,7 +20,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
See :class:`Image.gl_load` and :class:`Image.gl_load`,
for example.
`OpenGL.org <http://www.opengl.org>`_
`NeHe GameDev <nehe.gamedev.net>`_
`NeHe GameDev <http://nehe.gamedev.net>`_
.. function:: glAccum(op, value):

@ -2,8 +2,9 @@
Best Practice
*************
When writing you're own scripts python is great for new developers to pick up and become productive, but you can also pick up odd habits or at least write scripts that are not easy for others to understand.
TODO: Intro text
For you're own work this is of course fine, but if you want to collaborate with others or have you're work included with blender there are practices we encourage.
Style Conventions
@ -61,5 +62,233 @@ TODO: Thomas
Script Efficiency
=================
TODO: Campbell
List Manipulation (General Python Tips)
---------------------------------------
Searching for list items
^^^^^^^^^^^^^^^^^^^^^^^^
In Python there are some handy list functions that save you having to search through the list.
Even though you're not looping on the list data **python is**, so you need to be aware of functions that will slow down your script by searching the whole list.
.. code-block:: python
my_list.count(list_item)
my_list.index(list_item)
my_list.remove(list_item)
if list_item in my_list: ...
Modifying Lists
^^^^^^^^^^^^^^^
In python we can add and remove from a list, This is slower when the list length is modifier, especially at the start of the list, since all the data after the index of modification needs to be moved up or down 1 place.
The most simple way to add onto the end of the list is to use ``my_list.append(list_item)`` or ``my_list.extend(some_list)`` and the fastest way to remove an item is ``my_list.pop()`` or ``del my_list[-1]``.
To use an index you can use ``my_list.insert(index, list_item)`` or ``list.pop(index)`` for list removal, but these are slower.
Sometimes its faster (but more memory hungry) to just rebuild the list.
Say you want to remove all triangle faces in a list.
Rather than...
.. code-block:: python
faces = mesh.faces[:] # make a list copy of the meshes faces
f_idx = len(faces) # Loop backwards
while f_idx: # while the value is not 0
f_idx -= 1
if len(faces[f_idx].vertices) == 3:
faces.pop(f_idx) # remove the triangle
It's faster to build a new list with list comprehension.
.. code-block:: python
faces = [f for f in mesh.faces if len(f.vertices) != 3]
Adding List Items
^^^^^^^^^^^^^^^^^
If you have a list that you want to add onto another list, rather then...
.. code-block:: python
for l in some_list:
my_list.append(l)
Use...
.. code-block:: python
my_list.extend([a, b, c...])
Note that insert can be used when needed, but it is slower than append especially when inserting at the start of a long list.
This example shows a very sub-optimal way of making a reversed list.
.. code-block:: python
reverse_list = []
for list_item in some_list:
reverse_list.insert(0, list_item)
Removing List Items
^^^^^^^^^^^^^^^^^^^
Use ``my_list.pop(index)`` rather than ``my_list.remove(list_item)``
This requires you to have the index of the list item but is faster since ``remove()`` will search the list.
Here is an example of how to remove items in 1 loop, removing the last items first, which is faster (as explained above).
.. code-block:: python
list_index = len(my_list)
while list_index:
list_index -= 1
if my_list[list_index].some_test_attribute == 1:
my_list.pop(list_index)
This example shows a fast way of removing items, for use in cases were where you can alter the list order without breaking the scripts functionality. This works by swapping 2 list items, so the item you remove is always last.
.. code-block:: python
pop_index = 5
# swap so the pop_index is last.
my_list[-1], my_list[pop_index] = my_list[pop_index], my_list[-1]
# remove last item (pop_index)
my_list.pop()
When removing many items in a large list this can provide a good speedup.
Avoid Copying Lists
^^^^^^^^^^^^^^^^^^^
When passing a list/dictionary to a function, it is faster to have the function modify the list rather then returning a new list so python dosn't have tp duplicate the list in memory.
Functions that modify a list in-place are more efficient then functions that create new lists.
This is generally slower so only use for functions when it makes sense not to modify the list in place.
>>> my_list = some_list_func(my_list)
This is generally faster since there is no re-assignment and no list duplication.
>>> some_list_func(vec)
Also note that passing a sliced list makes a copy of the list in python memory
>>> foobar(my_list[:])
If my_list was a large array containing 10000's of items, a copy could use a lot of extra memory.
Writing Strings to a File (Python General)
------------------------------------------
Here are 3 ways of joining multiple strings into 1 string for writing
This really applies to any area of your code that involves a lot of string joining.
Pythons string addition, *don't use if you can help it, especially when writing data in a loop.*
>>> file.write(str1 + " " + str2 + " " + str3 + "\n")
String formatting. Use this when you're writing string data from floats and int's
>>> file.write("%s %s %s\n" % (str1, str2, str3))
Pythons string joining function. To join a list of strings
>>> file.write(" ".join([str1, str2, str3, "\n"]))
join is fastest on many strings, string formatting is quite fast too (better for converting data types). String arithmetic is slowest.
Parsing Strings (Import/Exporting)
----------------------------------
Since many file formats are ASCII, the way you parse/export strings can make a large difference in how fast your script runs.
When importing strings to make into blender there are a few ways to parse the string.
Parsing Numbers
^^^^^^^^^^^^^^^
Use ``float(string)`` rather than ``eval(string)``, if you know the value will be an int then ``int(string)``, float() will work for an int too but its faster to read ints with int().
Checking String Start/End
^^^^^^^^^^^^^^^^^^^^^^^^^
If your checking the start of a string for a keyword, rather than...
>>> if line[0:5] == "vert ": ...
Use...
>>> if line.startswith("vert "):
Using ``startswith()`` is slightly faster (approx 5%) and also avoids a possible error with the slice length not matching the string length.
my_string.endswith("foo_bar") can be used for line endings too.
if your unsure whether the text is upper or lower case use lower or upper string function.
>>> if line.lower().startswith("vert ")
Use try/except Sparingly
------------------------
The **try** statement useful to save time writing error checking code.
However **try** is significantly slower then an **if** since an exception has to be set each time, so avoid using **try** in areas of your code that execute in a loop and runs many times.
There are cases where using **try** is faster than checking weather the condition will raise an error, so it is worth experimenting.
Value Comparison
----------------
Python has two ways to compare values ``a == b`` and ``a is b``, The difference is that ``==`` may run the objects comparison function ``__cmp__()`` where as ``is`` compares identity, that both variables reference the same item in memory.
In cases where you know you are checking for the same value which is referenced from multiple places, ``is`` is faster.
Time You're Code
----------------
While developing a script its good to time it to be aware of any changes in performance, this can be done simply.
.. code-block:: python
import time
time_start = time.time()
# do something...
print("My Script Finished: %.4f sec" % time.time() - time_start)

@ -223,6 +223,26 @@ While writing scripts that deal with armatures you may find you have to switch b
This is mainly an issue with editmode since pose data can be manipulated without having to be in pose mode, however for operator access you may still need to enter pose mode.
Relative File Paths
===================
Blenders relative file paths are not compatible with standard python modules such as ``sys`` and ``os``.
Built in python functions don't understand blenders ``//`` prefix which denotes the blend file path.
A common case where you would run into this problem is when exporting a material with assosiated image paths.
>>> bpy.path.abspath(image.filepath)
When using blender data from linked libraries there is an unfortunate complication since the path will be relative to the library rather then the open blend file. When the data block may be from an external blend file pass the library argument from the `bpy.types.ID`.
>>> bpy.path.abspath(image.filepath, library=image.library)
These returns the absolute path which can be used with native python modules.
Unicode Problems
================

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

@ -32,7 +32,8 @@
AUD_DynamicIIRFilterReader::AUD_DynamicIIRFilterReader(AUD_Reference<AUD_IReader> reader,
AUD_Reference<AUD_DynamicIIRFilterFactory> factory) :
AUD_IIRFilterReader(reader, std::vector<float>(), std::vector<float>())
AUD_IIRFilterReader(reader, std::vector<float>(), std::vector<float>()),
m_factory(factory)
{
sampleRateChanged(reader->getSpecs().rate);
}

@ -36,11 +36,14 @@ AUD_IIRFilterReader::AUD_IIRFilterReader(AUD_Reference<AUD_IReader> reader,
const std::vector<float>& a) :
AUD_BaseIIRFilterReader(reader, b.size(), a.size()), m_a(a), m_b(b)
{
for(int i = 1; i < m_a.size(); i++)
m_a[i] /= m_a[0];
for(int i = 0; i < m_b.size(); i++)
m_b[i] /= m_a[0];
m_a[0] = 1;
if(m_a.size())
{
for(int i = 1; i < m_a.size(); i++)
m_a[i] /= m_a[0];
for(int i = 0; i < m_b.size(); i++)
m_b[i] /= m_a[0];
m_a[0] = 1;
}
}
sample_t AUD_IIRFilterReader::filter()
@ -58,7 +61,7 @@ sample_t AUD_IIRFilterReader::filter()
void AUD_IIRFilterReader::setCoefficients(const std::vector<float>& b,
const std::vector<float>& a)
{
setLengths(m_b.size(), m_a.size());
setLengths(b.size(), a.size());
m_a = a;
m_b = b;
}

@ -826,42 +826,51 @@ float* AUD_readSoundBuffer(const char* filename, float low, float high,
AUD_Reference<AUD_IFactory> file = new AUD_FileFactory(filename);
AUD_Reference<AUD_IReader> reader = file->createReader();
AUD_SampleRate rate = reader->getSpecs().rate;
sound = new AUD_ChannelMapperFactory(file, specs);
if(high < rate)
sound = new AUD_LowpassFactory(sound, high);
if(low > 0)
sound = new AUD_HighpassFactory(sound, low);
sound = new AUD_EnvelopeFactory(sound, attack, release, threshold, 0.1f);
sound = new AUD_LinearResampleFactory(sound, specs);
if(square)
sound = new AUD_SquareFactory(sound, sthreshold);
if(accumulate)
sound = new AUD_AccumulatorFactory(sound, additive);
else if(additive)
sound = new AUD_SumFactory(sound);
reader = sound->createReader();
if(reader.isNull())
return NULL;
int len;
int position = 0;
bool eos;
do
try
{
len = samplerate;
buffer.resize((position + len) * sizeof(float), true);
reader->read(len, eos, buffer.getBuffer() + position);
position += len;
} while(!eos);
AUD_Reference<AUD_IReader> reader = file->createReader();
AUD_SampleRate rate = reader->getSpecs().rate;
sound = new AUD_ChannelMapperFactory(file, specs);
if(high < rate)
sound = new AUD_LowpassFactory(sound, high);
if(low > 0)
sound = new AUD_HighpassFactory(sound, low);
sound = new AUD_EnvelopeFactory(sound, attack, release, threshold, 0.1f);
sound = new AUD_LinearResampleFactory(sound, specs);
if(square)
sound = new AUD_SquareFactory(sound, sthreshold);
if(accumulate)
sound = new AUD_AccumulatorFactory(sound, additive);
else if(additive)
sound = new AUD_SumFactory(sound);
reader = sound->createReader();
if(reader.isNull())
return NULL;
int len;
bool eos;
do
{
len = samplerate;
buffer.resize((position + len) * sizeof(float), true);
reader->read(len, eos, buffer.getBuffer() + position);
position += len;
} while(!eos);
}
catch(AUD_Exception&)
{
return NULL;
}
float* result = (float*)malloc(position * sizeof(float));
memcpy(result, buffer.getBuffer(), position * sizeof(float));

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

@ -69,7 +69,7 @@ bool AUD_NULLDevice::AUD_NULLHandle::seek(float position)
float AUD_NULLDevice::AUD_NULLHandle::getPosition()
{
return 0.0f;
return std::numeric_limits<float>::quiet_NaN();
}
AUD_Status AUD_NULLDevice::AUD_NULLHandle::getStatus()
@ -79,7 +79,7 @@ AUD_Status AUD_NULLDevice::AUD_NULLHandle::getStatus()
float AUD_NULLDevice::AUD_NULLHandle::getVolume()
{
return 0.0f;
return std::numeric_limits<float>::quiet_NaN();
}
bool AUD_NULLDevice::AUD_NULLHandle::setVolume(float volume)
@ -89,7 +89,7 @@ bool AUD_NULLDevice::AUD_NULLHandle::setVolume(float volume)
float AUD_NULLDevice::AUD_NULLHandle::getPitch()
{
return 0.0f;
return std::numeric_limits<float>::quiet_NaN();
}
bool AUD_NULLDevice::AUD_NULLHandle::setPitch(float pitch)
@ -153,7 +153,7 @@ void AUD_NULLDevice::unlock()
float AUD_NULLDevice::getVolume() const
{
return 0;
return std::numeric_limits<float>::quiet_NaN();
}
void AUD_NULLDevice::setVolume(float volume)

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

@ -110,7 +110,7 @@ private:
const GHOST_TEmbedderWindowID parentWindow
);
/* SDL spesific */
/* SDL specific */
GHOST_WindowSDL * findGhostWindow(SDL_Window *sdl_win);
bool

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

@ -70,7 +70,7 @@ public:
~GHOST_WindowSDL();
/* SDL spesific */
/* SDL specific */
SDL_Window *
getSDLWindow()
{

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

@ -135,10 +135,12 @@ def dump_messages_rna(messages):
item.identifier,
)
# Here identifier and name can be the same!
if item.name: # and item.name != item.identifier:
messages.setdefault(item.name, []).append(msgsrc)
if item.name: # and item.name != item.identifier:
messages.setdefault(item.name,
[]).append(msgsrc)
if item.description:
messages.setdefault(item.description, []).append(msgsrc)
messages.setdefault(item.description,
[]).append(msgsrc)
def walkRNA(bl_rna):

Binary file not shown.

@ -165,7 +165,7 @@ def modules(module_cache):
if mod:
module_cache[mod_name] = mod
# just incase we get stale modules, not likely
# just in case we get stale modules, not likely
for mod_stale in modules_stale:
del module_cache[mod_stale]
del modules_stale
@ -209,7 +209,7 @@ def enable(module_name, default_set=True):
:arg module_name: The name of the addon and module.
:type module_name: string
:return: the loaded module or None on failier.
:return: the loaded module or None on failure.
:rtype: module
"""
@ -262,7 +262,7 @@ def enable(module_name, default_set=True):
# * OK loaded successfully! *
if default_set:
# just incase its enabled alredy
# just in case its enabled already
ext = _bpy.context.user_preferences.addons.get(module_name)
if not ext:
ext = _bpy.context.user_preferences.addons.new()
@ -286,7 +286,7 @@ def disable(module_name, default_set=True):
import sys
mod = sys.modules.get(module_name)
# possible this addon is from a previous session and didnt load a
# possible this addon is from a previous session and didn't load a
# module this time. So even if the module is not found, still disable
# the addon in the user prefs.
if mod:
@ -300,7 +300,7 @@ def disable(module_name, default_set=True):
else:
print("addon_utils.disable", module_name, "not loaded")
# could be in more then once, unlikely but better do this just incase.
# could be in more then once, unlikely but better do this just in case.
addons = _bpy.context.user_preferences.addons
if default_set:

@ -73,7 +73,7 @@ class DataPathBuilder(object):
try:
print("base." + item_new)
base_new = eval("base." + item_new)
break # found, dont keep looking
break # found, don't keep looking
except:
pass

@ -69,7 +69,7 @@ def read_blend_rend_chunk(path):
struct.unpack('>i' if is_big_endian else '<i', blendfile.read(4))[0]
sizeof_bhead_left -= 4
# We dont care about the rest of the bhead struct
# We don't care about the rest of the bhead struct
blendfile.read(sizeof_bhead_left)
# Now we want the scene name, start and end frame. this is 32bites long

@ -56,7 +56,7 @@ def main():
# from bpy.types import Panel
sys.modules["bpy.types"] = types
# if "-d" in sys.argv: # Enable this to measure startup speed
#~ if "-d" in sys.argv: # Enable this to measure start up speed
if 0:
import cProfile
cProfile.run('import bpy; bpy.utils.load_scripts()', 'blender.prof')

@ -138,7 +138,7 @@ class BPyOpsSubModOp(object):
@staticmethod
def _scene_update(context):
scene = context.scene
if scene: # None in backgroud mode
if scene: # None in background mode
scene.update()
else:
import bpy

@ -142,9 +142,9 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
if reload_scripts:
_bpy_types.TypeMap.clear()
# just unload, dont change user defaults, this means we can sync
# just unload, don't change user defaults, this means we can sync
# to reload. note that they will only actually reload of the
# modification time changes. This `wont` work for packages so...
# modification time changes. This `won't` work for packages so...
# its not perfect.
for module_name in [ext.module for ext in prefs.addons]:
_addon_utils.disable(module_name, default_set=False)
@ -220,7 +220,7 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
if _os.path.isdir(path):
_sys_path_ensure(path)
# only add this to sys.modules, dont run
# only add this to sys.modules, don't run
if path_subdir == "modules":
continue
@ -374,7 +374,7 @@ def smpte_from_seconds(time, fps=None):
if time >= 3600.0: # hours
hours = int(time / 3600.0)
time = time % 3600.0
if time >= 60.0: # mins
if time >= 60.0: # minutes
minutes = int(time / 60.0)
time = time % 60.0

@ -158,7 +158,7 @@ def bake_action(frame_start,
# -------------------------------------------------------------------------
# Create action
# incase animation data hassnt been created
# in case animation data hassnt been created
atd = obj.animation_data_create()
if action is None:
action = bpy.data.actions.new("Action")

@ -43,10 +43,10 @@ def load_image(imagepath,
the end will be ignored.
:type dirname: string
:arg place_holder: if True a new place holder image will be created.
this is usefull so later you can relink the image to its original data.
this is useful so later you can relink the image to its original data.
:type place_holder: bool
:arg recursive: If True, directories will be recursivly searched.
Be carefull with this if you have files in your root directory because
:arg recursive: If True, directories will be recursively searched.
Be careful with this if you have files in your root directory because
it may take a long time.
:type recursive: bool
:arg ncase_cmp: on non windows systems, find the correct case for the file.

@ -114,7 +114,7 @@ class ImportHelper:
# Axis conversion function, not pretty LUT
# use lookup tabes to convert between any axis
# use lookup table to convert between any axis
_axis_convert_matrix = (
((-1.0, 0.0, 0.0), (0.0, -1.0, 0.0), (0.0, 0.0, 1.0)),
((-1.0, 0.0, 0.0), (0.0, 0.0, -1.0), (0.0, -1.0, 0.0)),
@ -302,7 +302,7 @@ def free_derived_objects(ob):
def unpack_list(list_of_tuples):
flat_list = []
flat_list_extend = flat_list.extend # a tich faster
flat_list_extend = flat_list.extend # a tiny bit faster
for t in list_of_tuples:
flat_list_extend(t)
return flat_list
@ -318,7 +318,7 @@ def unpack_face_list(list_of_tuples):
if len(t) == 3:
if t[2] == 0:
t = t[1], t[2], t[0]
else: # assuem quad
else: # assume quad
if t[3] == 0 or t[2] == 0:
t = t[2], t[3], t[0], t[1]
@ -371,7 +371,7 @@ def path_reference(filepath,
:arg copy_subdir: the subdirectory of *base_dst* to use when mode='COPY'.
:type copy_subdir: string
:arg copy_set: collect from/to pairs when mode='COPY',
pass to *path_reference_copy* when exportign is done.
pass to *path_reference_copy* when exporting is done.
:type copy_set: set
:arg library: The library this path is relative to.
:type library: :class:`bpy.types.Library` or None
@ -450,7 +450,7 @@ def unique_name(key, name, name_dict, name_max=-1, clean_func=None, sep="."):
:arg key: unique item this name belongs to, name_dict[key] will be reused
when available.
This can be the object, mesh, material, etc instance its self.
:type key: any hashable object assosiated with the *name*.
:type key: any hashable object associated with the *name*.
:arg name: The name used to create a unique value in *name_dict*.
:type name: string
:arg name_dict: This is used to cache namespace to ensure no collisions

@ -21,7 +21,7 @@
KM_HIERARCHY = [
('Window', 'EMPTY', 'WINDOW', []), # file save, window change, exit
('Screen', 'EMPTY', 'WINDOW', [ # full screen, undo, screenshot
('Screen Editing', 'EMPTY', 'WINDOW', []), # resizing, action corners
('Screen Editing', 'EMPTY', 'WINDOW', []), # re-sizing, action corners
]),
('View2D', 'EMPTY', 'WINDOW', []), # view 2d navigation (per region)

@ -50,7 +50,7 @@ def mesh_linked_faces(mesh):
face_groups = [[f] for f in mesh.faces]
face_mapping = list(range(len(mesh.faces))) # map old, new face location
# Now clump faces iterativly
# Now clump faces iteratively
ok = True
while ok:
ok = False

@ -119,7 +119,7 @@ def object_data_add(context, obdata, operator=None):
obj_act = scene.objects.active
# XXX
# caused because entering editmodedoes not add a empty undo slot!
# caused because entering edit-mode does not add a empty undo slot!
if context.user_preferences.edit.use_enter_edit_mode:
if not (obj_act and
obj_act.mode == 'EDIT' and

@ -27,7 +27,7 @@ __all__ = (
def region_2d_to_vector_3d(region, rv3d, coord):
"""
Return a direction vector from the viewport at the spesific 2d region
Return a direction vector from the viewport at the specific 2d region
coordinate.
:arg region: region of the 3D viewport, typically bpy.context.region.

@ -49,7 +49,7 @@ class Library(bpy_types.ID):
@property
def users_id(self):
"""ID datablocks which use this library"""
"""ID data blocks which use this library"""
import bpy
# See: readblenentry.c, IDTYPE_FLAGS_ISLINKABLE, we could make this an attribute in rna.
@ -220,9 +220,9 @@ class _GenericBone:
@property
def children_recursive_basename(self):
"""
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 basenames will
terminate the function and not be returned.
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.
"""
basename = self.basename
chain = []
@ -256,7 +256,7 @@ class _GenericBone:
bones = id_data.pose.bones
elif id_data_type == bpy_types.Armature:
bones = id_data.edit_bones
if not bones: # not in editmode
if not bones: # not in edit mode
bones = id_data.bones
return bones
@ -284,11 +284,11 @@ class EditBone(StructRNA, _GenericBone, metaclass=StructMetaPropGroup):
def transform(self, matrix, scale=True, roll=True):
"""
Transform the the bones head, tail, roll and envalope (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 envalope by the 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.
:type roll: bool
@ -318,7 +318,7 @@ class Mesh(bpy_types.ID):
def from_pydata(self, vertices, edges, faces):
"""
Make a mesh from a list of verts/edges/faces
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), ...].
@ -553,7 +553,7 @@ class _GenericUI:
operator_context_default = self.layout.operator_context
for func in draw_ls._draw_funcs:
# so bad menu functions dont stop the entire menu from drawing.
# so bad menu functions don't stop the entire menu from drawing
try:
func(self, context)
except:

@ -50,7 +50,7 @@ def replace_help(namespace):
def get_console(console_id):
'''
helper function for console operators
currently each text datablock gets its own
currently each text data block gets its own
console - code.InteractiveConsole()
...which is stored in this function.
@ -65,7 +65,7 @@ def get_console(console_id):
consoles = get_console.consoles = {}
get_console.consoles_namespace_hash = hash_next
else:
# check if clearning the namespace is needed to avoid a memory leak.
# check if clearing the namespace is needed to avoid a memory leak.
# the window manager is normally loaded with new blend files
# so this is a reasonable way to deal with namespace clearing.
# bpy.data hashing is reset by undo so cant be used.
@ -135,7 +135,7 @@ def execute(context):
sys.stdout = stdout
sys.stderr = stderr
# dont allow the stdin to be used, can lock blender.
# don't allow the stdin to be used, can lock blender.
stdin_backup = sys.stdin
sys.stdin = None
@ -143,14 +143,14 @@ def execute(context):
main_mod_back = sys.modules["__main__"]
sys.modules["__main__"] = console._bpy_main_mod
# incase exception happens
line = "" # incase of encodingf error
# in case exception happens
line = "" # in case of encoding error
is_multiline = False
try:
line = line_object.body
# run the console, "\n" executes a multiline statement
# run the console, "\n" executes a multi line statement
line_exec = line if line.strip() else "\n"
is_multiline = console.push(line_exec)
@ -222,8 +222,8 @@ def autocomplete(context):
if not console:
return {'CANCELLED'}
# dont allow the stdin to be used, can lock blender.
# note: unlikely stdin would be used for autocomp. but its possible.
# don't allow the stdin to be used, can lock blender.
# note: unlikely stdin would be used for autocomplete. but its possible.
stdin_backup = sys.stdin
sys.stdin = None
@ -238,8 +238,8 @@ def autocomplete(context):
current_line = sc.history[-1]
line = current_line.body
# This function isnt aware of the text editor or being an operator
# just does the autocomp then copy its results back
# This function isn't aware of the text editor or being an operator
# just does the autocomplete then copy its results back
result = intellisense.expand(
line=line,
cursor=current_line.current_character,
@ -250,7 +250,7 @@ def autocomplete(context):
current_line.body, current_line.current_character, scrollback = result
del result
# update sel. setting body should really do this!
# update selection. setting body should really do this!
ofs = len(line_new) - len(line)
sc.select_start += ofs
sc.select_end += ofs
@ -263,12 +263,12 @@ def autocomplete(context):
if _BPY_MAIN_OWN:
sys.modules["__main__"] = main_mod_back
# Separate automplete output by command prompts
# Separate autocomplete output by command prompts
if scrollback != '':
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 dont use the text editor
# text editor. This will change when we don't use the text editor
# anymore
if scrollback:
add_scrollback(scrollback, 'INFO')

@ -64,7 +64,7 @@ def execute(context):
def autocomplete(context):
# sc = context.space_data
#~ sc = context.space_data
# TODO
return {'CANCELLED'}

@ -292,7 +292,7 @@ class InfoPropertyRNA:
elif as_arg:
if not self.is_required:
type_info.append("optional")
else: # readonly is only useful for selfs, not args
else: # readonly is only useful for self's, not args
if self.is_readonly:
type_info.append("readonly")
@ -519,7 +519,7 @@ def BuildRNAInfo():
# Done ordering structs
# precalc vars to avoid a lot of looping
# precalculate vars to avoid a lot of looping
for (rna_base, identifier, rna_struct) in structs:
# rna_struct_path = full_rna_struct_path(rna_struct)
@ -634,7 +634,7 @@ if __name__ == "__main__":
struct = rna_info.BuildRNAInfo()[0]
data = []
for struct_id, v in sorted(struct.items()):
struct_id_str = v.identifier # "".join(sid for sid in struct_id if struct_id)
struct_id_str = v.identifier #~ "".join(sid for sid in struct_id if struct_id)
for base in v.get_bases():
struct_id_str = base.identifier + "|" + struct_id_str

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

@ -87,7 +87,7 @@ class ANIM_OT_keying_set_export(Operator):
# --------------------------------------------------------
# generate and write set of lookups for id's used in paths
# cache for syncing ID-blocks to bpy paths + shorthands
# cache for syncing ID-blocks to bpy paths + shorthand's
id_to_paths_cache = {}
for ksp in ks.paths:
@ -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'}

@ -62,7 +62,7 @@ class ConsoleAutocomplete(Operator):
class ConsoleBanner(Operator):
'''Print a message whem the terminal initializes'''
'''Print a message when the terminal initializes'''
bl_idname = "console.banner"
bl_label = "Console Banner"
@ -97,7 +97,7 @@ class ConsoleLanguage(Operator):
def execute(self, context):
sc = context.space_data
# defailt to python
# default to python
sc.language = self.language
bpy.ops.console.banner()

@ -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"
@ -174,7 +174,7 @@ class SelectHierarchy(Operator):
select_new.sort(key=lambda obj_iter: obj_iter.name)
act_new = select_new[0]
# dont edit any object settings above this
# don't edit any object settings above this
if select_new:
if not self.extend:
bpy.ops.object.select_all(action='DESELECT')
@ -331,7 +331,7 @@ class ShapeTransfer(Operator):
orig_shape_coords = me_cos(ob_act.active_shape_key.data)
orig_normals = me_nos(me.vertices)
# the actual mverts location isnt as relyable as the base shape :S
# the actual mverts location isn't as reliable as the base shape :S
# orig_coords = me_cos(me.vertices)
orig_coords = me_cos(me.shape_keys.key_blocks[0].data)
@ -721,8 +721,8 @@ class TransformsToDeltasAnim(Operator):
fcu.data_path = "delta_rotation_quaternion"
obj.rotation_quaternion.identity()
# XXX: currently not implemented
# elif fcu.data_path == "rotation_axis_angle":
# fcu.data_path = "delta_rotation_axis_angle"
#~ elif fcu.data_path == "rotation_axis_angle":
#~ fcu.data_path = "delta_rotation_axis_angle"
elif fcu.data_path == "scale":
fcu.data_path = "delta_scale"
obj.scale = 1.0, 1.0, 1.0

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

@ -104,13 +104,13 @@ def extend(obj, operator, EXTEND_MODE):
uvs_vhash_target[edgepair_inner_target[1]][:] = uvs_vhash_source[edgepair_inner_source[iB]]
# Set the 2 UV's on the target face that are not touching
# for this we need to do basic expaning on the source faces UV's
# for this we need to do basic expanding on the source faces UV's
if EXTEND_MODE == 'LENGTH':
try: # divide by zero is possible
'''
measure the length of each face from the middle of each edge to the opposite
allong the axis we are copying, use this
along the axis we are copying, use this
'''
i1a = edgepair_outer_target[iB]
i2a = edgepair_inner_target[iA]
@ -158,11 +158,11 @@ def extend(obj, operator, EXTEND_MODE):
# Modes
# 0 unsearched
# 1:mapped, use search from this face. - removed!!
# 2:all siblings have been searched. dont search again.
# 2:all siblings have been searched. don't search again.
face_modes = [0] * len(face_sel)
face_modes[face_act_local_index] = 1 # extend UV's from this face.
# Edge connectivty
# Edge connectivity
edge_faces = {}
for i, f in enumerate(face_sel):
for edkey in f.edge_keys:
@ -181,7 +181,7 @@ def extend(obj, operator, EXTEND_MODE):
looplen[0] += (me_verts[ed[0]].co - me_verts[ed[1]].co).length
looplen[0] = looplen[0] / len(loop)
# remove seams, so we dont map accross seams.
# remove seams, so we don't map across seams.
for ed in me.edges:
if ed.use_seam:
# remove the edge pair if we can
@ -213,7 +213,7 @@ def extend(obj, operator, EXTEND_MODE):
face_modes[i] = 1 # we can map from this one now.
ok = True # keep searching
face_modes[i] = 2 # dont search again
face_modes[i] = 2 # don't search again
if is_editmode:
bpy.ops.object.mode_set(mode='EDIT')

@ -36,7 +36,7 @@ class prettyface(object):
def __init__(self, data):
self.has_parent = False
self.rot = False # only used for triables
self.rot = False # only used for triangles
self.xoff = 0
self.yoff = 0
@ -157,7 +157,7 @@ class prettyface(object):
angles_co.sort()
I = [i for a, i in angles_co]
# fuv = f.uv
#~ fuv = f.uv
fuv = f.id_data.uv_textures.active.data[f.index].uv # XXX25
if self.rot:
@ -200,8 +200,8 @@ def lightmap_uvpack(meshes,
'''
BOX_DIV if the maximum division of the UV map that
a box may be consolidated into.
Basicly, a lower value will be slower but waist less space
and a higher value will have more clumpy boxes but more waisted space
Basically, a lower value will be slower but waist less space
and a higher value will have more clumpy boxes but more wasted space
'''
import time
from math import sqrt
@ -321,7 +321,7 @@ def lightmap_uvpack(meshes,
lengths.append(curr_len)
curr_len = curr_len / 2.0
# Dont allow boxes smaller then the margin
# Don't allow boxes smaller then the margin
# since we contract on the margin, boxes that are smaller will create errors
# print(curr_len, side_len/MARGIN_DIV)
if curr_len / 4.0 < side_len / PREF_MARGIN_DIV:
@ -371,9 +371,9 @@ def lightmap_uvpack(meshes,
print("...done")
# Since the boxes are sized in powers of 2, we can neatly group them into bigger squares
# this is done hierarchily, so that we may avoid running the pack function
# this is done hierarchically, so that we may avoid running the pack function
# on many thousands of boxes, (under 1k is best) because it would get slow.
# Using an off and even dict us usefull because they are packed differently
# Using an off and even dict us useful because they are packed differently
# where w/h are the same, their packed in groups of 4
# where they are different they are packed in pairs
#
@ -393,14 +393,14 @@ def lightmap_uvpack(meshes,
# Count the number of boxes consolidated, only used for stats.
c = 0
# This is tricky. the total area of all packed boxes, then squt that to get an estimated size
# This is tricky. the total area of all packed boxes, then sqrt() that to get an estimated size
# this is used then converted into out INT space so we can compare it with
# the ints assigned to the boxes size
# and divided by BOX_DIV, basicly if BOX_DIV is 8
# ...then the maximum box consolidataion (recursive grouping) will have a max width & height
# and divided by BOX_DIV, basically if BOX_DIV is 8
# ...then the maximum box consolidation (recursive grouping) will have a max width & height
# ...1/8th of the UV size.
# ...limiting this is needed or you end up with bug unused texture spaces
# ...however if its too high, boxpacking is way too slow for high poly meshes.
# ...however if its too high, box-packing is way too slow for high poly meshes.
float_to_int_factor = lengths_to_ints[0][0]
if float_to_int_factor > 0:
max_int_dimension = int(((side_len / float_to_int_factor)) / PREF_BOX_DIV)
@ -409,7 +409,7 @@ def lightmap_uvpack(meshes,
max_int_dimension = 0.0 # wont be used
ok = False
# RECURSIVE prettyface grouping
# RECURSIVE pretty face grouping
while ok:
ok = False
@ -456,7 +456,7 @@ def lightmap_uvpack(meshes,
pretty_faces = [pf for pf in pretty_faces if not pf.has_parent]
# spin every second prettyface
# spin every second pretty-face
# if there all vertical you get less efficiently used texture space
i = len(pretty_faces)
d = 0

@ -34,7 +34,7 @@ USER_FILL_HOLES_QUALITY = None
def pointInTri2D(v, v1, v2, v3):
key = v1.x, v1.y, v2.x, v2.y, v3.x, v3.y
# Commented because its slower to do the bounds check, we should realy cache the bounds info for each face.
# Commented because its slower to do the bounds check, we should really cache the bounds info for each face.
'''
# BOUNDS CHECK
xmin= 1000000
@ -119,7 +119,7 @@ def boundsEdgeLoop(edges):
"""
# Turns the islands into a list of unpordered edges (Non internal)
# Onlt for UV's
# Only for UV's
# only returns outline edges for intersection tests. and unique points.
def island2Edge(island):
@ -141,7 +141,7 @@ def island2Edge(island):
else:
i1= vIdx; i2= vIdx-1
try: edges[ f_uvkey[i1], f_uvkey[i2] ] *= 0 # sets eny edge with more then 1 user to 0 are not returned.
try: edges[ f_uvkey[i1], f_uvkey[i2] ] *= 0 # sets any edge with more then 1 user to 0 are not returned.
except: edges[ f_uvkey[i1], f_uvkey[i2] ] = (f.uv[i1] - f.uv[i2]).length,
# If 2 are the same then they will be together, but full [a,b] order is not correct.
@ -162,10 +162,10 @@ def island2Edge(island):
return length_sorted_edges, [v.to_3d() for v in unique_points.values()]
# ========================= NOT WORKING????
# Find if a points inside an edge loop, un-orderd.
# Find if a points inside an edge loop, un-ordered.
# pt is and x/y
# edges are a non ordered loop of edges.
# #offsets are the edge x and y offset.
# offsets are the edge x and y offset.
"""
def pointInEdges(pt, edges):
#
@ -223,7 +223,7 @@ def islandIntersectUvIsland(source, target, SourceOffset):
if pointInIsland(pv+SourceOffset, target[0]):
return 2 # SOURCE INSIDE TARGET
# 2 test for a part of the target being totaly inside the source.
# 2 test for a part of the target being totally inside the source.
for pv in target[7]:
if pointInIsland(pv-SourceOffset, source[0]):
return 3 # PART OF TARGET INSIDE SOURCE.
@ -242,7 +242,7 @@ def testNewVecLs2DRotIsBetter(vecs, mat=-1, bestAreaSoFar = -1):
for i, v in enumerate(vecs):
# Do this allong the way
# Do this along the way
if mat != -1:
v = vecs[i] = mat * v
x= v.x
@ -252,7 +252,7 @@ def testNewVecLs2DRotIsBetter(vecs, mat=-1, bestAreaSoFar = -1):
if x>maxx: maxx= x
if y>maxy: maxy= y
# Spesific to this algo, bail out if we get bigger then the current area
# Specific to this algo, bail out if we get bigger then the current area
if bestAreaSoFar != -1 and (maxx-minx) * (maxy-miny) > bestAreaSoFar:
return (BIG_NUM, None), None
w = maxx-minx
@ -262,7 +262,7 @@ def testNewVecLs2DRotIsBetter(vecs, mat=-1, bestAreaSoFar = -1):
def optiRotateUvIsland(faces):
global currentArea
# Bestfit Rotation
# Best-fit Rotation
def best2dRotation(uvVecs, MAT1, MAT2):
global currentArea
@ -318,7 +318,7 @@ def optiRotateUvIsland(faces):
currentArea = newAreaPos
# 45d done
# Testcase different rotations and find the onfe that best fits in a square
# Testcase different rotations and find the one that best fits in a square
for ROTMAT in RotMatStepRotation:
uvVecs = best2dRotation(uvVecs, ROTMAT[0], ROTMAT[1])
@ -409,7 +409,7 @@ def mergeUvIslands(islandList):
BREAK= False
while areaIslandIdx < len(decoratedIslandListAreaSort) and not BREAK:
sourceIsland = decoratedIslandListAreaSort[areaIslandIdx]
# Alredy packed?
# Already packed?
if not sourceIsland[0]:
areaIslandIdx+=1
else:
@ -420,7 +420,7 @@ def mergeUvIslands(islandList):
BREAK= True
break
# Now we have 2 islands, is the efficience of the islands lowers theres an
# Now we have 2 islands, if the efficiency of the islands lowers theres an
# increasing likely hood that we can fit merge into the bigger UV island.
# this ensures a tight fit.
@ -435,12 +435,12 @@ def mergeUvIslands(islandList):
pass
else:
# ([island, totFaceArea, efficiency, islandArea, w,h])
# Waisted space on target is greater then UV bounding island area.
#~ ([island, totFaceArea, efficiency, islandArea, w,h])
# Wasted space on target is greater then UV bounding island area.
# if targetIsland[3] > (sourceIsland[2]) and\ #
# print USER_FREE_SPACE_TO_TEST_QUALITY
#~ if targetIsland[3] > (sourceIsland[2]) and\ #
#~ print USER_FREE_SPACE_TO_TEST_QUALITY
if targetIsland[2] > (sourceIsland[1] * USER_FREE_SPACE_TO_TEST_QUALITY) and\
targetIsland[4] > sourceIsland[4] and\
targetIsland[5] > sourceIsland[5]:
@ -456,7 +456,7 @@ def mergeUvIslands(islandList):
boxLeft = 0
# Distllllance we can move between whilst staying inside the targets bounds.
# Distance we can move between whilst staying inside the targets bounds.
testWidth = targetIsland[4] - sourceIsland[4]
testHeight = targetIsland[5] - sourceIsland[5]
@ -474,25 +474,25 @@ def mergeUvIslands(islandList):
boxLeft = 0 # Start 1 back so we can jump into the loop.
boxBottom= 0 #-yIncrement
##testcount= 0
#~ testcount= 0
while boxBottom <= testHeight:
# Should we use this? - not needed for now.
#if Window.GetKeyQualifiers() & ctrl:
# BREAK= True
# break
#~ if Window.GetKeyQualifiers() & ctrl:
#~ BREAK= True
#~ break
##testcount+=1
#print 'Testing intersect'
Intersect = islandIntersectUvIsland(sourceIsland, targetIsland, Vector((boxLeft, boxBottom)))
#print 'Done', Intersect
if Intersect == 1: # Line intersect, dont bother with this any more
if Intersect == 1: # Line intersect, don't bother with this any more
pass
if Intersect == 2: # Source inside target
'''
We have an intersection, if we are inside the target
then move us 1 whole width accross,
then move us 1 whole width across,
Its possible this is a bad idea since 2 skinny Angular faces
could join without 1 whole move, but its a lot more optimal to speed this up
since we have already tested for it.
@ -500,7 +500,7 @@ def mergeUvIslands(islandList):
It gives about 10% speedup with minimal errors.
'''
#print 'ass'
# Move the test allong its width + SMALL_NUM
# Move the test along its width + SMALL_NUM
#boxLeft += sourceIsland[4] + SMALL_NUM
boxLeft += sourceIsland[4]
elif Intersect == 0: # No intersection?? Place it.
@ -551,7 +551,7 @@ def mergeUvIslands(islandList):
break
# INCREMENR NEXT LOCATION
# INCREMENT NEXT LOCATION
if boxLeft > testWidth:
boxBottom += yIncrement
boxLeft = 0.0
@ -572,8 +572,8 @@ def mergeUvIslands(islandList):
# Takes groups of faces. assumes face groups are UV groups.
def getUvIslands(faceGroups, me):
# Get seams so we dont cross over seams
edge_seams = {} # shoudl be a set
# Get seams so we don't cross over seams
edge_seams = {} # should be a set
for ed in me.edges:
if ed.use_seam:
edge_seams[ed.key] = None # dummy var- use sets!
@ -609,7 +609,7 @@ def getUvIslands(faceGroups, me):
# Modes
# 0 - face not yet touched.
# 1 - added to island list, and need to search
# 2 - touched and searched - dont touch again.
# 2 - touched and searched - don't touch again.
face_modes = [0] * len(faces) # initialize zero - untested.
face_modes[0] = 1 # start the search with face 1
@ -633,7 +633,7 @@ def getUvIslands(faceGroups, me):
face_modes[ii] = ok = 1 # mark as searched
newIsland.append(faces[ii])
# mark as searched, dont look again.
# mark as searched, don't look again.
face_modes[i] = 2
islandList.append(newIsland)
@ -664,8 +664,8 @@ def packIslands(islandList):
# Now we have UV islands, we need to pack them.
# Make a synchronised list with the islands
# so we can box pak the islands.
# Make a synchronized list with the islands
# so we can box pack the islands.
packBoxes = []
# Keep a list of X/Y offset so we can save time by writing the
@ -716,14 +716,14 @@ def packIslands(islandList):
# print 'Box Packing Time:', time.time() - time1
#if len(pa ckedLs) != len(islandList):
# raise "Error packed boxes differes from original length"
# raise "Error packed boxes differs from original length"
#print '\tWriting Packed Data to faces'
#XXX Window.DrawProgressBar(0.8, 'Writing Packed Data to faces')
# Sort by ID, so there in sync again
islandIdx = len(islandList)
# Having these here avoids devide by 0
# Having these here avoids divide by 0
if islandIdx:
if USER_STRETCH_ASPECT:
@ -845,9 +845,9 @@ def main(context,
time.sleep(10)
'''
#XXX if not Draw.PupBlock(ob % len(obList), pup_block):
#XXX return
#XXX del ob
#~ XXX if not Draw.PupBlock(ob % len(obList), pup_block):
#~ XXX return
#~ XXX del ob
# Convert from being button types
@ -859,10 +859,10 @@ def main(context,
is_editmode = (context.active_object.mode == 'EDIT')
if is_editmode:
bpy.ops.object.mode_set(mode='OBJECT')
# Assume face select mode! an annoying hack to toggle face select mode because Mesh dosent like faceSelectMode.
# Assume face select mode! an annoying hack to toggle face select mode because Mesh doesn't like faceSelectMode.
if USER_SHARE_SPACE:
# Sort by data name so we get consistant results
# Sort by data name so we get consistent results
obList.sort(key = lambda ob: ob.data.name)
collected_islandList= []
@ -870,7 +870,7 @@ def main(context,
time1 = time.time()
# Tag as False se we dont operate on the same mesh twice.
# Tag as False so we don't operate on the same mesh twice.
#XXX bpy.data.meshes.tag = False
for me in bpy.data.meshes:
me.tag = False
@ -885,7 +885,7 @@ def main(context,
# Tag as used
me.tag = True
if not me.uv_textures: # Mesh has no UV Coords, dont bother.
if not me.uv_textures: # Mesh has no UV Coords, don't bother.
me.uv_textures.new()
uv_layer = me.uv_textures.active.data
@ -902,7 +902,7 @@ def main(context,
#XXX Window.DrawProgressBar(0.1, 'SmartProj UV Unwrapper, mapping "%s", %i faces.' % (me.name, len(meshFaces)))
# =======
# Generate a projection list from face normals, this is ment to be smart :)
# Generate a projection list from face normals, this is meant to be smart :)
# make a list of face props that are in sync with meshFaces
# Make a Face List that is sorted by area.
@ -928,7 +928,7 @@ def main(context,
# Initialize projectVecs
if USER_VIEW_INIT:
# Generate Projection
projectVecs = [Vector(Window.GetViewVector()) * ob.matrix_world.inverted().to_3x3()] # We add to this allong the way
projectVecs = [Vector(Window.GetViewVector()) * ob.matrix_world.inverted().to_3x3()] # We add to this along the way
else:
projectVecs = []
@ -936,7 +936,7 @@ def main(context,
newProjectMeshFaces = [] # Popping stuffs it up.
# Predent that the most unique angke is ages away to start the loop off
# Pretend that the most unique angle is ages away to start the loop off
mostUniqueAngle = -1.0
# This is popped
@ -950,7 +950,7 @@ def main(context,
# add all the faces that are close.
for fIdx in range(len(tempMeshFaces)-1, -1, -1):
# Use half the angle limit so we dont overweight faces towards this
# Use half the angle limit so we don't overweight faces towards this
# normal and hog all the faces.
if newProjectVec.dot(tempMeshFaces[fIdx].no) > USER_PROJECTION_LIMIT_HALF_CONVERTED:
newProjectMeshFaces.append(tempMeshFaces.pop(fIdx))

@ -16,7 +16,7 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENCE BLOCK *****
# ***** END GPL LICENSE BLOCK *****
# --------------------------------------------------------------------------
# <pep8 compliant>
@ -69,7 +69,7 @@ def applyVertexDirt(me, blur_iterations, blur_strength, clamp_dirt, clamp_clean,
vec /= tot_con
# angle is the acos of the dot product between vert and connected verts normals
# angle is the acos() of the dot product between vert and connected verts normals
ang = acos(no.dot(vec))
# enforce min/max
@ -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,
)

@ -33,7 +33,7 @@ class VIEW3D_OT_edit_mesh_extrude_individual_move(Operator):
totface = mesh.total_face_sel
totedge = mesh.total_edge_sel
# totvert = mesh.total_vert_sel
#~ totvert = mesh.total_vert_sel
if select_mode[2] and totface == 1:
bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN',
@ -65,7 +65,7 @@ class VIEW3D_OT_edit_mesh_extrude_move(Operator):
totface = mesh.total_face_sel
totedge = mesh.total_edge_sel
# totvert = mesh.total_vert_sel
#~ totvert = mesh.total_vert_sel
if totface >= 1:
bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN',

@ -70,7 +70,7 @@ def context_path_validate(context, data_path):
# One of the items in the rna path is None, just ignore this
value = Ellipsis
else:
# We have a real error in the rna path, dont ignore that
# We have a real error in the rna path, don't ignore that
raise
return value
@ -103,7 +103,7 @@ def operator_value_is_undo(value):
def operator_path_is_undo(context, data_path):
# note that if we have data paths that use strings this could fail
# luckily we dont do this!
# luckily we don't do this!
#
# When we cant find the data owner assume no undo is needed.
data_path_head, data_path_sep, data_path_tail = data_path.rpartition(".")
@ -425,7 +425,7 @@ class WM_OT_context_cycle_enum(Operator):
rna_struct_str, rna_prop_str = data_path.rsplit('.', 1)
i = rna_prop_str.find('[')
# just incse we get "context.foo.bar[0]"
# just in case we get "context.foo.bar[0]"
if i != -1:
rna_prop_str = rna_prop_str[0:i]
@ -820,8 +820,7 @@ class WM_OT_doc_view(Operator):
class_name = rna_parent.identifier
rna_parent = rna_parent.base
# It so happens that epydoc nests these, not sphinx
# class_name_full = self._nested_class_string(class_name)
#~ class_name_full = self._nested_class_string(class_name)
url = ("%s/bpy.types.%s.html#bpy.types.%s.%s" %
(self._prefix, class_name, class_name, class_prop))
@ -1014,7 +1013,7 @@ class WM_OT_properties_edit(Operator):
item = eval("context.%s" % data_path)
# setup defaults
prop_ui = rna_idprop_ui_prop_get(item, self.property, False) # dont create
prop_ui = rna_idprop_ui_prop_get(item, self.property, False) # don't create
if prop_ui:
self.min = prop_ui.get("min", -1000000000)
self.max = prop_ui.get("max", 1000000000)
@ -1162,7 +1161,7 @@ class WM_OT_copy_prev_settings(Operator):
elif not os.path.isdir(path_src):
self.report({'ERROR'}, "Source path %r exists" % path_src)
else:
shutil.copytree(path_src, path_dst)
shutil.copytree(path_src, path_dst, symlinks=True)
# in 2.57 and earlier windows installers, system scripts were copied
# into the configuration directory, don't want to copy those
@ -1171,7 +1170,7 @@ class WM_OT_copy_prev_settings(Operator):
shutil.rmtree(os.path.join(path_dst, 'scripts'))
shutil.rmtree(os.path.join(path_dst, 'plugins'))
# dont loose users work if they open the splash later.
# don't loose users work if they open the splash later.
if bpy.data.is_saved is bpy.data.is_dirty is False:
bpy.ops.wm.read_homefile()
else:
@ -1372,9 +1371,9 @@ class WM_OT_keyitem_add(Operator):
km = context.keymap
if km.is_modal:
km.keymap_items.new_modal("", 'A', 'PRESS') # kmi
km.keymap_items.new_modal("", 'A', 'PRESS') #~ kmi
else:
km.keymap_items.new("none", 'A', 'PRESS') # kmi
km.keymap_items.new("none", 'A', 'PRESS') #~ kmi
# clear filter and expand keymap so we can see the newly added item
if context.space_data.filter_text != "":
@ -1556,7 +1555,7 @@ class WM_OT_addon_install(Operator):
pyfile = self.filepath
if self.target == 'DEFAULT':
# dont use bpy.utils.script_paths("addons") because we may not be able to write to it.
# don't use bpy.utils.script_paths("addons") because we may not be able to write to it.
path_addons = bpy.utils.user_resource('SCRIPTS', "addons", create=True)
else:
path_addons = bpy.context.user_preferences.filepaths.script_directory
@ -1637,7 +1636,7 @@ class WM_OT_addon_install(Operator):
addons_new.discard("modules")
# disable any addons we may have enabled previously and removed.
# this is unlikely but do just incase. bug [#23978]
# this is unlikely but do just in case. bug [#23978]
for new_addon in addons_new:
addon_utils.disable(new_addon)
@ -1652,11 +1651,11 @@ class WM_OT_addon_install(Operator):
context.window_manager.addon_search = info["name"]
break
# incase a new module path was created to install this addon.
# in case a new module path was created to install this addon.
bpy.utils.refresh_script_paths()
# TODO, should not be a warning.
# self.report({'WARNING'}, "File installed to '%s'\n" % path_dest)
#~ self.report({'WARNING'}, "File installed to '%s'\n" % path_dest)
return {'FINISHED'}
def invoke(self, context, event):
@ -1699,7 +1698,7 @@ class WM_OT_addon_remove(Operator):
self.report('WARNING', "Addon path %r could not be found" % path)
return {'CANCELLED'}
# incase its enabled
# in case its enabled
addon_utils.disable(self.module)
import shutil

@ -21,8 +21,8 @@
# Generic Panels (Independent of DataType)
# NOTE:
# The specialised panel types are derived in their respective UI modules
# dont register these classes since they are only helpers.
# The specialized panel types are derived in their respective UI modules
# don't register these classes since they are only helpers.
class MotionPathButtonsPanel():

@ -214,7 +214,7 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, Panel):
layout.prop(pose_marker_active, "name")
# TODO: this panel will soon be depreceated too
# TODO: this panel will soon be deprecated deprecated too
class DATA_PT_ghost(ArmatureButtonsPanel, Panel):
bl_label = "Ghost"
@ -301,7 +301,7 @@ class DATA_PT_motion_paths(MotionPathButtonsPanel, Panel):
@classmethod
def poll(cls, context):
# XXX: include posemode check?
# XXX: include pose-mode check?
return (context.object) and (context.armature)
def draw(self, context):
@ -324,7 +324,7 @@ class DATA_PT_onion_skinning(OnionSkinButtonsPanel): # , Panel): # inherit from
@classmethod
def poll(cls, context):
# XXX: include posemode check?
# XXX: include pose-mode check?
return (context.object) and (context.armature)
def draw(self, context):

@ -189,7 +189,7 @@ class BONE_PT_display(BoneButtonsPanel, Panel):
return context.bone
def draw(self, context):
# note. this works ok in editmode but isnt
# note. this works ok in edit-mode but isn't
# all that useful so disabling for now.
layout = self.layout

@ -668,7 +668,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:")

@ -87,7 +87,7 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel, Panel):
@classmethod
def poll(cls, context):
# An exception, dont call the parent poll func because
# An exception, don't call the parent poll func because
# this manages materials for all engine types
engine = context.scene.render.engine
@ -537,7 +537,7 @@ class MATERIAL_PT_halo(MaterialButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
mat = context.material # dont use node material
mat = context.material # don't use node material
halo = mat.halo
def number_but(layout, toggle, number, name, color):
@ -595,7 +595,7 @@ class MATERIAL_PT_flare(MaterialButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
mat = context.material # dont use node material
mat = context.material # don't use node material
halo = mat.halo
layout.active = halo.use_flare_mode
@ -622,7 +622,7 @@ class MATERIAL_PT_game_settings(MaterialButtonsPanel, bpy.types.Panel):
def draw(self, context):
layout = self.layout
game = context.material.game_settings # dont use node material
game = context.material.game_settings # don't use node material
row = layout.row()
row.prop(game, "use_backface_culling")
@ -653,7 +653,7 @@ class MATERIAL_PT_physics(MaterialButtonsPanel, bpy.types.Panel):
layout = self.layout
layout.active = context.material.game_settings.physics
phys = context.material.physics # dont use node material
phys = context.material.physics # don't use node material
split = layout.split()
row = split.row()
@ -686,7 +686,7 @@ class MATERIAL_PT_strand(MaterialButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
mat = context.material # dont use node material
mat = context.material # don't use node material
tan = mat.strand
split = layout.split()
@ -862,7 +862,7 @@ class MATERIAL_PT_volume_density(VolumeButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
vol = context.material.volume # dont use node material
vol = context.material.volume # don't use node material
row = layout.row()
row.prop(vol, "density")
@ -876,7 +876,7 @@ class MATERIAL_PT_volume_shading(VolumeButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
vol = context.material.volume # dont use node material
vol = context.material.volume # don't use node material
split = layout.split()
@ -901,7 +901,7 @@ class MATERIAL_PT_volume_lighting(VolumeButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
vol = context.material.volume # dont use node material
vol = context.material.volume # don't use node material
split = layout.split()
@ -942,7 +942,7 @@ class MATERIAL_PT_volume_transp(VolumeButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
mat = context.material # dont use node material
mat = context.material # don't use node material
layout.prop(mat, "transparency_method", expand=True)
@ -954,7 +954,7 @@ class MATERIAL_PT_volume_integration(VolumeButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
vol = context.material.volume # dont use node material
vol = context.material.volume # don't use node material
split = layout.split()

@ -658,7 +658,7 @@ class ConstraintButtonsPanel():
row.label(text="Source to Destination Mapping:")
# note: chr(187) is the ASCII arrow ( >> ). Blender Text Editor can't
# open it. Thus we are using the hardcoded value instead.
# open it. Thus we are using the hard-coded value instead.
row = col.row()
row.prop(con, "map_to_x_from", expand=False, text="")
row.label(text=" %s X" % chr(187))

@ -405,9 +405,12 @@ class PARTICLE_PT_rotation(ParticleButtonsPanel, Panel):
layout.enabled = particle_panel_enabled(context, psys)
row = layout.row()
row.label(text="Initial Rotation:")
row.prop(part, "use_dynamic_rotation")
layout.prop(part, "use_dynamic_rotation")
if part.use_dynamic_rotation:
layout.label(text="Initial Rotation Axis:")
else:
layout.label(text="Rotation Axis:")
split = layout.split()
@ -419,12 +422,17 @@ class PARTICLE_PT_rotation(ParticleButtonsPanel, Panel):
col.prop(part, "phase_factor", slider=True)
col.prop(part, "phase_factor_random", text="Random", slider=True)
col = layout.column()
col.label(text="Angular Velocity:")
col.row().prop(part, "angular_velocity_mode", expand=True)
if part.angular_velocity_mode != 'NONE':
col.prop(part, "angular_velocity_factor", text="")
if part.type != 'HAIR':
col = layout.column()
if part.use_dynamic_rotation:
col.label(text="Initial Angular Velocity:")
else:
col.label(text="Angular Velocity:")
sub = col.row(align=True)
sub.prop(part, "angular_velocity_mode", text="")
subsub = sub.column()
subsub.active = part.angular_velocity_mode != 'NONE'
subsub.prop(part, "angular_velocity_factor", text="")
class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
@ -832,7 +840,9 @@ class PARTICLE_PT_render(ParticleButtonsPanel, Panel):
elif part.render_type == 'OBJECT':
col.prop(part, "dupli_object")
col.prop(part, "use_global_dupli")
sub = col.row()
sub.prop(part, "use_global_dupli")
sub.prop(part, "use_rotation_dupli")
elif part.render_type == 'GROUP':
col.prop(part, "dupli_group")
split = layout.split()
@ -841,13 +851,14 @@ class PARTICLE_PT_render(ParticleButtonsPanel, Panel):
col.prop(part, "use_whole_group")
sub = col.column()
sub.active = (part.use_whole_group is False)
sub.prop(part, "use_group_pick_random")
sub.prop(part, "use_group_count")
col = split.column()
sub = col.column()
sub.active = (part.use_whole_group is False)
sub.prop(part, "use_global_dupli")
sub.prop(part, "use_group_pick_random")
sub.prop(part, "use_rotation_dupli")
if part.use_group_count and not part.use_whole_group:
row = layout.row()

@ -77,7 +77,7 @@ class PHYSICS_PT_add(PhysicButtonsPanel, Panel):
physics_add(self, col, context.smoke, "Smoke", 'SMOKE', 'MOD_SMOKE', True)
#cachetype can be 'PSYS' 'HAIR' 'SMOKE' etc
# cache-type can be 'PSYS' 'HAIR' 'SMOKE' etc
def point_cache_ui(self, context, cache, enabled, cachetype):
layout = self.layout

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