svn merge ^/trunk/blender -r41150:41175
authorCampbell Barton <ideasman42@gmail.com>
Mon, 24 Oct 2011 05:00:53 +0000 (05:00 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 24 Oct 2011 05:00:53 +0000 (05:00 +0000)
92 files changed:
SConstruct
build_files/buildbot/config/user-config-i686.py
build_files/buildbot/config/user-config-player-i686.py
build_files/buildbot/config/user-config-player-x86_64.py
build_files/buildbot/config/user-config-x86_64.py
build_files/scons/config/aix4-config.py [deleted file]
build_files/scons/config/darwin-config.py
build_files/scons/config/freebsd7-config.py
build_files/scons/config/freebsd8-config.py
build_files/scons/config/freebsd9-config.py
build_files/scons/config/irix6-config.py [deleted file]
build_files/scons/config/linux-config.py
build_files/scons/config/linuxcross-config.py
build_files/scons/config/openbsd3-config.py [deleted file]
build_files/scons/config/sunos5-config.py [deleted file]
build_files/scons/config/win32-mingw-config.py
build_files/scons/config/win32-vc-config.py
build_files/scons/config/win64-vc-config.py
build_files/scons/tools/Blender.py
build_files/scons/tools/btools.py
intern/ghost/GHOST_Types.h
intern/ghost/intern/GHOST_SystemCocoa.mm
po/README.txt
po/update_mo.py
release/bin/.blender/.bfont.ttf [deleted file]
release/datafiles/fonts/droidsans.ttf.gz [moved from release/bin/.blender/fonts/droidsans.ttf.gz with 100% similarity]
release/scripts/startup/bl_ui/properties_data_modifier.py
release/scripts/startup/bl_ui/properties_physics_field.py
source/blender/blenfont/BLF_translation.h
source/blender/blenfont/intern/blf_font.c
source/blender/blenfont/intern/blf_internal.h
source/blender/blenfont/intern/blf_lang.c
source/blender/blenfont/intern/blf_translation.c
source/blender/blenfont/intern/blf_util.c
source/blender/blenkernel/BKE_blender.h
source/blender/blenkernel/intern/key.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/smoke.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenkernel/intern/writeffmpeg.c
source/blender/blenlib/BLI_path_util.h
source/blender/blenlib/BLI_string_utf8.h
source/blender/blenlib/PIL_time.h
source/blender/blenlib/intern/bpath.c
source/blender/blenlib/intern/path_util.c
source/blender/blenlib/intern/string_utf8.c
source/blender/blenlib/intern/winstuff.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/collada/DocumentImporter.cpp
source/blender/collada/ImageExporter.cpp
source/blender/editors/armature/poselib.c
source/blender/editors/include/UI_interface.h
source/blender/editors/interface/interface.c
source/blender/editors/interface/interface_icons.c
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_panel.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/interface_utils.c
source/blender/editors/screen/area.c
source/blender/editors/space_buttons/buttons_header.c
source/blender/editors/space_file/file_draw.c
source/blender/editors/space_file/file_panels.c
source/blender/editors/space_file/filesel.c
source/blender/editors/space_graph/graph_buttons.c
source/blender/editors/space_info/space_info.c
source/blender/editors/space_nla/nla_buttons.c
source/blender/editors/space_node/node_header.c
source/blender/editors/space_node/space_node.c
source/blender/editors/space_sequencer/sequencer_add.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/space_view3d/view3d_toolbar.c
source/blender/editors/transform/transform.h
source/blender/editors/transform/transform_orientations.c
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_particle.c
source/blender/makesrna/intern/rna_sequencer.c
source/blender/makesrna/intern/rna_smoke.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/python/intern/bpy_rna.c
source/blender/windowmanager/WM_api.h
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_operators.c
source/blender/windowmanager/intern/wm_window.c
source/creator/CMakeLists.txt
source/creator/creator.c
source/gameengine/GameLogic/SCA_KeyboardSensor.h
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
source/gameengine/Ketsji/KX_PythonInit.cpp

index 738466d389e3f774ca7f600d3fb5aa6fa6ca3a43..aeaef581145ce60bae54f87f81d31b77872a2c94 100644 (file)
@@ -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)
-
-            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", ):
+    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__')
+
+                dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
+                dir += os.sep + os.path.basename(scriptpath) + dp[len(scriptpath):]
+
+                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']
+        
+        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')
+
+                # we only care about release/datafiles/fonts, release/datafiles/locales
+                if check_path(dp, "fonts") or check_path(dp, "locale"):
+                    pass
+                else:
                     continue
-
-                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))
-        
-        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__')
-
-                    dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
-                    dir += os.sep + os.path.basename(scriptpath) + dp[len(scriptpath):]
-
-                    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))
+                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))
 
 #-- icons
 if env['OURPLATFORM']=='linux':
index f2197a05501d7cb0f44b7ebb7b534beac445600b..080fd8d61236b79e1d9d592aaf8cd4e198a84e19 100644 (file)
@@ -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']
index 99671ecc07229ec0914adaddb100a2307a0a418c..204732376fac4432a78196d474d68bb3fa07782d 100644 (file)
@@ -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']
index a1ca38880eb89fbbdcb0f12948c0447e6164fb54..cc0ba209a44877dd900689ac2b840c7b9d757cc5 100644 (file)
@@ -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']
index 93fe3ca2e5bd240ef9b529b8a0a75d967fa10eb9..4698ffdce158b18b54f9c443065e62668f1e1395 100644 (file)
@@ -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']
diff --git a/build_files/scons/config/aix4-config.py b/build_files/scons/config/aix4-config.py
deleted file mode 100644 (file)
index f8b3e75..0000000
+++ /dev/null
@@ -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
index 0c132041d82768820b4b2d131ed4f41e127032d1..deb3d01febd852b68561ba392441db64ba26c249 100644 (file)
@@ -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']
index fec7531b3c7e28ee3ed05821688c7465f00336f8..eb7d7c9de57b9bf92b0f10f3c4478a39ecd50186 100644 (file)
@@ -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
 ##
index eea89bf24ff60f78e7e9416065e34d0ba489421d..451d22455e0f08c4445e3ef3b4796c7de09087ed 100644 (file)
@@ -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
 ##
index a63da6e35f9dcf7a21a44f30839c5360ffcbdb4c..2ce6ec7ce33b441e7fd52c036d1ec25e4e6eb5c4 100644 (file)
@@ -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
 ##
diff --git a/build_files/scons/config/irix6-config.py b/build_files/scons/config/irix6-config.py
deleted file mode 100644 (file)
index e69de29..0000000
index a26748cd8dc0914df9b87729fd9976f7d64e779e..91f86ae7e806e3e37eda63f3835e756b0e7334f2 100644 (file)
@@ -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
 ##
index 070e18a5af0a83a063a892b88f97ae4337cfb467..f6f72cd32d57b7a004e72d7c57a957b006648d4b 100644 (file)
@@ -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']
 
diff --git a/build_files/scons/config/openbsd3-config.py b/build_files/scons/config/openbsd3-config.py
deleted file mode 100644 (file)
index 83c515d..0000000
+++ /dev/null
@@ -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'
diff --git a/build_files/scons/config/sunos5-config.py b/build_files/scons/config/sunos5-config.py
deleted file mode 100644 (file)
index 0cf78c9..0000000
+++ /dev/null
@@ -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 = []
index 167ed502bf6c3a00068fa08bb31d2e97169a1377..f210ab436b5a349a09918fc972b9dd1a029bf06f 100644 (file)
@@ -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']
index 9604eb5d320d482dcd0df6dee337c50fca5a325e..ec37b3046c8345b8444e1ccde7467eb01ede9302 100644 (file)
@@ -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 = []
index 049b7eb5d402dfd4fa8c8a2592bea29ed5ea2f1c..afa64e03e80dd05cf020fb455116e9dc9a062464 100644 (file)
@@ -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 = []
index c802eee4fb6288178f992daf22aa1654179196fc..875d8f7388b06a03baa6ca1f023f61ba4d9708de 100644 (file)
@@ -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)
index fe56d40ea56099d96e1b0470dca1d9887205aa23..49efa598ed8686d2d627f8582a97966f825610af 100644 (file)
@@ -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', ''),
index 78fc3f69c7af3332905a287cf689b5f795bb86a7..2b5e96a1bf79d8713f53f4bc85fcce289a3d0191 100644 (file)
@@ -466,8 +466,19 @@ 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;
 
index 1dfb8e36422d7019a3037474841e77fd75c2db25..c3c0c5914442c941fd37ab9c72a2d683f57f0e3f 100644 (file)
@@ -1706,6 +1706,10 @@ GHOST_TSuccess GHOST_SystemCocoa::handleKeyEvent(void *eventPtr)
                                        utf8_buf[0] = '\0';
                                }
                        }
+
+                       /* XXX the above code gives us the right utf8, however if we pass it along Font Object doesn't work.
+                          let's leave utf8 disabled for OSX before we fix that */
+                       utf8_buf[0] = '\0';//to be removed once things are working
                        
                        if ((keyCode == GHOST_kKeyQ) && (m_modifierMask & NSCommandKeyMask))
                                break; //Cmd-Q is directly handled by Cocoa
index cadcb7194e81a991fe34a6763373a98248bf5845..6e634ae5ee35ae951dc73257bce7944a17ac1674 100644 (file)
@@ -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.
 
index 33b7baaed693a2ce26310c8f67724e12d3022e88..a0173b2d0598f008f6b5a1cdfdceb8dc49b733a9 100755 (executable)
@@ -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"
 
diff --git a/release/bin/.blender/.bfont.ttf b/release/bin/.blender/.bfont.ttf
deleted file mode 100644 (file)
index 58cd6b5..0000000
Binary files a/release/bin/.blender/.bfont.ttf and /dev/null differ
index 146855bb806ebe5cc4823d116c18a3a9659dd029..4456731523f959829bc8aa042a1719b355ca2bf0 100644 (file)
@@ -669,7 +669,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:")
index f07559625804bddc3f4cd8dd0d56c4833bcfcae4..2229b9dc3dab244bc5f8ec0656eebb8d99541724 100644 (file)
@@ -61,6 +61,10 @@ class PHYSICS_PT_field(PhysicButtonsPanel, Panel):
             split = layout.split(percentage=0.2)
             split.label(text="Shape:")
             split.prop(field, "shape", text="")
+        elif field.type == 'TEXTURE':
+            split = layout.split(percentage=0.2)
+            split.label(text="Texture:")
+            split.row().template_ID(field, "texture", new="texture.new")
 
         split = layout.split()
 
@@ -103,7 +107,6 @@ class PHYSICS_PT_field(PhysicButtonsPanel, Panel):
         elif field.type == 'TEXTURE':
             col = split.column()
             col.prop(field, "strength")
-            col.prop(field, "texture", text="")
             col.prop(field, "texture_mode", text="")
             col.prop(field, "texture_nabla")
 
index 1c36f3e150475e6a598139860bd618b14536df79..707cd17e0b351750adc69048890cd7b05d179a36 100644 (file)
@@ -60,7 +60,8 @@ void BLF_lang_encoding_name(const char *str);
 
 void BLF_lang_encoding(const char *str);
 
-#define _(msgid) BLF_gettext(msgid)
+/*#define _(msgid) BLF_gettext(msgid)*/
+/* The "translation-marker" macro. */
 #define N_(msgid) msgid
 
 #endif /* BLF_TRANSLATION_H */
index 5161761cf092bd5fb3bd828f18bbf8f45a019a84..355182fb85f8538ac0aa2b0e5f5761dff8aa389c 100644 (file)
@@ -129,7 +129,7 @@ static void blf_font_ensure_ascii_table(FontBLF *font)
                g= (glyph_ascii_table)[c];                                            \
                i++;                                                                  \
        }                                                                         \
-       else if ((c= blf_utf8_next((unsigned char *)(str), &(i)))) {              \
+       else if ((c= BLI_str_utf8_as_unicode_step((str), &(i))) != BLI_UTF8_ERR) {               \
                if ((g= blf_glyph_search((font)->glyph_cache, c)) == NULL) {          \
                        g= blf_glyph_add(font, FT_Get_Char_Index((font)->face, c), c);    \
                }                                                                     \
@@ -141,15 +141,20 @@ static void blf_font_ensure_ascii_table(FontBLF *font)
        const FT_UInt kern_mode= (has_kerning == 0) ? 0 :                         \
                                 (((_font)->flags & BLF_KERNING_DEFAULT) ?        \
                                  ft_kerning_default : FT_KERNING_UNFITTED)       \
-                                                                                 \
 
 
 #define BLF_KERNING_STEP(_font, kern_mode, g_prev, g, delta, pen_x)           \
 {                                                                             \
        if (g_prev) {                                                             \
                delta.x= delta.y= 0;                                                  \
-               if (FT_Get_Kerning((_font)->face, g_prev->idx, g->idx, kern_mode, &delta) == 0) \
+               if (FT_Get_Kerning((_font)->face,                                     \
+                                  (g_prev)->idx,                                     \
+                                  (g)->idx,                                          \
+                                  kern_mode,                                         \
+                                  &(delta)) == 0)                                    \
+               {                                                                     \
                        pen_x += delta.x >> 6;                                            \
+               }                                                                     \
        }                                                                         \
 }                                                                             \
 
@@ -159,7 +164,7 @@ void blf_font_draw(FontBLF *font, const char *str, unsigned int len)
        GlyphBLF *g, *g_prev= NULL;
        FT_Vector delta;
        int pen_x= 0, pen_y= 0;
-       unsigned int i= 0;
+       size_t i= 0;
        GlyphBLF **glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
 
        BLF_KERNING_VARS(font, has_kerning, kern_mode);
@@ -170,9 +175,9 @@ void blf_font_draw(FontBLF *font, const char *str, unsigned int len)
 
                BLF_UTF8_NEXT_FAST(font, g, str, i, c, glyph_ascii_table);
 
-               if (c == 0)      break;
-               if (g == NULL)   continue;
-               if (has_kerning) BLF_KERNING_STEP(font, kern_mode, g_prev, g, delta, pen_x);
+               if (c == BLI_UTF8_ERR)  break;
+               if (g == NULL)          continue;
+               if (has_kerning)        BLF_KERNING_STEP(font, kern_mode, g_prev, g, delta, pen_x);
 
                /* do not return this loop if clipped, we want every character tested */
                blf_glyph_render(font, g, (float)pen_x, (float)pen_y);
@@ -214,7 +219,7 @@ void blf_font_buffer(FontBLF *font, const char *str)
        GlyphBLF *g, *g_prev= NULL;
        FT_Vector delta;
        int pen_x= (int)font->pos[0], pen_y= 0;
-       unsigned int i= 0;
+       size_t i= 0;
        GlyphBLF **glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
 
        /* buffer specific vars*/
@@ -235,9 +240,9 @@ void blf_font_buffer(FontBLF *font, const char *str)
 
                BLF_UTF8_NEXT_FAST(font, g, str, i, c, glyph_ascii_table);
 
-               if (c == 0)      break;
-               if (g == NULL)   continue;
-               if (has_kerning) BLF_KERNING_STEP(font, kern_mode, g_prev, g, delta, pen_x);
+               if (c == BLI_UTF8_ERR)  break;
+               if (g == NULL)          continue;
+               if (has_kerning)        BLF_KERNING_STEP(font, kern_mode, g_prev, g, delta, pen_x);
 
                chx= pen_x + ((int)g->pos_x);
                chy= (int)font->pos[1] + g->height;
@@ -340,7 +345,7 @@ void blf_font_boundbox(FontBLF *font, const char *str, rctf *box)
        GlyphBLF *g, *g_prev= NULL;
        FT_Vector delta;
        int pen_x= 0, pen_y= 0;
-       unsigned int i= 0;
+       size_t i= 0;
        GlyphBLF **glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
 
        rctf gbox;
@@ -358,9 +363,9 @@ void blf_font_boundbox(FontBLF *font, const char *str, rctf *box)
 
                BLF_UTF8_NEXT_FAST(font, g, str, i, c, glyph_ascii_table);
 
-               if (c == 0)      break;
-               if (g == NULL)   continue;
-               if (has_kerning) BLF_KERNING_STEP(font, kern_mode, g_prev, g, delta, pen_x);
+               if (c == BLI_UTF8_ERR)  break;
+               if (g == NULL)          continue;
+               if (has_kerning)        BLF_KERNING_STEP(font, kern_mode, g_prev, g, delta, pen_x);
 
                gbox.xmin= pen_x;
                gbox.xmax= pen_x + g->advance;
index ba0b9985dd4f6f666915cf1e90d982b3d035957c..df88d0c8feaf81fad8bc24e5f518989e708cd008 100644 (file)
@@ -40,7 +40,6 @@ struct rctf;
 
 unsigned int blf_next_p2(unsigned int x);
 unsigned int blf_hash(unsigned int val);
-int blf_utf8_next(unsigned char *buf, unsigned int *iindex);
 
 char *blf_dir_search(const char *file);
 char *blf_dir_metrics_search(const char *filename);
index ec9501c06a69720e67fe7efa9d703ea1bb0d4195..d5245073e5967964ee07294440f185db20dee1ab 100644 (file)
@@ -103,10 +103,13 @@ void BLF_lang_init(void)
        
        BLI_strncpy(global_encoding_name, SYSTEM_ENCODING_DEFAULT, sizeof(global_encoding_name));
        
-       if (messagepath)
+       if (messagepath) {
                BLI_strncpy(global_messagepath, messagepath, sizeof(global_messagepath));
-       else
+       }
+       else {
+               printf("%s: 'locale' data path for translations not found, continuing\n", __func__);
                global_messagepath[0]= '\0';
+       }
        
 }
 
index 8c0a26df4c22d73a63a5c34eae4166cbea149bd4..90d9c4a5981c84d1a7cedf75fe57f5abc9f0756e 100644 (file)
@@ -38,6 +38,7 @@
 
 #include "MEM_guardedalloc.h"
 
+#include "BLI_utildefines.h"
 #include "BLI_path_util.h"
 #include "BLI_string.h"
 #include "BLI_path_util.h"
@@ -54,11 +55,16 @@ unsigned char *BLF_get_unifont(int *unifont_size_r)
 {
        if(unifont_ttf==NULL) {
                char *fontpath = BLI_get_folder(BLENDER_DATAFILES, "fonts");
-               char unifont_path[1024];
+               if (fontpath) {
+                       char unifont_path[1024];
 
-               BLI_snprintf(unifont_path, sizeof(unifont_path), "%s/%s", fontpath, unifont_filename);
+                       BLI_snprintf(unifont_path, sizeof(unifont_path), "%s/%s", fontpath, unifont_filename);
 
-               unifont_ttf= (unsigned char*)BLI_ungzip_to_mem(unifont_path, &unifont_size);
+                       unifont_ttf= (unsigned char*)BLI_ungzip_to_mem(unifont_path, &unifont_size);
+               }
+               else {
+                       printf("%s: 'fonts' data path not found for international font, continuing\n", __func__);
+               }
        }
 
        *unifont_size_r= unifont_size;
index cfe77887674a4ba00700681ed91f57e8fd588e32..d51f9b8af6bc7037d8383c5f4a6640744ef5bc0b 100644 (file)
@@ -37,6 +37,8 @@
 
 #include "blf_internal.h"
 
+#include "BLI_string_utf8.h"
+
 unsigned int blf_next_p2(unsigned int x)
 {
        x -= 1;
@@ -62,67 +64,3 @@ unsigned int blf_hash(unsigned int val)
        key ^= (key >> 17);
        return key % 257;
 }
-
-/*
- * This function is from Imlib2 library (font_main.c), a
- * library that does image file loading and saving as well
- * as rendering, manipulation, arbitrary polygon support, etc.
- *
- * Copyright (C) 2000 Carsten Haitzler and various contributors
- * The original name: imlib_font_utf8_get_next
- * more info here: http://docs.enlightenment.org/api/imlib2/html/
- */
-int blf_utf8_next(unsigned char *buf, unsigned int *iindex)
-{
-       /* Reads UTF8 bytes from 'buf', starting at 'index' and
-        * returns the code point of the next valid code point.
-        * 'index' is updated ready for the next call.
-        *
-        * Returns 0 to indicate an error (e.g. invalid UTF8)
-        */
-       int index= *iindex, len, r;
-       unsigned char d, d2, d3, d4;
-
-       d= buf[index++];
-       if (!d)
-               return 0;
-
-       while (buf[index] && ((buf[index] & 0xc0) == 0x80))
-               index++;
-
-       len= index - *iindex;
-       if (len == 1)
-               r= d;
-       else if (len == 2) {
-               /* 2 byte */
-               d2= buf[*iindex + 1];
-               r= d & 0x1f; /* copy lower 5 */
-               r <<= 6;
-               r |= (d2 & 0x3f); /* copy lower 6 */
-       }
-       else if (len == 3) {
-               /* 3 byte */
-               d2= buf[*iindex + 1];
-               d3= buf[*iindex + 2];
-               r= d & 0x0f; /* copy lower 4 */
-               r <<= 6;
-               r |= (d2 & 0x3f);
-               r <<= 6;
-               r |= (d3 & 0x3f);
-       }
-       else {
-               /* 4 byte */
-               d2= buf[*iindex + 1];
-               d3= buf[*iindex + 2];
-               d4= buf[*iindex + 3];
-               r= d & 0x0f; /* copy lower 4 */
-               r <<= 6;
-               r |= (d2 & 0x3f);
-               r <<= 6;
-               r |= (d3 & 0x3f);
-               r <<= 6;
-               r |= (d4 & 0x3f);
-       }
-       *iindex= index;
-       return r;
-}
index 1350aca1039a703dadb4ce950feaedf937517723..d4b8ade7876166b4a77fff49fc0690d0a461e9e3 100644 (file)
@@ -53,7 +53,7 @@ extern "C" {
                /* can be left blank, otherwise a,b,c... etc with no quotes */
 #define BLENDER_VERSION_CHAR
                /* alpha/beta/rc/release, docs use this */
-#define BLENDER_VERSION_CYCLE  release
+#define BLENDER_VERSION_CYCLE  alpha
 
 struct ListBase;
 struct MemFile;
index 81dd7607d20c5db082c680b05edd80d57fd2b594..f94994c0e3bbe6156fb37cc388f911c73d7eec14 100644 (file)
@@ -1328,9 +1328,9 @@ static void do_latt_key(Scene *scene, Object *ob, Key *key, char *out, const int
                        flag= setkeys(ctime, &key->block, k, t, 0);
 
                        if(flag==0)
-                               do_key(a, a+1, tot, (char *)out, key, actkb, k, t, KEY_MODE_DUMMY);
+                               do_key(a, a+1, tot, out, key, actkb, k, t, KEY_MODE_DUMMY);
                        else
-                               cp_key(a, a+1, tot, (char *)out, key, actkb, k[2], NULL, KEY_MODE_DUMMY);
+                               cp_key(a, a+1, tot, out, key, actkb, k[2], NULL, KEY_MODE_DUMMY);
                }               
        }
        else {
@@ -1340,7 +1340,7 @@ static void do_latt_key(Scene *scene, Object *ob, Key *key, char *out, const int
                        for(kb= key->block.first; kb; kb= kb->next)
                                kb->weights= get_weights_array(ob, kb->vgroup);
                        
-                       do_rel_key(0, tot, tot, (char *)out, key, actkb, KEY_MODE_DUMMY);
+                       do_rel_key(0, tot, tot, out, key, actkb, KEY_MODE_DUMMY);
                        
                        for(kb= key->block.first; kb; kb= kb->next) {
                                if(kb->weights) MEM_freeN(kb->weights);
@@ -1434,7 +1434,7 @@ float *do_ob_key(Scene *scene, Object *ob)
                if(ELEM(ob->type, OB_MESH, OB_LATTICE)) {
                        float *weights= get_weights_array(ob, kb->vgroup);
 
-                       cp_key(0, tot, tot, (char*)out, key, actkb, kb, weights, 0);
+                       cp_key(0, tot, tot, out, key, actkb, kb, weights, 0);
 
                        if(weights) MEM_freeN(weights);
                }
index 8e5452e27041f43fcf9d20aefe0e93214c3818f8..bd5e5dc60493bb0318d1a417434d5e9679ab7a91 100644 (file)
@@ -910,7 +910,7 @@ static int ptcache_path(PTCacheID *pid, char *filename)
        else if (G.relbase_valid || lib) {
                char file[MAX_PTCACHE_PATH]; /* we dont want the dir, only the file */
 
-               BLI_split_dirfile(blendfilename, NULL, file, 0, sizeof(file));
+               BLI_split_file_part(blendfilename, file, sizeof(file));
                i = strlen(file);
                
                /* remove .blend */
index 889db8eb0354f277331d321e93f8c6154792bd59..1633e065d21846a668f19da7dd7645406c7efd04 100644 (file)
@@ -131,15 +131,15 @@ struct Scene;
 struct DerivedMesh;
 struct SmokeModifierData;
 
-// forward declerations
-static void get_cell(float *p0, int res[3], float dx, float *pos, int *cell, int correct);
-void calcTriangleDivs(Object *ob, MVert *verts, int numverts, MFace *tris, int numfaces, int numtris, int **tridivs, float cell_len);
-static void fill_scs_points(Object *ob, DerivedMesh *dm, SmokeCollSettings *scs);
-
 #define TRI_UVOFFSET (1./4.)
 
+#ifdef WITH_SMOKE
+/* forward declerations */
+static void calcTriangleDivs(Object *ob, MVert *verts, int numverts, MFace *tris, int numfaces, int numtris, int **tridivs, float cell_len);
+static void get_cell(float *p0, int res[3], float dx, float *pos, int *cell, int correct);
+static void fill_scs_points(Object *ob, DerivedMesh *dm, SmokeCollSettings *scs);
+#else /* WITH_SMOKE */
 /* Stubs to use when smoke is disabled */
-#ifndef WITH_SMOKE
 struct WTURBULENCE *smoke_turbulence_init(int *UNUSED(res), int UNUSED(amplify), int UNUSED(noisetype)) { return NULL; }
 struct FLUID_3D *smoke_init(int *UNUSED(res), float *UNUSED(p0)) { return NULL; }
 void smoke_free(struct FLUID_3D *UNUSED(fluid)) {}
@@ -148,9 +148,9 @@ void smoke_initWaveletBlenderRNA(struct WTURBULENCE *UNUSED(wt), float *UNUSED(s
 void smoke_initBlenderRNA(struct FLUID_3D *UNUSED(fluid), float *UNUSED(alpha), float *UNUSED(beta), float *UNUSED(dt_factor), float *UNUSED(vorticity), int *UNUSED(border_colli)) {}
 long long smoke_get_mem_req(int UNUSED(xres), int UNUSED(yres), int UNUSED(zres), int UNUSED(amplify)) { return 0; }
 void smokeModifier_do(SmokeModifierData *UNUSED(smd), Scene *UNUSED(scene), Object *UNUSED(ob), DerivedMesh *UNUSED(dm)) {}
-#endif // WITH_SMOKE
-
+#endif /* WITH_SMOKE */
 
+#ifdef WITH_SMOKE
 static int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene, DerivedMesh *dm)
 {
        if((smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain && !smd->domain->fluid)
@@ -455,7 +455,7 @@ static void fill_scs_points(Object *ob, DerivedMesh *dm, SmokeCollSettings *scs)
 }
 
 /*! init triangle divisions */
-void calcTriangleDivs(Object *ob, MVert *verts, int UNUSED(numverts), MFace *faces, int numfaces, int numtris, int **tridivs, float cell_len) 
+static void calcTriangleDivs(Object *ob, MVert *verts, int UNUSED(numverts), MFace *faces, int numfaces, int numtris, int **tridivs, float cell_len)
 {
        // mTriangleDivs1.resize( faces.size() );
        // mTriangleDivs2.resize( faces.size() );
@@ -554,6 +554,8 @@ void calcTriangleDivs(Object *ob, MVert *verts, int UNUSED(numverts), MFace *fac
        }
 }
 
+#endif /* WITH_SMOKE */
+
 static void smokeModifier_freeDomain(SmokeModifierData *smd)
 {
        if(smd->domain)
@@ -1659,4 +1661,4 @@ static void smoke_calc_transparency(float *result, float *input, float *p0, floa
        }
 }
 
-#endif // WITH_SMOKE
+#endif /* WITH_SMOKE */
index 8787ec07d9c72cfe13ea738226c51ad3f6c13299..cd147f4dbed4c54eb0bdde8015a31e4b6c27840e 100644 (file)
@@ -208,7 +208,7 @@ static float sb_time_scale(Object *ob)
        }
        return (1.0f);
        /*
-       this would be frames/sec independant timing assuming 25 fps is default
+       this would be frames/sec independent timing assuming 25 fps is default
        but does not work very well with NLA
                return (25.0f/scene->r.frs_sec)
        */
index 58a2f45e8762816c800325e0c5380e56a35f8845..7b414f7746a6cea31736ceba29d15e86ff25ecc7 100644 (file)
@@ -407,8 +407,7 @@ static void set_ffmpeg_properties(RenderData *rd, AVCodecContext *c, const char
                return;
        }
        
-       prop = IDP_GetPropertyFromGroup(
-               rd->ffcodecdata.properties, (char*) prop_name);
+       prop = IDP_GetPropertyFromGroup(rd->ffcodecdata.properties, prop_name);
        if (!prop) {
                return;
        }
@@ -1025,8 +1024,7 @@ void ffmpeg_property_del(RenderData *rd, void *type, void *prop_)
                return;
        }
 
-       group = IDP_GetPropertyFromGroup(
-               rd->ffcodecdata.properties, (char*) type);
+       group = IDP_GetPropertyFromGroup(rd->ffcodecdata.properties, type);
        if (group && prop) {
                IDP_RemFromGroup(group, prop);
                IDP_FreeProperty(prop);
@@ -1057,11 +1055,10 @@ IDProperty *ffmpeg_property_add(RenderData *rd, char * type, int opt_index, int
                        = IDP_New(IDP_GROUP, val, "ffmpeg"); 
        }
 
-       group = IDP_GetPropertyFromGroup(
-               rd->ffcodecdata.properties, (char*) type);
+       group = IDP_GetPropertyFromGroup(rd->ffcodecdata.properties, type);
        
        if (!group) {
-               group = IDP_New(IDP_GROUP, val, (char*) type); 
+               group = IDP_New(IDP_GROUP, val, type);
                IDP_AddToGroup(rd->ffcodecdata.properties, group);
        }
 
index 4f7f7b482b5db412d14328569304d9223a203fa1..9ccdc37c353958c3209536f9a12dc1f9103c75b0 100644 (file)
@@ -104,6 +104,8 @@ void BLI_make_file_string(const char *relabase, char *string,  const char *dir,
 void BLI_make_exist(char *dir);
 void BLI_make_existing_file(const char *name);
 void BLI_split_dirfile(const char *string, char *dir, char *file, const size_t dirlen, const size_t filelen);
+void BLI_split_dir_part(const char *string, char *dir, const size_t dirlen);
+void BLI_split_file_part(const char *string, char *file, const size_t filelen);
 void BLI_join_dirfile(char *string, const size_t maxlen, const char *dir, const char *file);
 char *BLI_path_basename(char *path);
 int BKE_rebase_path(char *abs, size_t abs_len, char *rel, size_t rel_len, const char *base_dir, const char *src_dir, const char *dest_dir);
index b7a9c204bfe4e990e13cbb0f6c5ef6deadfc849b..765ae93828eb7fa7f86d650dd6d18e6e70d25ffc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id:
+ * $Id$
  *
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
 extern "C" {
 #endif
 
-char       *BLI_strncpy_utf8(char *dst, const char *src, size_t maxncpy);
-int         BLI_utf8_invalid_byte(const char *str, int length);
-int         BLI_utf8_invalid_strip(char *str, int length);
+char        *BLI_strncpy_utf8(char *dst, const char *src, size_t maxncpy);
+int          BLI_utf8_invalid_byte(const char *str, int length);
+int          BLI_utf8_invalid_strip(char *str, int length);
 
     /* copied from glib */
-char       *BLI_str_find_prev_char_utf8(const char *str, const char *p);
-char       *BLI_str_find_next_char_utf8(const char *p, const char *end);
-char       *BLI_str_prev_char_utf8(const char *p);
+unsigned int BLI_str_utf8_as_unicode(const char *p);
+unsigned int BLI_str_utf8_as_unicode_and_size(const char *p, size_t *index);
+unsigned int BLI_str_utf8_as_unicode_step(const char *p, size_t *index);
+size_t          BLI_str_utf8_from_unicode(unsigned int c, char *outbuf);
+
+char        *BLI_str_find_prev_char_utf8(const char *str, const char *p);
+char        *BLI_str_find_next_char_utf8(const char *p, const char *end);
+char        *BLI_str_prev_char_utf8(const char *p);
 
     /* wchar_t functions, copied from blenders own font.c originally */
-size_t      BLI_wstrlen_utf8(const wchar_t *src);
-size_t      BLI_strlen_utf8(const char *strc);
-size_t      BLI_strncpy_wchar_as_utf8(char *dst, const wchar_t *src, const size_t maxcpy);
-size_t      BLI_strncpy_wchar_from_utf8(wchar_t *dst, const char *src, const size_t maxcpy);
+size_t       BLI_wstrlen_utf8(const wchar_t *src);
+size_t       BLI_strlen_utf8(const char *strc);
+size_t       BLI_strncpy_wchar_as_utf8(char *dst, const wchar_t *src, const size_t maxcpy);
+size_t       BLI_strncpy_wchar_from_utf8(wchar_t *dst, const char *src, const size_t maxcpy);
+
+#define      BLI_UTF8_MAX 6
+#define      BLI_UTF8_ERR ((unsigned int)-1)
 
 #ifdef __cplusplus
 }
index 82869035d500e7b8f20ca43c1c4b92b365827764..36ea43bef2da1234e8988c84758864da7a309e25 100644 (file)
@@ -1,7 +1,5 @@
-/*
- * @file PIL_time.h
- * 
- * Platform independant time functions.
+/* 
+ * Platform independent time functions.
  * $Id$
  *
  * ***** BEGIN GPL LICENSE BLOCK *****
@@ -51,7 +49,7 @@ extern
 double PIL_check_seconds_timer         (void);
 
        /**
-        * Platform-independant sleep function.
+        * Platform-independent sleep function.
         * @param ms Number of milliseconds to sleep
         */
 void   PIL_sleep_ms                            (int ms);
index 4e4f8b3cade895461f58a0312b7c3700cff4664d..293f824c5fdf5bce0f9a74480dd33e572aecaeb7 100644 (file)
@@ -903,7 +903,7 @@ void findMissingFiles(Main *bmain, const char *str)
 
        //XXX waitcursor( 1 );
 
-       BLI_split_dirfile(str, dirname, NULL, sizeof(dirname), 0);
+       BLI_split_dir_part(str, dirname, sizeof(dirname));
 
        BLI_bpathIterator_init(&bpi, bmain, bmain->name, 0);
 
index 31c8d32d01502d77816bd083f4ac7c47bdea643f..d03c45e7db97f624ec8679ae0f4800f7a3abd648 100644 (file)
@@ -89,6 +89,7 @@
 #define UNIQUE_NAME_MAX 128
 
 extern char bprogname[];
+extern char bprogdir[];
 
 static int add_win32_extension(char *name);
 static char *blender_version_decimal(const int ver);
@@ -876,7 +877,6 @@ static int test_env_path(char *path, const char *envvar)
 
 static int get_path_local(char *targetpath, const char *folder_name, const char *subfolder_name, const int ver)
 {
-       char bprogdir[FILE_MAX];
        char relfolder[FILE_MAX];
        
 #ifdef PATH_DEBUG2
@@ -893,10 +893,7 @@ static int get_path_local(char *targetpath, const char *folder_name, const char
        else {
                relfolder[0]= '\0';
        }
-       
-       /* use argv[0] (bprogname) to get the path to the executable */
-       BLI_split_dirfile(bprogname, bprogdir, NULL, sizeof(bprogdir), 0);
-       
+
        /* try EXECUTABLE_DIR/2.5x/folder_name - new default directory for local blender installed files */
        if(test_path(targetpath, bprogdir, blender_version_decimal(ver), relfolder))
                return 1;
@@ -964,10 +961,6 @@ static int get_path_system(char *targetpath, const char *folder_name, const char
         * these are only used when running blender from source */
        char cwd[FILE_MAX];
        char relfolder[FILE_MAX];
-       char bprogdir[FILE_MAX];
-
-       /* use argv[0] (bprogname) to get the path to the executable */
-       BLI_split_dirfile(bprogname, bprogdir, NULL, sizeof(bprogdir), 0);
 
        if(folder_name) {
                if (subfolder_name) {
@@ -1431,6 +1424,16 @@ void BLI_split_dirfile(const char *string, char *dir, char *file, const size_t d
        }
 }
 
+void BLI_split_dir_part(const char *string, char *dir, const size_t dirlen)
+{
+       BLI_split_dirfile(string, dir, NULL, dirlen, 0);
+}
+
+void BLI_split_file_part(const char *string, char *file, const size_t filelen)
+{
+       BLI_split_dirfile(string, NULL, file, 0, filelen);
+}
+
 /* simple appending of filename to dir, does not check for valid path! */
 void BLI_join_dirfile(char *dst, const size_t maxlen, const char *dir, const char *file)
 {
@@ -1517,7 +1520,7 @@ int BKE_rebase_path(char *abs, size_t abs_len, char *rel, size_t rel_len, const
        if (rel)
                rel[0]= 0;
 
-       BLI_split_dirfile(base_dir, blend_dir, NULL, sizeof(blend_dir), 0);
+       BLI_split_dir_part(base_dir, blend_dir, sizeof(blend_dir));
 
        if (src_dir[0]=='\0')
                return 0;
index f331d13e5805e712da8622cd54497917a441e4c1..b1ad04eb70d9f66e7455a2c447d6959c051c0794 100644 (file)
@@ -18,6 +18,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
  * The Original Code is Copyright (C) 2011 Blender Foundation.
+ * Code from gutf8.c Copyright (C) 1999 Tom Tromey
+ *                   Copyright (C) 2000 Red Hat, Inc.
  * All rights reserved.
  *
  * Contributor(s): Campbell Barton.
@@ -34,7 +36,7 @@
 #include <wchar.h>
 #include <wctype.h>
 
-#include "BLI_string.h"
+#include "BLI_string_utf8.h"
 
 /* from libswish3, originally called u8_isvalid(),
  * modified to return the index of the bad character (byte index not utf).
@@ -189,45 +191,11 @@ char *BLI_strncpy_utf8(char *dst, const char *src, size_t maxncpy)
 /* --------------------------------------------------------------------------*/
 /* wchar_t / utf8 functions  */
 
-/* UTF-8 <-> wchar transformations */
-static size_t chtoutf8(const unsigned long c, char o[4])
-{
-       // Variables and initialization
-/*     memset(o, 0, 4);        */
-
-       // Create the utf-8 string
-       if (c < 0x80) {
-               o[0] = (char) c;
-               return 1;
-       }
-       else if (c < 0x800) {
-               o[0] = (0xC0 | (c>>6));
-               o[1] = (0x80 | (c & 0x3f));
-               return 2;
-       }
-       else if (c < 0x10000) {
-               o[0] = (0xe0 | (c >> 12));
-               o[1] = (0x80 | (c >>6 & 0x3f));
-               o[2] = (0x80 | (c & 0x3f));
-               return 3;
-       }
-       else if (c < 0x200000) {
-               o[0] = (0xf0 | (c>>18));
-               o[1] = (0x80 | (c >>12 & 0x3f));
-               o[2] = (0x80 | (c >> 6 & 0x3f));
-               o[3] = (0x80 | (c & 0x3f));
-               return 4;
-       }
-
-       /* should we assert here? */
-       return 0;
-}
-
 size_t BLI_strncpy_wchar_as_utf8(char *dst, const wchar_t *src, const size_t maxcpy)
 {
        size_t len = 0;
        while(*src && len < maxcpy) { /* XXX can still run over the buffer because utf8 size isnt known :| */
-               len += chtoutf8(*src++, dst+len);
+               len += BLI_str_utf8_from_unicode(*src++, dst+len);
        }
 
        dst[len]= '\0';
@@ -238,11 +206,10 @@ size_t BLI_strncpy_wchar_as_utf8(char *dst, const wchar_t *src, const size_t max
 /* wchar len in utf8 */
 size_t BLI_wstrlen_utf8(const wchar_t *src)
 {
-       char ch_dummy[4];
        size_t len = 0;
 
        while(*src) {
-               len += chtoutf8(*src++, ch_dummy);
+               len += BLI_str_utf8_from_unicode(*src++, NULL);
        }
 
        return len;
@@ -272,26 +239,6 @@ size_t BLI_strlen_utf8(const char *strc)
        return len;
 }
 
-
-/* Converts Unicode to wchar
-
-According to RFC 3629 "UTF-8, a transformation format of ISO 10646"
-(http://tools.ietf.org/html/rfc3629), the valid UTF-8 encoding are:
-
-  Char. number range  |        UTF-8 octet sequence
-         (hexadecimal)    |              (binary)
-   --------------------+---------------------------------------------
-   0000 0000-0000 007F | 0xxxxxxx
-   0000 0080-0000 07FF | 110xxxxx 10xxxxxx
-   0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx
-   0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
-
-If the encoding incidated by the first character is incorrect (because the
-1 to 3 following characters do not match 10xxxxxx), the output is a '?' and
-only a single input character is consumed.
-
-*/
-
 size_t BLI_strncpy_wchar_from_utf8(wchar_t *dst_w, const char *src_c, const size_t maxcpy)
 {
        int len=0;
@@ -299,32 +246,16 @@ size_t BLI_strncpy_wchar_from_utf8(wchar_t *dst_w, const char *src_c, const size
        if(dst_w==NULL || src_c==NULL) return(0);
 
        while(*src_c && len < maxcpy) {
-               if ((*src_c & 0xe0) == 0xc0) {
-                       if((src_c[1] & 0x80) && (src_c[1] & 0x40) == 0x00) {
-                               *dst_w=((src_c[0] &0x1f)<<6) | (src_c[1]&0x3f);
-                               src_c++;
-                       } else {
-                               *dst_w = '?';
-                       }
-               } else if ((*src_c & 0xf0) == 0xe0) {
-                       if((src_c[1] & src_c[2] & 0x80) && ((src_c[1] | src_c[2]) & 0x40) == 0x00) {
-                               *dst_w=((src_c[0] & 0x0f)<<12) | ((src_c[1]&0x3f)<<6) | (src_c[2]&0x3f);
-                               src_c += 2;
-                       } else {
-                               *dst_w = '?';
-                       }
-               } else if ((*src_c & 0xf8) == 0xf0) {
-                       if((src_c[1] & src_c[2] & src_c[3] & 0x80) && ((src_c[1] | src_c[2] | src_c[3]) & 0x40) == 0x00) {
-                               *dst_w=((src_c[0] & 0x07)<<18) | ((src_c[1]&0x1f)<<12) | ((src_c[2]&0x3f)<<6) | (src_c[3]&0x3f);
-                               src_c += 3;
-                       } else {
-                               *dst_w = '?';
-                       }
-               } else {
-                       *dst_w=(src_c[0] & 0x7f);
+               size_t step= 0;
+               unsigned int unicode= BLI_str_utf8_as_unicode_and_size(src_c, &step);
+               if (unicode != BLI_UTF8_ERR) {
+                       *dst_w= (wchar_t)unicode;
+                       src_c += step;
+               }
+               else {
+                       *dst_w = '?';
+                       src_c= BLI_str_find_next_char_utf8(src_c, NULL);
                }
-
-               src_c++;
                dst_w++;
                len++;
        }
@@ -334,13 +265,198 @@ size_t BLI_strncpy_wchar_from_utf8(wchar_t *dst_w, const char *src_c, const size
 /* end wchar_t / utf8 functions  */
 /* --------------------------------------------------------------------------*/
 
+/* copied from glib's gutf8.c */
+
+/* note, glib uses unsigned int for unicode, best we do the same,
+ * though we dont typedef it - campbell */
+
+#define UTF8_COMPUTE(Char, Mask, Len)                                         \
+       if (Char < 128) {                                                         \
+               Len = 1;                                                              \
+               Mask = 0x7f;                                                          \
+       }                                                                         \
+       else if ((Char & 0xe0) == 0xc0) {                                         \
+               Len = 2;                                                              \
+               Mask = 0x1f;                                                          \
+       }                                                                         \
+       else if ((Char & 0xf0) == 0xe0) {                                         \
+               Len = 3;                                                              \
+               Mask = 0x0f;                                                          \
+       }                                                                         \
+       else if ((Char & 0xf8) == 0xf0) {                                         \
+               Len = 4;                                                              \
+               Mask = 0x07;                                                          \
+       }                                                                         \
+       else if ((Char & 0xfc) == 0xf8) {                                         \
+               Len = 5;                                                              \
+               Mask = 0x03;                                                          \
+       }                                                                         \
+       else if ((Char & 0xfe) == 0xfc) {                                         \
+               Len = 6;                                                              \
+               Mask = 0x01;                                                          \
+       }                                                                         \
+       else {                                                                    \
+               Len = -1;                                                             \
+       }
 
+/* same as glib define but added an 'Err' arg */
+#define UTF8_GET(Result, Chars, Count, Mask, Len, Err)                        \
+       (Result) = (Chars)[0] & (Mask);                                           \
+       for ((Count) = 1; (Count) < (Len); ++(Count)) {                           \
+               if (((Chars)[(Count)] & 0xc0) != 0x80) {                              \
+                       (Result) = Err;                                                   \
+                       break;                                                            \
+               }                                                                     \
+               (Result) <<= 6;                                                       \
+               (Result) |= ((Chars)[(Count)] & 0x3f);                                \
+       }
 
 
+/* was g_utf8_get_char */
+/**
+ * BLI_str_utf8_as_unicode:
+ * @p: a pointer to Unicode character encoded as UTF-8
+ *
+ * Converts a sequence of bytes encoded as UTF-8 to a Unicode character.
+ * If @p does not point to a valid UTF-8 encoded character, results are
+ * undefined. If you are not sure that the bytes are complete
+ * valid Unicode characters, you should use g_utf8_get_char_validated()
+ * instead.
+ *
+ * Return value: the resulting character
+ **/
+unsigned int BLI_str_utf8_as_unicode(const char *p)
+{
+  int i, mask = 0, len;
+  unsigned int result;
+  unsigned char c = (unsigned char) *p;
+
+  UTF8_COMPUTE (c, mask, len);
+  if (len == -1)
+    return BLI_UTF8_ERR;
+  UTF8_GET (result, p, i, mask, len, BLI_UTF8_ERR);
+
+  return result;
+}
+
+/* varient that increments the length */
+unsigned int BLI_str_utf8_as_unicode_and_size(const char *p, size_t *index)
+{
+       int i, mask = 0, len;
+       unsigned int result;
+       unsigned char c = (unsigned char) *p;
+
+       UTF8_COMPUTE (c, mask, len);
+       if (len == -1)
+               return BLI_UTF8_ERR;
+       UTF8_GET (result, p, i, mask, len, BLI_UTF8_ERR);
+       *index += len;
+       return result;
+}
+
+/* another varient that steps over the index,
+ * note, currently this also falls back to latin1 for text drawing. */
+unsigned int BLI_str_utf8_as_unicode_step(const char *p, size_t *index)
+{
+       int i, mask = 0, len;
+       unsigned int result;
+       unsigned char c;
+
+       p += *index;
+       c= (unsigned char) *p;
+
+       UTF8_COMPUTE (c, mask, len);
+       if (len == -1) {
+               /* when called with NULL end, result will never be NULL,
+                * checks for a NULL character */
+               char *p_next= BLI_str_find_next_char_utf8(p, NULL);
+               /* will never return the same pointer unless '\0',
+                * eternal loop is prevented */
+               *index += (size_t)(p_next - p);
+               return BLI_UTF8_ERR;
+       }
+
+       /* this is tricky since there are a few ways we can bail out of bad unicode
+        * values, 3 possible solutions. */
+#if 0
+       UTF8_GET (result, p, i, mask, len, BLI_UTF8_ERR);
+#elif 1
+       /* WARNING: this is NOT part of glib, or supported by similar functions.
+        * this is added for text drawing because some filepaths can have latin1
+        * characters */
+       UTF8_GET (result, p, i, mask, len, BLI_UTF8_ERR);
+       if(result == BLI_UTF8_ERR) {
+               len= 1;
+               result= *p;
+       }
+       /* end warning! */
+#else
+       /* without a fallback like '?', text drawing will stop on this value */
+       UTF8_GET (result, p, i, mask, len, '?');
+#endif
+
+       *index += len;
+       return result;
+}
+
+/* was g_unichar_to_utf8 */
+/**
+ * BLI_str_utf8_from_unicode:
+ * @c: a Unicode character code
+ * @outbuf: output buffer, must have at least 6 bytes of space.
+ *       If %NULL, the length will be computed and returned
+ *       and nothing will be written to @outbuf.
+ *
+ * Converts a single character to UTF-8.
+ *
+ * Return value: number of bytes written
+ **/
+size_t BLI_str_utf8_from_unicode(unsigned int c, char *outbuf)
+{
+       /* If this gets modified, also update the copy in g_string_insert_unichar() */
+       unsigned int len = 0;
+       int first;
+       int i;
+
+       if (c < 0x80) {
+               first = 0;
+               len = 1;
+       }
+       else if (c < 0x800) {
+               first = 0xc0;
+               len = 2;
+       }
+       else if (c < 0x10000) {
+               first = 0xe0;
+               len = 3;
+       }
+       else if (c < 0x200000) {
+               first = 0xf0;
+               len = 4;
+       }
+       else if (c < 0x4000000) {
+               first = 0xf8;
+               len = 5;
+       }
+       else {
+               first = 0xfc;
+               len = 6;
+       }
+
+       if (outbuf) {
+               for (i = len - 1; i > 0; --i) {
+                       outbuf[i] = (c & 0x3f) | 0x80;
+                       c >>= 6;
+               }
+               outbuf[0] = c | first;
+       }
+
+       return len;
+}
 
-/* copied from glib */
+/* was g_utf8_find_prev_char */
 /**
- * g_utf8_find_prev_char:
+ * BLI_str_find_prev_char_utf8:
  * @str: pointer to the beginning of a UTF-8 encoded string
  * @p: pointer to some position within @str
  *
@@ -364,8 +480,9 @@ char * BLI_str_find_prev_char_utf8(const char *str, const char *p)
        return NULL;
 }
 
+/* was g_utf8_find_next_char */
 /**
- * g_utf8_find_next_char:
+ * BLI_str_find_next_char_utf8:
  * @p: a pointer to a position within a UTF-8 encoded string
  * @end: a pointer to the byte following the end of the string,
  * or %NULL to indicate that the string is nul-terminated.
@@ -395,8 +512,9 @@ char *BLI_str_find_next_char_utf8(const char *p, const char *end)
        return (p == end) ? NULL : (char *)p;
 }
 
+/* was g_utf8_prev_char */
 /**
- * g_utf8_prev_char:
+ * BLI_str_prev_char_utf8:
  * @p: a pointer to a position within a UTF-8 encoded string
  *
  * Finds the previous UTF-8 character in the string before @p.
index 9594197ef9041d181ed3855b8cb46e5806c43abb..21ad0ff7253c8cefc2548f7c6339d93d91dfc166 100644 (file)
@@ -56,7 +56,7 @@ int BLI_getInstallationDir( char * str ) {
        int a;
        
        GetModuleFileName(NULL,str,FILE_MAXDIR+FILE_MAXFILE);
-       BLI_split_dirfile(str, dir, NULL, sizeof(dir), 0); /* shouldn't be relative */
+       BLI_split_dir_part(str, dir, sizeof(dir)); /* shouldn't be relative */
        a = strlen(dir);
        if(dir[a-1] == '\\') dir[a-1]=0;
        
index 20ddca60cfebf8e78438e2cbac693ff17fca818d..c4ad3a7d361e5b501f9d9e6dffa3ef0f9471ca03 100644 (file)
@@ -3124,7 +3124,7 @@ static void direct_link_pointcache(FileData *fd, PointCache *cache)
                                pm->data[i] = newdataadr(fd, pm->data[i]);
                                
                                /* the cache saves non-struct data without DNA */
-                               if(pm->data[i] && strcmp(ptcache_data_struct[i], "")==0 && (fd->flags & FD_FLAGS_SWITCH_ENDIAN)) {
+                               if(pm->data[i] && ptcache_data_struct[i][0]=='\0' && (fd->flags & FD_FLAGS_SWITCH_ENDIAN)) {
                                        int j, tot= (BKE_ptcache_data_size (i) * pm->totpoint)/4; /* data_size returns bytes */
                                        int *poin= pm->data[i];
                                        
index 181b2e3dd26eb41210918b3d420cca3903e48787..fb34a3710a29509ee2b49c8bd0004c21227f13d4 100644 (file)
@@ -872,7 +872,7 @@ static void write_pointcaches(WriteData *wd, ListBase *ptcaches)
                                
                                for(i=0; i<BPHYS_TOT_DATA; i++) {
                                        if(pm->data[i] && pm->data_types & (1<<i)) {
-                                               if(strcmp(ptcache_data_struct[i], "")==0)
+                                               if(ptcache_data_struct[i][0]=='\0')
                                                        writedata(wd, DATA, MEM_allocN_len(pm->data[i]), pm->data[i]);
                                                else
                                                        writestruct(wd, DATA, ptcache_data_struct[i], pm->totpoint, pm->data[i]);
@@ -880,7 +880,7 @@ static void write_pointcaches(WriteData *wd, ListBase *ptcaches)
                                }
 
                                for(; extra; extra=extra->next) {
-                                       if(strcmp(ptcache_extra_struct[extra->type], "")==0)
+                                       if(ptcache_extra_struct[extra->type][0]=='\0')
                                                continue;
                                        writestruct(wd, DATA, "PTCacheExtra", 1, extra);
                                        writestruct(wd, DATA, ptcache_extra_struct[extra->type], extra->totdata, extra->data);
@@ -2681,8 +2681,8 @@ int BLO_write_file(Main *mainvar, const char *filepath, int write_flags, ReportL
        if(write_flags & G_FILE_RELATIVE_REMAP) {
                char dir1[FILE_MAXDIR+FILE_MAXFILE];
                char dir2[FILE_MAXDIR+FILE_MAXFILE];
-               BLI_split_dirfile(filepath, dir1, NULL, sizeof(dir1), 0);
-               BLI_split_dirfile(mainvar->name, dir2, NULL, sizeof(dir2), 0);
+               BLI_split_dir_part(filepath, dir1, sizeof(dir1));
+               BLI_split_dir_part(mainvar->name, dir2, sizeof(dir2));
 
                /* just incase there is some subtle difference */
                BLI_cleanup_dir(mainvar->name, dir1);
@@ -2702,6 +2702,7 @@ int BLO_write_file(Main *mainvar, const char *filepath, int write_flags, ReportL
                }
        }
 
+       userfilename[0]= '\0'; /* ensure its initialized */
        BLI_make_file_string(G.main->name, userfilename, BLI_get_folder_create(BLENDER_USER_CONFIG, NULL), BLENDER_STARTUP_FILE);
        write_user_block= (BLI_path_cmp(filepath, userfilename) == 0);
 
index 056d74aabfb4f7d6d0737cb5b04cc5054e2bb458..c06867ca107b9024344fa63202e56b8bbe21f90c 100644 (file)
@@ -884,7 +884,7 @@ bool DocumentImporter::writeImage( const COLLADAFW::Image* image )
        char dir[FILE_MAX];
        char full_path[FILE_MAX];
        
-       BLI_split_dirfile(filename, dir, NULL, sizeof(dir), 0);
+       BLI_split_dir_part(filename, dir, sizeof(dir));
        BLI_join_dirfile(full_path, sizeof(full_path), dir, filepath.c_str());
        Image *ima = BKE_add_image_file(full_path);
        if (!ima) {
index 53c43677c18491e7d0a6d276538a9e6b411661b1..6c7251016c34d6a1aa3a6d840223de7174a13d23 100644 (file)
@@ -97,7 +97,7 @@ void ImagesExporter::operator()(Material *ma, Object *ob)
                        char src[FILE_MAX];
                        char dir[FILE_MAX];
                        
-                       BLI_split_dirfile(this->export_settings->filepath, dir, NULL, sizeof(dir), 0);
+                       BLI_split_dir_part(this->export_settings->filepath, dir, sizeof(dir));
 
                        BKE_rebase_path(abs, sizeof(abs), rel, sizeof(rel), G.main->name, image->name, dir);
 
index e7c7ebf3ecefac253cd4ba8efb24f99c84f21230..8e9f5c7543c08aeaf58a043aad294551b8aa5daf 100644 (file)
@@ -409,15 +409,15 @@ static int poselib_add_menu_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED
        uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
        
        /* add new (adds to the first unoccupied frame) */
-       uiItemIntO(layout, UI_translate_do_iface(N_("Add New")), ICON_NONE, "POSELIB_OT_pose_add", "frame", poselib_get_free_index(ob->poselib));
+       uiItemIntO(layout, IFACE_("Add New"), ICON_NONE, "POSELIB_OT_pose_add", "frame", poselib_get_free_index(ob->poselib));
        
        /* check if we have any choices to add a new pose in any other way */
        if ((ob->poselib) && (ob->poselib->markers.first)) {
                /* add new (on current frame) */
-               uiItemIntO(layout, UI_translate_do_iface(N_("Add New (Current Frame)")), ICON_NONE, "POSELIB_OT_pose_add", "frame", CFRA);
+               uiItemIntO(layout, IFACE_("Add New (Current Frame)"), ICON_NONE, "POSELIB_OT_pose_add", "frame", CFRA);
                
                /* replace existing - submenu */
-               uiItemMenuF(layout, UI_translate_do_iface(N_("Replace Existing...")), 0, poselib_add_menu_invoke__replacemenu, NULL);
+               uiItemMenuF(layout, IFACE_("Replace Existing..."), 0, poselib_add_menu_invoke__replacemenu, NULL);
        }
        
        uiPupMenuEnd(C, pup);
index a06497889d946f057615ab24f03296316c53110d..43f6b36f5eb807d6b45d3983149d6d2e8cf35375 100644 (file)
@@ -813,5 +813,9 @@ int UI_translate_tooltips(void);
 const char *UI_translate_do_iface(const char *msgid);
 const char *UI_translate_do_tooltip(const char *msgid);
 
+/* Those macros should be used everywhere in UI code. */
+#define IFACE_(msgid) UI_translate_do_iface(msgid)
+#define TIP_(msgid) UI_translate_do_tooltip(msgid)
+
 #endif /*  UI_INTERFACE_H */
 
index 16edd0a1a9e55b9ea34b214e005493ad7f47581e..a12d297bbb1a3f59a593ea8a7c580bdec66aa256 100644 (file)
@@ -2773,10 +2773,7 @@ static uiBut *ui_def_but_operator(uiBlock *block, int type, const char *opname,
        if ((!tip || tip[0]=='\0') && ot && ot->description) {
                tip= ot->description;
 
-#ifdef WITH_INTERNATIONAL
-               if(UI_translate_tooltips())
-                       tip= BLF_gettext(tip);
-#endif
+               tip = TIP_(tip);
        }
 
        but= ui_def_but(block, type, -1, str, x1, y1, x2, y2, NULL, 0, 0, 0, 0, tip);
index 24434465f5fe4020b954063d7c7ab59f5ef9a1a1..c1418c5b6e8febd968764deeedc8179543509070 100644 (file)
@@ -525,6 +525,9 @@ static void init_internal_icons(void)
                                bbuf= NULL;
                        }
                }
+               else {
+                       printf("%s: 'icons' data path not found, continuing\n", __func__);
+               }
        }
        if(bbuf==NULL)
                bbuf = IMB_ibImageFromMemory((unsigned char*)datatoc_blenderbuttons, datatoc_blenderbuttons_size, IB_rect);
index ba612fc8727bb4d17303ba76229591d1ab223400..2f423a361b83bf4e1c62afcf6d9b89b852344554 100644 (file)
@@ -637,11 +637,7 @@ PointerRNA uiItemFullO(uiLayout *layout, const char *opname, const char *name, i
        }
 
        if(!name) {
-               name= ot->name;
-
-#ifdef WITH_INTERNATIONAL
-               name= UI_translate_do_iface(name);
-#endif
+               name= IFACE_(ot->name);
        }
 
        if(layout->root->type == UI_LAYOUT_MENU && !icon)
@@ -1430,11 +1426,7 @@ void uiItemM(uiLayout *layout, bContext *UNUSED(C), const char *menuname, const
        }
 
        if(!name) {
-               name= mt->label;
-
-#ifdef WITH_INTERNATIONAL
-               name= UI_translate_do_iface(name);
-#endif
+               name= IFACE_(mt->label);
        }
 
        if(layout->root->type == UI_LAYOUT_MENU && !icon)
@@ -2808,7 +2800,7 @@ void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,in
                empty= uiDefAutoButsRNA(layout, &ptr, check_prop, label_align) == 0;
 
                if(empty && (flag & UI_LAYOUT_OP_SHOW_EMPTY)) {
-                       uiItemL(layout, UI_translate_do_iface(N_("No Properties")), ICON_NONE);
+                       uiItemL(layout, IFACE_("No Properties"), ICON_NONE);
                }
        }
        
index c25e7f23c04c8e38e0bc85499b614e22f4f542bb..890a2b4ee7f29366e55634c13beec9b70f230acb 100644 (file)
@@ -442,11 +442,7 @@ static void ui_draw_aligned_panel_header(uiStyle *style, uiBlock *block, rcti *r
        Panel *panel= block->panel;
        rcti hrect;
        int  pnl_icons;
-       const char *activename= panel->drawname[0]?panel->drawname:panel->panelname;
-
-#ifdef WITH_INTERNATIONAL
-       activename= UI_translate_do_iface(activename);
-#endif
+       const char *activename= IFACE_(panel->drawname[0] ? panel->drawname : panel->panelname);
 
        /* + 0.001f to avoid flirting with float inaccuracy */
        if(panel->control & UI_PNL_CLOSE) pnl_icons=(panel->labelofs+2*PNL_ICON+5)/block->aspect + 0.001f;
index 028ab05464b6ddd6235d88622305936b00ad7703..4791d2652dca547c96aa5c73e65ce0932e38bd3b 100644 (file)
@@ -349,7 +349,6 @@ static void ui_tooltip_region_free_cb(ARegion *ar)
        ar->regiondata= NULL;
 }
 
-#define TIP_(msgid) UI_translate_do_tooltip(msgid)
 ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
 {
        uiStyle *style= UI_GetStyle();
@@ -410,7 +409,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
                prop= (but->opptr)? but->opptr->data: NULL;
 
                if(WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, buf, sizeof(buf))) {
-                       BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_(N_("Shortcut: %s")), buf);
+                       BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Shortcut: %s"), buf);
                        data->color[data->totline]= 0x888888;
                        data->totline++;
                }
@@ -420,7 +419,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
                /* full string */
                ui_get_but_string(but, buf, sizeof(buf));
                if(buf[0]) {
-                       BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_(N_("Value: %s")), buf);
+                       BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Value: %s"), buf);
                        data->color[data->totline]= 0x888888;
                        data->totline++;
                }
@@ -432,7 +431,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
                if (unit_type == PROP_UNIT_ROTATION) {
                        if (RNA_property_type(but->rnaprop) == PROP_FLOAT) {
                                float value= RNA_property_array_check(but->rnaprop) ? RNA_property_float_get_index(&but->rnapoin, but->rnaprop, but->rnaindex) : RNA_property_float_get(&but->rnapoin, but->rnaprop);
-                               BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_(N_("Radians: %f")), value);
+                               BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Radians: %f"), value);
                                data->color[data->totline]= 0x888888;
                                data->totline++;
                        }
@@ -441,7 +440,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
                if(but->flag & UI_BUT_DRIVEN) {
                        if(ui_but_anim_expression_get(but, buf, sizeof(buf))) {
                                /* expression */
-                               BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_(N_("Expression: %s")), buf);
+                               BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Expression: %s"), buf);
                                data->color[data->totline]= 0x888888;
                                data->totline++;
                        }
@@ -449,7 +448,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
 
                /* rna info */
                if ((U.flag & USER_TOOLTIPS_PYTHON) == 0) {
-                       BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_(N_("Python: %s.%s")), RNA_struct_identifier(but->rnapoin.type), RNA_property_identifier(but->rnaprop));
+                       BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Python: %s.%s"), RNA_struct_identifier(but->rnapoin.type), RNA_property_identifier(but->rnaprop));
                        data->color[data->totline]= 0x888888;
                        data->totline++;
                }
@@ -457,7 +456,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
                if(but->rnapoin.id.data) {
                        ID *id= but->rnapoin.id.data;
                        if(id->lib && id->lib->name) {
-                               BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_(N_("Library: %s")), id->lib->name);
+                               BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Library: %s"), id->lib->name);
                                data->color[data->totline]= 0x888888;
                                data->totline++;
                        }
@@ -472,7 +471,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
 
                /* operator info */
                if ((U.flag & USER_TOOLTIPS_PYTHON) == 0) {
-                       BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_(N_("Python: %s")), str);
+                       BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Python: %s"), str);
                        data->color[data->totline]= 0x888888;
                        data->totline++;
                }
@@ -486,7 +485,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
                        WM_operator_poll_context(C, but->optype, but->opcontext);
                        poll_msg= CTX_wm_operator_poll_msg_get(C);
                        if(poll_msg) {
-                               BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_(N_("Disabled: %s")), poll_msg);
+                               BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Disabled: %s"), poll_msg);
                                data->color[data->totline]= 0x6666ff; /* alert */
                                data->totline++;                        
                        }
@@ -496,7 +495,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
                if ((U.flag & USER_TOOLTIPS_PYTHON) == 0) {
                        if(but->menu_create_func && WM_menutype_contains((MenuType *)but->poin)) {
                                MenuType *mt= (MenuType *)but->poin;
-                               BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_(N_("Python: %s")), mt->idname);
+                               BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Python: %s"), mt->idname);
                                data->color[data->totline]= 0x888888;
                                data->totline++;
                        }
@@ -615,7 +614,6 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
 
        return ar;
 }
-#undef TIP_
 
 void ui_tooltip_free(bContext *C, ARegion *ar)
 {
@@ -2372,7 +2370,7 @@ uiPopupMenu *uiPupMenuBegin(bContext *C, const char *title, int icon)
        
        pup->block= uiBeginBlock(C, NULL, "uiPupMenuBegin", UI_EMBOSSP);
        pup->block->flag |= UI_BLOCK_POPUP_MEMORY;
-       pup->block->puphash= ui_popup_menu_hash((char*)title);
+       pup->block->puphash= ui_popup_menu_hash(title);
        pup->layout= uiBlockLayout(pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, style);
        uiLayoutSetOperatorContext(pup->layout, WM_OP_EXEC_REGION_WIN);
 
index e264146a6e3dc2bdf123180ecb22c0149670f367..c6bc0f58b5b6e594a5e662da65f0e532e892e81d 100644 (file)
@@ -357,7 +357,7 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
        if(flag & UI_ID_PREVIEWS) {
 
                but= uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X*6, UI_UNIT_Y*6,
-                               UI_translate_do_tooltip(template_id_browse_tip(type)));
+                               TIP_(template_id_browse_tip(type)));
                if(type) {
                        but->icon= RNA_struct_ui_icon(type);
                        if (id) but->icon = ui_id_icon_get(C, id, 1);
@@ -370,7 +370,7 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
        }
        else if(flag & UI_ID_BROWSE) {
                but= uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X*1.6, UI_UNIT_Y,
-                               UI_translate_do_tooltip(template_id_browse_tip(type)));
+                               TIP_(template_id_browse_tip(type)));
                if(type) {
                        but->icon= RNA_struct_ui_icon(type);
                        /* default dragging of icon for id browse buttons */
@@ -396,12 +396,12 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
                if(id->lib) {
                        if(id->flag & LIB_INDIRECT) {
                                but= uiDefIconBut(block, BUT, 0, ICON_LIBRARY_DATA_INDIRECT, 0,0,UI_UNIT_X,UI_UNIT_Y, NULL, 0, 0, 0, 0,
-                                       UI_translate_do_tooltip(N_("Indirect library datablock, cannot change")));
+                                       TIP_("Indirect library datablock, cannot change"));
                                uiButSetFlag(but, UI_BUT_DISABLED);
                        }
                        else {
                                but= uiDefIconBut(block, BUT, 0, ICON_LIBRARY_DATA_DIRECT, 0,0,UI_UNIT_X,UI_UNIT_Y, NULL, 0, 0, 0, 0,
-                                       UI_translate_do_tooltip(N_("Direct linked library datablock, click to make local")));
+                                       TIP_("Direct linked library datablock, click to make local"));
                                if(!id_make_local(id, 1 /* test */) || (idfrom && idfrom->lib))
                                        uiButSetFlag(but, UI_BUT_DISABLED);
                        }
@@ -415,7 +415,7 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
                        BLI_snprintf(str, sizeof(str), "%d", id->us);
 
                        but= uiDefBut(block, BUT, 0, str, 0,0,UI_UNIT_X + ((id->us < 10) ? 0:10), UI_UNIT_Y, NULL, 0, 0, 0, 0,
-                                     UI_translate_do_tooltip(_("Display number of users of this data (click to make a single-user copy)")));
+                                     TIP_("Display number of users of this data (click to make a single-user copy)"));
 
                        uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_ALONE));
                        if(!id_copy(id, NULL, 1 /* test only */) || (idfrom && idfrom->lib) || !editable)
@@ -433,11 +433,11 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
                int w= id?UI_UNIT_X: (flag & UI_ID_OPEN)? UI_UNIT_X*3: UI_UNIT_X*6;
                
                if(newop) {
-                       but= uiDefIconTextButO(block, BUT, newop, WM_OP_INVOKE_DEFAULT, ICON_ZOOMIN, (id)? "": UI_translate_do_iface(N_("New")), 0, 0, w, UI_UNIT_Y, NULL);
+                       but= uiDefIconTextButO(block, BUT, newop, WM_OP_INVOKE_DEFAULT, ICON_ZOOMIN, (id)? "": IFACE_("New"), 0, 0, w, UI_UNIT_Y, NULL);
                        uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_ADD_NEW));
                }
                else {
-                       but= uiDefIconTextBut(block, BUT, 0, ICON_ZOOMIN, (id)? "": _("New"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
+                       but= uiDefIconTextBut(block, BUT, 0, ICON_ZOOMIN, (id)? "": IFACE_("New"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
                        uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_ADD_NEW));
                }
 
@@ -449,11 +449,11 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
                int w= id?UI_UNIT_X: (flag & UI_ID_ADD_NEW)? UI_UNIT_X*3: UI_UNIT_X*6;
                
                if(openop) {
-                       but= uiDefIconTextButO(block, BUT, openop, WM_OP_INVOKE_DEFAULT, ICON_FILESEL, (id)? "": UI_translate_do_iface(N_("Open")), 0, 0, w, UI_UNIT_Y, NULL);
+                       but= uiDefIconTextButO(block, BUT, openop, WM_OP_INVOKE_DEFAULT, ICON_FILESEL, (id)? "": IFACE_("Open"), 0, 0, w, UI_UNIT_Y, NULL);
                        uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_OPEN));
                }
                else {
-                       but= uiDefIconTextBut(block, BUT, 0, ICON_FILESEL, (id)? "": UI_translate_do_iface(N_("Open")), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
+                       but= uiDefIconTextBut(block, BUT, 0, ICON_FILESEL, (id)? "": IFACE_("Open"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
                        uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_OPEN));
                }
 
@@ -470,7 +470,7 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
                }
                else {
                        but= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0,
-                                       UI_translate_do_tooltip(N_("Unlink datablock. Shift + Click to set users to zero, data will then not be saved")));
+                                       TIP_("Unlink datablock. Shift + Click to set users to zero, data will then not be saved"));
                        uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_DELETE));
 
                        if(RNA_property_flag(template->prop) & PROP_NEVER_NULL)
@@ -727,8 +727,8 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, Modif
                BLI_snprintf(str, sizeof(str), "%s parent deform", md->name);
                uiDefBut(block, LABEL, 0, str, 0, 0, 185, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, "Modifier name"); 
                
-               but = uiDefBut(block, BUT, 0, UI_translate_do_iface(N_("Make Real")), 0, 0, 80, 16, NULL, 0.0, 0.0, 0.0, 0.0,
-                                       UI_translate_do_tooltip(N_("Convert virtual modifier to a real modifier")));
+               but = uiDefBut(block, BUT, 0, IFACE_("Make Real"), 0, 0, 80, 16, NULL, 0.0, 0.0, 0.0, 0.0,
+                                       TIP_("Convert virtual modifier to a real modifier"));
                uiButSetFunc(but, modifiers_convertToReal, ob, md);
        }
        else {
@@ -765,7 +765,7 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, Modif
                        {
                                /* -- convert to rna ? */
                                but = uiDefIconButBitI(block, TOG, eModifierMode_OnCage, 0, ICON_MESH_DATA, 0, 0, UI_UNIT_X-2, UI_UNIT_Y, &md->mode, 0.0, 0.0, 0.0, 0.0,
-                                               UI_translate_do_tooltip(N_("Apply modifier to editing cage during Editmode")));
+                                               TIP_("Apply modifier to editing cage during Editmode"));
                                if (index < cageIndex)
                                        uiButSetFlag(but, UI_BUT_DISABLED);
                                uiButSetFunc(but, modifiers_setOnCage, ob, md);
@@ -786,7 +786,7 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, Modif
                                /* add disabled pre-tesselated button, so users could have
                                   message for this modifiers */
                                but = uiDefIconButBitI(block, TOG, eModifierMode_ApplyOnSpline, 0, ICON_SURFACE_DATA, 0, 0, UI_UNIT_X-2, UI_UNIT_Y, &md->mode, 0.0, 0.0, 0.0, 0.0,
-                                               UI_translate_do_tooltip(N_("This modifier could be applied on splines' points only")));
+                                               TIP_("This modifier could be applied on splines' points only"));
                                uiButSetFlag(but, UI_BUT_DISABLED);
                        } else if (mti->type != eModifierTypeType_Constructive) {
                                /* constructive modifiers tesselates curve before applying */
@@ -836,17 +836,17 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, Modif
                        }
                        else {
                                uiLayoutSetOperatorContext(row, WM_OP_INVOKE_DEFAULT);
-                               uiItemEnumO(row, "OBJECT_OT_modifier_apply", UI_translate_do_iface(N_("Apply")), 0, "apply_as", MODIFIER_APPLY_DATA);
+                               uiItemEnumO(row, "OBJECT_OT_modifier_apply", IFACE_("Apply"), 0, "apply_as", MODIFIER_APPLY_DATA);
                                
                                if (modifier_sameTopology(md))
-                                       uiItemEnumO(row, "OBJECT_OT_modifier_apply", UI_translate_do_iface(N_("Apply as Shape")), 0, "apply_as", MODIFIER_APPLY_SHAPE);
+                                       uiItemEnumO(row, "OBJECT_OT_modifier_apply", IFACE_("Apply as Shape"), 0, "apply_as", MODIFIER_APPLY_SHAPE);
                        }
                        
                        uiBlockClearButLock(block);
                        uiBlockSetButLock(block, ob && ob->id.lib, ERROR_LIBDATA_MESSAGE);
                        
                        if (!ELEM5(md->type, eModifierType_Fluidsim, eModifierType_Softbody, eModifierType_ParticleSystem, eModifierType_Cloth, eModifierType_Smoke))
-                               uiItemO(row, UI_translate_do_tooltip(N_("Copy")), ICON_NONE, "OBJECT_OT_modifier_copy");
+                               uiItemO(row, TIP_("Copy"), ICON_NONE, "OBJECT_OT_modifier_copy");
                }
                
                /* result is the layout block inside the box, that we return so that modifier settings can be drawn */
@@ -1020,8 +1020,8 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
                uiBlockSetEmboss(block, UI_EMBOSSN);
                
                /* draw a ghost icon (for proxy) and also a lock beside it, to show that constraint is "proxy locked" */
-               uiDefIconBut(block, BUT, B_CONSTRAINT_TEST, ICON_GHOST, xco+244, yco, 19, 19, NULL, 0.0, 0.0, 0.0, 0.0, UI_translate_do_tooltip(N_("Proxy Protected")));
-               uiDefIconBut(block, BUT, B_CONSTRAINT_TEST, ICON_LOCKED, xco+262, yco, 19, 19, NULL, 0.0, 0.0, 0.0, 0.0, UI_translate_do_tooltip(N_("Proxy Protected")));
+               uiDefIconBut(block, BUT, B_CONSTRAINT_TEST, ICON_GHOST, xco+244, yco, 19, 19, NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Proxy Protected"));
+               uiDefIconBut(block, BUT, B_CONSTRAINT_TEST, ICON_LOCKED, xco+262, yco, 19, 19, NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Proxy Protected"));
                
                uiBlockSetEmboss(block, UI_EMBOSS);
        }
@@ -1207,14 +1207,14 @@ void uiTemplatePreview(uiLayout *layout, ID *id, int show_buttons, ID *parent, M
                        RNA_pointer_create(id, &RNA_Texture, tex, &texture_ptr);
                        
                        uiLayoutRow(layout, 1);
-                       uiDefButS(block, ROW, B_MATPRV, UI_translate_do_iface(N_("Texture")),  0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_TEXTURE, 0, 0, "");
+                       uiDefButS(block, ROW, B_MATPRV, IFACE_("Texture"),  0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_TEXTURE, 0, 0, "");
                        if(GS(parent->name) == ID_MA)
-                               uiDefButS(block, ROW, B_MATPRV, UI_translate_do_iface(N_("Material")),  0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, "");
+                               uiDefButS(block, ROW, B_MATPRV, IFACE_("Material"),  0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, "");
                        else if(GS(parent->name) == ID_LA)
-                               uiDefButS(block, ROW, B_MATPRV, UI_translate_do_iface(N_("Lamp")),  0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, "");
+                               uiDefButS(block, ROW, B_MATPRV, IFACE_("Lamp"),  0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, "");
                        else if(GS(parent->name) == ID_WO)
-                               uiDefButS(block, ROW, B_MATPRV, UI_translate_do_iface(N_("World")),  0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, "");
-                       uiDefButS(block, ROW, B_MATPRV, UI_translate_do_iface(N_("Both")),  0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_BOTH, 0, 0, "");
+                               uiDefButS(block, ROW, B_MATPRV, IFACE_("World"),  0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, "");
+                       uiDefButS(block, ROW, B_MATPRV, IFACE_("Both"),  0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_BOTH, 0, 0, "");
                        
                        /* Alpha buton for texture preview */
                        if(*pr_texture!=TEX_PR_OTHER) {
@@ -1305,23 +1305,23 @@ static void colorband_buttons_large(uiLayout *layout, uiBlock *block, ColorBand
 
        if(coba==NULL) return;
 
-       bt= uiDefBut(block, BUT, 0,     UI_translate_do_iface(N_("Add")), 0+xoffs,line1_y,40,UI_UNIT_Y, NULL, 0, 0, 0, 0,
-                       UI_translate_do_tooltip(N_("Add a new color stop to the colorband")));
+       bt= uiDefBut(block, BUT, 0,     IFACE_("Add"), 0+xoffs,line1_y,40,UI_UNIT_Y, NULL, 0, 0, 0, 0,
+                       TIP_("Add a new color stop to the colorband"));
        uiButSetNFunc(bt, colorband_add_cb, MEM_dupallocN(cb), coba);
 
-       bt= uiDefBut(block, BUT, 0,     UI_translate_do_iface(N_("Delete")), 45+xoffs,line1_y,45,UI_UNIT_Y, NULL, 0, 0, 0, 0,
-                       UI_translate_do_tooltip(N_("Delete the active position")));
+       bt= uiDefBut(block, BUT, 0,     IFACE_("Delete"), 45+xoffs,line1_y,45,UI_UNIT_Y, NULL, 0, 0, 0, 0,
+                       TIP_("Delete the active position"));
        uiButSetNFunc(bt, colorband_del_cb, MEM_dupallocN(cb), coba);
 
 
        /* XXX, todo for later - convert to operator - campbell */
-       bt= uiDefBut(block, BUT, 0,     "F",            95+xoffs,line1_y,20,UI_UNIT_Y, NULL, 0, 0, 0, 0, UI_translate_do_tooltip(N_("Flip colorband")));
+       bt= uiDefBut(block, BUT, 0,     "F",            95+xoffs,line1_y,20,UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Flip colorband"));
        uiButSetNFunc(bt, colorband_flip_cb, MEM_dupallocN(cb), coba);
 
-       uiDefButS(block, NUM, 0,                "",                             120+xoffs,line1_y,80, UI_UNIT_Y, &coba->cur, 0.0, (float)(MAX2(0, coba->tot-1)), 0, 0, UI_translate_do_tooltip(N_("Choose active color stop")));
+       uiDefButS(block, NUM, 0,                "",                             120+xoffs,line1_y,80, UI_UNIT_Y, &coba->cur, 0.0, (float)(MAX2(0, coba->tot-1)), 0, 0, TIP_("Choose active color stop"));
 
-       bt= uiDefButS(block, MENU, 0,           UI_translate_do_iface(N_("Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4")),
-                       210+xoffs, line1_y, 90, UI_UNIT_Y,              &coba->ipotype, 0.0, 0.0, 0, 0, UI_translate_do_tooltip(N_("Set interpolation between color stops")));
+       bt= uiDefButS(block, MENU, 0,           IFACE_("Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4"),
+                       210+xoffs, line1_y, 90, UI_UNIT_Y,              &coba->ipotype, 0.0, 0.0, 0, 0, TIP_("Set interpolation between color stops"));
        uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL);
        uiBlockEndAlign(block);
 
@@ -1350,13 +1350,13 @@ static void colorband_buttons_small(uiLayout *layout, uiBlock *block, ColorBand
        float xs= butr->xmin;
 
        uiBlockBeginAlign(block);
-       bt= uiDefBut(block, BUT, 0,     UI_translate_do_iface(N_("Add")), xs,butr->ymin+UI_UNIT_Y,2.0f*unit,UI_UNIT_Y,  NULL, 0, 0, 0, 0,
-                       UI_translate_do_tooltip(N_("Add a new color stop to the colorband")));
+       bt= uiDefBut(block, BUT, 0,     IFACE_("Add"), xs,butr->ymin+UI_UNIT_Y,2.0f*unit,UI_UNIT_Y,     NULL, 0, 0, 0, 0,
+                       TIP_("Add a new color stop to the colorband"));
        uiButSetNFunc(bt, colorband_add_cb, MEM_dupallocN(cb), coba);
-       bt= uiDefBut(block, BUT, 0,     UI_translate_do_iface(N_("Delete")), xs+2.0f*unit,butr->ymin+UI_UNIT_Y,1.5f*unit,UI_UNIT_Y,     NULL, 0, 0, 0, 0,
-                    UI_translate_do_tooltip(N_("Delete the active position")));
+       bt= uiDefBut(block, BUT, 0,     IFACE_("Delete"), xs+2.0f*unit,butr->ymin+UI_UNIT_Y,1.5f*unit,UI_UNIT_Y,        NULL, 0, 0, 0, 0,
+                    TIP_("Delete the active position"));
        uiButSetNFunc(bt, colorband_del_cb, MEM_dupallocN(cb), coba);
-       bt= uiDefBut(block, BUT, 0,     "F",            xs+3.5f*unit,butr->ymin+UI_UNIT_Y,0.5f*unit,UI_UNIT_Y,  NULL, 0, 0, 0, 0, UI_translate_do_tooltip(N_("Flip the color ramp")));
+       bt= uiDefBut(block, BUT, 0,     "F",            xs+3.5f*unit,butr->ymin+UI_UNIT_Y,0.5f*unit,UI_UNIT_Y,  NULL, 0, 0, 0, 0, TIP_("Flip the color ramp"));
        uiButSetNFunc(bt, colorband_flip_cb, MEM_dupallocN(cb), coba);
        uiBlockEndAlign(block);
 
@@ -1367,9 +1367,9 @@ static void colorband_buttons_small(uiLayout *layout, uiBlock *block, ColorBand
                uiItemR(layout, &ptr, "color", 0, "", ICON_NONE);
        }
 
-       bt= uiDefButS(block, MENU, 0, UI_translate_do_tooltip(N_("Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4")),
+       bt= uiDefButS(block, MENU, 0, TIP_("Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4"),
                        xs+10.0f*unit, butr->ymin+UI_UNIT_Y, unit*4, UI_UNIT_Y,         &coba->ipotype, 0.0, 0.0, 0, 0,
-                       UI_translate_do_tooltip(N_("Set interpolation between color stops")));
+                       TIP_("Set interpolation between color stops"));
        uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL);
 
        bt= uiDefBut(block, BUT_COLORBAND, 0, "",               xs,butr->ymin,butr->xmax-butr->xmin,UI_UNIT_Y, coba, 0, 0, 0, 0, "");
@@ -1620,10 +1620,10 @@ static uiBlock *curvemap_clipping_func(bContext *C, struct ARegion *ar, void *cu
        uiButSetFunc(bt, curvemap_buttons_setclip, cumap, NULL);
 
        uiBlockBeginAlign(block);
-       uiDefButF(block, NUM, 0, UI_translate_do_iface(N_("Min X ")),    0,4*UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.xmin, -100.0, cumap->clipr.xmax, 10, 0, "");
-       uiDefButF(block, NUM, 0, UI_translate_do_iface(N_("Min Y ")),    0,3*UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.ymin, -100.0, cumap->clipr.ymax, 10, 0, "");
-       uiDefButF(block, NUM, 0, UI_translate_do_iface(N_("Max X ")),    0,2*UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.xmax, cumap->clipr.xmin, 100.0, 10, 0, "");
-       uiDefButF(block, NUM, 0, UI_translate_do_iface(N_("Max Y ")),    0,UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.ymax, cumap->clipr.ymin, 100.0, 10, 0, "");
+       uiDefButF(block, NUM, 0, IFACE_("Min X "),       0,4*UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.xmin, -100.0, cumap->clipr.xmax, 10, 0, "");
+       uiDefButF(block, NUM, 0, IFACE_("Min Y "),       0,3*UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.ymin, -100.0, cumap->clipr.ymax, 10, 0, "");
+       uiDefButF(block, NUM, 0, IFACE_("Max X "),       0,2*UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.xmax, cumap->clipr.xmin, 100.0, 10, 0, "");
+       uiDefButF(block, NUM, 0, IFACE_("Max Y "),       0,UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.ymax, cumap->clipr.ymin, 100.0, 10, 0, "");
 
        uiBlockSetDirection(block, UI_RIGHT);
 
@@ -1672,12 +1672,12 @@ static uiBlock *curvemap_tools_func(bContext *C, struct ARegion *ar, void *cumap
        block= uiBeginBlock(C, ar, "curvemap_tools_func", UI_EMBOSS);
        uiBlockSetButmFunc(block, curvemap_tools_dofunc, cumap_v);
 
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, UI_translate_do_iface(N_("Reset View")),                  0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 1, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, UI_translate_do_iface(N_("Vector Handle")),               0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 2, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, UI_translate_do_iface(N_("Auto Handle")),                 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 3, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, UI_translate_do_iface(N_("Extend Horizontal")),   0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 4, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, UI_translate_do_iface(N_("Extend Extrapolated")), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 5, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, UI_translate_do_iface(N_("Reset Curve")),                 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
+       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Reset View"),                     0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 1, "");
+       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Vector Handle"),          0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 2, "");
+       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Auto Handle"),                    0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 3, "");
+       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Extend Horizontal"),      0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 4, "");
+       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Extend Extrapolated"),    0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 5, "");
+       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Reset Curve"),                    0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
 
        uiBlockSetDirection(block, UI_RIGHT);
        uiTextBoundsBlock(block, 50);
@@ -1694,10 +1694,10 @@ static uiBlock *curvemap_brush_tools_func(bContext *C, struct ARegion *ar, void
        block= uiBeginBlock(C, ar, "curvemap_tools_func", UI_EMBOSS);
        uiBlockSetButmFunc(block, curvemap_tools_dofunc, cumap_v);
 
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, UI_translate_do_iface(N_("Reset View")),          0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 1, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, UI_translate_do_iface(N_("Vector Handle")),       0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 2, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, UI_translate_do_iface(N_("Auto Handle")),         0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 3, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, UI_translate_do_iface(N_("Reset Curve")),         0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
+       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Reset View"),             0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 1, "");
+       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Vector Handle"),  0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 2, "");
+       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Auto Handle"),            0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 3, "");
+       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Reset Curve"),            0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
 
        uiBlockSetDirection(block, UI_RIGHT);
        uiTextBoundsBlock(block, 50);
@@ -1814,24 +1814,24 @@ static void curvemap_buttons_layout(uiLayout *layout, PointerRNA *ptr, char labe
 
        uiBlockSetEmboss(block, UI_EMBOSSN);
 
-       bt= uiDefIconBut(block, BUT, 0, ICON_ZOOMIN, 0, 0, dx, dx, NULL, 0.0, 0.0, 0.0, 0.0, UI_translate_do_tooltip(N_("Zoom in")));
+       bt= uiDefIconBut(block, BUT, 0, ICON_ZOOMIN, 0, 0, dx, dx, NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Zoom in"));
        uiButSetFunc(bt, curvemap_buttons_zoom_in, cumap, NULL);
 
-       bt= uiDefIconBut(block, BUT, 0, ICON_ZOOMOUT, 0, 0, dx, dx, NULL, 0.0, 0.0, 0.0, 0.0, UI_translate_do_tooltip(N_("Zoom out")));
+       bt= uiDefIconBut(block, BUT, 0, ICON_ZOOMOUT, 0, 0, dx, dx, NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Zoom out"));
        uiButSetFunc(bt, curvemap_buttons_zoom_out, cumap, NULL);
 
        if(brush)
-               bt= uiDefIconBlockBut(block, curvemap_brush_tools_func, cumap, 0, ICON_MODIFIER, 0, 0, dx, dx, UI_translate_do_tooltip(N_("Tools")));
+               bt= uiDefIconBlockBut(block, curvemap_brush_tools_func, cumap, 0, ICON_MODIFIER, 0, 0, dx, dx, TIP_("Tools"));
        else
-               bt= uiDefIconBlockBut(block, curvemap_tools_func, cumap, 0, ICON_MODIFIER, 0, 0, dx, dx, UI_translate_do_tooltip(N_("Tools")));
+               bt= uiDefIconBlockBut(block, curvemap_tools_func, cumap, 0, ICON_MODIFIER, 0, 0, dx, dx, TIP_("Tools"));
 
        uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL);
 
        if(cumap->flag & CUMA_DO_CLIP) icon= ICON_CLIPUV_HLT; else icon= ICON_CLIPUV_DEHLT;
-       bt= uiDefIconBlockBut(block, curvemap_clipping_func, cumap, 0, icon, 0, 0, dx, dx, UI_translate_do_tooltip(N_("Clipping Options")));
+       bt= uiDefIconBlockBut(block, curvemap_clipping_func, cumap, 0, icon, 0, 0, dx, dx, TIP_("Clipping Options"));
        uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL);
 
-       bt= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, dx, dx, NULL, 0.0, 0.0, 0.0, 0.0, UI_translate_do_tooltip(N_("Delete points")));
+       bt= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, dx, dx, NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Delete points"));
        uiButSetNFunc(bt, curvemap_buttons_delete, MEM_dupallocN(cb), cumap);
 
        uiBlockSetEmboss(block, UI_EMBOSS);
@@ -1850,8 +1850,8 @@ static void curvemap_buttons_layout(uiLayout *layout, PointerRNA *ptr, char labe
                uiItemR(uiLayoutColumn(split, 0), ptr, "white_level", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
 
                uiLayoutRow(layout, 0);
-               bt=uiDefBut(block, BUT, 0, UI_translate_do_iface(N_("Reset")),  0, 0, UI_UNIT_X*10, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0,
-                               UI_translate_do_tooltip(N_("Reset Black/White point and curves")));
+               bt=uiDefBut(block, BUT, 0, IFACE_("Reset"),     0, 0, UI_UNIT_X*10, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0,
+                               TIP_("Reset Black/White point and curves"));
                uiButSetNFunc(bt, curvemap_buttons_reset, MEM_dupallocN(cb), cumap);
        }
 
@@ -2470,18 +2470,18 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
                (void)ui_abs; // UNUSED
                
                uiDefIconBut(block, BUT, handle_event, ICON_PANEL_CLOSE, 
-                               0, UI_UNIT_Y*0.1, UI_UNIT_X*0.8, UI_UNIT_Y*0.8, NULL, 0.0f, 0.0f, 0, 0, UI_translate_do_tooltip(N_("Stop this job")));
+                               0, UI_UNIT_Y*0.1, UI_UNIT_X*0.8, UI_UNIT_Y*0.8, NULL, 0.0f, 0.0f, 0, 0, TIP_("Stop this job"));
                uiDefBut(block, PROGRESSBAR, 0, WM_jobs_name(wm, owner), 
-                               UI_UNIT_X, 0, 100, UI_UNIT_Y, NULL, 0.0f, 0.0f, WM_jobs_progress(wm, owner), 0, UI_translate_do_tooltip(N_("Progress")));
+                               UI_UNIT_X, 0, 100, UI_UNIT_Y, NULL, 0.0f, 0.0f, WM_jobs_progress(wm, owner), 0, TIP_("Progress"));
                
                uiLayoutRow(layout, 0);
        }
        if(WM_jobs_test(wm, screen))
-               uiDefIconTextBut(block, BUT, B_STOPCAST, ICON_CANCEL, UI_translate_do_iface(N_("Capture")), 0,0,85,UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0,
-                               UI_translate_do_tooltip(N_("Stop screencast")));
+               uiDefIconTextBut(block, BUT, B_STOPCAST, ICON_CANCEL, IFACE_("Capture"), 0,0,85,UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0,
+                               TIP_("Stop screencast"));
        if(screen->animtimer)
-               uiDefIconTextBut(block, BUT, B_STOPANIM, ICON_CANCEL, UI_translate_do_tooltip(N_("Anim Player")), 0,0,100,UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0,
-                               UI_translate_do_tooltip(N_("Stop animation playback")));
+               uiDefIconTextBut(block, BUT, B_STOPANIM, ICON_CANCEL, TIP_("Anim Player"), 0,0,100,UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0,
+                               TIP_("Stop animation playback"));
 }
 
 /************************* Reports for Last Operator Template **************************/
@@ -2543,7 +2543,7 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C)
        uiBlockSetEmboss(block, UI_EMBOSSN);
 
        if (reports->list.first != reports->list.last)
-               uiDefIconButO(block, BUT, "UI_OT_reports_to_textblock", WM_OP_INVOKE_REGION_WIN, icon, 2, 0, UI_UNIT_X, UI_UNIT_Y, UI_translate_do_tooltip(N_("Click to see rest of reports in textblock: 'Recent Reports'")));
+               uiDefIconButO(block, BUT, "UI_OT_reports_to_textblock", WM_OP_INVOKE_REGION_WIN, icon, 2, 0, UI_UNIT_X, UI_UNIT_Y, TIP_("Click to see rest of reports in textblock: 'Recent Reports'"));
        else
                uiDefIconBut(block, LABEL, 0, icon, 2, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "");
 
index 206ecbad1d01505d79b443b0e7de3f1b69403cde..23d5e77b78d2c1b470675f7dbb4bc68d28722324 100644 (file)
@@ -117,7 +117,7 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
                }
                case PROP_COLLECTION: {
                        char text[256];
-                       BLI_snprintf(text, sizeof(text), UI_translate_do_iface(N_("%d items")), RNA_property_collection_length(ptr, prop));
+                       BLI_snprintf(text, sizeof(text), IFACE_("%d items"), RNA_property_collection_length(ptr, prop));
                        but= uiDefBut(block, LABEL, 0, text, x1, y1, x2, y2, NULL, 0, 0, 0, 0, NULL);
                        uiButSetFlag(but, UI_BUT_DISABLED);
                        break;
index 28f486117b71a9047d04c8cc07dcdd03c4ab57df..2b007f557062eb8f8373328c4cfdae1c5b3fb3b2 100644 (file)
@@ -1388,7 +1388,7 @@ static const char *editortype_pup(void)
                   "|Python Console %x18"
                   );
 
-       return UI_translate_do_iface(types);
+       return IFACE_(types);
 }
 
 static void spacefunc(struct bContext *C, void *UNUSED(arg1), void *UNUSED(arg2))
@@ -1410,7 +1410,7 @@ int ED_area_header_switchbutton(const bContext *C, uiBlock *block, int yco)
        but= uiDefIconTextButC(block, ICONTEXTROW, 0, ICON_VIEW3D, 
                                                   editortype_pup(), xco, yco, UI_UNIT_X+10, UI_UNIT_Y, 
                                                   &(sa->butspacetype), 1.0, SPACEICONMAX, 0, 0, 
-                                                  UI_translate_do_tooltip(N_("Displays current editor type. Click for menu of available types")));
+                                                  TIP_("Displays current editor type. Click for menu of available types"));
        uiButSetFunc(but, spacefunc, NULL, NULL);
        uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
        
index b18b5373240e59809f78a27c80353fd629c05905..dfbb2a543cb12aa89af07230acded032b2e2d49f 100644 (file)
@@ -125,7 +125,7 @@ void buttons_header_buttons(const bContext *C, ARegion *ar)
 
 #define BUTTON_HEADER_CTX(_ctx, _icon, _tip) \
        if(sbuts->pathflag & (1<<_ctx)) { \
-               but= uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, _icon, xco+=BUT_UNIT_X, yco, BUT_UNIT_X, UI_UNIT_Y, &(sbuts->mainb), 0.0, (float)_ctx, 0, 0, UI_translate_do_tooltip(_tip)); \
+               but= uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, _icon, xco+=BUT_UNIT_X, yco, BUT_UNIT_X, UI_UNIT_Y, &(sbuts->mainb), 0.0, (float)_ctx, 0, 0, TIP_(_tip)); \
                uiButClearFlag(but, UI_BUT_UNDO); \
        } \
 
index 85edcce35ca1b2a80e4d4fcb2a9b23df5a618669..6fbfa11d0cf8ad971759492ca45d3da7100a7a60 100644 (file)
@@ -182,7 +182,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
                but = uiDefButTextO(block, TEX, "FILE_OT_directory", 0, "",
                                 min_x, line1_y, line1_w-chan_offs, btn_h, 
                                 params->dir, 0.0, (float)FILE_MAX, 0, 0,
-                                UI_translate_do_tooltip(N_("File path")));
+                                TIP_("File path"));
                uiButSetCompleteFunc(but, autocomplete_directory, NULL);
                uiButSetFlag(but, UI_BUT_NO_UTF8);
 
@@ -190,7 +190,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
                        but = uiDefBut(block, TEX, B_FS_FILENAME, "",
                                         min_x, line2_y, line2_w-chan_offs, btn_h,
                                         params->file, 0.0, (float)FILE_MAXFILE, 0, 0,
-                                        UI_translate_do_tooltip(overwrite_alert ?N_("File name, overwrite existing") : N_("File name")));
+                                        TIP_(overwrite_alert ?N_("File name, overwrite existing") : N_("File name")));
                        uiButSetCompleteFunc(but, autocomplete_file, NULL);
                        uiButSetFlag(but, UI_BUT_NO_UTF8);
 
@@ -208,15 +208,15 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
        if (fnumbuttons && (params->flag & FILE_DIRSEL_ONLY) == 0) {
                uiBlockBeginAlign(block);
                but = uiDefIconButO(block, BUT, "FILE_OT_filenum", 0, ICON_ZOOMOUT,
-                               min_x + line2_w + separator - chan_offs, line2_y, 
-                               btn_fn_w, btn_h, 
-                               UI_translate_do_tooltip(N_("Decrement the filename number")));    
+                               min_x + line2_w + separator - chan_offs, line2_y,
+                               btn_fn_w, btn_h,
+                               TIP_("Decrement the filename number"));
                RNA_int_set(uiButGetOperatorPtrRNA(but), "increment", -1); 
        
-               but = uiDefIconButO(block, BUT, "FILE_OT_filenum", 0, ICON_ZOOMIN, 
-                               min_x + line2_w + separator + btn_fn_w - chan_offs, line2_y, 
-                               btn_fn_w, btn_h, 
-                               UI_translate_do_tooltip(N_("Increment the filename number")));    
+               but = uiDefIconButO(block, BUT, "FILE_OT_filenum", 0, ICON_ZOOMIN,
+                               min_x + line2_w + separator + btn_fn_w - chan_offs, line2_y,
+                               btn_fn_w, btn_h,
+                               TIP_("Increment the filename number"));
                RNA_int_set(uiButGetOperatorPtrRNA(but), "increment", 1); 
                uiBlockEndAlign(block);
        }
@@ -227,9 +227,9 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
                uiDefButO(block, BUT, "FILE_OT_execute", WM_OP_EXEC_REGION_WIN, params->title,
                        max_x - loadbutton, line1_y, loadbutton, btn_h, 
                        params->title);
-               uiDefButO(block, BUT, "FILE_OT_cancel", WM_OP_EXEC_REGION_WIN, UI_translate_do_iface(N_("Cancel")),
+               uiDefButO(block, BUT, "FILE_OT_cancel", WM_OP_EXEC_REGION_WIN, IFACE_("Cancel"),
                        max_x - loadbutton, line2_y, loadbutton, btn_h, 
-                       UI_translate_do_tooltip(N_("Cancel")));
+                       TIP_("Cancel"));
        }
        
        uiEndBlock(C, block);
index 37dce293d777b5f4c52d835e0db5e038c8de7bcf..fae10c0d84e21c61d118c1cc497aed13dbdbfe5a 100644 (file)
@@ -146,7 +146,7 @@ static void file_panel_bookmarks(const bContext *C, Panel *pa)
 
        if(sfile) {
                row= uiLayoutRow(pa->layout, 0);
-               uiItemO(row, UI_translate_do_iface(N_("Add")), ICON_ZOOMIN, "file.bookmark_add");
+               uiItemO(row, IFACE_("Add"), ICON_ZOOMIN, "file.bookmark_add");
                uiItemL(row, NULL, ICON_NONE);
 
                file_panel_category(C, pa, FS_CATEGORY_BOOKMARKS, &sfile->bookmarknr, ICON_BOOKMARKS, 1, 0);
index f36145aaba0e5a27bdf3547d8babb780e15f3ae6..149d84b86cd5e6720a7e0b3e1ce0ae573da1362a 100644 (file)
@@ -613,7 +613,7 @@ void autocomplete_directory(struct bContext *C, char *str, void *UNUSED(arg_v))
                DIR *dir;
                struct dirent *de;
                
-               BLI_split_dirfile(str, dirname, NULL, sizeof(dirname), 0);
+               BLI_split_dir_part(str, dirname, sizeof(dirname));
 
                dir = opendir(dirname);
 
index f1593105d5b18f358f25dd81417abfcff2e6af6d..51a24044deb8955e11bfbaea31ab1e90adab4c20 100644 (file)
@@ -754,8 +754,8 @@ static void graph_panel_modifiers(const bContext *C, Panel *pa)
                block= uiLayoutGetBlock(row);
                
                // XXX for now, this will be a operator button which calls a 'add modifier' operator
-               uiDefButO(block, BUT, "GRAPH_OT_fmodifier_add", WM_OP_INVOKE_REGION_WIN, UI_translate_do_iface(N_("Add Modifier")), 10, 0, 150, 20,
-                               UI_translate_do_tooltip(N_("Adds a new F-Curve Modifier for the active F-Curve")));
+               uiDefButO(block, BUT, "GRAPH_OT_fmodifier_add", WM_OP_INVOKE_REGION_WIN, IFACE_("Add Modifier"), 10, 0, 150, 20,
+                               TIP_("Adds a new F-Curve Modifier for the active F-Curve"));
                
                /* copy/paste (as sub-row)*/
                row= uiLayoutRow(row, 1);
index 9157df6960f8d0a3fb44cc1b6e58c3e9f89b752b..bafcf36e6462876500e03d61f554cad40e30e1de 100644 (file)
@@ -280,7 +280,7 @@ static void recent_files_menu_draw(const bContext *UNUSED(C), Menu *menu)
                        uiItemStringO(layout, BLI_path_basename(recent->filepath), ICON_FILE_BLEND, "WM_OT_open_mainfile", "filepath", recent->filepath);
                }
        } else {
-               uiItemL(layout, UI_translate_do_iface(N_("No Recent Files")), ICON_NONE);
+               uiItemL(layout, IFACE_("No Recent Files"), ICON_NONE);
        }
 }
 
@@ -290,7 +290,7 @@ static void recent_files_menu_register(void)
 
        mt= MEM_callocN(sizeof(MenuType), "spacetype info menu recent files");
        strcpy(mt->idname, "INFO_MT_file_open_recent");
-       strcpy(mt->label, _("Open Recent..."));
+       strcpy(mt->label, N_("Open Recent..."));
        mt->draw= recent_files_menu_draw;
        WM_menutype_add(mt);
 }
index 5e1f27455594d26138f952a478407968e0765ad2..7ba33e7e57e629fa73fa08ab8ee03c02127bccb8 100644 (file)
@@ -448,8 +448,8 @@ static void nla_panel_modifiers(const bContext *C, Panel *pa)
                
                // XXX for now, this will be a operator button which calls a temporary 'add modifier' operator
                // FIXME: we need to set the only-active property so that this will only add modifiers for the active strip (not all selected)
-               uiDefButO(block, BUT, "NLA_OT_fmodifier_add", WM_OP_INVOKE_REGION_WIN, UI_translate_do_iface(N_("Add Modifier")), 10, 0, 150, 20,
-                               UI_translate_do_tooltip(N_("Adds a new F-Modifier for the active NLA Strip")));
+               uiDefButO(block, BUT, "NLA_OT_fmodifier_add", WM_OP_INVOKE_REGION_WIN, IFACE_("Add Modifier"), 10, 0, 150, 20,
+                               TIP_("Adds a new F-Modifier for the active NLA Strip"));
                
                /* copy/paste (as sub-row)*/
                row= uiLayoutRow(row, 1);
index 205dd6bb63900338dbd0da41ac21c98eb20365c3..b64685e39845990af0b7e879b3257b1aa6738a44 100644 (file)
@@ -218,7 +218,6 @@ static void node_add_menu(bContext *C, uiLayout *layout, void *arg_nodeclass)
        }
 }
 
-#define IFACE_(msgid) UI_translate_do_iface(msgid)
 static void node_menu_add(const bContext *C, Menu *menu)
 {
        SpaceNode *snode= CTX_wm_space_node(C);
@@ -228,40 +227,39 @@ static void node_menu_add(const bContext *C, Menu *menu)
                uiLayoutSetActive(layout, 0);
 
        if(snode->treetype==NTREE_SHADER) {
-               uiItemMenuF(layout, IFACE_(N_("Input")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT));
-               uiItemMenuF(layout, IFACE_(N_("Output")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT));
-               uiItemMenuF(layout, IFACE_(N_("Color")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR));
-               uiItemMenuF(layout, IFACE_(N_("Vector")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_VECTOR));
-               uiItemMenuF(layout, IFACE_(N_("Convertor")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR));
-               uiItemMenuF(layout, IFACE_(N_("Group")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP));
-               uiItemMenuF(layout, IFACE_(N_("Dynamic")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_DYNAMIC));
-               uiItemMenuF(layout, IFACE_(N_("Layout")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_LAYOUT));
+               uiItemMenuF(layout, IFACE_("Input"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT));
+               uiItemMenuF(layout, IFACE_("Output"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT));
+               uiItemMenuF(layout, IFACE_("Color"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR));
+               uiItemMenuF(layout, IFACE_("Vector"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_VECTOR));
+               uiItemMenuF(layout, IFACE_("Convertor"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR));
+               uiItemMenuF(layout, IFACE_("Group"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP));
+               uiItemMenuF(layout, IFACE_("Dynamic"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_DYNAMIC));
+               uiItemMenuF(layout, IFACE_("Layout"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_LAYOUT));
        }
        else if(snode->treetype==NTREE_COMPOSIT) {
-               uiItemMenuF(layout, IFACE_(N_("Input")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT));
-               uiItemMenuF(layout, IFACE_(N_("Output")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT));
-               uiItemMenuF(layout, IFACE_(N_("Color")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR));
-               uiItemMenuF(layout, IFACE_(N_("Vector")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_VECTOR));
-               uiItemMenuF(layout, IFACE_(N_("Filter")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_FILTER));
-               uiItemMenuF(layout, IFACE_(N_("Convertor")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR));
-               uiItemMenuF(layout, IFACE_(N_("Matte")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_MATTE));
-               uiItemMenuF(layout, IFACE_(N_("Distort")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_DISTORT));
-               uiItemMenuF(layout, IFACE_(N_("Group")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP));
-               uiItemMenuF(layout, IFACE_(N_("Layout")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_LAYOUT));
+               uiItemMenuF(layout, IFACE_("Input"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT));
+               uiItemMenuF(layout, IFACE_("Output"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT));
+               uiItemMenuF(layout, IFACE_("Color"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR));
+               uiItemMenuF(layout, IFACE_("Vector"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_VECTOR));
+               uiItemMenuF(layout, IFACE_("Filter"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_FILTER));
+               uiItemMenuF(layout, IFACE_("Convertor"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR));
+               uiItemMenuF(layout, IFACE_("Matte"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_MATTE));
+               uiItemMenuF(layout, IFACE_("Distort"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_DISTORT));
+               uiItemMenuF(layout, IFACE_("Group"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP));
+               uiItemMenuF(layout, IFACE_("Layout"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_LAYOUT));
        }
        else if(snode->treetype==NTREE_TEXTURE) {
-               uiItemMenuF(layout, IFACE_(N_("Input")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT));
-               uiItemMenuF(layout, IFACE_(N_("Output")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT));
-               uiItemMenuF(layout, IFACE_(N_("Color")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR));
-               uiItemMenuF(layout, IFACE_(N_("Patterns")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_PATTERN));
-               uiItemMenuF(layout, IFACE_(N_("Textures")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_TEXTURE));
-               uiItemMenuF(layout, IFACE_(N_("Convertor")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR));
-               uiItemMenuF(layout, IFACE_(N_("Distort")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_DISTORT));
-               uiItemMenuF(layout, IFACE_(N_("Group")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP));
-               uiItemMenuF(layout, IFACE_(N_("Layout")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_LAYOUT));
+               uiItemMenuF(layout, IFACE_("Input"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT));
+               uiItemMenuF(layout, IFACE_("Output"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT));
+               uiItemMenuF(layout, IFACE_("Color"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR));
+               uiItemMenuF(layout, IFACE_("Patterns"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_PATTERN));
+               uiItemMenuF(layout, IFACE_("Textures"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_TEXTURE));
+               uiItemMenuF(layout, IFACE_("Convertor"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR));
+               uiItemMenuF(layout, IFACE_("Distort"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_DISTORT));
+               uiItemMenuF(layout, IFACE_("Group"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP));
+               uiItemMenuF(layout, IFACE_("Layout"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_LAYOUT));
        }
 }
-#undef IFACE_
 
 void node_menus_register(void)
 {
index 1047e906a109abc35d89a9e7bf8dac5fcd8af258..1d9723f598b79f7aa0c1882cfa1bd9e723aaf34a 100644 (file)
@@ -214,6 +214,12 @@ static void node_area_listener(ScrArea *sa, wmNotifier *wmn)
                                        ED_area_tag_refresh(sa);
                        }
                        break;
+               case NC_OBJECT:
+                       if(type==NTREE_SHADER) {
+                               if(wmn->data==ND_OB_SHADING)
+                                       ED_area_tag_refresh(sa);
+                       }
+                       break;
                case NC_TEXT:
                        /* pynodes */
                        if(wmn->data==ND_SHADING)
index 7e4d02036ef316666505607c822fcc90f9b02db9..2b78bc3c190c17f0d60fa29bd2d52a45c34d72f7 100644 (file)
@@ -321,7 +321,7 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad
                char dir_only[FILE_MAX];
                char file_only[FILE_MAX];
 
-               BLI_split_dirfile(seq_load.path, dir_only, NULL, sizeof(dir_only), 0);
+               BLI_split_dir_part(seq_load.path, dir_only, sizeof(dir_only));
 
                RNA_BEGIN(op->ptr, itemptr, "files") {
                        RNA_string_get(&itemptr, "name", file_only);
index d223896924d7b8ef2e77e73b33bd6752f27ab12d..f5c886a031f579ab15ce9a4e633c3b686ad1d469 100644 (file)
@@ -276,22 +276,16 @@ static int modeselect_addmode(char *str, const char *title, int id, int icon)
 {
        static char formatstr[] = "|%s %%x%d %%i%d";
 
-       if(UI_translate_iface())
-               return sprintf(str, formatstr, BLF_gettext(title), id, icon);
-       else
-               return sprintf(str, formatstr, title, id, icon);
+       return sprintf(str, formatstr, IFACE_(title), id, icon);
 }
 
 static char *view3d_modeselect_pup(Scene *scene)
 {
        Object *ob= OBACT;
        static char string[256];
-       const char *title= N_("Mode: %t");
+       const char *title= IFACE_("Mode: %t");
        char *str = string;
 
-       if(U.transopts&USER_TR_IFACE)
-               title= BLF_gettext(title);
-
        BLI_strncpy(str, title, sizeof(string));
 
        str += modeselect_addmode(str, N_("Object Mode"), OB_MODE_OBJECT, ICON_OBJECT_DATA);
@@ -504,7 +498,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
        
        uiBlockBeginAlign(block);
        uiDefIconTextButS(block, MENU, B_MODESELECT, object_mode_icon(v3d->modeselect), view3d_modeselect_pup(scene) , 
-                         0,0,126 * dpi_fac, UI_UNIT_Y, &(v3d->modeselect), 0, 0, 0, 0, "Mode");
+                         0,0,126 * dpi_fac, UI_UNIT_Y, &(v3d->modeselect), 0, 0, 0, 0, TIP_("Mode"));
        uiBlockEndAlign(block);
        
        /* Draw type */
@@ -543,11 +537,11 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
                block= uiLayoutGetBlock(row);
                
                if(v3d->twflag & V3D_USE_MANIPULATOR) {
-                       but= uiDefIconButBitC(block, TOG, V3D_MANIP_TRANSLATE, B_MAN_TRANS, ICON_MAN_TRANS, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, "Translate manipulator mode");
+                       but= uiDefIconButBitC(block, TOG, V3D_MANIP_TRANSLATE, B_MAN_TRANS, ICON_MAN_TRANS, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, TIP_("Translate manipulator mode"));
                        uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
-                       but= uiDefIconButBitC(block, TOG, V3D_MANIP_ROTATE, B_MAN_ROT, ICON_MAN_ROT, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, "Rotate manipulator mode");
+                       but= uiDefIconButBitC(block, TOG, V3D_MANIP_ROTATE, B_MAN_ROT, ICON_MAN_ROT, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, TIP_("Rotate manipulator mode"));
                        uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
-                       but= uiDefIconButBitC(block, TOG, V3D_MANIP_SCALE, B_MAN_SCALE, ICON_MAN_SCALE, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, "Scale manipulator mode");
+                       but= uiDefIconButBitC(block, TOG, V3D_MANIP_SCALE, B_MAN_SCALE, ICON_MAN_SCALE, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, TIP_("Scale manipulator mode"));
                        uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
                }
                        
@@ -556,7 +550,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
                }
                        
                str_menu = BIF_menustringTransformOrientation(C, "Orientation");
-               but= uiDefButC(block, MENU, B_MAN_MODE, str_menu,0,0,70 * dpi_fac, UI_UNIT_Y, &v3d->twmode, 0, 0, 0, 0, "Transform Orientation");
+               but= uiDefButC(block, MENU, B_MAN_MODE, str_menu,0,0,70 * dpi_fac, UI_UNIT_Y, &v3d->twmode, 0, 0, 0, 0, TIP_("Transform Orientation"));
                uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
                MEM_freeN((void *)str_menu);
        }
index b93c77b599029a2aeb687515ff7f831962bb3192..b247d2c3fd0ffee91519121e7e70a816f599c354 100644 (file)
@@ -82,7 +82,7 @@ static void view3d_panel_operator_redo_header(const bContext *C, Panel *pa)
        wmOperator *op= WM_operator_last_redo(C);
 
        if(op) BLI_strncpy(pa->drawname, op->type->name, sizeof(pa->drawname));
-       else BLI_strncpy(pa->drawname, N_("Operator"), sizeof(pa->drawname));
+       else BLI_strncpy(pa->drawname, IFACE_("Operator"), sizeof(pa->drawname));
 }
 
 static void view3d_panel_operator_redo_operator(const bContext *C, Panel *pa, wmOperator *op)
index 3f8999483d02e2d08bd6caa976fbe1327be34447..f2d41cb5b483e4503840b71c6d44cd68f2a585d0 100644 (file)
@@ -155,7 +155,7 @@ typedef struct TransData2D {
        float loc[3];           /* Location of data used to transform (x,y,0) */
        float *loc2d;           /* Pointer to real 2d location of data */
 
-       float *h1, *h2;     /* Pointer to handle locations, if handles aren't being moved independantly*/
+       float *h1, *h2;     /* Pointer to handle locations, if handles aren't being moved independently */
        float ih1[2], ih2[2];
 } TransData2D;
 
index efa34d92c0fac3686366b3acd1a04a22f5a66d29..1c137c932cff7263ffb016814c2f38316b41ed67 100644 (file)
@@ -411,18 +411,15 @@ EnumPropertyItem *BIF_enumTransformOrientation(bContext *C)
 }
 
 const char * BIF_menustringTransformOrientation(const bContext *C, const char *title) {
-       const char* menu = N_("%t|Global%x0|Local%x1|Gimbal%x4|Normal%x2|View%x3");
+       const char* menu = IFACE_("%t|Global%x0|Local%x1|Gimbal%x4|Normal%x2|View%x3");
        ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces;
        TransformOrientation *ts;
        int i = V3D_MANIP_CUSTOM;
        char *str_menu, *p;
 
-       if(UI_translate_iface()) {
-               title= BLF_gettext(title);
-               menu= BLF_gettext(menu);
-       }
-       
-       str_menu = MEM_callocN(strlen(menu) + strlen(title) + 1 + 40 * BIF_countTransformOrientation(C), UI_translate_do_tooltip(N_("UserTransSpace from matrix")));
+       title = IFACE_(title);
+
+       str_menu = MEM_callocN(strlen(menu) + strlen(title) + 1 + 40 * BIF_countTransformOrientation(C), TIP_("UserTransSpace from matrix"));
        p = str_menu;
        
        p += sprintf(str_menu, "%s", title);
index bb4d6d3a33037f471e2f85715af51f0ce1ea7bc3..871cbad6152b0be3d6960f222d12bbc95bf8f1c1 100644 (file)
@@ -544,9 +544,9 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
                                PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
                                rna_print_data_get(f, dp);
                                if(dp->dnapointerlevel == 0)
-                                       fprintf(f, "    return rna_pointer_inherit_refine(ptr, &RNA_%s, &data->%s);\n", (char*)pprop->type, dp->dnaname);
+                                       fprintf(f, "    return rna_pointer_inherit_refine(ptr, &RNA_%s, &data->%s);\n", (const char*)pprop->type, dp->dnaname);
                                else
-                                       fprintf(f, "    return rna_pointer_inherit_refine(ptr, &RNA_%s, data->%s);\n", (char*)pprop->type, dp->dnaname);
+                                       fprintf(f, "    return rna_pointer_inherit_refine(ptr, &RNA_%s, data->%s);\n", (const char*)pprop->type, dp->dnaname);
                        }
                        fprintf(f, "}\n\n");
                        break;
@@ -560,7 +560,7 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
                                if(strcmp(manualfunc, "rna_iterator_listbase_get") == 0 ||
                                   strcmp(manualfunc, "rna_iterator_array_get") == 0 ||
                                   strcmp(manualfunc, "rna_iterator_array_dereference_get") == 0)
-                                       fprintf(f, "    return rna_pointer_inherit_refine(&iter->parent, &RNA_%s, %s(iter));\n", (cprop->item_type)? (char*)cprop->item_type: "UnknownType", manualfunc);
+                                       fprintf(f, "    return rna_pointer_inherit_refine(&iter->parent, &RNA_%s, %s(iter));\n", (cprop->item_type)? (const char*)cprop->item_type: "UnknownType", manualfunc);
                                else
                                        fprintf(f, "    return %s(iter);\n", manualfunc);
                        }
@@ -707,7 +707,7 @@ static void rna_clamp_value(FILE *f, PropertyRNA *prop, int array)
                fprintf(f, "value;\n");
 }
 
-static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, char *manualfunc)
+static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, const char *manualfunc)
 {
        char *func;
 
@@ -771,7 +771,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
                                }
                                else {
                                        PointerPropertyRNA *pprop= (PointerPropertyRNA*)dp->prop;
-                                       StructRNA *type= rna_find_struct((char*)pprop->type);
+                                       StructRNA *type= rna_find_struct((const char*)pprop->type);
                                        if(type && (type->flag & STRUCT_ID)) {
                                                fprintf(f, "    if(value.data)\n");
                                                fprintf(f, "            id_lib_extern((ID*)value.data);\n\n");
@@ -883,7 +883,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
        return func;
 }
 
-static char *rna_def_property_length_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, char *manualfunc)
+static char *rna_def_property_length_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, const char *manualfunc)
 {
        char *func= NULL;
 
@@ -941,7 +941,7 @@ static char *rna_def_property_length_func(FILE *f, StructRNA *srna, PropertyRNA
        return func;
 }
 
-static char *rna_def_property_begin_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, char *manualfunc)
+static char *rna_def_property_begin_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, const char *manualfunc)
 {
        char *func, *getfunc;
 
@@ -999,7 +999,7 @@ static char *rna_def_property_begin_func(FILE *f, StructRNA *srna, PropertyRNA *
        return func;
 }
 
-static char *rna_def_property_lookup_int_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, char *manualfunc, char *nextfunc)
+static char *rna_def_property_lookup_int_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, const char *manualfunc, const char *nextfunc)
 {
        /* note on indices, this is for external functions and ignores skipped values.
         * so the the index can only be checked against the length when there is no 'skip' funcion. */
@@ -1078,7 +1078,7 @@ static char *rna_def_property_lookup_int_func(FILE *f, StructRNA *srna, Property
 
 #if 0
        rna_print_data_get(f, dp);
-       item_type= (cprop->item_type)? (char*)cprop->item_type: "UnknownType";
+       item_type= (cprop->item_type)? (const char*)cprop->item_type: "UnknownType";
 
        if(dp->dnalengthname || dp->dnalengthfixed) {
                if(dp->dnalengthname)
@@ -1099,7 +1099,7 @@ static char *rna_def_property_lookup_int_func(FILE *f, StructRNA *srna, Property
        return func;
 }
 
-static char *rna_def_property_next_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, char *manualfunc)
+static char *rna_def_property_next_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, const char *manualfunc)
 {
        char *func, *getfunc;
 
@@ -1125,7 +1125,7 @@ static char *rna_def_property_next_func(FILE *f, StructRNA *srna, PropertyRNA *p
        return func;
 }
 
-static char *rna_def_property_end_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, char *manualfunc)
+static char *rna_def_property_end_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, const char *manualfunc)
 {
        char *func;
 
@@ -1193,12 +1193,12 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
                                if(!bprop->get && !bprop->set && !dp->booleanbit)
                                        rna_set_raw_property(dp, prop);
 
-                               bprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)bprop->get);
-                               bprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (char*)bprop->set);
+                               bprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)bprop->get);
+                               bprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)bprop->set);
                        }
                        else {
-                               bprop->getarray= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)bprop->getarray);
-                               bprop->setarray= (void*)rna_def_property_set_func(f, srna, prop, dp, (char*)bprop->setarray);
+                               bprop->getarray= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)bprop->getarray);
+                               bprop->setarray= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)bprop->setarray);
                        }
                        break;
                }
@@ -1209,15 +1209,15 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
                                if(!iprop->get && !iprop->set)
                                        rna_set_raw_property(dp, prop);
 
-                               iprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)iprop->get);
-                               iprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (char*)iprop->set);
+                               iprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)iprop->get);
+                               iprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)iprop->set);
                        }
                        else {
                                if(!iprop->getarray && !iprop->setarray)
                                        rna_set_raw_property(dp, prop);
 
-                               iprop->getarray= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)iprop->getarray);
-                               iprop->setarray= (void*)rna_def_property_set_func(f, srna, prop, dp, (char*)iprop->setarray);
+                               iprop->getarray= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)iprop->getarray);
+                               iprop->setarray= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)iprop->setarray);
                        }
                        break;
                }
@@ -1228,38 +1228,38 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
                                if(!fprop->get && !fprop->set)
                                        rna_set_raw_property(dp, prop);
 
-                               fprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)fprop->get);
-                               fprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (char*)fprop->set);
+                               fprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)fprop->get);
+                               fprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)fprop->set);
                        }
                        else {
                                if(!fprop->getarray && !fprop->setarray)
                                        rna_set_raw_property(dp, prop);
 
-                               fprop->getarray= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)fprop->getarray);
-                               fprop->setarray= (void*)rna_def_property_set_func(f, srna, prop, dp, (char*)fprop->setarray);
+                               fprop->getarray= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)fprop->getarray);
+                               fprop->setarray= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)fprop->setarray);
                        }
                        break;
                }
                case PROP_ENUM: {
                        EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
 
-                       eprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)eprop->get);
-                       eprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (char*)eprop->set);
+                       eprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)eprop->get);
+                       eprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)eprop->set);
                        break;
                }
                case PROP_STRING: {
                        StringPropertyRNA *sprop= (StringPropertyRNA*)prop;
 
-                       sprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)sprop->get);
-                       sprop->length= (void*)rna_def_property_length_func(f, srna, prop, dp, (char*)sprop->length);
-                       sprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (char*)sprop->set);
+                       sprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)sprop->get);
+                       sprop->length= (void*)rna_def_property_length_func(f, srna, prop, dp, (const char*)sprop->length);
+                       sprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)sprop->set);
                        break;
                }
                case PROP_POINTER: {
                        PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
 
-                       pprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)pprop->get);
-                       pprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (char*)pprop->set);
+                       pprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)pprop->get);
+                       pprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)pprop->set);
                        if(!pprop->type) {
                                fprintf(stderr, "rna_def_property_funcs: %s.%s, pointer must have a struct type.\n", srna->identifier, prop->identifier);
                                DefRNA.error= 1;
@@ -1268,24 +1268,24 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
                }
                case PROP_COLLECTION: {
                        CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
-                       char *nextfunc= (char*)cprop->next;
+                       const char *nextfunc= (const char*)cprop->next;
 
                        if(dp->dnatype && strcmp(dp->dnatype, "ListBase")==0);
                        else if(dp->dnalengthname || dp->dnalengthfixed)
-                               cprop->length= (void*)rna_def_property_length_func(f, srna, prop, dp, (char*)cprop->length);
+                               cprop->length= (void*)rna_def_property_length_func(f, srna, prop, dp, (const char*)cprop->length);
 
                        /* test if we can allow raw array access, if it is using our standard
                         * array get/next function, we can be sure it is an actual array */
                        if(cprop->next && cprop->get)
-                               if(strcmp((char*)cprop->next, "rna_iterator_array_next") == 0 &&
-                                  strcmp((char*)cprop->get, "rna_iterator_array_get") == 0)
+                               if(strcmp((const char*)cprop->next, "rna_iterator_array_next") == 0 &&
+                                  strcmp((const char*)cprop->get, "rna_iterator_array_get") == 0)
                                        prop->flag |= PROP_RAW_ARRAY;
 
-                       cprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)cprop->get);
-                       cprop->begin= (void*)rna_def_property_begin_func(f, srna, prop, dp, (char*)cprop->begin);
-                       cprop->next= (void*)rna_def_property_next_func(f, srna, prop, dp, (char*)cprop->next);
-                       cprop->end= (void*)rna_def_property_end_func(f, srna, prop, dp, (char*)cprop->end);
-                       cprop->lookupint= (void*)rna_def_property_lookup_int_func(f, srna, prop, dp, (char*)cprop->lookupint, nextfunc);
+                       cprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)cprop->get);
+                       cprop->begin= (void*)rna_def_property_begin_func(f, srna, prop, dp, (const char*)cprop->begin);
+                       cprop->next= (void*)rna_def_property_next_func(f, srna, prop, dp, (const char*)cprop->next);
+                       cprop->end= (void*)rna_def_property_end_func(f, srna, prop, dp, (const char*)cprop->end);
+                       cprop->lookupint= (void*)rna_def_property_lookup_int_func(f, srna, prop, dp, (const char*)cprop->lookupint, nextfunc);
 
                        if(!(prop->flag & PROP_IDPROPERTY)) {
                                if(!cprop->begin) {
@@ -1414,7 +1414,7 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property
        if(prop->flag & (PROP_IDPROPERTY|PROP_BUILTIN))
                return;
        
-       if(prop->name && prop->description && strcmp(prop->description, "") != 0)
+       if(prop->name && prop->description && prop->description[0] != '\0')
                fprintf(f, "\t/* %s: %s */\n", prop->name, prop->description);
        else if(prop->name)
                fprintf(f, "\t/* %s */\n", prop->name);
@@ -1468,7 +1468,7 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property
                        PointerPropertyRNA *pprop= (PointerPropertyRNA*)dp->prop;
 
                        if(pprop->type)
-                               fprintf(f, "\tinline %s %s(void);", (char*)pprop->type, rna_safe_id(prop->identifier));
+                               fprintf(f, "\tinline %s %s(void);", (const char*)pprop->type, rna_safe_id(prop->identifier));
                        else
                                fprintf(f, "\tinline %s %s(void);", "UnknownType", rna_safe_id(prop->identifier));
                        break;
@@ -1477,7 +1477,7 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property
                        CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)dp->prop;
 
                        if(cprop->item_type)
-                               fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", (char*)cprop->item_type, srna->identifier, rna_safe_id(prop->identifier));
+                               fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", (const char*)cprop->item_type, srna->identifier, rna_safe_id(prop->identifier));
                        else
                                fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", "UnknownType", srna->identifier, rna_safe_id(prop->identifier));
                        break;
@@ -1531,7 +1531,7 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe
                        PointerPropertyRNA *pprop= (PointerPropertyRNA*)dp->prop;
 
                        if(pprop->type)
-                               fprintf(f, "\tPOINTER_PROPERTY(%s, %s, %s)", (char*)pprop->type, srna->identifier, rna_safe_id(prop->identifier));
+                               fprintf(f, "\tPOINTER_PROPERTY(%s, %s, %s)", (const char*)pprop->type, srna->identifier, rna_safe_id(prop->identifier));
                        else
                                fprintf(f, "\tPOINTER_PROPERTY(%s, %s, %s)", "UnknownType", srna->identifier, rna_safe_id(prop->identifier));
                        break;
@@ -1540,7 +1540,7 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe
                        /*CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)dp->prop;
 
                        if(cprop->type)
-                               fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", (char*)cprop->type, srna->identifier, prop->identifier);
+                               fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", (const char*)cprop->type, srna->identifier, prop->identifier);
                        else
                                fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", "UnknownType", srna->identifier, prop->identifier);*/
                        break;
@@ -1763,7 +1763,7 @@ static void rna_auto_types(void)
                                                pprop->type= (StructRNA*)rna_find_type(dp->dnatype);
 
                                        if(pprop->type) {
-                                               type= rna_find_struct((char*)pprop->type);
+                                               type= rna_find_struct((const char*)pprop->type);
                                                if(type && (type->flag & STRUCT_ID_REFCOUNT))
                                                        pprop->property.flag |= PROP_ID_REFCOUNT;
                                        }
@@ -2214,7 +2214,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
        else fprintf(f, "\t0, -1");
 
        /* our own type - collections/arrays only */
-       if(prop->srna) fprintf(f, ", &RNA_%s", (char*)prop->srna);
+       if(prop->srna) fprintf(f, ", &RNA_%s", (const char*)prop->srna);
        else fprintf(f, ", NULL");
 
        fprintf(f, "},\n");
@@ -2273,14 +2273,14 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
                        case PROP_POINTER: {
                                PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
                                fprintf(f, "\t%s, %s, %s, %s,", rna_function_string(pprop->get), rna_function_string(pprop->set), rna_function_string(pprop->typef), rna_function_string(pprop->poll));
-                               if(pprop->type) fprintf(f, "&RNA_%s\n", (char*)pprop->type);
+                               if(pprop->type) fprintf(f, "&RNA_%s\n", (const char*)pprop->type);
                                else fprintf(f, "NULL\n");
                                break;
                         }
                        case PROP_COLLECTION: {
                                CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
                                fprintf(f, "\t%s, %s, %s, %s, %s, %s, %s, %s, ", rna_function_string(cprop->begin), rna_function_string(cprop->next), rna_function_string(cprop->end), rna_function_string(cprop->get), rna_function_string(cprop->length), rna_function_string(cprop->lookupint), rna_function_string(cprop->lookupstring), rna_function_string(cprop->assignint));
-                               if(cprop->item_type) fprintf(f, "&RNA_%s\n", (char*)cprop->item_type);
+                               if(cprop->item_type) fprintf(f, "&RNA_%s\n", (const char*)cprop->item_type);
                                else fprintf(f, "NULL\n");
                                break;
                        }
index 8047b2df2268f58993aa97798e2bbba1b3be900e..149497c85fb260a2e5503cb8bb200962a1ab3bd5 100644 (file)
@@ -1614,7 +1614,7 @@ void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, int value)
 
                group= RNA_struct_idprops(ptr, 1);
                if(group)
-                       IDP_AddToGroup(group, IDP_New(IDP_INT, val, (char*)prop->identifier));
+                       IDP_AddToGroup(group, IDP_New(IDP_INT, val, prop->identifier));
        }
 }
 
@@ -1693,7 +1693,7 @@ void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const in
 
                group= RNA_struct_idprops(ptr, 1);
                if(group) {
-                       idprop= IDP_New(IDP_ARRAY, val, (char*)prop->identifier);
+                       idprop= IDP_New(IDP_ARRAY, val, prop->identifier);
                        IDP_AddToGroup(group, idprop);
                        memcpy(IDP_Array(idprop), values, sizeof(int)*idprop->len);
                }
@@ -1811,7 +1811,7 @@ void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
 
                group= RNA_struct_idprops(ptr, 1);
                if(group)
-                       IDP_AddToGroup(group, IDP_New(IDP_INT, val, (char*)prop->identifier));
+                       IDP_AddToGroup(group, IDP_New(IDP_INT, val, prop->identifier));
        }
 }
 
@@ -1927,7 +1927,7 @@ void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *v
 
                group= RNA_struct_idprops(ptr, 1);
                if(group) {
-                       idprop= IDP_New(IDP_ARRAY, val, (char*)prop->identifier);
+                       idprop= IDP_New(IDP_ARRAY, val, prop->identifier);
                        IDP_AddToGroup(group, idprop);
                        memcpy(IDP_Array(idprop), values, sizeof(int)*idprop->len);
                }
@@ -2047,7 +2047,7 @@ void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
 
                group= RNA_struct_idprops(ptr, 1);
                if(group)
-                       IDP_AddToGroup(group, IDP_New(IDP_FLOAT, val, (char*)prop->identifier));
+                       IDP_AddToGroup(group, IDP_New(IDP_FLOAT, val, prop->identifier));
        }
 }
 
@@ -2181,7 +2181,7 @@ void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const floa
 
                group= RNA_struct_idprops(ptr, 1);
                if(group) {
-                       idprop= IDP_New(IDP_ARRAY, val, (char*)prop->identifier);
+                       idprop= IDP_New(IDP_ARRAY, val, prop->identifier);
                        IDP_AddToGroup(group, idprop);
                        memcpy(IDP_Array(idprop), values, sizeof(float)*idprop->len);
                }
@@ -2328,7 +2328,7 @@ void RNA_property_string_set(PointerRNA *ptr, PropertyRNA *prop, const char *val
        BLI_assert(RNA_property_type(prop) == PROP_STRING);
 
        if((idprop=rna_idproperty_check(&prop, ptr)))
-               IDP_AssignString(idprop, (char*)value, RNA_property_string_maxlength(prop) - 1);
+               IDP_AssignString(idprop, value, RNA_property_string_maxlength(prop) - 1);
        else if(sprop->set)
                sprop->set(ptr, value); /* set function needs to clamp its self */
        else if(prop->flag & PROP_EDITABLE) {
@@ -2336,7 +2336,7 @@ void RNA_property_string_set(PointerRNA *ptr, PropertyRNA *prop, const char *val
 
                group= RNA_struct_idprops(ptr, 1);
                if(group)
-                       IDP_AddToGroup(group, IDP_NewString((char*)value, (char*)prop->identifier, RNA_property_string_maxlength(prop) - 1));
+                       IDP_AddToGroup(group, IDP_NewString(value, prop->identifier, RNA_property_string_maxlength(prop) - 1));
        }
 }
 
@@ -2413,7 +2413,7 @@ void RNA_property_enum_set(PointerRNA *ptr, PropertyRNA *prop, int value)
 
                group= RNA_struct_idprops(ptr, 1);
                if(group)
-                       IDP_AddToGroup(group, IDP_New(IDP_INT, val, (char*)prop->identifier));
+                       IDP_AddToGroup(group, IDP_New(IDP_INT, val, prop->identifier));
        }
 }
 
@@ -2509,7 +2509,7 @@ void RNA_property_pointer_add(PointerRNA *ptr, PropertyRNA *prop)
 
                group= RNA_struct_idprops(ptr, 1);
                if(group)
-                       IDP_AddToGroup(group, IDP_New(IDP_GROUP, val, (char*)prop->identifier));
+                       IDP_AddToGroup(group, IDP_New(IDP_GROUP, val, prop->identifier));
        }
        else
                printf("%s %s.%s: only supported for id properties.\n", __func__, ptr->type->identifier, prop->identifier);
@@ -2885,7 +2885,7 @@ int RNA_property_collection_type_get(PointerRNA *ptr, PropertyRNA *prop, Pointer
        BLI_assert(RNA_property_type(prop) == PROP_COLLECTION);
 
        *r_ptr= *ptr;
-       return ((r_ptr->type = prop->srna) ? 1:0);
+       return ((r_ptr->type = rna_ensure_property(prop)->srna) ? 1:0);
 }
 
 int RNA_property_collection_raw_array(PointerRNA *ptr, PropertyRNA *prop, PropertyRNA *itemprop, RawArray *array)
index 43d5f87f0d5001d0e1e32d903d33ee2cc18a8844..a1d156a2b2ac146f5579963c5241e01818839fa0 100644 (file)
@@ -820,7 +820,7 @@ static void psys_vg_name_set__internal(PointerRNA *ptr, const char *value, int i
                psys->vgroup[index]= 0;
        }
        else {
-               int vgroup_num = defgroup_name_index(ob, (char*)value);
+               int vgroup_num = defgroup_name_index(ob, value);
 
                if(vgroup_num == -1)
                        return;
index 9d72eeacf3e1b260c7a3af576d10d870bf5eb315..3c2b771ae869b069c43272c57632eb163e643d70 100644 (file)
@@ -540,7 +540,7 @@ static int rna_Sequence_input_count_get(PointerRNA *ptr)
 static void rna_SequenceElement_filename_set(PointerRNA *ptr, const char *value)
 {
        StripElem *elem= (StripElem*)(ptr->data);
-       BLI_split_dirfile(value, NULL, elem->name, 0, sizeof(elem->name));
+       BLI_split_file_part(value, elem->name, sizeof(elem->name));
 }*/
 
 static void rna_Sequence_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
index 44bdeba3e2eb1ef525446fd13e0f22a6f7300d45..c40548ade6b1db1000c5e04239120bbf9f40e4f6 100644 (file)
@@ -289,12 +289,14 @@ static void rna_def_smoke_flow_settings(BlenderRNA *brna)
        RNA_def_property_range(prop, 0.001, 1);
        RNA_def_property_ui_range(prop, 0.001, 1.0, 1.0, 4);
        RNA_def_property_ui_text(prop, "Density", "");
+       RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
 
        prop= RNA_def_property(srna, "temperature", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "temp");
        RNA_def_property_range(prop, -10, 10);
        RNA_def_property_ui_range(prop, -10, 10, 1, 1);
        RNA_def_property_ui_text(prop, "Temp. Diff.", "Temperature difference to ambient temperature");
+       RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
        
        prop= RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE);
        RNA_def_property_pointer_sdna(prop, NULL, "psys");
@@ -306,20 +308,24 @@ static void rna_def_smoke_flow_settings(BlenderRNA *brna)
        prop= RNA_def_property(srna, "use_outflow", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "type", MOD_SMOKE_FLOW_TYPE_OUTFLOW);
        RNA_def_property_ui_text(prop, "Outflow", "Delete smoke from simulation");
+       RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
 
        prop= RNA_def_property(srna, "use_absolute", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_FLOW_ABSOLUTE);
        RNA_def_property_ui_text(prop, "Absolute Density", "Only allow given density value in emitter area");
+       RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
 
        prop= RNA_def_property(srna, "initial_velocity", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_FLOW_INITVELOCITY);
        RNA_def_property_ui_text(prop, "Initial Velocity", "Smoke inherits its velocity from the emitter particle");
+       RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
 
        prop= RNA_def_property(srna, "velocity_factor", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "vel_multi");
        RNA_def_property_range(prop, -2.0, 2.0);
        RNA_def_property_ui_range(prop, -2.0, 2.0, 0.05, 5);
        RNA_def_property_ui_text(prop, "Multiplier", "Multiplier to adjust velocity passed to smoke");
+       RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
 }
 
 static void rna_def_smoke_coll_settings(BlenderRNA *brna)
index 0c3ff108c03064db51c4a0f8a41552ef9ed83bb2..d579d00f6ce07c94f4f97a1f2d8f4b6b5ad3187c 100644 (file)
@@ -2512,36 +2512,36 @@ static void rna_def_userdef_system(BlenderRNA *brna)
        /* if you edit here, please also edit the source/blender/blenfont/intern/blf_lang.c 's locales */
        static EnumPropertyItem language_items[] = {
                {0, "", 0, "Nearly done", ""},
-               {0, "DEFAULT", 0, N_("Default (Default)"), ""},
-               {1, "ENGLISH", 0, N_("English (English)"), "en_US"},
-               {8, "FRENCH", 0, N_("French (Français)"), "fr_FR"},
-               {9, "SPANISH", 0, N_("Spanish (Español)"), "es_ES"},
-               {13, "SIMPLIFIED_CHINESE", 0, N_("Simplified Chinese (简体中文)"), "zh_CN"},
+               {0, "DEFAULT", 0, "Default (Default)", ""},
+               {1, "ENGLISH", 0, "English (English)", "en_US"},
+               {8, "FRENCH", 0, "French (Français)", "fr_FR"},
+               {9, "SPANISH", 0, "Spanish (Español)", "es_ES"},
+               {13, "SIMPLIFIED_CHINESE", 0, "Simplified Chinese (简体中文)", "zh_CN"},
                {0, "", 0, "In progress", ""},
-               {2, "JAPANESE", 0, N_("Japanese (日本語)"), "ja_JP"},
-               {3, "DUTCH", 0, N_("Dutch (Nederlandse taal)"), "nl_NL"},
-               {4, "ITALIAN", 0, N_("Italian (Italiano)"), "it_IT"},
-               {5, "GERMAN", 0, N_("German (Deutsch)"), "de_DE"},
-               {6, "FINNISH", 0, N_("Finnish (Suomi)"), "fi_FI"},
-               {7, "SWEDISH", 0, N_("Swedish (Svenska)"), "sv_SE"},
-               {10, "CATALAN", 0, N_("Catalan (Català)"), "ca_AD"},
-               {11, "CZECH", 0, N_("Czech (Český)"), "cs_CZ"},
-               {12, "BRAZILIAN_PORTUGUESE", 0, N_("Brazilian Portuguese (Português do Brasil)"), "pt_BR"},
-               {14, "TRADITIONAL_CHINESE", 0, N_("Traditional Chinese (繁體中文)"), "zh_TW"},
-               {15, "RUSSIAN", 0, N_("Russian (Русский)"), "ru_RU"},
-               {16, "CROATIAN", 0, N_("Croatian (Hrvatski)"), "hr_HR"},
-               {17, "SERBIAN", 0, N_("Serbian (Српском језику)"), "sr_RS"},
-               {18, "UKRAINIAN", 0, N_("Ukrainian (Український)"), "uk_UA"},
-               {19, "POLISH", 0, N_("Polish (Polski)"), "pl_PL"},
-               {20, "ROMANIAN", 0, N_("Romanian (Român)"), "ro_RO"},
+               {2, "JAPANESE", 0, "Japanese (日本語)", "ja_JP"},
+               {3, "DUTCH", 0, "Dutch (Nederlandse taal)", "nl_NL"},
+               {4, "ITALIAN", 0, "Italian (Italiano)", "it_IT"},
+               {5, "GERMAN", 0, "German (Deutsch)", "de_DE"},
+               {6, "FINNISH", 0, "Finnish (Suomi)", "fi_FI"},
+               {7, "SWEDISH", 0, "Swedish (Svenska)", "sv_SE"},
+               {10, "CATALAN", 0, "Catalan (Català)", "ca_AD"},
+               {11, "CZECH", 0, "Czech (Český)", "cs_CZ"},
+               {12, "BRAZILIAN_PORTUGUESE", 0, "Brazilian Portuguese (Português do Brasil)", "pt_BR"},
+               {14, "TRADITIONAL_CHINESE", 0, "Traditional Chinese (繁體中文)", "zh_TW"},
+               {15, "RUSSIAN", 0, "Russian (Русский)", "ru_RU"},
+               {16, "CROATIAN", 0, "Croatian (Hrvatski)", "hr_HR"},
+               {17, "SERBIAN", 0, "Serbian (Српском језику)", "sr_RS"},
+               {18, "UKRAINIAN", 0, "Ukrainian (Український)", "uk_UA"},
+               {19, "POLISH", 0, "Polish (Polski)", "pl_PL"},
+               {20, "ROMANIAN", 0, "Romanian (Român)", "ro_RO"},
                /* using the utf8 flipped form of Arabic (العربية) */
-               {21, "ARABIC", 0, N_("Arabic (ﺔﻴﺑﺮﻌﻟﺍ)"), "ar_EG"},
-               {22, "BULGARIAN", 0, N_("Bulgarian (Български)"), "bg_BG"},
-               {23, "GREEK", 0, N_("Greek (Ελληνικά)"), "el_GR"},
-               {24, "KOREAN", 0, N_("Korean (한국 언어)"), "ko_KR"},
-               /*{25, "NEPALI", 0, N_("Nepali (नेपाली)"), "ne_NP"},*/
+               {21, "ARABIC", 0, "Arabic (ﺔﻴﺑﺮﻌﻟﺍ)", "ar_EG"},
+               {22, "BULGARIAN", 0, "Bulgarian (Български)", "bg_BG"},
+               {23, "GREEK", 0, "Greek (Ελληνικά)", "el_GR"},
+               {24, "KOREAN", 0, "Korean (한국 언어)", "ko_KR"},
+               /*{25, "NEPALI", 0, "Nepali (नेपाली)", "ne_NP"},*/
                /* using the utf8 flipped form of Persian (فارسی) */
-               {26, "PERSIAN", 0, N_("Persian (ﯽﺳﺭﺎﻓ)"), "fa_PE"},
+               {26, "PERSIAN", 0, "Persian (ﯽﺳﺭﺎﻓ)", "fa_PE"},
                {0, NULL, 0, NULL, NULL}};
 
        srna= RNA_def_struct(brna, "UserPreferencesSystem", NULL);
index e52df8f932079cdb95c45f2764340aa57be90370..a6306909699c4ead984e67311f783a103f40c364 100644 (file)
@@ -1534,7 +1534,7 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb
                                param= _PyUnicode_AsString(value);
 #ifdef WITH_INTERNATIONAL
                                if (subtype == PROP_TRANSLATE) {
-                                       param= UI_translate_do_iface(param);
+                                       param= IFACE_(param);
                                }
 #endif // WITH_INTERNATIONAL
 
index 9e19a057175fd0360556ccae34f7a314de448cfe..34f59ce047d92de0b7d852319b98cc869ffd52ac 100644 (file)
@@ -267,6 +267,9 @@ void                WM_gestures_remove(struct bContext *C);
                        /* fileselecting support */
 void           WM_event_add_fileselect(struct bContext *C, struct wmOperator *op);
 void           WM_event_fileselect_event(struct bContext *C, void *ophandle, int eventval);
+#ifndef NDEBUG
+void           WM_event_print(struct wmEvent *event);
+#endif
 
                        /* drag and drop */
 struct wmDrag          *WM_event_start_drag(struct bContext *C, int icon, int type, void *poin, double value);
index 6fd84b4c315bb45e03ac2fabc3aa92bd5db5b121..e73440e5eb0b9a1e6255fce53fdbbedfd764b3a9 100644 (file)
 #include "wm_event_types.h"
 #include "wm_draw.h"
 
+#ifndef NDEBUG
+#  include "RNA_enum_types.h"
+#endif
+
 static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, PointerRNA *properties, ReportList *reports, short context, short poll_only);
 
 /* ************ event management ************** */
@@ -435,6 +439,35 @@ static void wm_operator_print(bContext *C, wmOperator *op)
        MEM_freeN(buf);
 }
 
+/* for debugging only, getting inspecting events manually is tedious */
+#ifndef NDEBUG
+
+void WM_event_print(wmEvent *event)
+{
+       if(event) {
+               const char *unknown= "UNKNOWN";
+               const char *type_id= unknown;
+               const char *val_id= unknown;
+
+               RNA_enum_identifier(event_type_items, event->type, &type_id);
+               RNA_enum_identifier(event_value_items, event->val, &val_id);
+
+               printf("wmEvent - type:%d/%s, val:%d/%s, "
+                          "shift:%d, ctrl:%d, alt:%d, oskey:%d, keymodifier:%d, "
+                          "mouse:(%d,%d), ascii:'%c', utf8:'%.6s', "
+                          "keymap_idname:%s, pointer:%p\n",
+                          event->type, type_id, event->val, val_id,
+                          event->shift, event->ctrl, event->alt, event->oskey, event->keymodifier,
+                          event->x, event->y, event->ascii, event->utf8_buf,
+                          event->keymap_idname, (void *)event);
+       }
+       else {
+               printf("wmEvent - NULL\n");
+       }
+}
+
+#endif /* NDEBUG */
+
 static void wm_operator_reports(bContext *C, wmOperator *op, int retval, int popup)
 {
        if(popup) {
index bf5b60d691fcfcbcea23503043e0371c9d7d9cef..9b2d7026a46e983510d963cc352ef666d4b0eaff 100644 (file)
@@ -437,17 +437,17 @@ void WM_read_file(bContext *C, const char *filepath, ReportList *reports)
        else if(retval == BKE_READ_EXOTIC_OK_OTHER)
                BKE_write_undo(C, "Import file");
        else if(retval == BKE_READ_EXOTIC_FAIL_OPEN) {
-               BKE_reportf(reports, RPT_ERROR, UI_translate_do_iface(N_("Can't read file: \"%s\", %s.")), filepath,
-                               errno ? strerror(errno) : UI_translate_do_iface(N_("Unable to open the file")));
+               BKE_reportf(reports, RPT_ERROR, IFACE_("Can't read file: \"%s\", %s."), filepath,
+                               errno ? strerror(errno) : IFACE_("Unable to open the file"));
        }
        else if(retval == BKE_READ_EXOTIC_FAIL_FORMAT) {
-               BKE_reportf(reports, RPT_ERROR, UI_translate_do_iface(N_("File format is not supported in file: \"%s\".")), filepath);
+               BKE_reportf(reports, RPT_ERROR, IFACE_("File format is not supported in file: \"%s\"."), filepath);
        }
        else if(retval == BKE_READ_EXOTIC_FAIL_PATH) {
-               BKE_reportf(reports, RPT_ERROR, UI_translate_do_iface(N_("File path invalid: \"%s\".")), filepath);
+               BKE_reportf(reports, RPT_ERROR, IFACE_("File path invalid: \"%s\"."), filepath);
        }
        else {
-               BKE_reportf(reports, RPT_ERROR, UI_translate_do_iface(N_("Unknown error loading: \"%s\".")), filepath);
+               BKE_reportf(reports, RPT_ERROR, IFACE_("Unknown error loading: \"%s\"."), filepath);
                BLI_assert(!"invalid 'retval'");
        }
 
index 1face062e7e20c92a29dff37c98ca524c5f66cfb..a06da3941af09ba81a4f9b914d60bc72679cacee 100644 (file)
@@ -156,10 +156,10 @@ void WM_operatortype_append(void (*opfunc)(wmOperatorType*))
 
        if(ot->name==NULL) {
                fprintf(stderr, "ERROR: Operator %s has no name property!\n", ot->idname);
-               ot->name= UI_translate_do_iface(N_("Dummy Name"));
+               ot->name= IFACE_("Dummy Name");
        }
 
-       RNA_def_struct_ui_text(ot->srna, ot->name, ot->description ? ot->description:UI_translate_do_iface(N_("(undocumented operator)"))); // XXX All ops should have a description but for now allow them not to.
+       RNA_def_struct_ui_text(ot->srna, ot->name, ot->description ? ot->description:IFACE_("(undocumented operator)")); // XXX All ops should have a description but for now allow them not to.
        RNA_def_struct_identifier(ot->srna, ot->idname);
 
        BLI_ghash_insert(global_ops_hash, (void *)ot->idname, ot);
@@ -172,7 +172,7 @@ void WM_operatortype_append_ptr(void (*opfunc)(wmOperatorType*, void*), void *us
        ot= MEM_callocN(sizeof(wmOperatorType), "operatortype");
        ot->srna= RNA_def_struct(&BLENDER_RNA, "", "OperatorProperties");
        opfunc(ot, userdata);
-       RNA_def_struct_ui_text(ot->srna, ot->name, ot->description ? ot->description:UI_translate_do_iface(N_("(undocumented operator)")));
+       RNA_def_struct_ui_text(ot->srna, ot->name, ot->description ? ot->description:IFACE_("(undocumented operator)"));
        RNA_def_struct_identifier(ot->srna, ot->idname);
 
        BLI_ghash_insert(global_ops_hash, (void *)ot->idname, ot);
@@ -366,7 +366,7 @@ wmOperatorType *WM_operatortype_append_macro(const char *idname, const char *nam
        ot->poll= NULL;
 
        if(!ot->description)
-               ot->description= UI_translate_do_iface(N_("(undocumented operator)"));
+               ot->description= IFACE_("(undocumented operator)");
        
        RNA_def_struct_ui_text(ot->srna, ot->name, ot->description); // XXX All ops should have a description but for now allow them not to.
        RNA_def_struct_identifier(ot->srna, ot->idname);
@@ -391,7 +391,7 @@ void WM_operatortype_append_macro_ptr(void (*opfunc)(wmOperatorType*, void*), vo
        ot->poll= NULL;
 
        if(!ot->description)
-               ot->description= UI_translate_do_iface(N_("(undocumented operator)"));
+               ot->description= IFACE_("(undocumented operator)");
 
        opfunc(ot, userdata);
 
@@ -678,7 +678,7 @@ int WM_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
        else {
                pup= uiPupMenuBegin(C, op->type->name, ICON_NONE);
                layout= uiPupMenuLayout(pup);
-               uiItemsFullEnumO(layout, op->type->idname, (char*)RNA_property_identifier(prop), op->ptr->data, WM_OP_EXEC_REGION_WIN, 0);
+               uiItemsFullEnumO(layout, op->type->idname, RNA_property_identifier(prop), op->ptr->data, WM_OP_EXEC_REGION_WIN, 0);
                uiPupMenuEnd(C, pup);
        }
 
@@ -788,7 +788,7 @@ int WM_operator_confirm_message(bContext *C, wmOperator *op, const char *message
        else
                properties= NULL;
 
-       pup= uiPupMenuBegin(C, UI_translate_do_iface(N_("OK?")), ICON_QUESTION);
+       pup= uiPupMenuBegin(C, IFACE_("OK?"), ICON_QUESTION);
        layout= uiPupMenuLayout(pup);
        uiItemFullO(layout, op->type->idname, message, ICON_NONE, properties, WM_OP_EXEC_REGION_WIN, 0);
        uiPupMenuEnd(C, pup);
@@ -870,10 +870,10 @@ void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type,
 void WM_operator_properties_select_all(wmOperatorType *ot)
 {
        static EnumPropertyItem select_all_actions[] = {
-                       {SEL_TOGGLE, "TOGGLE", 0, N_("Toggle"), "Toggle selection for all elements"},
-                       {SEL_SELECT, "SELECT", 0, N_("Select"), "Select all elements"},
-                       {SEL_DESELECT, "DESELECT", 0, N_("Deselect"), "Deselect all elements"},
-                       {SEL_INVERT, "INVERT", 0, N_("Invert"), "Invert selection of all elements"},
+                       {SEL_TOGGLE, "TOGGLE", 0, "Toggle", "Toggle selection for all elements"},
+                       {SEL_SELECT, "SELECT", 0, "Select", "Select all elements"},
+                       {SEL_DESELECT, "DESELECT", 0, "Deselect", "Deselect all elements"},
+                       {SEL_INVERT, "INVERT", 0, "Invert", "Invert selection of all elements"},
                        {0, NULL, 0, NULL, NULL}
        };
 
@@ -882,25 +882,25 @@ void WM_operator_properties_select_all(wmOperatorType *ot)
 
 void WM_operator_properties_gesture_border(wmOperatorType *ot, int extend)
 {
-       RNA_def_int(ot->srna, "gesture_mode", 0, INT_MIN, INT_MAX, N_("Gesture Mode"), "", INT_MIN, INT_MAX);
-       RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, N_("X Min"), "", INT_MIN, INT_MAX);
-       RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, N_("X Max"), "", INT_MIN, INT_MAX);
-       RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, N_("Y Min"), "", INT_MIN, INT_MAX);
-       RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, N_("Y Max"), "", INT_MIN, INT_MAX);
+       RNA_def_int(ot->srna, "gesture_mode", 0, INT_MIN, INT_MAX, "Gesture Mode", "", INT_MIN, INT_MAX);
+       RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX);
+       RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX);
+       RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX);
+       RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX);
 
        if(extend)
-               RNA_def_boolean(ot->srna, "extend", 1, _("Extend"), _("Extend selection instead of deselecting everything first"));
+               RNA_def_boolean(ot->srna, "extend", 1, "Extend", "Extend selection instead of deselecting everything first");
 }
 
 void WM_operator_properties_gesture_straightline(wmOperatorType *ot, int cursor)
 {
-       RNA_def_int(ot->srna, "xstart", 0, INT_MIN, INT_MAX, N_("X Start"), "", INT_MIN, INT_MAX);
-       RNA_def_int(ot->srna, "xend", 0, INT_MIN, INT_MAX, N_("X End"), "", INT_MIN, INT_MAX);
-       RNA_def_int(ot->srna, "ystart", 0, INT_MIN, INT_MAX, N_("Y Start"), "", INT_MIN, INT_MAX);
-       RNA_def_int(ot->srna, "yend", 0, INT_MIN, INT_MAX, N_("Y End"), "", INT_MIN, INT_MAX);
+       RNA_def_int(ot->srna, "xstart", 0, INT_MIN, INT_MAX, "X Start", "", INT_MIN, INT_MAX);
+       RNA_def_int(ot->srna, "xend", 0, INT_MIN, INT_MAX, "X End", "", INT_MIN, INT_MAX);
+       RNA_def_int(ot->srna, "ystart", 0, INT_MIN, INT_MAX, "Y Start", "", INT_MIN, INT_MAX);
+       RNA_def_int(ot->srna, "yend", 0, INT_MIN, INT_MAX, "Y End", "", INT_MIN, INT_MAX);
        
        if(cursor)
-               RNA_def_int(ot->srna, "cursor", cursor, 0, INT_MAX, N_("Cursor"), N_("Mouse cursor style to use during the modal operator"), 0, INT_MAX);
+               RNA_def_int(ot->srna, "cursor", cursor, 0, INT_MAX, "Cursor", "Mouse cursor style to use during the modal operator", 0, INT_MAX);
 }
 
 
@@ -1031,7 +1031,7 @@ static uiBlock *wm_block_dialog_create(bContext *C, ARegion *ar, void *userData)
                col= uiLayoutColumn(layout, FALSE);
                col_block= uiLayoutGetBlock(col);
                /* Create OK button, the callback of which will execute op */
-               btn= uiDefBut(col_block, BUT, 0, UI_translate_do_iface(N_("OK")), 0, -30, 0, UI_UNIT_Y, NULL, 0, 0, 0, 0, "");
+               btn= uiDefBut(col_block, BUT, 0, IFACE_("OK"), 0, -30, 0, UI_UNIT_Y, NULL, 0, 0, 0, 0, "");
                uiButSetFunc(btn, dialog_exec_cb, data, col_block);
        }
 
@@ -1282,19 +1282,19 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
        split = uiLayoutSplit(layout, 0, 0);
        col = uiLayoutColumn(split, 0);
        uiItemL(col, "Links", ICON_NONE);
-       uiItemStringO(col, UI_translate_do_iface(N_("Donations")), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/blenderorg/blender-foundation/donation-payment");
-       uiItemStringO(col, UI_translate_do_iface(N_("Credits")), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/credits");
-       uiItemStringO(col, UI_translate_do_iface(N_("Release Log")), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/release-logs/blender-260");
-       uiItemStringO(col, UI_translate_do_iface(N_("Manual")), ICON_URL, "WM_OT_url_open", "url", "http://wiki.blender.org/index.php/Doc:2.5/Manual");
-       uiItemStringO(col, UI_translate_do_iface(N_("Blender Website")), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org");
-       uiItemStringO(col, UI_translate_do_iface(N_("User Community")), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/community/user-community");
+       uiItemStringO(col, IFACE_("Donations"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/blenderorg/blender-foundation/donation-payment");
+       uiItemStringO(col, IFACE_("Credits"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/credits");
+       uiItemStringO(col, IFACE_("Release Log"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/release-logs/blender-260");
+       uiItemStringO(col, IFACE_("Manual"), ICON_URL, "WM_OT_url_open", "url", "http://wiki.blender.org/index.php/Doc:2.5/Manual");
+       uiItemStringO(col, IFACE_("Blender Website"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org");
+       uiItemStringO(col, IFACE_("User Community"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/community/user-community");
        if(strcmp(STRINGIFY(BLENDER_VERSION_CYCLE), "release")==0) {
                BLI_snprintf(url, sizeof(url), "http://www.blender.org/documentation/blender_python_api_%d_%d" STRINGIFY(BLENDER_VERSION_CHAR) "_release", BLENDER_VERSION/100, BLENDER_VERSION%100);
        }
        else {
                BLI_snprintf(url, sizeof(url), "http://www.blender.org/documentation/blender_python_api_%d_%d_%d", BLENDER_VERSION/100, BLENDER_VERSION%100, BLENDER_SUBVERSION);
        }
-       uiItemStringO(col, UI_translate_do_iface(N_("Python API Reference")), ICON_URL, "WM_OT_url_open", "url", url);
+       uiItemStringO(col, IFACE_("Python API Reference"), ICON_URL, "WM_OT_url_open", "url", url);
        uiItemL(col, "", ICON_NONE);
 
        col = uiLayoutColumn(split, 0);
@@ -1304,7 +1304,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
                uiItemS(col);
        }
 
-       uiItemL(col, UI_translate_do_iface(N_("Recent")), ICON_NONE);
+       uiItemL(col, IFACE_("Recent"), ICON_NONE);
        for(recent = G.recent_files.first, i=0; (i<5) && (recent); recent = recent->next, i++) {
                uiItemStringO(col, BLI_path_basename(recent->filepath), ICON_FILE_BLEND, "WM_OT_open_mainfile", "filepath", recent->filepath);
        }
@@ -3319,13 +3319,13 @@ static void redraw_timer_window_swap(bContext *C)
 }
 
 static EnumPropertyItem redraw_timer_type_items[] = {
-       {0, "DRAW", 0, N_("Draw Region"), N_("Draw Region")},
-       {1, "DRAW_SWAP", 0, N_("Draw Region + Swap"), N_("Draw Region and Swap")},
-       {2, "DRAW_WIN", 0, N_("Draw Window"), N_("Draw Window")},
-       {3, "DRAW_WIN_SWAP", 0, N_("Draw Window + Swap"), N_("Draw Window and Swap")},
-       {4, "ANIM_STEP", 0, N_("Anim Step"), N_("Animation Steps")},
-       {5, "ANIM_PLAY", 0, N_("Anim Play"), N_("Animation Playback")},
-       {6, "UNDO", 0, N_("Undo/Redo"), N_("Undo/Redo")},
+       {0, "DRAW", 0, "Draw Region", "Draw Region"},
+       {1, "DRAW_SWAP", 0, "Draw Region + Swap", "Draw Region and Swap"},
+       {2, "DRAW_WIN", 0, "Draw Window", "Draw Window"},
+       {3, "DRAW_WIN_SWAP", 0, "Draw Window + Swap", "Draw Window and Swap"},
+       {4, "ANIM_STEP", 0, "Anim Step", "Animation Steps"},
+       {5, "ANIM_PLAY", 0, "Anim Play", "Animation Playback"},
+       {6, "UNDO", 0, "Undo/Redo", "Undo/Redo"},
        {0, NULL, 0, NULL, NULL}};
 
 static int redraw_timer_exec(bContext *C, wmOperator *op)
@@ -3635,14 +3635,14 @@ void wm_operatortype_init(void)
 static void gesture_circle_modal_keymap(wmKeyConfig *keyconf)
 {
        static EnumPropertyItem modal_items[] = {
-       {GESTURE_MODAL_CANCEL,  "CANCEL", 0, N_("Cancel"), ""},
-       {GESTURE_MODAL_CONFIRM, "CONFIRM", 0, N_("Confirm"), ""},
-       {GESTURE_MODAL_CIRCLE_ADD, "ADD", 0, N_("Add"), ""},
-       {GESTURE_MODAL_CIRCLE_SUB, "SUBTRACT", 0, N_("Subtract"), ""},
+       {GESTURE_MODAL_CANCEL,  "CANCEL", 0, "Cancel", ""},
+       {GESTURE_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""},
+       {GESTURE_MODAL_CIRCLE_ADD, "ADD", 0, "Add", ""},
+       {GESTURE_MODAL_CIRCLE_SUB, "SUBTRACT", 0, "Subtract", ""},
 
-       {GESTURE_MODAL_SELECT,  "SELECT", 0, N_("Select"), ""},
-       {GESTURE_MODAL_DESELECT,"DESELECT", 0, N_("DeSelect"), ""},
-       {GESTURE_MODAL_NOP,"NOP", 0, N_("No Operation"), ""},
+       {GESTURE_MODAL_SELECT,  "SELECT", 0, "Select", ""},
+       {GESTURE_MODAL_DESELECT,"DESELECT", 0, "DeSelect", ""},
+       {GESTURE_MODAL_NOP,"NOP", 0, "No Operation", ""},
 
 
        {0, NULL, 0, NULL, NULL}};
@@ -3688,9 +3688,9 @@ static void gesture_circle_modal_keymap(wmKeyConfig *keyconf)
 static void gesture_straightline_modal_keymap(wmKeyConfig *keyconf)
 {
        static EnumPropertyItem modal_items[] = {
-               {GESTURE_MODAL_CANCEL,  "CANCEL", 0, N_("Cancel"), ""},
-               {GESTURE_MODAL_SELECT,  "SELECT", 0, N_("Select"), ""},
-               {GESTURE_MODAL_BEGIN,   "BEGIN", 0, N_("Begin"), ""},
+               {GESTURE_MODAL_CANCEL,  "CANCEL", 0, "Cancel", ""},
+               {GESTURE_MODAL_SELECT,  "SELECT", 0, "Select", ""},
+               {GESTURE_MODAL_BEGIN,   "BEGIN", 0, "Begin", ""},
                {0, NULL, 0, NULL, NULL}};
        
        wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "Gesture Straight Line");
@@ -3716,10 +3716,10 @@ static void gesture_straightline_modal_keymap(wmKeyConfig *keyconf)
 static void gesture_border_modal_keymap(wmKeyConfig *keyconf)
 {
        static EnumPropertyItem modal_items[] = {
-       {GESTURE_MODAL_CANCEL,  "CANCEL", 0, N_("Cancel"), ""},
-       {GESTURE_MODAL_SELECT,  "SELECT", 0, N_("Select"), ""},
-       {GESTURE_MODAL_DESELECT,"DESELECT", 0, N_("DeSelect"), ""},
-       {GESTURE_MODAL_BEGIN,   "BEGIN", 0, N_("Begin"), ""},
+       {GESTURE_MODAL_CANCEL,  "CANCEL", 0, "Cancel", ""},
+       {GESTURE_MODAL_SELECT,  "SELECT", 0, "Select", ""},
+       {GESTURE_MODAL_DESELECT,"DESELECT", 0, "DeSelect", ""},
+       {GESTURE_MODAL_BEGIN,   "BEGIN", 0, "Begin", ""},
        {0, NULL, 0, NULL, NULL}};
 
        wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "Gesture Border");
@@ -3771,10 +3771,10 @@ static void gesture_border_modal_keymap(wmKeyConfig *keyconf)
 static void gesture_zoom_border_modal_keymap(wmKeyConfig *keyconf)
 {
        static EnumPropertyItem modal_items[] = {
-       {GESTURE_MODAL_CANCEL, "CANCEL", 0, N_("Cancel"), ""},
-       {GESTURE_MODAL_IN,      "IN", 0, N_("In"), ""},
-       {GESTURE_MODAL_OUT, "OUT", 0, N_("Out"), ""},
-       {GESTURE_MODAL_BEGIN, "BEGIN", 0, N_("Begin"), ""},
+       {GESTURE_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""},
+       {GESTURE_MODAL_IN,      "IN", 0, "In", ""},
+       {GESTURE_MODAL_OUT, "OUT", 0, "Out", ""},
+       {GESTURE_MODAL_BEGIN, "BEGIN", 0, "Begin", ""},
        {0, NULL, 0, NULL, NULL}};
 
        wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "Gesture Zoom Border");
index 405960d0795abf7c5f8cca20445b669c8e056b20..38ff02b46c5cba93ef81ed1350cd600a4683bd04 100644 (file)
@@ -506,11 +506,11 @@ void WM_window_open_temp(bContext *C, rcti *position, int type)
        ED_screen_set(C, win->screen);
        
        if(sa->spacetype==SPACE_IMAGE)
-               GHOST_SetTitle(win->ghostwin, UI_translate_do_iface(N_("Blender Render")));
+               GHOST_SetTitle(win->ghostwin, IFACE_("Blender Render"));
        else if(ELEM(sa->spacetype, SPACE_OUTLINER, SPACE_USERPREF))
-               GHOST_SetTitle(win->ghostwin, UI_translate_do_iface(N_("Blender User Preferences")));
+               GHOST_SetTitle(win->ghostwin, IFACE_("Blender User Preferences"));
        else if(sa->spacetype==SPACE_FILE)
-               GHOST_SetTitle(win->ghostwin, UI_translate_do_iface(N_("Blender File View")));
+               GHOST_SetTitle(win->ghostwin, IFACE_("Blender File View"));
        else
                GHOST_SetTitle(win->ghostwin, "Blender");
 }
index e8cc6e1877d4d8c88ac4df137eaa07672b2c0350..984a1844318af048278210d268cedce67469dc37 100644 (file)
@@ -344,16 +344,11 @@ if(UNIX AND NOT APPLE)
                )
        endif()
 
-       install(
-               FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf
-               DESTINATION ${TARGETDIR_VER}
-       )
-
        if(WITH_INTERNATIONAL)
                install(
                        DIRECTORY
-                               ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
-                               ${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts
+                               ${CMAKE_SOURCE_DIR}/release/datafiles/locale
+                               ${CMAKE_SOURCE_DIR}/release/datafiles/fonts
                        DESTINATION ${TARGETDIR_VER}/datafiles
                        PATTERN ".svn" EXCLUDE
                )
@@ -416,16 +411,11 @@ elseif(WIN32)
                DESTINATION ${TARGETDIR}
        )
 
-       install(  # same as linux!, deduplicate
-               FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf
-               DESTINATION ${TARGETDIR_VER}
-       )
-
        if(WITH_INTERNATIONAL) # same as linux!, deduplicate
                install(
                        DIRECTORY
-                               ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
-                               ${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts
+                               ${CMAKE_SOURCE_DIR}/release/datafiles/locale
+                               ${CMAKE_SOURCE_DIR}/release/datafiles/fonts
                        DESTINATION ${TARGETDIR_VER}/datafiles
                        PATTERN ".svn" EXCLUDE
                )
@@ -639,17 +629,12 @@ elseif(APPLE)
                \${TARGETDIR}/blender.app/Contents/
        )
 
-       install(
-               FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf
-               DESTINATION ${TARGETDIR_VER}
-       )
-
        # localization
        if(WITH_INTERNATIONAL)
                install(
                        DIRECTORY
-                               ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
-                               ${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts
+                               ${CMAKE_SOURCE_DIR}/release/datafiles/locale
+                               ${CMAKE_SOURCE_DIR}/release/datafiles/fonts
                        DESTINATION ${TARGETDIR_VER}/datafiles
                        PATTERN ".svn" EXCLUDE
                )
index b357f7b48f2768dd6499d33267967d3943583719..d24e930e2c98cac380e002219c2795f193a038ee 100644 (file)
@@ -145,7 +145,8 @@ static int print_version(int argc, const char **argv, void *data);
 
 extern int pluginapi_force_ref(void);  /* from blenpluginapi:pluginapi.c */
 
-char bprogname[FILE_MAX]; /* from blenpluginapi:pluginapi.c */
+char bprogname[FILE_MAX];
+char bprogdir[FILE_MAX];
 char btempdir[FILE_MAX];
 
 #define BLEND_VERSION_STRING_FMT "Blender %d.%02d (sub %d)\n", BLENDER_VERSION/100, BLENDER_VERSION%100, BLENDER_SUBVERSION
@@ -1187,6 +1188,7 @@ int main(int argc, const char **argv)
        // need this.
 
        BLI_where_am_i(bprogname, sizeof(bprogname), argv[0]);
+       BLI_split_dir_part(bprogname, bprogdir, sizeof(bprogdir));
 
        BLI_threadapi_init();
 
index ee40567fce286de809095c621c88ab75cb5d0587..6df648bf2d3efdb3a1b5eaaba4d54683b351f7b0 100644 (file)
@@ -69,7 +69,7 @@ class SCA_KeyboardSensor : public SCA_ISensor
         * The property that indicates whether or not to log text when in
         * loggin mode. If the property equals 0, no loggin is done. For
         * all other values, logging is active. Logging can only become
-        * active if there is a property to log to. Logging is independant
+        * active if there is a property to log to. Logging is independent
         * from hotkey settings. */
        STR_String      m_toggleprop;
 
index ea17b9adcfd73e7484a9eb010199885d0bb770f1..78ea2aac8ced01f63802c0c5221c6ce94d8e844e 100644 (file)
@@ -117,6 +117,7 @@ const int kMinWindowWidth = 100;
 const int kMinWindowHeight = 100;
 
 char bprogname[FILE_MAX];
+char bprogdir[FILE_MAX];
 
 static void mem_error_cb(const char *errorStr)
 {
@@ -380,6 +381,7 @@ int main(int argc, char** argv)
 #endif /* __alpha__ */
 #endif /* __linux__ */
        BLI_where_am_i(bprogname, sizeof(bprogname), argv[0]);
+       BLI_split_dir_part(bprogname, bprogdir, sizeof(bprogdir));
 #ifdef __APPLE__
        // Can't use Carbon right now because of double defined type ID (In Carbon.h and DNA_ID.h, sigh)
        /*
index e86831b9323ea947304f99b066c571ff201230a4..c7da650f98861314ddbf5ce00d953939d66a6273 100644 (file)
@@ -502,7 +502,7 @@ static PyObject* gPyGetBlendFileList(PyObject*, PyObject* args)
                BLI_path_abs(cpath, gp_GamePythonPath);
        } else {
                /* Get the dir only */
-               BLI_split_dirfile(gp_GamePythonPath, cpath, NULL, sizeof(cpath), 0);
+               BLI_split_dir_part(gp_GamePythonPath, cpath, sizeof(cpath));
        }
 
        if((dp  = opendir(cpath)) == NULL) {
@@ -1732,7 +1732,7 @@ static void initPySysObjects__append(PyObject *sys_path, char *filename)
        PyObject *item;
        char expanded[FILE_MAXDIR + FILE_MAXFILE];
        
-       BLI_split_dirfile(filename, expanded, NULL, sizeof(expanded), 0); /* get the dir part of filename only */
+       BLI_split_dir_part(filename, expanded, sizeof(expanded)); /* get the dir part of filename only */
        BLI_path_abs(expanded, gp_GamePythonPath); /* filename from lib->filename is (always?) absolute, so this may not be needed but it wont hurt */
        BLI_cleanup_file(gp_GamePythonPath, expanded); /* Dont use BLI_cleanup_dir because it adds a slash - BREAKS WIN32 ONLY */
        item= PyUnicode_DecodeFSDefault(expanded);