forked from bartvdbraak/blender
svn merge ^/trunk/blender -r40405:40431
This commit is contained in:
commit
5bd83eede0
14
GNUmakefile
14
GNUmakefile
@ -130,6 +130,10 @@ help:
|
||||
@echo " * package_pacman - build an arch linux pacmanpackage"
|
||||
@echo " * package_archive - build an archive package"
|
||||
@echo ""
|
||||
@echo "Other Targets"
|
||||
@echo " * translations - update blenders translation files in po/"
|
||||
# TODO, doxygen and sphinx docs
|
||||
@echo ""
|
||||
@echo "Testing Targets (not assosiated with building blender)"
|
||||
@echo " * test - run ctest, currently tests import/export, operator execution and that python modules load"
|
||||
@echo " * test_cmake - runs our own cmake file checker which detects errors in the cmake file list definitions"
|
||||
@ -156,6 +160,16 @@ package_archive:
|
||||
@echo archive in "$(BUILD_DIR)/release"
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Other Targets
|
||||
#
|
||||
translations:
|
||||
$(BUILD_DIR)/bin/blender --background --python po/update_msg.py
|
||||
python3 po/update_pot.py
|
||||
python3 po/update_po.py
|
||||
python3 po/update_mo.py
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Tests
|
||||
#
|
||||
|
@ -48,11 +48,11 @@ def get_platform(filename):
|
||||
tokens = filename.split("-")
|
||||
platforms = ('osx', 'mac', 'bsd',
|
||||
'win', 'linux', 'source',
|
||||
'irix', 'solaris')
|
||||
'solaris')
|
||||
platform_tokens = []
|
||||
found = False
|
||||
|
||||
for i, token in enumerate(tokens):
|
||||
for token in tokens:
|
||||
if not found:
|
||||
for platform in platforms:
|
||||
if platform in token.lower():
|
||||
|
@ -43,6 +43,7 @@ CHECKER_ARGS = [
|
||||
# "--enable=all", # if you want sixty hundred pedantic suggestions
|
||||
]
|
||||
|
||||
|
||||
def main():
|
||||
source_info = project_source_info.build_info(ignore_prefix_list=CHECKER_IGNORE_PREFIX)
|
||||
|
||||
@ -58,12 +59,12 @@ def main():
|
||||
check_commands.append((c, cmd))
|
||||
|
||||
for i, (c, cmd) in enumerate(check_commands):
|
||||
percent = 100.0 * (i / (len(check_commands)-1))
|
||||
percent = 100.0 * (i / (len(check_commands) - 1))
|
||||
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
|
||||
|
||||
|
||||
# if percent < 27.9:
|
||||
# continue
|
||||
|
||||
|
||||
# let cppcheck finish the line off...
|
||||
sys.stdout.write("%s " % percent_str)
|
||||
|
||||
|
@ -58,9 +58,9 @@ CHECKER_ARGS = [
|
||||
# re-definitions, rna causes most of these
|
||||
"-redef",
|
||||
"-syntax",
|
||||
|
||||
|
||||
# dummy, witjout this splint complains with:
|
||||
# /usr/include/bits/confname.h:31:27: *** Internal Bug at cscannerHelp.c:2428: Unexpanded macro not function or constant: int _PC_MAX_CANON
|
||||
# /usr/include/bits/confname.h:31:27: *** Internal Bug at cscannerHelp.c:2428: Unexpanded macro not function or constant: int _PC_MAX_CANON
|
||||
"-D_PC_MAX_CANON=0",
|
||||
]
|
||||
|
||||
|
@ -27,7 +27,6 @@ __all__ = (
|
||||
)
|
||||
|
||||
import os
|
||||
import sys
|
||||
from os.path import join, dirname, normpath, abspath
|
||||
|
||||
SOURCE_DIR = join(dirname(__file__), "..", "..")
|
||||
@ -35,11 +34,6 @@ SOURCE_DIR = normpath(SOURCE_DIR)
|
||||
SOURCE_DIR = abspath(SOURCE_DIR)
|
||||
|
||||
|
||||
def is_c_header(filename):
|
||||
ext = os.path.splitext(filename)[1]
|
||||
return (ext in (".h", ".hpp", ".hxx"))
|
||||
|
||||
|
||||
def is_c_header(filename):
|
||||
ext = os.path.splitext(filename)[1]
|
||||
return (ext in (".h", ".hpp", ".hxx"))
|
||||
@ -79,6 +73,7 @@ def do_ignore(filepath, ignore_prefix_list):
|
||||
|
||||
def makefile_log():
|
||||
import subprocess
|
||||
import time
|
||||
# Check blender is not 2.5x until it supports playback again
|
||||
print("running make with --dry-run ...")
|
||||
process = subprocess.Popen(["make", "--always-make", "--dry-run", "--keep-going", "VERBOSE=1"],
|
||||
|
@ -1,208 +0,0 @@
|
||||
import os
|
||||
|
||||
LCGDIR = os.getcwd()+"/../lib/irix-6.5-mips"
|
||||
LIBDIR = LCGDIR
|
||||
|
||||
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 = 'true'
|
||||
WITH_BF_STATICOPENAL = 'true'
|
||||
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'
|
||||
|
||||
BF_LIBSAMPLERATE = LCGDIR+'/samplerate'
|
||||
BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
|
||||
BF_LIBSAMPLERATE_LIB = 'samplerate'
|
||||
BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib'
|
||||
|
||||
WITH_BF_SDL = 'true'
|
||||
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 = 'true'
|
||||
|
||||
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_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 = 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 = 'true'
|
||||
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 = 'true' # -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 = 'c99'
|
||||
CXX = 'CC'
|
||||
|
||||
|
||||
CCFLAGS = ['-pipe','-fPIC', '-n32']
|
||||
|
||||
CPPFLAGS = []
|
||||
CXXFLAGS = ['-pipe','-fPIC', '-n32']
|
||||
REL_CFLAGS = ['-DNDEBUG', '-O2']
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2']
|
||||
##BF_DEPEND = 'true'
|
||||
##
|
||||
##AR = ar
|
||||
##ARFLAGS = ruv
|
||||
##ARFLAGSQUIET = ru
|
||||
##
|
||||
C_WARN = ['-no_prelink', '-ptused']
|
||||
|
||||
CC_WARN = ['-no_prelink', '-ptused']
|
||||
|
||||
##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/irix6'
|
||||
BF_INSTALLDIR='../install/irix6'
|
||||
|
||||
#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
|
@ -765,7 +765,7 @@ def pyrna2sphinx(BASEPATH):
|
||||
fw(" .. attribute:: %s\n\n" % prop.identifier)
|
||||
if prop.description:
|
||||
fw(" %s\n\n" % prop.description)
|
||||
|
||||
|
||||
# special exception, cant use genric code here for enums
|
||||
if prop.type == "enum":
|
||||
enum_text = pyrna_enum2sphinx(prop)
|
||||
|
@ -67,6 +67,7 @@ set(SRC
|
||||
FX/AUD_SuperposeFactory.cpp
|
||||
FX/AUD_SuperposeReader.cpp
|
||||
FX/AUD_VolumeFactory.cpp
|
||||
|
||||
intern/AUD_3DMath.h
|
||||
intern/AUD_AnimateableProperty.cpp
|
||||
intern/AUD_AnimateableProperty.h
|
||||
@ -99,6 +100,7 @@ set(SRC
|
||||
intern/AUD_IWriter.h
|
||||
intern/AUD_JOSResampleFactory.cpp
|
||||
intern/AUD_JOSResampleFactory.h
|
||||
intern/AUD_JOSResampleReaderCoeff.cpp
|
||||
intern/AUD_JOSResampleReader.cpp
|
||||
intern/AUD_JOSResampleReader.h
|
||||
intern/AUD_LinearResampleFactory.cpp
|
||||
|
@ -26,7 +26,7 @@ if env['WITH_GHOST_SDL']:
|
||||
pass
|
||||
incs += ' ' + env['BF_SDL_INC']
|
||||
defs += ['WITH_GHOST_SDL']
|
||||
elif window_system in ('linux', 'openbsd3', 'sunos5', 'freebsd7', 'freebsd8', 'freebsd9', 'irix6', 'aix4', 'aix5'):
|
||||
elif window_system in ('linux', 'openbsd3', 'sunos5', 'freebsd7', 'freebsd8', 'freebsd9', 'aix4', 'aix5'):
|
||||
for f in pf:
|
||||
try:
|
||||
sources.remove('intern' + os.sep + f + 'Win32.cpp')
|
||||
|
@ -57,16 +57,6 @@
|
||||
#include <X11/XF86keysym.h>
|
||||
#endif
|
||||
|
||||
#ifdef __sgi
|
||||
|
||||
#if defined(_SGI_EXTRA_PREDEFINES) && !defined(NO_FAST_ATOMS)
|
||||
#include <X11/SGIFastAtom.h>
|
||||
#else
|
||||
#define XSGIFastInternAtom(dpy,string,fast_name,how) XInternAtom(dpy,string,how)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// For timing
|
||||
|
||||
#include <sys/time.h>
|
||||
@ -98,16 +88,9 @@ GHOST_SystemX11(
|
||||
std::cerr << "Unable to open a display" << std::endl;
|
||||
abort(); //was return before, but this would just mean it will crash later
|
||||
}
|
||||
|
||||
#ifdef __sgi
|
||||
m_delete_window_atom
|
||||
= XSGIFastInternAtom(m_display,
|
||||
"WM_DELETE_WINDOW",
|
||||
SGI_XA_WM_DELETE_WINDOW, False);
|
||||
#else
|
||||
|
||||
m_delete_window_atom
|
||||
= XInternAtom(m_display, "WM_DELETE_WINDOW", True);
|
||||
#endif
|
||||
|
||||
m_wm_protocols= XInternAtom(m_display, "WM_PROTOCOLS", False);
|
||||
m_wm_take_focus= XInternAtom(m_display, "WM_TAKE_FOCUS", False);
|
||||
@ -630,7 +613,6 @@ GHOST_SystemX11::processEvent(XEvent *xe)
|
||||
{
|
||||
XClientMessageEvent & xcme = xe->xclient;
|
||||
|
||||
#ifndef __sgi
|
||||
if (((Atom)xcme.data.l[0]) == m_delete_window_atom) {
|
||||
g_event = new
|
||||
GHOST_Event(
|
||||
@ -638,10 +620,8 @@ GHOST_SystemX11::processEvent(XEvent *xe)
|
||||
GHOST_kEventWindowClose,
|
||||
window
|
||||
);
|
||||
} else
|
||||
#endif
|
||||
|
||||
if (((Atom)xcme.data.l[0]) == m_wm_take_focus) {
|
||||
}
|
||||
else if (((Atom)xcme.data.l[0]) == m_wm_take_focus) {
|
||||
XWindowAttributes attr;
|
||||
Window fwin;
|
||||
int revert_to;
|
||||
|
@ -25,6 +25,11 @@
|
||||
* Contributor(s): none yet.
|
||||
*
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
/** \file MEM_sys_types.h
|
||||
* \ingroup MEM
|
||||
*
|
||||
* A platform-independent definition of [u]intXX_t
|
||||
* Plus the accompanying header include for htonl/ntohl
|
||||
*
|
||||
@ -44,10 +49,6 @@
|
||||
// doxygen would get a conflict
|
||||
*/
|
||||
|
||||
/** \file MEM_sys_types.h
|
||||
* \ingroup MEM
|
||||
*/
|
||||
|
||||
#ifndef MEM_SYS_TYPES_H
|
||||
#define MEM_SYS_TYPES_H
|
||||
|
||||
@ -60,6 +61,7 @@ extern "C" {
|
||||
/* The __intXX are built-in types of the visual complier! So we don't
|
||||
* need to include anything else here. */
|
||||
|
||||
|
||||
typedef signed __int8 int8_t;
|
||||
typedef signed __int16 int16_t;
|
||||
typedef signed __int32 int32_t;
|
||||
@ -104,11 +106,12 @@ unsigned long __attribute__((__stdcall__)) htonl(unsigned long);
|
||||
|
||||
#else
|
||||
|
||||
/* FreeBSD, Irix, Solaris */
|
||||
/* FreeBSD, Solaris */
|
||||
#include <sys/types.h>
|
||||
|
||||
#endif /* ifdef platform for types */
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifndef FREE_WINDOWS
|
||||
#ifndef htonl
|
||||
@ -122,7 +125,7 @@ unsigned long __attribute__((__stdcall__)) htonl(unsigned long);
|
||||
#include <sys/param.h>
|
||||
#elif defined (__APPLE__)
|
||||
#include <sys/types.h>
|
||||
#else /* irix sun linux */
|
||||
#else /* sun linux */
|
||||
#include <netinet/in.h>
|
||||
#endif /* ifdef platform for htonl/ntohl */
|
||||
|
||||
|
@ -364,22 +364,9 @@ void *MEM_mapallocN(size_t len, const char *str)
|
||||
mem_lock_thread();
|
||||
|
||||
len = (len + 3 ) & ~3; /* allocate in units of 4 */
|
||||
|
||||
#ifdef __sgi
|
||||
{
|
||||
#include <fcntl.h>
|
||||
|
||||
int fd;
|
||||
fd = open("/dev/zero", O_RDWR);
|
||||
|
||||
memh= mmap(0, len+sizeof(MemHead)+sizeof(MemTail),
|
||||
PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
|
||||
close(fd);
|
||||
}
|
||||
#else
|
||||
memh= mmap(NULL, len+sizeof(MemHead)+sizeof(MemTail),
|
||||
PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANON, -1, 0);
|
||||
#endif
|
||||
|
||||
if(memh!=(MemHead *)-1) {
|
||||
make_memhead_header(memh, len, str);
|
||||
|
@ -25,6 +25,11 @@
|
||||
* Contributor(s): none yet.
|
||||
*
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
/** \file superlu_sys_types.h
|
||||
* \ingroup opennl
|
||||
*
|
||||
* A platform-independent definition of [u]intXX_t
|
||||
* Plus the accompanying header include for htonl/ntohl
|
||||
*
|
||||
@ -37,10 +42,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/** \file superlu_sys_types.h
|
||||
* \ingroup opennl
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
// DG: original BLO_sys_types.h is in source/blender/blenkernel
|
||||
@ -99,29 +100,32 @@ typedef unsigned long uintptr_t;
|
||||
#include <inttypes.h>
|
||||
|
||||
#elif defined(FREE_WINDOWS)
|
||||
|
||||
/* define htoln here, there must be a syntax error in winsock2.h in MinGW */
|
||||
unsigned long __attribute__((__stdcall__)) htonl(unsigned long);
|
||||
#include <stdint.h>
|
||||
|
||||
#else
|
||||
|
||||
/* FreeBSD, Irix, Solaris */
|
||||
/* FreeBSD, Solaris */
|
||||
#include <sys/types.h>
|
||||
|
||||
#endif /* ifdef platform for types */
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifndef FREE_WINDOWS
|
||||
#ifndef htonl
|
||||
#define htonl(x) correctByteOrder(x)
|
||||
#endif
|
||||
#ifndef ntohl
|
||||
#define ntohl(x) correctByteOrder(x)
|
||||
#endif
|
||||
#endif
|
||||
#elif defined (__FreeBSD__) || defined (__OpenBSD__)
|
||||
#include <sys/param.h>
|
||||
#elif defined (__APPLE__)
|
||||
#include <sys/types.h>
|
||||
#else /* irix sun linux */
|
||||
#else /* sun linux */
|
||||
#include <netinet/in.h>
|
||||
#endif /* ifdef platform for htonl/ntohl */
|
||||
|
||||
|
@ -1,17 +1,54 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
|
||||
# $Id$
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
# update all mo files in the LANGS
|
||||
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
LOCALE_DIR="../release/bin/.blender/locale"
|
||||
PO_DIR = "."
|
||||
CURRENT_DIR = 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")
|
||||
|
||||
DOMAIN = "blender"
|
||||
|
||||
for po in os.listdir( PO_DIR ):
|
||||
if po.endswith(".po"):
|
||||
lang = po[:-3]
|
||||
# show stats
|
||||
cmd = "msgfmt --statistics %s.po -o %s/%s/LC_MESSAGES/%s.mo" % ( lang, LOCALE_DIR, lang, DOMAIN )
|
||||
print cmd
|
||||
os.system( cmd )
|
||||
|
||||
def main():
|
||||
for po in os.listdir(CURRENT_DIR):
|
||||
if po.endswith(".po"):
|
||||
lang = po[:-3]
|
||||
# show stats
|
||||
cmd = ("msgfmt",
|
||||
"--statistics",
|
||||
os.path.join(CURRENT_DIR, "%s.po" % lang),
|
||||
"-o",
|
||||
os.path.join(LOCALE_DIR, lang, "LC_MESSAGES", "%s.mo" % DOMAIN),
|
||||
)
|
||||
|
||||
print(" ".join(cmd))
|
||||
process = subprocess.Popen(cmd)
|
||||
process.wait()
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("\n\n *** Running %r *** \n" % __file__)
|
||||
main()
|
||||
|
210
po/update_msg.py
Normal file
210
po/update_msg.py
Normal file
@ -0,0 +1,210 @@
|
||||
# $Id$
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
# Write out messages.txt from blender
|
||||
|
||||
# Execite:
|
||||
# blender --background --python po/update_msg.py
|
||||
|
||||
import os
|
||||
|
||||
CURRENT_DIR = os.path.dirname(__file__)
|
||||
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.join(CURRENT_DIR, "..")))
|
||||
|
||||
FILE_NAME_MESSAGES = os.path.join(CURRENT_DIR, "messages.txt")
|
||||
|
||||
|
||||
def dump_messages_rna(messages):
|
||||
import bpy
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Function definitions
|
||||
|
||||
def walkProperties(properties):
|
||||
import bpy
|
||||
for prop in properties:
|
||||
messages.add(prop.name)
|
||||
messages.add(prop.description)
|
||||
|
||||
if isinstance(prop, bpy.types.EnumProperty):
|
||||
for item in prop.enum_items:
|
||||
messages.add(item.name)
|
||||
messages.add(item.description)
|
||||
|
||||
def walkRNA(bl_rna):
|
||||
if bl_rna.name and bl_rna.name != bl_rna.identifier:
|
||||
messages.add(bl_rna.name)
|
||||
|
||||
if bl_rna.description:
|
||||
messages.add(bl_rna.description)
|
||||
|
||||
walkProperties(bl_rna.properties)
|
||||
|
||||
def walkClass(cls):
|
||||
walkRNA(cls.bl_rna)
|
||||
|
||||
def walk_keymap_hierarchy(hier):
|
||||
for lvl in hier:
|
||||
messages.add(lvl[0])
|
||||
|
||||
if lvl[3]:
|
||||
walk_keymap_hierarchy(lvl[3])
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Dump Messages
|
||||
|
||||
for cls in type(bpy.context).__base__.__subclasses__():
|
||||
walkClass(cls)
|
||||
|
||||
for cls in bpy.types.Space.__subclasses__():
|
||||
walkClass(cls)
|
||||
|
||||
for cls in bpy.types.Operator.__subclasses__():
|
||||
walkClass(cls)
|
||||
|
||||
from bl_ui.space_userpref_keymap import KM_HIERARCHY
|
||||
|
||||
walk_keymap_hierarchy(KM_HIERARCHY)
|
||||
|
||||
|
||||
## XXX. what is this supposed to do, we wrote the file already???
|
||||
#_walkClass(bpy.types.SpaceDopeSheetEditor)
|
||||
|
||||
|
||||
def dump_messages_pytext(messages):
|
||||
""" dumps text inlined in the python user interface: eg.
|
||||
|
||||
layout.prop("someprop", text="My Name")
|
||||
"""
|
||||
import ast
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Gather function names
|
||||
|
||||
import bpy
|
||||
# key: func_id
|
||||
# val: [(arg_kw, arg_pos), (arg_kw, arg_pos), ...]
|
||||
func_translate_args = {}
|
||||
|
||||
# so far only 'text' keywords, but we may want others translated later
|
||||
translate_kw = ("text", )
|
||||
|
||||
for func_id, func in bpy.types.UILayout.bl_rna.functions.items():
|
||||
# check it has a 'text' argument
|
||||
for (arg_pos, (arg_kw, arg)) in enumerate(func.parameters.items()):
|
||||
if ((arg_kw in translate_kw) and
|
||||
(arg.is_output == False) and
|
||||
(arg.type == 'STRING')):
|
||||
|
||||
func_translate_args.setdefault(func_id, []).append((arg_kw,
|
||||
arg_pos))
|
||||
# print(func_translate_args)
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Function definitions
|
||||
|
||||
def extract_strings(fp, node_container):
|
||||
""" Recursively get strings, needed incase we have "Blah" + "Blah",
|
||||
passed as an argument in that case it wont evaluate to a string.
|
||||
"""
|
||||
for node in ast.walk(node_container):
|
||||
if type(node) == ast.Str:
|
||||
eval_str = ast.literal_eval(node)
|
||||
if eval_str:
|
||||
# print("%s:%d: %s" % (fp, node.lineno, eval_str)) # testing
|
||||
messages.add(eval_str)
|
||||
|
||||
def extract_strings_from_file(fn):
|
||||
filedata = open(fn, 'r', encoding="utf8")
|
||||
root_node = ast.parse(filedata.read(), fn, 'exec')
|
||||
filedata.close()
|
||||
|
||||
for node in ast.walk(root_node):
|
||||
if type(node) == ast.Call:
|
||||
# print("found function at")
|
||||
# print("%s:%d" % (fn, node.lineno))
|
||||
|
||||
# lambda's
|
||||
if type(node.func) == ast.Name:
|
||||
continue
|
||||
|
||||
# getattr(self, con.type)(context, box, con)
|
||||
if not hasattr(node.func, "attr"):
|
||||
continue
|
||||
|
||||
translate_args = func_translate_args.get(node.func.attr, ())
|
||||
|
||||
# do nothing if not found
|
||||
for arg_kw, arg_pos in translate_args:
|
||||
if arg_pos < len(node.args):
|
||||
extract_strings(fn, node.args[arg_pos])
|
||||
else:
|
||||
for kw in node.keywords:
|
||||
if kw.arg == arg_kw:
|
||||
extract_strings(fn, kw.value)
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Dump Messages
|
||||
|
||||
mod_dir = os.path.join(SOURCE_DIR, "release", "scripts", "startup", "bl_ui")
|
||||
|
||||
files = [os.path.join(mod_dir, f)
|
||||
for f in os.listdir(mod_dir)
|
||||
if not f.startswith("_")
|
||||
if f.endswith("py")
|
||||
]
|
||||
|
||||
for fn in files:
|
||||
extract_strings_from_file(fn)
|
||||
|
||||
|
||||
def dump_messages():
|
||||
messages = {""}
|
||||
|
||||
# get strings from RNA
|
||||
dump_messages_rna(messages)
|
||||
|
||||
# get strings from UI layout definitions text="..." args
|
||||
dump_messages_pytext(messages)
|
||||
|
||||
messages.remove("")
|
||||
|
||||
message_file = open(FILE_NAME_MESSAGES, 'w', encoding="utf8")
|
||||
message_file.writelines("\n".join(sorted(messages)))
|
||||
message_file.close()
|
||||
|
||||
print("Written %d messages to: %r" % (len(messages), FILE_NAME_MESSAGES))
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
try:
|
||||
import bpy
|
||||
except ImportError:
|
||||
print("This script must run from inside blender")
|
||||
return
|
||||
|
||||
dump_messages()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("\n\n *** Running %r *** \n" % __file__)
|
||||
main()
|
@ -1,17 +1,53 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
|
||||
# $Id$
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
# update all po files in the LANGS
|
||||
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
PO_DIR = "."
|
||||
CURRENT_DIR = os.path.dirname(__file__)
|
||||
DOMAIN = "blender"
|
||||
|
||||
for po in os.listdir( PO_DIR ):
|
||||
if po.endswith(".po"):
|
||||
lang = po[:-3]
|
||||
# update po file
|
||||
cmd = "msgmerge --update --lang=%s %s.po %s.pot" % (lang, lang, DOMAIN)
|
||||
print(cmd)
|
||||
os.system( cmd )
|
||||
|
||||
|
||||
def main():
|
||||
for po in os.listdir(CURRENT_DIR):
|
||||
if po.endswith(".po"):
|
||||
lang = po[:-3]
|
||||
|
||||
# update po file
|
||||
cmd = ("msgmerge",
|
||||
"--update",
|
||||
"--lang=%s" % lang,
|
||||
os.path.join(CURRENT_DIR, "%s.po" % lang),
|
||||
os.path.join(CURRENT_DIR, "%s.pot" % DOMAIN),
|
||||
)
|
||||
|
||||
print(" ".join(cmd))
|
||||
process = subprocess.Popen(cmd)
|
||||
process.wait()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("\n\n *** Running %r *** \n" % __file__)
|
||||
main()
|
||||
|
119
po/update_pot.py
119
po/update_pot.py
@ -1,50 +1,61 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
|
||||
# $Id$
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
# update the pot file according the POTFILES.in
|
||||
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
GETTEXT_XGETTEXT_EXECUTABLE="xgettext"
|
||||
SOURCE_DIR=".."
|
||||
DOMAIN="blender"
|
||||
GETTEXT_XGETTEXT_EXECUTABLE = "xgettext"
|
||||
CURRENT_DIR = os.path.dirname(__file__)
|
||||
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.join(CURRENT_DIR, "..")))
|
||||
DOMAIN = "blender"
|
||||
|
||||
cmd = "%s --files-from=%s/po/POTFILES.in --keyword=_ --keyword=N_ --directory=%s --output=%s/po/%s.pot --from-code=utf-8" % (
|
||||
GETTEXT_XGETTEXT_EXECUTABLE, SOURCE_DIR, SOURCE_DIR, SOURCE_DIR, DOMAIN)
|
||||
FILE_NAME_POT = os.path.join(CURRENT_DIR, "blender.pot")
|
||||
FILE_NAME_MESSAGES = os.path.join(CURRENT_DIR, "messages.txt")
|
||||
|
||||
os.system( cmd )
|
||||
|
||||
def stripeol(s):
|
||||
if line.endswith("\n"):
|
||||
s = s[:-1]
|
||||
def main():
|
||||
cmd = (GETTEXT_XGETTEXT_EXECUTABLE,
|
||||
"--files-from=%s" % os.path.join(SOURCE_DIR, "po", "POTFILES.in"),
|
||||
"--keyword=_",
|
||||
"--keyword=N_",
|
||||
"--directory=%s" % SOURCE_DIR,
|
||||
"--output=%s" % os.path.join(SOURCE_DIR, "po", "%s.pot" % DOMAIN),
|
||||
"--from-code=utf-8",
|
||||
)
|
||||
|
||||
if line.endswith("\r"):
|
||||
s = s[:-1]
|
||||
print(" ".join(cmd))
|
||||
process = subprocess.Popen(cmd)
|
||||
process.wait()
|
||||
|
||||
return s
|
||||
def stripeol(s):
|
||||
return s.rstrip("\n\r")
|
||||
|
||||
pot_messages = {}
|
||||
reading_message = False
|
||||
message = ""
|
||||
with open("blender.pot", 'r') as handle:
|
||||
while True:
|
||||
line = handle.readline()
|
||||
|
||||
if not line:
|
||||
break
|
||||
|
||||
line = stripeol(line)
|
||||
if line.startswith("msgid"):
|
||||
reading_message = True
|
||||
message = line[7:-1]
|
||||
elif line.startswith("msgstr"):
|
||||
reading_message = False
|
||||
pot_messages[message] = True
|
||||
elif reading_message:
|
||||
message += line[1:-1]
|
||||
|
||||
# add messages collected automatically from RNA
|
||||
with open("blender.pot", "a") as pot_handle:
|
||||
with open("messages.txt", 'r') as handle:
|
||||
pot_messages = {}
|
||||
reading_message = False
|
||||
message = ""
|
||||
with open(FILE_NAME_POT, 'r') as handle:
|
||||
while True:
|
||||
line = handle.readline()
|
||||
|
||||
@ -52,10 +63,34 @@ with open("blender.pot", "a") as pot_handle:
|
||||
break
|
||||
|
||||
line = stripeol(line)
|
||||
line = line.replace("\\", "\\\\")
|
||||
line = line.replace("\"", "\\\"")
|
||||
if line.startswith("msgid"):
|
||||
reading_message = True
|
||||
message = line[7:-1]
|
||||
elif line.startswith("msgstr"):
|
||||
reading_message = False
|
||||
pot_messages[message] = True
|
||||
elif reading_message:
|
||||
message += line[1:-1]
|
||||
|
||||
if not pot_messages.get(line):
|
||||
pot_handle.write("\n#: Automatically collected from RNA\n")
|
||||
pot_handle.write("msgid \"%s\"\n" % (line))
|
||||
pot_handle.write("msgstr \"\"\n")
|
||||
# add messages collected automatically from RNA
|
||||
with open(FILE_NAME_POT, "a") as pot_handle:
|
||||
with open(FILE_NAME_MESSAGES, 'r') as handle:
|
||||
while True:
|
||||
line = handle.readline()
|
||||
|
||||
if not line:
|
||||
break
|
||||
|
||||
line = stripeol(line)
|
||||
line = line.replace("\\", "\\\\")
|
||||
line = line.replace("\"", "\\\"")
|
||||
|
||||
if not pot_messages.get(line):
|
||||
pot_handle.write("\n#: Automatically collected from RNA\n")
|
||||
pot_handle.write("msgid \"%s\"\n" % (line))
|
||||
pot_handle.write("msgstr \"\"\n")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("\n\n *** Running %r *** \n" % __file__)
|
||||
main()
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1,34 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
|
||||
# All rights reserved.
|
||||
#
|
||||
# The Original Code is: all of this file.
|
||||
#
|
||||
# Contributor(s): none yet.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
#
|
||||
# OS specific stuff for the package, only to be executed by ../Makefile
|
||||
#
|
||||
|
||||
# Add icon to package
|
||||
cp -f extra/blender.icon $DISTDIR/
|
@ -1144,67 +1144,6 @@ class WM_OT_sysinfo(Operator):
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
class WM_OT_get_messages(Operator):
|
||||
bl_idname = "wm.get_messages"
|
||||
bl_label = "Get Messages"
|
||||
|
||||
def _putMessage(self, messages, msg):
|
||||
if len(msg):
|
||||
messages[msg] = True
|
||||
|
||||
def _walkProperties(self, properties, messages):
|
||||
for prop in properties:
|
||||
self._putMessage(messages, prop.name)
|
||||
self._putMessage(messages, prop.description)
|
||||
|
||||
if isinstance(prop, bpy.types.EnumProperty):
|
||||
for item in prop.enum_items:
|
||||
self._putMessage(messages, item.name)
|
||||
self._putMessage(messages, item.description)
|
||||
|
||||
def _walkRNA(self, bl_rna, messages):
|
||||
if bl_rna.name and bl_rna.name != bl_rna.identifier:
|
||||
self._putMessage(messages, bl_rna.name)
|
||||
|
||||
if bl_rna.description:
|
||||
self._putMessage(messages, bl_rna.description)
|
||||
|
||||
self._walkProperties(bl_rna.properties, messages)
|
||||
|
||||
def _walkClass(self, cls, messages):
|
||||
self._walkRNA(cls.bl_rna, messages)
|
||||
|
||||
def _walk_keymap_hierarchy(self, hier, messages):
|
||||
for lvl in hier:
|
||||
self._putMessage(messages, lvl[0])
|
||||
|
||||
if lvl[3]:
|
||||
self._walk_keymap_hierarchy(lvl[3], messages)
|
||||
|
||||
def execute(self, context):
|
||||
messages = {}
|
||||
|
||||
for cls in type(bpy.context).__base__.__subclasses__():
|
||||
self._walkClass(cls, messages)
|
||||
|
||||
for cls in bpy.types.Space.__subclasses__():
|
||||
self._walkClass(cls, messages)
|
||||
|
||||
for cls in bpy.types.Operator.__subclasses__():
|
||||
self._walkClass(cls, messages)
|
||||
|
||||
from bl_ui.space_userpref_keymap import KM_HIERARCHY
|
||||
|
||||
self._walk_keymap_hierarchy(KM_HIERARCHY, messages)
|
||||
|
||||
text = bpy.data.texts.new(name="messages.txt")
|
||||
for message in messages:
|
||||
text.write(message + "\n")
|
||||
self._walkClass(bpy.types.SpaceDopeSheetEditor, messages)
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
class WM_OT_copy_prev_settings(Operator):
|
||||
'''Copy settings from previous version'''
|
||||
bl_idname = "wm.copy_prev_settings"
|
||||
|
@ -25,6 +25,7 @@
|
||||
# dont register these classes since they are only helpers.
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
class MotionPathButtonsPanel():
|
||||
bl_space_type = 'PROPERTIES'
|
||||
bl_region_type = 'WINDOW'
|
||||
|
@ -22,6 +22,7 @@ from bpy.types import Panel, Menu
|
||||
from rna_prop_ui import PropertyPanel
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
class ArmatureButtonsPanel():
|
||||
bl_space_type = 'PROPERTIES'
|
||||
bl_region_type = 'WINDOW'
|
||||
|
@ -23,6 +23,7 @@ from bpy.types import Panel
|
||||
from rna_prop_ui import PropertyPanel
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
class BoneButtonsPanel():
|
||||
bl_space_type = 'PROPERTIES'
|
||||
bl_region_type = 'WINDOW'
|
||||
|
@ -22,6 +22,7 @@ from bpy.types import Panel
|
||||
from rna_prop_ui import PropertyPanel
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
class CameraButtonsPanel():
|
||||
bl_space_type = 'PROPERTIES'
|
||||
bl_region_type = 'WINDOW'
|
||||
|
@ -22,6 +22,7 @@ from bpy.types import Panel
|
||||
from rna_prop_ui import PropertyPanel
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
class CurveButtonsPanel():
|
||||
bl_space_type = 'PROPERTIES'
|
||||
bl_region_type = 'WINDOW'
|
||||
|
@ -21,6 +21,7 @@ import bpy
|
||||
from bpy.types import Panel
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
class DataButtonsPanel():
|
||||
bl_space_type = 'PROPERTIES'
|
||||
bl_region_type = 'WINDOW'
|
||||
|
@ -22,6 +22,7 @@ from bpy.types import Menu, Panel
|
||||
from rna_prop_ui import PropertyPanel
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
class LAMP_MT_sunsky_presets(Menu):
|
||||
bl_label = _("Sun & Sky Presets")
|
||||
preset_subdir = "sunsky"
|
||||
|
@ -22,6 +22,7 @@ from bpy.types import Menu, Panel
|
||||
from rna_prop_ui import PropertyPanel
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
class MESH_MT_vertex_group_specials(Menu):
|
||||
bl_label = _("Vertex Group Specials")
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
|
@ -22,6 +22,7 @@ from bpy.types import Panel
|
||||
from rna_prop_ui import PropertyPanel
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
class DataButtonsPanel():
|
||||
bl_space_type = 'PROPERTIES'
|
||||
bl_region_type = 'WINDOW'
|
||||
|
@ -21,6 +21,7 @@ import bpy
|
||||
from bpy.types import Panel
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
class ModifierButtonsPanel():
|
||||
bl_space_type = 'PROPERTIES'
|
||||
bl_region_type = 'WINDOW'
|
||||
@ -207,7 +208,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
|
||||
|
||||
def DECIMATE(self, layout, ob, md):
|
||||
layout.prop(md, "ratio")
|
||||
layout.label(text=_("Face Count")+": %s" % str(md.face_count))
|
||||
layout.label(text=_("Face Count") + ": %d" % md.face_count)
|
||||
|
||||
def DISPLACE(self, layout, ob, md):
|
||||
split = layout.split()
|
||||
|
@ -21,6 +21,7 @@ import bpy
|
||||
from bpy.types import Panel
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
class PhysicsButtonsPanel():
|
||||
bl_space_type = 'PROPERTIES'
|
||||
bl_region_type = 'WINDOW'
|
||||
|
@ -22,6 +22,7 @@ from bpy.types import Menu, Panel
|
||||
from rna_prop_ui import PropertyPanel
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
def active_node_mat(mat):
|
||||
# TODO, 2.4x has a pipeline section, for 2.5 we need to communicate
|
||||
# which settings from node-materials are used
|
||||
@ -618,7 +619,7 @@ class MATERIAL_PT_game_settings(MaterialButtonsPanel, bpy.types.Panel):
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return context.material and (context.scene.render.engine in cls.COMPAT_ENGINES)
|
||||
return context.material and (context.scene.render.engine in cls.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
@ -633,13 +634,14 @@ class MATERIAL_PT_game_settings(MaterialButtonsPanel, bpy.types.Panel):
|
||||
row.label(text="Alpha Blend:")
|
||||
row.label(text="Face Orientation:")
|
||||
row = layout.row()
|
||||
row.prop(game,"alpha_blend",text="")
|
||||
row.prop(game,"face_orientation",text="")
|
||||
row.prop(game, "alpha_blend", text="")
|
||||
row.prop(game, "face_orientation", text="")
|
||||
|
||||
|
||||
class MATERIAL_PT_physics(MaterialButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Physics"
|
||||
COMPAT_ENGINES = {'BLENDER_GAME'}
|
||||
|
||||
|
||||
def draw_header(self, context):
|
||||
game = context.material.game_settings
|
||||
self.layout.prop(game, "physics", text="")
|
||||
|
@ -22,6 +22,7 @@ from bpy.types import Panel
|
||||
from rna_prop_ui import PropertyPanel
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
class ObjectButtonsPanel():
|
||||
bl_space_type = 'PROPERTIES'
|
||||
bl_region_type = 'WINDOW'
|
||||
|
@ -21,6 +21,7 @@ import bpy
|
||||
from bpy.types import Panel
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
class ConstraintButtonsPanel():
|
||||
bl_space_type = 'PROPERTIES'
|
||||
bl_region_type = 'WINDOW'
|
||||
@ -754,7 +755,7 @@ class ConstraintButtonsPanel():
|
||||
col.prop(con, "rotation_range", text=_("Pivot When"))
|
||||
|
||||
def SCRIPT(self, context, layout, con):
|
||||
layout.label( _("Blender 2.5 has no py-constraints") )
|
||||
layout.label(_("Blender 2.5 has no py-constraints"))
|
||||
|
||||
|
||||
class OBJECT_PT_constraints(ConstraintButtonsPanel, Panel):
|
||||
|
@ -22,6 +22,7 @@ import bpy
|
||||
from bpy.types import Panel
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
class PhysicButtonsPanel():
|
||||
bl_space_type = 'PROPERTIES'
|
||||
bl_region_type = 'WINDOW'
|
||||
|
@ -21,6 +21,7 @@ import bpy
|
||||
from bpy.types import Panel
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
class PhysicButtonsPanel():
|
||||
bl_space_type = 'PROPERTIES'
|
||||
bl_region_type = 'WINDOW'
|
||||
@ -58,7 +59,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
|
||||
layout.active = fluid.use
|
||||
|
||||
if fluid.type == 'DOMAIN':
|
||||
layout.operator("fluid.bake", text=_("Bake (Req. Memory:")+" %s)" % fluid.memory_estimate, icon='MOD_FLUIDSIM')
|
||||
layout.operator("fluid.bake", text=_("Bake (Req. Memory:") + " %s)" % fluid.memory_estimate, icon='MOD_FLUIDSIM')
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
|
@ -22,6 +22,7 @@ from bpy.types import Operator, Panel
|
||||
from rna_prop_ui import PropertyPanel
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
class SceneButtonsPanel():
|
||||
bl_space_type = 'PROPERTIES'
|
||||
bl_region_type = 'WINDOW'
|
||||
|
@ -372,13 +372,13 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel, Panel):
|
||||
|
||||
col = layout.column(align=True)
|
||||
row = col.row()
|
||||
row.label(text=_("Final Length")+": %s" % bpy.utils.smpte_from_frame(strip.frame_final_duration))
|
||||
row.label(text=_("Final Length") + ": %s" % bpy.utils.smpte_from_frame(strip.frame_final_duration))
|
||||
row = col.row()
|
||||
row.active = (frame_current >= strip.frame_start and frame_current <= strip.frame_start + strip.frame_duration)
|
||||
row.label(text=_("Playhead")+": %d" % (frame_current - strip.frame_start))
|
||||
row.label(text=_("Playhead") + ": %d" % (frame_current - strip.frame_start))
|
||||
|
||||
col.label(text=_("Frame Offset")+" %d:%d" % (strip.frame_offset_start, strip.frame_offset_end))
|
||||
col.label(text=_("Frame Still")+" %d:%d" % (strip.frame_still_start, strip.frame_still_end))
|
||||
col.label(text=_("Frame Offset") + " %d:%d" % (strip.frame_offset_start, strip.frame_offset_end))
|
||||
col.label(text=_("Frame Still") + " %d:%d" % (strip.frame_still_start, strip.frame_still_end))
|
||||
|
||||
elem = False
|
||||
|
||||
@ -388,7 +388,7 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel, Panel):
|
||||
elem = strip.elements[0]
|
||||
|
||||
if elem and elem.orig_width > 0 and elem.orig_height > 0:
|
||||
col.label(text=_("Orig Dim")+": %dx%d" % (elem.orig_width, elem.orig_height))
|
||||
col.label(text=_("Orig Dim") + ": %dx%d" % (elem.orig_width, elem.orig_height))
|
||||
else:
|
||||
col.label(text=_("Orig Dim: None"))
|
||||
|
||||
@ -690,7 +690,7 @@ class SEQUENCER_PT_scene(SequencerButtonsPanel, Panel):
|
||||
if scene:
|
||||
sta = scene.frame_start
|
||||
end = scene.frame_end
|
||||
layout.label(text=_("Original frame range")+": %d-%d (%d)" % (sta, end, end - sta + 1))
|
||||
layout.label(text=_("Original frame range") + ": %d-%d (%d)" % (sta, end, end - sta + 1))
|
||||
|
||||
|
||||
class SEQUENCER_PT_filter(SequencerButtonsPanel, Panel):
|
||||
|
@ -67,9 +67,9 @@ class TEXT_HT_header(Header):
|
||||
row = layout.row()
|
||||
if text.filepath:
|
||||
if text.is_dirty:
|
||||
row.label(text=_("File")+": *%r " % text.filepath+_("(unsaved)"))
|
||||
row.label(text=_("File") + ": *%r " % text.filepath + _("(unsaved)"))
|
||||
else:
|
||||
row.label(text=_("File")+": %r" % text.filepath)
|
||||
row.label(text=_("File") + ": %r" % text.filepath)
|
||||
else:
|
||||
row.label(text=_("Text: External")
|
||||
if text.library
|
||||
|
@ -650,7 +650,7 @@ class USERPREF_PT_theme(Panel):
|
||||
col = split.column()
|
||||
|
||||
for i, ui in enumerate(theme.bone_color_sets):
|
||||
col.label(text=_("Color Set")+" %d:" % (i + 1)) # i starts from 0
|
||||
col.label(text=_("Color Set") + " %d:" % (i + 1)) # i starts from 0
|
||||
|
||||
row = col.row()
|
||||
|
||||
|
@ -202,7 +202,7 @@ class InputKeyMapPanel:
|
||||
subcol = self.indented_layout(col, level + 1)
|
||||
subrow = subcol.row()
|
||||
subrow.prop(km, "show_expanded_items", text="", emboss=False)
|
||||
subrow.label(text="%s " % _(km.name) + _("(Global)") )
|
||||
subrow.label(text="%s " % _(km.name) + _("(Global)"))
|
||||
else:
|
||||
km.show_expanded_items = True
|
||||
|
||||
|
@ -47,6 +47,8 @@ int BLF_load_mem(const char *name, unsigned char *mem, int mem_size);
|
||||
int BLF_load_unique(const char *name);
|
||||
int BLF_load_mem_unique(const char *name, unsigned char *mem, int mem_size);
|
||||
|
||||
void BLF_unload(const char *name);
|
||||
|
||||
/* Attach a file with metrics information from memory. */
|
||||
void BLF_metrics_attach(int fontid, unsigned char *mem, int mem_size);
|
||||
|
||||
|
@ -61,10 +61,7 @@
|
||||
#define BLF_MAX_FONT 16
|
||||
|
||||
/* Font array. */
|
||||
static FontBLF *global_font[BLF_MAX_FONT];
|
||||
|
||||
/* Number of font. */
|
||||
static int global_font_num= 0;
|
||||
static FontBLF *global_font[BLF_MAX_FONT] = {0};
|
||||
|
||||
/* Default size and dpi, for BLF_draw_default. */
|
||||
static int global_font_default= -1;
|
||||
@ -99,10 +96,12 @@ void BLF_exit(void)
|
||||
FontBLF *font;
|
||||
int i;
|
||||
|
||||
for (i= 0; i < global_font_num; i++) {
|
||||
for (i= 0; i < BLF_MAX_FONT; i++) {
|
||||
font= global_font[i];
|
||||
if (font)
|
||||
if (font) {
|
||||
blf_font_free(font);
|
||||
global_font[i]= NULL;
|
||||
}
|
||||
}
|
||||
|
||||
blf_font_exit();
|
||||
@ -113,7 +112,7 @@ void BLF_cache_clear(void)
|
||||
FontBLF *font;
|
||||
int i;
|
||||
|
||||
for (i= 0; i < global_font_num; i++) {
|
||||
for (i= 0; i < BLF_MAX_FONT; i++) {
|
||||
font= global_font[i];
|
||||
if (font)
|
||||
blf_glyph_cache_clear(font);
|
||||
@ -130,6 +129,18 @@ static int blf_search(const char *name)
|
||||
if (font && (!strcmp(font->name, name)))
|
||||
return i;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int blf_search_available(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i= 0; i < BLF_MAX_FONT; i++)
|
||||
if(!global_font[i])
|
||||
return i;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -149,7 +160,8 @@ int BLF_load(const char *name)
|
||||
return i;
|
||||
}
|
||||
|
||||
if (global_font_num+1 >= BLF_MAX_FONT) {
|
||||
i = blf_search_available();
|
||||
if (i == -1) {
|
||||
printf("Too many fonts!!!\n");
|
||||
return -1;
|
||||
}
|
||||
@ -168,9 +180,7 @@ int BLF_load(const char *name)
|
||||
return -1;
|
||||
}
|
||||
|
||||
global_font[global_font_num]= font;
|
||||
i= global_font_num;
|
||||
global_font_num++;
|
||||
global_font[i]= font;
|
||||
return i;
|
||||
}
|
||||
|
||||
@ -186,7 +196,8 @@ int BLF_load_unique(const char *name)
|
||||
/* Don't search in the cache!! make a new
|
||||
* object font, this is for keep fonts threads safe.
|
||||
*/
|
||||
if (global_font_num+1 >= BLF_MAX_FONT) {
|
||||
i = blf_search_available();
|
||||
if (i == -1) {
|
||||
printf("Too many fonts!!!\n");
|
||||
return -1;
|
||||
}
|
||||
@ -205,9 +216,7 @@ int BLF_load_unique(const char *name)
|
||||
return -1;
|
||||
}
|
||||
|
||||
global_font[global_font_num]= font;
|
||||
i= global_font_num;
|
||||
global_font_num++;
|
||||
global_font[i]= font;
|
||||
return i;
|
||||
}
|
||||
|
||||
@ -234,7 +243,8 @@ int BLF_load_mem(const char *name, unsigned char *mem, int mem_size)
|
||||
return i;
|
||||
}
|
||||
|
||||
if (global_font_num+1 >= BLF_MAX_FONT) {
|
||||
i = blf_search_available();
|
||||
if (i == -1) {
|
||||
printf("Too many fonts!!!\n");
|
||||
return -1;
|
||||
}
|
||||
@ -250,9 +260,7 @@ int BLF_load_mem(const char *name, unsigned char *mem, int mem_size)
|
||||
return -1;
|
||||
}
|
||||
|
||||
global_font[global_font_num]= font;
|
||||
i= global_font_num;
|
||||
global_font_num++;
|
||||
global_font[i]= font;
|
||||
return i;
|
||||
}
|
||||
|
||||
@ -268,7 +276,8 @@ int BLF_load_mem_unique(const char *name, unsigned char *mem, int mem_size)
|
||||
* Don't search in the cache, make a new object font!
|
||||
* this is to keep the font thread safe.
|
||||
*/
|
||||
if (global_font_num+1 >= BLF_MAX_FONT) {
|
||||
i = blf_search_available();
|
||||
if (i == -1) {
|
||||
printf("Too many fonts!!!\n");
|
||||
return -1;
|
||||
}
|
||||
@ -284,12 +293,25 @@ int BLF_load_mem_unique(const char *name, unsigned char *mem, int mem_size)
|
||||
return -1;
|
||||
}
|
||||
|
||||
global_font[global_font_num]= font;
|
||||
i= global_font_num;
|
||||
global_font_num++;
|
||||
global_font[i]= font;
|
||||
return i;
|
||||
}
|
||||
|
||||
void BLF_unload(const char *name)
|
||||
{
|
||||
FontBLF *font;
|
||||
int i;
|
||||
|
||||
for (i= 0; i < BLF_MAX_FONT; i++) {
|
||||
font= global_font[i];
|
||||
|
||||
if (font && (!strcmp(font->name, name))) {
|
||||
blf_font_free(font);
|
||||
global_font[i]= NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BLF_enable(int fontid, int option)
|
||||
{
|
||||
FontBLF *font= BLF_get(fontid);
|
||||
|
@ -81,8 +81,8 @@ static const char *locales[] = {
|
||||
"catalan", "ca_AD",
|
||||
"czech", "cs_CZ",
|
||||
"ptb", "pt_BR",
|
||||
"chs", "zh_CN",
|
||||
"cht", "zh_TW",
|
||||
"Chinese (Simplified)_China.1252", "zh_CN",
|
||||
"Chinese (Traditional)_China.1252", "zh_TW",
|
||||
"russian", "ru_RU",
|
||||
"croatian", "hr_HR",
|
||||
"serbian", "sr_RS",
|
||||
@ -115,7 +115,7 @@ void BLF_lang_set(const char *str)
|
||||
char *locreturn;
|
||||
const char *short_locale;
|
||||
int ok= 1;
|
||||
#if defined (_WIN32)
|
||||
#if defined (_WIN32) && !defined(FREE_WINDOWS)
|
||||
char *long_locale = locales[ 2 * U.language];
|
||||
#endif
|
||||
|
||||
@ -127,7 +127,7 @@ void BLF_lang_set(const char *str)
|
||||
else
|
||||
short_locale = locales[ 2 * U.language + 1];
|
||||
|
||||
#if defined (_WIN32)
|
||||
#if defined (_WIN32) && !defined(FREE_WINDOWS)
|
||||
if(short_locale) {
|
||||
char *envStr;
|
||||
|
||||
|
@ -41,8 +41,6 @@ struct rctf;
|
||||
|
||||
#if defined _WIN32
|
||||
# define DO_INLINE __inline
|
||||
#elif defined (__sgi)
|
||||
# define DO_INLINE
|
||||
#elif defined (__sun) || defined (__sun__)
|
||||
# define DO_INLINE
|
||||
#else
|
||||
|
@ -61,4 +61,5 @@ int polyIsConvex(const unsigned short* p, const int vertsPerPoly, const float* v
|
||||
int polyFindVertex(const unsigned short* p, const int vertsPerPoly, unsigned short vertexIdx);
|
||||
float distPointToSegmentSq(const float* point, const float* a, const float* b);
|
||||
|
||||
|
||||
#endif //NAVMESH_CONVERSION_H
|
||||
|
@ -2278,7 +2278,7 @@ void DM_set_object_boundbox(Object *ob, DerivedMesh *dm)
|
||||
dm->getMinMax(dm, min, max);
|
||||
|
||||
if(!ob->bb)
|
||||
ob->bb= MEM_callocN(sizeof(BoundBox), "bb");
|
||||
ob->bb= MEM_callocN(sizeof(BoundBox), "DM-BoundBox");
|
||||
|
||||
boundbox_set_from_min_max(ob->bb, min, max);
|
||||
}
|
||||
|
@ -37,16 +37,17 @@
|
||||
#include "BKE_navmesh_conversion.h"
|
||||
#include "BKE_cdderivedmesh.h"
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
#include "BLI_math.h"
|
||||
|
||||
#include "recast-capi.h"
|
||||
|
||||
inline float area2(const float* a, const float* b, const float* c)
|
||||
BM_INLINE float area2(const float* a, const float* b, const float* c)
|
||||
{
|
||||
return (b[0] - a[0]) * (c[2] - a[2]) - (c[0] - a[0]) * (b[2] - a[2]);
|
||||
}
|
||||
|
||||
inline int left(const float* a, const float* b, const float* c)
|
||||
BM_INLINE int left(const float* a, const float* b, const float* c)
|
||||
{
|
||||
return area2(a, b, c) < 0;
|
||||
}
|
||||
|
@ -2363,7 +2363,7 @@ BoundBox *unit_boundbox(void)
|
||||
BoundBox *bb;
|
||||
float min[3] = {-1.0f,-1.0f,-1.0f}, max[3] = {-1.0f,-1.0f,-1.0f};
|
||||
|
||||
bb= MEM_callocN(sizeof(BoundBox), "bb");
|
||||
bb= MEM_callocN(sizeof(BoundBox), "OB-BoundBox");
|
||||
boundbox_set_from_min_max(bb, min, max);
|
||||
|
||||
return bb;
|
||||
|
@ -1156,8 +1156,8 @@ char *BLI_get_folder_version(const int id, const int ver, const int do_check)
|
||||
|
||||
void BLI_setenv(const char *env, const char*val)
|
||||
{
|
||||
/* SGI or free windows */
|
||||
#if (defined(__sgi) || ((defined(WIN32) || defined(WIN64)) && defined(FREE_WINDOWS)))
|
||||
/* free windows */
|
||||
#if (defined(WIN32) || defined(WIN64)) && defined(FREE_WINDOWS)
|
||||
char *envstr= MEM_mallocN(sizeof(char) * (strlen(env) + strlen(val) + 2), "envstr"); /* one for = another for \0 */
|
||||
|
||||
sprintf(envstr, "%s=%s", env, val);
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include <time.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#if defined (__sun__) || defined (__sun) || defined (__sgi) || defined (__NetBSD__)
|
||||
#if defined (__sun__) || defined (__sun) || defined (__NetBSD__)
|
||||
#include <sys/statvfs.h> /* Other modern unix os's should probably use this also */
|
||||
#elif !defined(__FreeBSD__) && !defined(linux) && (defined(__sparc) || defined(__sparc__))
|
||||
#include <sys/statfs.h>
|
||||
@ -165,7 +165,7 @@ double BLI_diskfree(const char *dir)
|
||||
return (double) (freec*bytesps*sectorspc);
|
||||
#else
|
||||
|
||||
#if defined (__sun__) || defined (__sun) || defined (__sgi) || defined (__NetBSD__)
|
||||
#if defined (__sun__) || defined (__sun) || defined (__NetBSD__)
|
||||
struct statvfs disk;
|
||||
#else
|
||||
struct statfs disk;
|
||||
@ -187,7 +187,7 @@ double BLI_diskfree(const char *dir)
|
||||
if (statfs(name, &disk)) return(-1);
|
||||
#endif
|
||||
|
||||
#if defined (__sun__) || defined (__sun) || defined (__sgi) || defined (__NetBSD__)
|
||||
#if defined (__sun__) || defined (__sun) || defined (__NetBSD__)
|
||||
if (statvfs(name, &disk)) return(-1);
|
||||
#elif !defined(__FreeBSD__) && !defined(linux) && (defined(__sparc) || defined(__sparc__))
|
||||
/* WARNING - This may not be supported by geeneric unix os's - Campbell */
|
||||
|
@ -319,8 +319,6 @@ int BLI_system_thread_count( void )
|
||||
mib[1] = HW_NCPU;
|
||||
len = sizeof(t);
|
||||
sysctl(mib, 2, &t, &len, NULL, 0);
|
||||
# elif defined(__sgi)
|
||||
t = sysconf(_SC_NPROC_ONLN);
|
||||
# else
|
||||
t = (int)sysconf(_SC_NPROCESSORS_ONLN);
|
||||
# endif
|
||||
|
@ -99,7 +99,7 @@ unsigned long __attribute__((__stdcall__)) htonl(unsigned long);
|
||||
|
||||
#else
|
||||
|
||||
/* FreeBSD, Irix, Solaris */
|
||||
/* FreeBSD, Solaris */
|
||||
#include <sys/types.h>
|
||||
|
||||
#endif /* ifdef platform for types */
|
||||
@ -118,7 +118,7 @@ unsigned long __attribute__((__stdcall__)) htonl(unsigned long);
|
||||
#include <sys/param.h>
|
||||
#elif defined (__APPLE__)
|
||||
#include <sys/types.h>
|
||||
#else /* irix sun linux */
|
||||
#else /* sun linux */
|
||||
#include <netinet/in.h>
|
||||
#endif /* ifdef platform for htonl/ntohl */
|
||||
|
||||
|
@ -12290,7 +12290,7 @@ BlendFileData *blo_read_file_internal(FileData *fd, const char *filepath)
|
||||
BlendFileData *bfd;
|
||||
|
||||
bfd= MEM_callocN(sizeof(BlendFileData), "blendfiledata");
|
||||
bfd->main= MEM_callocN(sizeof(Main), "main");
|
||||
bfd->main= MEM_callocN(sizeof(Main), "readfile_Main");
|
||||
BLI_addtail(&fd->mainlist, bfd->main);
|
||||
|
||||
bfd->main->versionfile= fd->fileversion;
|
||||
|
@ -1227,8 +1227,8 @@ void POSE_OT_paste (wmOperatorType *ot)
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
|
||||
/* properties */
|
||||
RNA_def_boolean(ot->srna, "flipped", 0, "Flipped on X-Axis", "Paste the stored pose flipped on to current pose");
|
||||
RNA_def_boolean(ot->srna, "selected_mask", 1, "On Selected Only", "Only paste the stored pose on to selected bones in the current pose");
|
||||
RNA_def_boolean(ot->srna, "flipped", FALSE, "Flipped on X-Axis", "Paste the stored pose flipped on to current pose");
|
||||
RNA_def_boolean(ot->srna, "selected_mask", FALSE, "On Selected Only", "Only paste the stored pose on to selected bones in the current pose");
|
||||
}
|
||||
|
||||
/* ********************************************** */
|
||||
|
@ -610,6 +610,7 @@ void UI_remove_popup_handlers(struct ListBase *handlers, uiPopupBlockHandle *pop
|
||||
|
||||
void UI_init(void);
|
||||
void UI_init_userdef(void);
|
||||
void UI_reinit_font(void);
|
||||
void UI_exit(void);
|
||||
|
||||
/* Layout
|
||||
|
@ -3552,6 +3552,11 @@ void UI_init_userdef(void)
|
||||
uiStyleInit();
|
||||
}
|
||||
|
||||
void UI_reinit_font()
|
||||
{
|
||||
uiStyleInit();
|
||||
}
|
||||
|
||||
void UI_exit(void)
|
||||
{
|
||||
ui_resources_free();
|
||||
|
@ -323,13 +323,28 @@ void uiStyleInit(void)
|
||||
|
||||
if(font->uifont_id==UIFONT_DEFAULT) {
|
||||
#ifdef INTERNATIONAL
|
||||
int unifont_size;
|
||||
unsigned char *unifont_ttf= BLF_get_unifont(&unifont_size);
|
||||
int font_size= datatoc_bfont_ttf_size;
|
||||
unsigned char *font_ttf= (unsigned char*)datatoc_bfont_ttf;
|
||||
static int last_font_size = 0;
|
||||
|
||||
if(unifont_ttf)
|
||||
font->blf_id= BLF_load_mem_unique("default", unifont_ttf, unifont_size);
|
||||
else
|
||||
font->blf_id= BLF_load_mem("default", (unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size);
|
||||
/* use unicode font for translation */
|
||||
if(U.transopts & USER_DOTRANSLATE) {
|
||||
font_ttf= BLF_get_unifont(&font_size);
|
||||
|
||||
if(!font_ttf) {
|
||||
/* fall back if not found */
|
||||
font_size= datatoc_bfont_ttf_size;
|
||||
font_ttf= (unsigned char*)datatoc_bfont_ttf;
|
||||
}
|
||||
}
|
||||
|
||||
/* relload only if needed */
|
||||
if(last_font_size != font_size) {
|
||||
BLF_unload("default");
|
||||
last_font_size = font_size;
|
||||
}
|
||||
|
||||
font->blf_id= BLF_load_mem("default", font_ttf, font_size);
|
||||
#else
|
||||
font->blf_id= BLF_load_mem("default", (unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size);
|
||||
#endif
|
||||
|
@ -2488,7 +2488,7 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C)
|
||||
uiLayout *ui_abs;
|
||||
uiBlock *block;
|
||||
uiBut *but;
|
||||
uiStyle *style= U.uistyles.first;
|
||||
uiStyle *style= UI_GetStyle();
|
||||
int width;
|
||||
int icon=0;
|
||||
|
||||
|
@ -279,18 +279,7 @@ void setlinestyle(int nr)
|
||||
void set_inverted_drawing(int enable)
|
||||
{
|
||||
glLogicOp(enable?GL_INVERT:GL_COPY);
|
||||
|
||||
/* Use GL_BLEND_EQUATION_EXT on sgi (if we have it),
|
||||
* apparently GL_COLOR_LOGIC_OP doesn't work on O2?
|
||||
* Is this an sgi bug or our bug?
|
||||
*/
|
||||
#if defined(__sgi) && defined(GL_BLEND_EQUATION_EXT)
|
||||
glBlendEquationEXT(enable?GL_LOGIC_OP:GL_FUNC_ADD_EXT);
|
||||
glToggle(GL_BLEND, enable);
|
||||
#else
|
||||
glToggle(GL_COLOR_LOGIC_OP, enable);
|
||||
#endif
|
||||
|
||||
glToggle(GL_DITHER, !enable);
|
||||
}
|
||||
|
||||
|
@ -21,11 +21,11 @@
|
||||
|
||||
set(INC
|
||||
../include
|
||||
../interface
|
||||
../../blenfont
|
||||
../../blenkernel
|
||||
../../blenlib
|
||||
../../blenloader
|
||||
../../editors/interface
|
||||
../../makesdna
|
||||
../../makesrna
|
||||
../../windowmanager
|
||||
|
@ -129,7 +129,7 @@ static uiBlock *socket_component_menu(bContext *C, ARegion *ar, void *args_v)
|
||||
block= uiBeginBlock(C, ar, "socket menu", UI_EMBOSS);
|
||||
uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN);
|
||||
|
||||
layout= uiLayoutColumn(uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, args->x, args->y+2, args->width, NODE_DY, U.uistyles.first), 0);
|
||||
layout= uiLayoutColumn(uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, args->x, args->y+2, args->width, NODE_DY, UI_GetStyle()), 0);
|
||||
|
||||
uiItemR(layout, &args->ptr, "default_value", UI_ITEM_R_EXPAND, "", ICON_NONE);
|
||||
|
||||
@ -788,7 +788,7 @@ static void node_draw_group(const bContext *C, ARegion *ar, SpaceNode *snode, bN
|
||||
UI_ThemeColor(TH_TEXT_HI);
|
||||
|
||||
layout = uiBlockLayout(gnode->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, (short)(rect.xmin+15), (short)(rect.ymax+group_header),
|
||||
MIN2((int)(rect.xmax - rect.xmin-18.0f), node_group_frame+20), group_header, U.uistyles.first);
|
||||
MIN2((int)(rect.xmax - rect.xmin-18.0f), node_group_frame+20), group_header, UI_GetStyle());
|
||||
RNA_pointer_create(&ntree->id, &RNA_Node, gnode, &ptr);
|
||||
uiTemplateIDBrowse(layout, (bContext*)C, &ptr, "node_tree", NULL, NULL, NULL);
|
||||
uiBlockLayoutResolve(gnode->block, NULL, NULL);
|
||||
|
@ -3326,7 +3326,7 @@ static void UV_OT_cursor_set(wmOperatorType *ot)
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
|
||||
/* properties */
|
||||
RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, "Location", "Cursor location in 0.0-1.0 coordinates.", -10.0f, 10.0f);
|
||||
RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, "Location", "Cursor location in normalised (0.0-1.0) coordinates", -10.0f, 10.0f);
|
||||
}
|
||||
|
||||
/********************** set tile operator **********************/
|
||||
|
@ -862,7 +862,7 @@ static void correct_uv_aspect(BMEditMesh *em)
|
||||
static void uv_map_clip_correct_properties(wmOperatorType *ot)
|
||||
{
|
||||
RNA_def_boolean(ot->srna, "correct_aspect", 1, "Correct Aspect",
|
||||
"Map UV's taking image aspect ratio into account");
|
||||
"Map UVs taking image aspect ratio into account");
|
||||
RNA_def_boolean(ot->srna, "clip_to_bounds", 0, "Clip to Bounds",
|
||||
"Clip UV coordinates to bounds after unwrapping");
|
||||
RNA_def_boolean(ot->srna, "scale_to_bounds", 0, "Scale to Bounds",
|
||||
@ -1014,11 +1014,11 @@ void UV_OT_unwrap(wmOperatorType *ot)
|
||||
|
||||
/* properties */
|
||||
RNA_def_enum(ot->srna, "method", method_items, 0, "Method",
|
||||
"Unwrapping method. Angle Based usually gives better results than Conformal, while being somewhat slower");
|
||||
"Unwrapping method (Angle Based usually gives better results than Conformal, while being somewhat slower)");
|
||||
RNA_def_boolean(ot->srna, "fill_holes", 1, "Fill Holes",
|
||||
"Virtual fill holes in mesh before unwrapping, to better avoid overlaps and preserve symmetry");
|
||||
RNA_def_boolean(ot->srna, "correct_aspect", 1, "Correct Aspect",
|
||||
"Map UV's taking image aspect ratio into account");
|
||||
"Map UVs taking image aspect ratio into account");
|
||||
}
|
||||
|
||||
/**************** Project From View operator **************/
|
||||
|
@ -114,109 +114,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/****/
|
||||
|
||||
#ifdef __sgi
|
||||
|
||||
#include <dmedia/moviefile.h>
|
||||
|
||||
static void movie_printerror(char * str) {
|
||||
const char * errstr = mvGetErrorStr(mvGetErrno());
|
||||
|
||||
if (str) {
|
||||
if (errstr) printf("%s: %s\n", str, errstr);
|
||||
else printf("%s: returned error\n", str);
|
||||
} else printf("%s\n", errstr);
|
||||
}
|
||||
|
||||
static int startmovie(struct anim * anim) {
|
||||
if (anim == 0) return(-1);
|
||||
|
||||
if ( mvOpenFile (anim->name, O_BINARY|O_RDONLY, &anim->movie ) != DM_SUCCESS ) {
|
||||
printf("Can't open movie: %s\n", anim->name);
|
||||
return(-1);
|
||||
}
|
||||
if ( mvFindTrackByMedium (anim->movie, DM_IMAGE, &anim->track) != DM_SUCCESS ) {
|
||||
printf("No image track in movie: %s\n", anim->name);
|
||||
mvClose(anim->movie);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
anim->duration = mvGetTrackLength (anim->track);
|
||||
anim->params = mvGetParams( anim->track );
|
||||
|
||||
anim->x = dmParamsGetInt( anim->params, DM_IMAGE_WIDTH);
|
||||
anim->y = dmParamsGetInt( anim->params, DM_IMAGE_HEIGHT);
|
||||
anim->interlacing = dmParamsGetEnum (anim->params, DM_IMAGE_INTERLACING);
|
||||
anim->orientation = dmParamsGetEnum (anim->params, DM_IMAGE_ORIENTATION);
|
||||
anim->framesize = dmImageFrameSize(anim->params);
|
||||
|
||||
anim->curposition = 0;
|
||||
anim->preseek = 0;
|
||||
|
||||
/*printf("x:%d y:%d size:%d interl:%d dur:%d\n", anim->x, anim->y, anim->framesize, anim->interlacing, anim->duration);*/
|
||||
return (0);
|
||||
}
|
||||
|
||||
static ImBuf * movie_fetchibuf(struct anim * anim, int position) {
|
||||
ImBuf * ibuf;
|
||||
/* extern rectcpy(); */
|
||||
int size;
|
||||
unsigned int *rect1, *rect2;
|
||||
|
||||
if (anim == 0) return (0);
|
||||
|
||||
ibuf = IMB_allocImBuf(anim->x, anim->y, 24, IB_rect);
|
||||
|
||||
if ( mvReadFrames(anim->track, position, 1, ibuf->x * ibuf->y *
|
||||
sizeof(int), ibuf->rect ) != DM_SUCCESS ) {
|
||||
movie_printerror("mvReadFrames");
|
||||
IMB_freeImBuf(ibuf);
|
||||
return(0);
|
||||
}
|
||||
|
||||
/*
|
||||
if (anim->interlacing == DM_IMAGE_INTERLACED_EVEN) {
|
||||
rect1 = ibuf->rect + (ibuf->x * ibuf->y) - 1;
|
||||
rect2 = rect1 - ibuf->x;
|
||||
|
||||
for (size = ibuf->x * (ibuf->y - 1); size > 0; size--){
|
||||
*rect1-- = *rect2--;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if (anim->interlacing == DM_IMAGE_INTERLACED_EVEN)
|
||||
{
|
||||
rect1 = ibuf->rect;
|
||||
rect2 = rect1 + ibuf->x;
|
||||
|
||||
for (size = ibuf->x * (ibuf->y - 1); size > 0; size--){
|
||||
*rect1++ = *rect2++;
|
||||
}
|
||||
}
|
||||
/*if (anim->orientation == DM_TOP_TO_BOTTOM) IMB_flipy(ibuf);*/
|
||||
|
||||
|
||||
return(ibuf);
|
||||
}
|
||||
|
||||
static void free_anim_movie(struct anim * anim) {
|
||||
if (anim == NULL) return;
|
||||
|
||||
if (anim->movie) {
|
||||
mvClose(anim->movie);
|
||||
anim->movie = NULL;
|
||||
}
|
||||
anim->duration = 0;
|
||||
}
|
||||
|
||||
int ismovie(char *name) {
|
||||
return (mvIsMovieFile(name) == DM_TRUE);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
int ismovie(const char *UNUSED(name)) {
|
||||
return 0;
|
||||
}
|
||||
@ -226,7 +123,6 @@ static int startmovie(struct anim *UNUSED(anim)) { return 1; }
|
||||
static ImBuf * movie_fetchibuf(struct anim *UNUSED(anim), int UNUSED(position)) { return NULL; }
|
||||
static void free_anim_movie(struct anim *UNUSED(anim)) { ; }
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
# define PATHSEPERATOR '\\'
|
||||
|
@ -75,6 +75,7 @@ typedef enum ModifierType {
|
||||
eModifierType_WeightVGMix,
|
||||
eModifierType_WeightVGProximity,
|
||||
eModifierType_NavMesh,
|
||||
eModifierType_DynamicPaint, /* reserve slot */
|
||||
|
||||
/* BMESH ONLY - keeps getting bumped by new modifiers in trunk */
|
||||
eModifierType_NgonInterp,
|
||||
|
@ -86,6 +86,7 @@ PropertyRNA *RNA_def_string(StructOrFunctionRNA *cont, const char *identifier, c
|
||||
PropertyRNA *RNA_def_string_file_path(StructOrFunctionRNA *cont, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description);
|
||||
PropertyRNA *RNA_def_string_dir_path(StructOrFunctionRNA *cont, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description);
|
||||
PropertyRNA *RNA_def_string_file_name(StructOrFunctionRNA *cont, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description);
|
||||
PropertyRNA *RNA_def_string_translate(StructOrFunctionRNA *cont, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description);
|
||||
|
||||
PropertyRNA *RNA_def_enum(StructOrFunctionRNA *cont, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description);
|
||||
PropertyRNA *RNA_def_enum_flag(StructOrFunctionRNA *cont, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description);
|
||||
|
@ -110,6 +110,7 @@ typedef enum PropertySubType {
|
||||
PROP_FILEPATH = 1,
|
||||
PROP_DIRPATH = 2,
|
||||
PROP_FILENAME = 3,
|
||||
PROP_TRANSLATE = 4, /* a string which should be translated */
|
||||
|
||||
/* numbers */
|
||||
PROP_UNSIGNED = 13,
|
||||
|
@ -1815,6 +1815,7 @@ static const char *rna_property_subtypename(PropertySubType type)
|
||||
case PROP_FILEPATH: return "PROP_FILEPATH";
|
||||
case PROP_FILENAME: return "PROP_FILENAME";
|
||||
case PROP_DIRPATH: return "PROP_DIRPATH";
|
||||
case PROP_TRANSLATE: return "PROP_TRANSLATE";
|
||||
case PROP_UNSIGNED: return "PROP_UNSIGNED";
|
||||
case PROP_PERCENTAGE: return "PROP_PERCENTAGE";
|
||||
case PROP_FACTOR: return "PROP_FACTOR";
|
||||
|
@ -460,13 +460,13 @@ static void rna_def_ID(BlenderRNA *brna)
|
||||
|
||||
prop= RNA_def_property(srna, "use_fake_user", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIB_FAKEUSER);
|
||||
RNA_def_property_ui_text(prop, "Fake User", "Saves this datablock even if it has no users");
|
||||
RNA_def_property_ui_text(prop, "Fake User", "Save this datablock even if it has no users");
|
||||
RNA_def_property_boolean_funcs(prop, NULL, "rna_ID_fake_user_set");
|
||||
|
||||
prop= RNA_def_property(srna, "tag", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIB_DOIT);
|
||||
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
|
||||
RNA_def_property_ui_text(prop, "Tag", "Tools can use this to tag data, (initial state is undefined)");
|
||||
RNA_def_property_ui_text(prop, "Tag", "Tools can use this to tag data (initial state is undefined)");
|
||||
|
||||
prop= RNA_def_property(srna, "library", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "lib");
|
||||
@ -480,8 +480,8 @@ static void rna_def_ID(BlenderRNA *brna)
|
||||
RNA_def_function_return(func, parm);
|
||||
|
||||
func= RNA_def_function(srna, "user_clear", "rna_ID_user_clear");
|
||||
RNA_def_function_ui_description(func, "Clears the user count of a datablock so its not saved, "
|
||||
"on reload the data will be removed");
|
||||
RNA_def_function_ui_description(func, "Clear the user count of a datablock so its not saved, "
|
||||
"on reload the data will be removed");
|
||||
|
||||
func= RNA_def_function(srna, "animation_data_create", "BKE_id_add_animdata");
|
||||
RNA_def_function_ui_description(func, "Create animation data to this ID, note that not all ID types support this");
|
||||
@ -493,7 +493,7 @@ static void rna_def_ID(BlenderRNA *brna)
|
||||
|
||||
func= RNA_def_function(srna, "update_tag", "rna_ID_update_tag");
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
RNA_def_function_ui_description(func, "Tag the id to update its display data");
|
||||
RNA_def_function_ui_description(func, "Tag the ID to update its display data");
|
||||
RNA_def_enum_flag(func, "refresh", update_flag_items, 0, "", "Type of updates to perform");
|
||||
}
|
||||
|
||||
|
@ -98,13 +98,13 @@ static FCurve *rna_Action_fcurve_new(bAction *act, ReportList *reports, const ch
|
||||
if(group && group[0]=='\0') group= NULL;
|
||||
|
||||
if(data_path[0] == '\0') {
|
||||
BKE_report(reports, RPT_ERROR, "FCurve data path empty, invalid argument");
|
||||
BKE_report(reports, RPT_ERROR, "F-Curve data path empty, invalid argument");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* annoying, check if this exists */
|
||||
if(verify_fcurve(act, group, data_path, index, 0)) {
|
||||
BKE_reportf(reports, RPT_ERROR, "FCurve '%s[%d]' already exists in action '%s'", data_path, index, act->id.name+2);
|
||||
BKE_reportf(reports, RPT_ERROR, "F-Curve '%s[%d]' already exists in action '%s'", data_path, index, act->id.name+2);
|
||||
return NULL;
|
||||
}
|
||||
return verify_fcurve(act, group, data_path, index, 1);
|
||||
@ -114,7 +114,7 @@ static void rna_Action_fcurve_remove(bAction *act, ReportList *reports, FCurve *
|
||||
{
|
||||
if (fcu->grp) {
|
||||
if (BLI_findindex(&act->groups, fcu->grp) == -1) {
|
||||
BKE_reportf(reports, RPT_ERROR, "FCurve's ActionGroup '%s' not found in action '%s'", fcu->grp->name, act->id.name+2);
|
||||
BKE_reportf(reports, RPT_ERROR, "F-Curve's ActionGroup '%s' not found in action '%s'", fcu->grp->name, act->id.name+2);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ static void rna_Action_fcurve_remove(bAction *act, ReportList *reports, FCurve *
|
||||
}
|
||||
else {
|
||||
if (BLI_findindex(&act->curves, fcu) == -1) {
|
||||
BKE_reportf(reports, RPT_ERROR, "FCurve not found in action '%s'", act->id.name+2);
|
||||
BKE_reportf(reports, RPT_ERROR, "F-Curve not found in action '%s'", act->id.name+2);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -309,20 +309,20 @@ static void rna_def_dopesheet(BlenderRNA *brna)
|
||||
/* NLA Specific Settings */
|
||||
prop= RNA_def_property(srna, "show_missing_nla", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NLA_NOACT);
|
||||
RNA_def_property_ui_text(prop, "Include Missing NLA", "Include Animation Data blocks with no NLA data. (NLA Editor only)");
|
||||
RNA_def_property_ui_text(prop, "Include Missing NLA", "Include Animation Data blocks with no NLA data (NLA Editor only)");
|
||||
RNA_def_property_ui_icon(prop, ICON_ACTION, 0);
|
||||
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
|
||||
|
||||
/* Summary Settings (DopeSheet editors only) */
|
||||
prop= RNA_def_property(srna, "show_summary", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "filterflag", ADS_FILTER_SUMMARY);
|
||||
RNA_def_property_ui_text(prop, "Display Summary", "Display an additional 'summary' line. (DopeSheet Editors only)");
|
||||
RNA_def_property_ui_text(prop, "Display Summary", "Display an additional 'summary' line (DopeSheet Editors only)");
|
||||
RNA_def_property_ui_icon(prop, ICON_BORDERMOVE, 0);
|
||||
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "show_expanded_summary", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ADS_FLAG_SUMMARY_COLLAPSED);
|
||||
RNA_def_property_ui_text(prop, "Collapse Summary", "Collapse summary when shown, so all other channels get hidden. (DopeSheet Editors Only)");
|
||||
RNA_def_property_ui_text(prop, "Collapse Summary", "Collapse summary when shown, so all other channels get hidden (DopeSheet Editors Only)");
|
||||
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
|
||||
|
||||
|
||||
@ -514,24 +514,24 @@ static void rna_def_action_fcurves(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
RNA_def_property_srna(cprop, "ActionFCurves");
|
||||
srna= RNA_def_struct(brna, "ActionFCurves", NULL);
|
||||
RNA_def_struct_sdna(srna, "bAction");
|
||||
RNA_def_struct_ui_text(srna, "Action FCurves", "Collection of action fcurves");
|
||||
RNA_def_struct_ui_text(srna, "Action F-Curves", "Collection of action F-Curves");
|
||||
|
||||
func= RNA_def_function(srna, "new", "rna_Action_fcurve_new");
|
||||
RNA_def_function_ui_description(func, "Add a keyframe to the curve");
|
||||
RNA_def_function_ui_description(func, "Add a keyframe to the F-Curve");
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
parm= RNA_def_string(func, "data_path", "", 0, "Data Path", "FCurve data path to use");
|
||||
parm= RNA_def_string(func, "data_path", "", 0, "Data Path", "F-Curve data path to use");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Array index", 0, INT_MAX);
|
||||
RNA_def_string(func, "action_group", "", 0, "Action Group", "Acton group to add this fcurve into");
|
||||
RNA_def_string(func, "action_group", "", 0, "Action Group", "Acton group to add this F-Curve into");
|
||||
|
||||
parm= RNA_def_pointer(func, "fcurve", "FCurve", "", "Newly created fcurve");
|
||||
parm= RNA_def_pointer(func, "fcurve", "FCurve", "", "Newly created F-Curve");
|
||||
RNA_def_function_return(func, parm);
|
||||
|
||||
|
||||
func= RNA_def_function(srna, "remove", "rna_Action_fcurve_remove");
|
||||
RNA_def_function_ui_description(func, "Remove action group");
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
parm= RNA_def_pointer(func, "fcurve", "FCurve", "", "FCurve to remove");
|
||||
parm= RNA_def_pointer(func, "fcurve", "FCurve", "", "F-Curve to remove");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
||||
}
|
||||
|
||||
@ -605,7 +605,7 @@ static void rna_def_action(BlenderRNA *brna)
|
||||
rna_def_action_pose_markers(brna, prop);
|
||||
|
||||
/* properties */
|
||||
prop= RNA_def_float_vector(srna, "frame_range" , 2 , NULL , 0, 0, "Frame Range" , "The final frame range of all fcurves within this action" , 0 , 0);
|
||||
prop= RNA_def_float_vector(srna, "frame_range" , 2 , NULL , 0, 0, "Frame Range" , "The final frame range of all F-Curves within this action" , 0 , 0);
|
||||
RNA_def_property_float_funcs(prop, "rna_Action_frame_range_get" , NULL, NULL);
|
||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
|
||||
|
@ -489,7 +489,7 @@ static void rna_def_keyingset_info(BlenderRNA *brna)
|
||||
RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
|
||||
|
||||
/* Name */
|
||||
prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
|
||||
prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_TRANSLATE);
|
||||
RNA_def_property_string_sdna(prop, NULL, "name");
|
||||
RNA_def_property_ui_text(prop, "Name", "");
|
||||
RNA_def_struct_name_property(srna, prop);
|
||||
|
@ -2240,6 +2240,20 @@ PropertyRNA *RNA_def_string_file_name(StructOrFunctionRNA *cont_, const char *id
|
||||
return prop;
|
||||
}
|
||||
|
||||
PropertyRNA *RNA_def_string_translate(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen,
|
||||
const char *ui_name, const char *ui_description)
|
||||
{
|
||||
ContainerRNA *cont= cont_;
|
||||
PropertyRNA *prop;
|
||||
|
||||
prop= RNA_def_property(cont, identifier, PROP_STRING, PROP_TRANSLATE);
|
||||
if(maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen);
|
||||
if(default_value) RNA_def_property_string_default(prop, default_value);
|
||||
RNA_def_property_ui_text(prop, ui_name, ui_description);
|
||||
|
||||
return prop;
|
||||
}
|
||||
|
||||
PropertyRNA *RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value,
|
||||
const char *ui_name, const char *ui_description)
|
||||
{
|
||||
|
@ -286,7 +286,7 @@ static void rna_def_render_engine(BlenderRNA *brna)
|
||||
RNA_def_property_string_sdna(prop, NULL, "type->idname");
|
||||
RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
|
||||
|
||||
prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
|
||||
prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_TRANSLATE);
|
||||
RNA_def_property_string_sdna(prop, NULL, "type->name");
|
||||
RNA_def_property_flag(prop, PROP_REGISTER);
|
||||
|
||||
|
@ -53,6 +53,7 @@ EnumPropertyItem property_subtype_items[] = {
|
||||
{PROP_FILEPATH, "FILEPATH", 0, "File Path", ""},
|
||||
{PROP_DIRPATH, "DIRPATH", 0, "Directory Path", ""},
|
||||
{PROP_FILENAME, "FILENAME", 0, "File Name", ""},
|
||||
{PROP_TRANSLATE, "TRANSLATE", 0, "Translate", ""},
|
||||
|
||||
/* numbers */
|
||||
{PROP_UNSIGNED, "UNSIGNED", 0, "Unsigned", ""},
|
||||
|
@ -661,7 +661,7 @@ static void rna_def_panel(BlenderRNA *brna)
|
||||
"class name is \"OBJECT_PT_hello\", and bl_idname is not set by the "
|
||||
"script, then bl_idname = \"OBJECT_PT_hello\"");
|
||||
|
||||
prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
|
||||
prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_TRANSLATE);
|
||||
RNA_def_property_string_sdna(prop, NULL, "type->label");
|
||||
RNA_def_property_flag(prop, PROP_REGISTER);
|
||||
RNA_def_property_ui_text(prop, "Label",
|
||||
@ -785,7 +785,7 @@ static void rna_def_menu(BlenderRNA *brna)
|
||||
"class name is \"OBJECT_MT_hello\", and bl_idname is not set by the "
|
||||
"script, then bl_idname = \"OBJECT_MT_hello\"");
|
||||
|
||||
prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
|
||||
prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_TRANSLATE);
|
||||
RNA_def_property_string_sdna(prop, NULL, "type->label");
|
||||
RNA_def_property_flag(prop, PROP_REGISTER);
|
||||
RNA_def_property_ui_text(prop, "Label", "The menu label");
|
||||
|
@ -84,7 +84,7 @@ static void api_ui_item_common(FunctionRNA *func)
|
||||
{
|
||||
PropertyRNA *prop;
|
||||
|
||||
RNA_def_string(func, "text", "", 0, "", "Override automatic text of the item");
|
||||
prop= RNA_def_string_translate(func, "text", "", 0, "", "Override automatic text of the item");
|
||||
|
||||
prop= RNA_def_property(func, "icon", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_items(prop, icon_items);
|
||||
@ -309,7 +309,7 @@ void RNA_api_ui_layout(StructRNA *srna)
|
||||
parm= RNA_def_string(func, "type_property", "", 0, "",
|
||||
"Identifier of property in data giving the type of the ID-blocks to use");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_string(func, "text", "", 0, "", "Custom label to display in UI");
|
||||
RNA_def_string_translate(func, "text", "", 0, "", "Custom label to display in UI");
|
||||
|
||||
func= RNA_def_function(srna, "template_path_builder", "uiTemplatePathBuilder");
|
||||
parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property");
|
||||
@ -318,7 +318,7 @@ void RNA_api_ui_layout(StructRNA *srna)
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
parm= RNA_def_pointer(func, "root", "ID", "", "ID-block from which path is evaluated from");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
|
||||
RNA_def_string(func, "text", "", 0, "", "Custom label to display in UI");
|
||||
RNA_def_string_translate(func, "text", "", 0, "", "Custom label to display in UI");
|
||||
|
||||
func= RNA_def_function(srna, "template_modifier", "uiTemplateModifier");
|
||||
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
|
||||
|
@ -65,6 +65,8 @@
|
||||
#include "MEM_guardedalloc.h"
|
||||
#include "MEM_CacheLimiterC-Api.h"
|
||||
|
||||
#include "UI_interface.h"
|
||||
|
||||
static void rna_userdef_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
WM_main_add_notifier(NC_WINDOW, NULL);
|
||||
@ -79,7 +81,9 @@ static void rna_userdef_dpi_update(Main *bmain, Scene *scene, PointerRNA *ptr)
|
||||
|
||||
static void rna_userdef_language_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
BLF_cache_clear();
|
||||
BLF_lang_set(NULL);
|
||||
UI_reinit_font();
|
||||
}
|
||||
|
||||
static void rna_userdef_show_manipulator_update(Main *bmain, Scene *scene, PointerRNA *ptr)
|
||||
|
@ -1188,14 +1188,14 @@ static void rna_def_operator(BlenderRNA *brna)
|
||||
RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
|
||||
RNA_def_struct_name_property(srna, prop);
|
||||
|
||||
prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
|
||||
prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_TRANSLATE);
|
||||
RNA_def_property_string_sdna(prop, NULL, "type->name");
|
||||
RNA_def_property_string_maxlength(prop, 1024); /* else it uses the pointer size! */
|
||||
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Operator_bl_label_set");
|
||||
// RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_flag(prop, PROP_REGISTER);
|
||||
|
||||
prop= RNA_def_property(srna, "bl_description", PROP_STRING, PROP_NONE);
|
||||
prop= RNA_def_property(srna, "bl_description", PROP_STRING, PROP_TRANSLATE);
|
||||
RNA_def_property_string_sdna(prop, NULL, "type->description");
|
||||
RNA_def_property_string_maxlength(prop, 1024); /* else it uses the pointer size! */
|
||||
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Operator_bl_description_set");
|
||||
@ -1249,14 +1249,14 @@ static void rna_def_macro_operator(BlenderRNA *brna)
|
||||
RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
|
||||
RNA_def_struct_name_property(srna, prop);
|
||||
|
||||
prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
|
||||
prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_TRANSLATE);
|
||||
RNA_def_property_string_sdna(prop, NULL, "type->name");
|
||||
RNA_def_property_string_maxlength(prop, 1024); /* else it uses the pointer size! */
|
||||
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Operator_bl_label_set");
|
||||
// RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_flag(prop, PROP_REGISTER);
|
||||
|
||||
prop= RNA_def_property(srna, "bl_description", PROP_STRING, PROP_NONE);
|
||||
prop= RNA_def_property(srna, "bl_description", PROP_STRING, PROP_TRANSLATE);
|
||||
RNA_def_property_string_sdna(prop, NULL, "type->description");
|
||||
RNA_def_property_string_maxlength(prop, 1024); /* else it uses the pointer size! */
|
||||
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Operator_bl_description_set");
|
||||
|
@ -48,12 +48,12 @@
|
||||
#include "BKE_customdata.h"
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
static int bit(int a, int b)
|
||||
BM_INLINE int bit(int a, int b)
|
||||
{
|
||||
return (a & (1 << b)) >> b;
|
||||
}
|
||||
|
||||
static void intToCol(int i, float* col)
|
||||
BM_INLINE void intToCol(int i, float* col)
|
||||
{
|
||||
int r = bit(i, 0) + bit(i, 3) * 2 + 1;
|
||||
int g = bit(i, 1) + bit(i, 4) * 2 + 1;
|
||||
|
@ -66,8 +66,6 @@ const char *node_filter_label(struct bNode *node);
|
||||
// this is needed for inlining behaviour
|
||||
#if defined _WIN32
|
||||
# define DO_INLINE __inline
|
||||
#elif defined (__sgi)
|
||||
# define DO_INLINE
|
||||
#elif defined (__sun) || defined (__sun__)
|
||||
# define DO_INLINE
|
||||
#else
|
||||
|
@ -95,4 +95,8 @@ if(WITH_AUDASPACE)
|
||||
add_definitions(-DWITH_AUDASPACE)
|
||||
endif()
|
||||
|
||||
if(WITH_INTERNATIONAL)
|
||||
add_definitions(-DINTERNATIONAL)
|
||||
endif()
|
||||
|
||||
blender_add_lib(bf_python "${SRC}" "${INC}" "${INC_SYS}")
|
||||
|
@ -79,7 +79,7 @@ static void atexit_func_call(const char *func_name, PyObject *atexit_func_arg)
|
||||
void BPY_atexit_register(void)
|
||||
{
|
||||
/* atexit module owns this new function reference */
|
||||
BLI_assert(func_bpy_atregister ==NULL);
|
||||
BLI_assert(func_bpy_atregister == NULL);
|
||||
|
||||
func_bpy_atregister= (PyObject *)PyCFunction_New(&meth_bpy_atexit, NULL);
|
||||
atexit_func_call("register", func_bpy_atregister);
|
||||
@ -87,6 +87,8 @@ void BPY_atexit_register(void)
|
||||
|
||||
void BPY_atexit_unregister(void)
|
||||
{
|
||||
BLI_assert(func_bpy_atregister != NULL);
|
||||
|
||||
atexit_func_call("unregister", func_bpy_atregister);
|
||||
func_bpy_atregister= NULL; /* don't really need to set but just incase */
|
||||
}
|
||||
|
@ -72,6 +72,7 @@ static EnumPropertyItem property_subtype_string_items[]= {
|
||||
{PROP_FILEPATH, "FILE_PATH", 0, "File Path", ""},
|
||||
{PROP_DIRPATH, "DIR_PATH", 0, "Directory Path", ""},
|
||||
{PROP_FILENAME, "FILENAME", 0, "Filename", ""},
|
||||
{PROP_TRANSLATE, "TRANSLATE", 0, "Translate", ""},
|
||||
|
||||
{PROP_NONE, "NONE", 0, "None", ""},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
@ -73,6 +73,10 @@
|
||||
#include "../generic/IDProp.h" /* for IDprop lookups */
|
||||
#include "../generic/py_capi_utils.h"
|
||||
|
||||
#ifdef INTERNATIONAL
|
||||
#include "UI_interface.h" /* bad level call into editors */
|
||||
#endif
|
||||
|
||||
#define USE_PEDANTIC_WRITE
|
||||
#define USE_MATHUTILS
|
||||
#define USE_STRING_COERCE
|
||||
@ -1519,6 +1523,12 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb
|
||||
}
|
||||
else {
|
||||
param= _PyUnicode_AsString(value);
|
||||
#ifdef INTERNATIONAL
|
||||
if(subtype == PROP_TRANSLATE) {
|
||||
param= UI_translate_do_iface(param);
|
||||
}
|
||||
#endif // INTERNATIONAL
|
||||
|
||||
}
|
||||
#else // USE_STRING_COERCE
|
||||
param= _PyUnicode_AsString(value);
|
||||
|
@ -85,7 +85,7 @@ static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, PointerRNA
|
||||
|
||||
void wm_event_add(wmWindow *win, wmEvent *event_to_add)
|
||||
{
|
||||
wmEvent *event= MEM_callocN(sizeof(wmEvent), "event");
|
||||
wmEvent *event= MEM_callocN(sizeof(wmEvent), "wmEvent");
|
||||
|
||||
*event= *event_to_add;
|
||||
BLI_addtail(&win->queue, event);
|
||||
|
@ -359,6 +359,7 @@ void uiItemS(struct uiLayout *layout){}
|
||||
void uiItemFullR(struct uiLayout *layout, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, int value, int flag, char *name, int icon){}
|
||||
void uiLayoutSetContextPointer(struct uiLayout *layout, char *name, struct PointerRNA *ptr){}
|
||||
char *uiLayoutIntrospect(struct uiLayout *layout){return (char *)NULL;}
|
||||
void UI_reinit_font() {}
|
||||
|
||||
/* rna template */
|
||||
void uiTemplateAnyID(struct uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname, char *text){}
|
||||
|
@ -47,11 +47,6 @@
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
|
||||
/* for setuid / getuid */
|
||||
#ifdef __sgi
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
/* This little block needed for linking to Blender... */
|
||||
|
||||
@ -159,7 +154,7 @@ char btempdir[FILE_MAX];
|
||||
static void setCallbacks(void);
|
||||
|
||||
/* set breakpoints here when running in debug mode, useful to catch floating point errors */
|
||||
#if defined(__sgi) || defined(__linux__) || defined(_WIN32) || defined(OSX_SSE_FPE)
|
||||
#if defined(__linux__) || defined(_WIN32) || defined(OSX_SSE_FPE)
|
||||
static void fpe_handler(int UNUSED(sig))
|
||||
{
|
||||
// printf("SIGFPE trapped\n");
|
||||
@ -394,7 +389,7 @@ static int debug_mode(int UNUSED(argc), const char **UNUSED(argv), void *data)
|
||||
|
||||
static int set_fpe(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
|
||||
{
|
||||
#if defined(__sgi) || defined(__linux__) || defined(_WIN32) || defined(OSX_SSE_FPE)
|
||||
#if defined(__linux__) || defined(_WIN32) || defined(OSX_SSE_FPE)
|
||||
/* zealous but makes float issues a heck of a lot easier to find!
|
||||
* set breakpoints on fpe_handler */
|
||||
signal(SIGFPE, fpe_handler);
|
||||
@ -1227,10 +1222,6 @@ int main(int argc, const char **argv)
|
||||
//signal(SIGFPE, segmentation_handler);
|
||||
}
|
||||
|
||||
#ifdef __sgi
|
||||
setuid(getuid()); /* end superuser */
|
||||
#endif
|
||||
|
||||
#if defined(WITH_PYTHON_MODULE) || defined(WITH_HEADLESS)
|
||||
G.background= 1; /* python module mode ALWAYS runs in background mode (for now) */
|
||||
#else
|
||||
|
@ -32,11 +32,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#if defined (__sgi)
|
||||
#include <math.h>
|
||||
#else
|
||||
#include <cmath>
|
||||
#endif
|
||||
|
||||
#include "SCA_LogicManager.h"
|
||||
#include "BL_ShapeActionActuator.h"
|
||||
|
@ -33,12 +33,7 @@
|
||||
* \ingroup ketsji
|
||||
*/
|
||||
|
||||
|
||||
#if defined (__sgi)
|
||||
#include <math.h>
|
||||
#else
|
||||
#include <cmath>
|
||||
#endif
|
||||
|
||||
#include "KX_IpoActuator.h"
|
||||
#include "KX_GameObject.h"
|
||||
|
@ -25,7 +25,6 @@ import addon_utils
|
||||
|
||||
import sys
|
||||
import os
|
||||
import imp
|
||||
|
||||
|
||||
def source_list(path, filename_check=None):
|
||||
|
Loading…
Reference in New Issue
Block a user