Merged changes in the trunk up to revision 55546.

Conflicts resolved:
source/blenderplayer/bad_level_call_stubs/SConscript

Partly reverted changes to intern/cycles/blender/addon/ui.py in revision 52899
to make it easier to merge trunk changes.
This commit is contained in:
Tamito Kajiyama 2013-03-24 12:13:13 +00:00
commit 385c72f5f2
379 changed files with 6689 additions and 5533 deletions

@ -124,7 +124,7 @@ mark_as_advanced(WITH_PYTHON_SECURITY) # some distributions see this as a secur
option(WITH_PYTHON_SAFETY "Enable internal API error checking to track invalid data to prevent crash on access (at the expense of some effeciency, only enable for development)." OFF) option(WITH_PYTHON_SAFETY "Enable internal API error checking to track invalid data to prevent crash on access (at the expense of some effeciency, only enable for development)." OFF)
option(WITH_PYTHON_MODULE "Enable building as a python module which runs without a user interface, like running regular blender in background mode (experimental, only enable for development)" OFF) option(WITH_PYTHON_MODULE "Enable building as a python module which runs without a user interface, like running regular blender in background mode (experimental, only enable for development)" OFF)
if (APPLE) if(APPLE)
option(WITH_PYTHON_FRAMEWORK "Enable building using the Python available in the framework (OSX only)" OFF) option(WITH_PYTHON_FRAMEWORK "Enable building using the Python available in the framework (OSX only)" OFF)
endif() endif()
@ -297,9 +297,9 @@ if(APPLE)
endif() endif()
execute_process(COMMAND uname -r OUTPUT_VARIABLE MAC_SYS) # check for actual system-version execute_process(COMMAND uname -r OUTPUT_VARIABLE MAC_SYS) # check for actual system-version
if (${MAC_SYS} MATCHES 12) if(${MAC_SYS} MATCHES 12)
set(OSX_SYSTEM 10.8) set(OSX_SYSTEM 10.8)
elseif (${MAC_SYS} MATCHES 11) elseif(${MAC_SYS} MATCHES 11)
set(OSX_SYSTEM 10.7) set(OSX_SYSTEM 10.7)
elseif(${MAC_SYS} MATCHES 10) elseif(${MAC_SYS} MATCHES 10)
set(OSX_SYSTEM 10.6) set(OSX_SYSTEM 10.6)
@ -539,7 +539,7 @@ set(PLATFORM_LINKFLAGS_DEBUG "")
if(UNIX AND NOT APPLE) if(UNIX AND NOT APPLE)
macro(find_package_wrapper) macro(find_package_wrapper)
STRING(TOUPPER ${ARGV0} _NAME_UPPER) string(TOUPPER ${ARGV0} _NAME_UPPER)
if(${WITH_STATIC_LIBS}) if(${WITH_STATIC_LIBS})
set(_cmake_find_library_suffixes_back ${CMAKE_FIND_LIBRARY_SUFFIXES}) set(_cmake_find_library_suffixes_back ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
@ -669,7 +669,7 @@ if(UNIX AND NOT APPLE)
endif() endif()
endif() endif()
if (WITH_INPUT_NDOF) if(WITH_INPUT_NDOF)
find_package_wrapper(Spacenav) find_package_wrapper(Spacenav)
if(NOT SPACENAV_FOUND) if(NOT SPACENAV_FOUND)
set(WITH_INPUT_NDOF OFF) set(WITH_INPUT_NDOF OFF)
@ -690,10 +690,11 @@ if(UNIX AND NOT APPLE)
endif() endif()
set(Boost_USE_MULTITHREADED ON) set(Boost_USE_MULTITHREADED ON)
set(__boost_packages filesystem regex system thread date_time) set(__boost_packages filesystem regex system thread date_time)
if (WITH_INTERNATIONAL) if(WITH_INTERNATIONAL)
list(APPEND __boost_packages locale) list(APPEND __boost_packages locale)
endif() endif()
find_package(Boost 1.48 COMPONENTS ${__boost_packages}) find_package(Boost 1.48 COMPONENTS ${__boost_packages})
unset(__boost_packages)
if(Boost_USE_STATIC_LIBS AND WITH_BOOST_ICU) if(Boost_USE_STATIC_LIBS AND WITH_BOOST_ICU)
find_package(IcuLinux) find_package(IcuLinux)
endif() endif()
@ -711,7 +712,7 @@ if(UNIX AND NOT APPLE)
set(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES} ${BOOST_LIBRARIES}) set(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES} ${BOOST_LIBRARIES})
set(OPENIMAGEIO_LIBPATH) # TODO, remove and reference the absolute path everywhere set(OPENIMAGEIO_LIBPATH) # TODO, remove and reference the absolute path everywhere
set(OPENIMAGEIO_DEFINITIONS) set(OPENIMAGEIO_DEFINITIONS "")
if(WITH_IMAGE_TIFF) if(WITH_IMAGE_TIFF)
list(APPEND OPENIMAGEIO_LIBRARIES "${TIFF_LIBRARY}") list(APPEND OPENIMAGEIO_LIBRARIES "${TIFF_LIBRARY}")
@ -902,7 +903,7 @@ elseif(WIN32)
if(CMAKE_COMPILER_IS_GNUCC) if(CMAKE_COMPILER_IS_GNUCC)
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw32) set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw32)
INCLUDE (CheckCSourceCompiles) include(CheckCSourceCompiles)
# Setup 64bit and 64bit windows systems # Setup 64bit and 64bit windows systems
CHECK_C_SOURCE_COMPILES(" CHECK_C_SOURCE_COMPILES("
#ifndef __MINGW64__ #ifndef __MINGW64__
@ -1138,7 +1139,7 @@ elseif(WIN32)
endif() endif()
set_lib_path(PYTHON "python") set_lib_path(PYTHON "python")
STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION}) string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
# Use shared libs for vc2008 and vc2010 until we actually have vc2010 libs # Use shared libs for vc2008 and vc2010 until we actually have vc2010 libs
set(PYTHON_LIBRARY ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}.lib) set(PYTHON_LIBRARY ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}.lib)
# set(PYTHON_LIBRARY ${PYTHON}/lib/python${_PYTHON_VERSION_NO_DOTS}.lib) #CACHE FILEPATH # set(PYTHON_LIBRARY ${PYTHON}/lib/python${_PYTHON_VERSION_NO_DOTS}.lib) #CACHE FILEPATH
@ -1380,7 +1381,7 @@ elseif(WIN32)
set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include) set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
set(OPENIMAGEIO_LIBRARIES OpenImageIO) set(OPENIMAGEIO_LIBRARIES OpenImageIO)
set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib) set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib)
set(OPENIMAGEIO_DEFINITIONS) set(OPENIMAGEIO_DEFINITIONS "")
endif() endif()
if(WITH_LLVM) if(WITH_LLVM)
@ -1633,7 +1634,7 @@ elseif(APPLE)
set(TIFF_LIBPATH ${TIFF}/lib) set(TIFF_LIBPATH ${TIFF}/lib)
endif() endif()
if (WITH_INPUT_NDOF) if(WITH_INPUT_NDOF)
# linker needs "-weak_framework 3DconnexionClient" # linker needs "-weak_framework 3DconnexionClient"
endif() endif()
@ -1641,7 +1642,7 @@ elseif(APPLE)
set(BOOST ${LIBDIR}/boost) set(BOOST ${LIBDIR}/boost)
set(BOOST_INCLUDE_DIR ${BOOST}/include) set(BOOST_INCLUDE_DIR ${BOOST}/include)
set(BOOST_LIBRARIES boost_date_time-mt boost_filesystem-mt boost_regex-mt boost_system-mt boost_thread-mt boost_wave-mt) set(BOOST_LIBRARIES boost_date_time-mt boost_filesystem-mt boost_regex-mt boost_system-mt boost_thread-mt boost_wave-mt)
if (WITH_INTERNATIONAL) if(WITH_INTERNATIONAL)
list(APPEND BOOST_LIBRARIES boost_locale-mt) list(APPEND BOOST_LIBRARIES boost_locale-mt)
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -liconv") # boost_locale needs it ! set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -liconv") # boost_locale needs it !
endif() endif()
@ -1933,13 +1934,14 @@ if(CMAKE_COMPILER_IS_GNUCC)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_DIV_BY_ZERO -Wno-div-by-zero) ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_DIV_BY_ZERO -Wno-div-by-zero)
# gcc 4.2 gives annoying warnings on every file with this # gcc 4.2 gives annoying warnings on every file with this
if (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.3") if(NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.3")
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNINITIALIZED -Wuninitialized) ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNINITIALIZED -Wuninitialized)
endif() endif()
# versions before gcc4.6 give many BLI_math warnings # versions before gcc4.6 give many BLI_math warnings
if (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.6") if(NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.6")
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_REDUNDANT_DECLS -Wredundant-decls) ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_REDUNDANT_DECLS -Wredundant-decls)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_REDUNDANT_DECLS -Wredundant-decls)
endif() endif()
# disable because it gives warnings for printf() & friends. # disable because it gives warnings for printf() & friends.
@ -1956,10 +1958,9 @@ if(CMAKE_COMPILER_IS_GNUCC)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_INIT_SELF -Winit-self) # needs -Wuninitialized ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_INIT_SELF -Winit-self) # needs -Wuninitialized
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_MISSING_INCLUDE_DIRS -Wmissing-include-dirs) ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_MISSING_INCLUDE_DIRS -Wmissing-include-dirs)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_DIV_BY_ZERO -Wno-div-by-zero) ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_DIV_BY_ZERO -Wno-div-by-zero)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_REDUNDANT_DECLS -Wredundant-decls)
# gcc 4.2 gives annoying warnings on every file with this # gcc 4.2 gives annoying warnings on every file with this
if (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.3") if(NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.3")
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNINITIALIZED -Wuninitialized) ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNINITIALIZED -Wuninitialized)
endif() endif()

@ -384,6 +384,9 @@ env['CPPFLAGS'].append('-DWITH_AUDASPACE')
env['CPPFLAGS'].append('-DWITH_AVI') env['CPPFLAGS'].append('-DWITH_AVI')
env['CPPFLAGS'].append('-DWITH_BOOL_COMPAT') env['CPPFLAGS'].append('-DWITH_BOOL_COMPAT')
if env['OURPLATFORM'] not in ('win32-vc', 'win64-vc'):
env['CPPFLAGS'].append('-DHAVE_STDBOOL_H')
# lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir # lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
B.root_build_dir = env['BF_BUILDDIR'] B.root_build_dir = env['BF_BUILDDIR']
B.doc_build_dir = os.path.join(env['BF_INSTALLDIR'], 'doc') B.doc_build_dir = os.path.join(env['BF_INSTALLDIR'], 'doc')

@ -168,8 +168,7 @@ PYTHON_SOURCE="http://python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSI
PYTHON_FORCE_REBUILD=false PYTHON_FORCE_REBUILD=false
PYTHON_SKIP=false PYTHON_SKIP=false
#Could not get numpy-1.6.2 to compile with python-3.3 NUMPY_VERSION="1.7.0"
NUMPY_VERSION="1.7.0rc1"
NUMPY_VERSION_MIN="1.7" NUMPY_VERSION_MIN="1.7"
NUMPY_SOURCE="http://sourceforge.net/projects/numpy/files/NumPy/$NUMPY_VERSION/numpy-$NUMPY_VERSION.tar.gz" NUMPY_SOURCE="http://sourceforge.net/projects/numpy/files/NumPy/$NUMPY_VERSION/numpy-$NUMPY_VERSION.tar.gz"
NUMPY_FORCE_REBUILD=false NUMPY_FORCE_REBUILD=false
@ -224,8 +223,6 @@ _ffmpeg_list_sep=";"
# FFMPEG optional libs. # FFMPEG optional libs.
VORBIS_USE=false VORBIS_USE=false
VORBIS_DEV="" VORBIS_DEV=""
SCHRO_USE=false
SCRHO_DEV=""
THEORA_USE=false THEORA_USE=false
THEORA_DEV="" THEORA_DEV=""
XVID_USE=false XVID_USE=false
@ -471,10 +468,10 @@ version_match() {
detect_distro() { detect_distro() {
if [ -f /etc/debian_version ]; then if [ -f /etc/debian_version ]; then
DISTRO="DEB" DISTRO="DEB"
elif [ -f /etc/redhat-release -o /etc/SuSE-release ]; then
DISTRO="RPM"
elif [ -f /etc/arch-release ]; then elif [ -f /etc/arch-release ]; then
DISTRO="ARCH" DISTRO="ARCH"
elif [ -f /etc/redhat-release -o /etc/SuSE-release ]; then
DISTRO="RPM"
fi fi
} }
@ -1067,7 +1064,11 @@ compile_OpenCOLLADA() {
cd $_src cd $_src
# XXX For now, always update from latest repo... # XXX For now, always update from latest repo...
git pull origin git pull origin master
# XXX We have to stick to this revision, the next one introduced a change to ExtraHandler' parseElement signature :/
git checkout c89cf095c40aa2a518b1104c448825eacc92d174
git reset --hard
# Always refresh the whole build! # Always refresh the whole build!
if [ -d build ]; then if [ -d build ]; then
@ -1144,11 +1145,6 @@ compile_FFmpeg() {
extra="$extra --enable-libtheora" extra="$extra --enable-libtheora"
fi fi
# XXX At least under Debian, static schro gives problem at blender linking time... :/
if $SCHRO_USE && ! $ALL_STATIC; then
extra="$extra --enable-libschroedinger"
fi
if $XVID_USE; then if $XVID_USE; then
extra="$extra --enable-libxvid" extra="$extra --enable-libxvid"
fi fi
@ -1362,14 +1358,6 @@ install_DEB() {
install_packages_DEB $VPX_DEV install_packages_DEB $VPX_DEV
VPX_USE=true VPX_USE=true
fi fi
INFO ""
SCHRO_DEV="libschroedinger-dev"
check_package_DEB $SCHRO_DEV
if [ $? -eq 0 ]; then
install_packages_DEB $SCHRO_DEV
SCHRO_USE=true
fi
fi fi
INFO "" INFO ""
@ -1607,9 +1595,10 @@ install_RPM() {
# Enable non-free repositories for all flavours # Enable non-free repositories for all flavours
rpm_flavour rpm_flavour
if [ $RPM = "FEDORA" ]; then if [ $RPM = "FEDORA" ]; then
_fedora_rel="`egrep "[0-9]{1,}" /etc/fedora-release -o`"
sudo yum -y localinstall --nogpgcheck \ sudo yum -y localinstall --nogpgcheck \
http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm \ http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$_fedora_rel.noarch.rpm \
http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$_fedora_rel.noarch.rpm
sudo yum -y update sudo yum -y update
@ -1636,6 +1625,11 @@ install_RPM() {
fi fi
elif [ $RPM = "SUSE" ]; then elif [ $RPM = "SUSE" ]; then
# Install this now to avoid using the version from packman repository...
if $WITH_ALL; then
install_packages_RPM libjack-devel
fi
_suse_rel="`grep VERSION /etc/SuSE-release | gawk '{print $3}'`" _suse_rel="`grep VERSION /etc/SuSE-release | gawk '{print $3}'`"
sudo zypper ar -f http://packman.inode.at/suse/openSUSE_$_suse_rel/ packman sudo zypper ar -f http://packman.inode.at/suse/openSUSE_$_suse_rel/ packman
@ -1647,11 +1641,10 @@ install_RPM() {
VORBIS_DEV="libvorbis-devel" VORBIS_DEV="libvorbis-devel"
THEORA_DEV="libtheora-devel" THEORA_DEV="libtheora-devel"
_packages="gcc gcc-c++ make scons libpng-devel libtiff-devel \ _packages="gcc gcc-c++ make scons libtiff-devel freetype-devel libjpeg-devel\
freetype-devel libX11-devel libXi-devel wget ncurses-devel \ libpng-devel libX11-devel libXi-devel wget ncurses-devel \
readline-devel $OPENJPEG_DEV openal-soft-devel \ readline-devel $OPENJPEG_DEV openal-soft-devel \
glew-devel yasm $THEORA_DEV $VORBIS_DEV SDL-devel fftw-devel \ glew-devel yasm $THEORA_DEV $VORBIS_DEV patch"
libjpeg-devel patch"
OPENJPEG_USE=true OPENJPEG_USE=true
VORBIS_USE=true VORBIS_USE=true
@ -1659,10 +1652,10 @@ install_RPM() {
if [ $RPM = "FEDORA" -o $RPM = "RHEL" ]; then if [ $RPM = "FEDORA" -o $RPM = "RHEL" ]; then
_packages="$_packages libsqlite3-devel openexr-devel" _packages="$_packages libsqlite3x-devel openexr-devel fftw-devel SDL-devel"
if $WITH_ALL; then if $WITH_ALL; then
_packages="$_packages jack-audio-connection-kit-devel libspnav-devel" _packages="$_packages jack-audio-connection-kit-devel"
fi fi
INFO "" INFO ""
@ -1696,11 +1689,7 @@ install_RPM() {
elif [ $RPM = "SUSE" ]; then elif [ $RPM = "SUSE" ]; then
_packages="$_packages cmake sqlite3-devel libopenexr-devel" _packages="$_packages cmake sqlite3-devel libopenexr-devel fftw3-devel libSDL-devel"
if $WITH_ALL; then
_packages="$_packages libjack-devel libspnav-devel"
fi
INFO "" INFO ""
install_packages_RPM $_packages install_packages_RPM $_packages
@ -1740,16 +1729,10 @@ install_RPM() {
install_packages_RPM $VPX_DEV install_packages_RPM $VPX_DEV
VPX_USE=true VPX_USE=true
fi fi
INFO "" INFO ""
SCHRO_DEV="schroedinger-devel" install_packages_RPM libspnav-devel
check_package_RPM $SCHRO_DEV
if [ $? -eq 0 ]; then
install_packages_RPM $SCHRO_DEV
SCHRO_USE=true
fi
fi fi
INFO "" INFO ""
if $PYTHON_SKIP; then if $PYTHON_SKIP; then
INFO "WARNING! Skipping Python installation, as requested..." INFO "WARNING! Skipping Python installation, as requested..."
@ -1822,22 +1805,27 @@ install_RPM() {
if $LLVM_SKIP; then if $LLVM_SKIP; then
INFO "WARNING! Skipping LLVM installation, as requested (this also implies skipping OSL!)..." INFO "WARNING! Skipping LLVM installation, as requested (this also implies skipping OSL!)..."
else else
check_package_RPM llvm-$LLVM_VERSION-devel # Problem compiling with LLVM 3.2 so match version 3.1 ...
check_package_version_match_RPM llvm $LLVM_VERSION
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
install_packages_RPM llvm-$LLVM_VERSION-devel clang if [ $RPM = "SUSE" ]; then
install_packages_RPM llvm-devel llvm-clang-devel
else
install_packages_RPM llvm-devel clang-devel
fi
have_llvm=true have_llvm=true
LLVM_VERSION_FOUND=$LLVM_VERSION LLVM_VERSION_FOUND=$LLVM_VERSION
else else
# #
# Better to compile it than use minimum version from repo... # Better to compile it than use minimum version from repo...
# #
install_packages_RPM libffi-devel install_packages_RPM libffi-devel
# LLVM can't find the fedora ffi header dir... # LLVM can't find the fedora ffi header dir...
_FFI_INCLUDE_DIR=`rpm -ql libffi-devel | grep -e ".*/ffi.h" | sed -r 's/(.*)\/ffi.h/\1/'` _FFI_INCLUDE_DIR=`rpm -ql libffi-devel | grep -e ".*/ffi.h" | sed -r 's/(.*)\/ffi.h/\1/'`
INFO "" INFO ""
compile_LLVM compile_LLVM
have_llvm=true have_llvm=true
LLVM_VERSION_FOUND=$LLVM_VERSION LLVM_VERSION_FOUND=$LLVM_VERSION
fi fi
fi fi
@ -1872,17 +1860,289 @@ install_RPM() {
fi fi
fi fi
if $FFMPEG_SKIP; then
INFO "WARNING! Skipping FFMpeg installation, as requested..."
else
check_package_version_ge_RPM ffmpeg $FFMPEG_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_RPM ffmpeg ffmpeg-devel
else
INFO ""
compile_FFmpeg
fi
fi
}
get_package_version_ARCH() {
pacman -Si $1 | grep Version | tail -n 1 | sed -r 's/.*:\s+(([0-9]+\.?)+).*/\1/'
}
check_package_ARCH() {
r=`pacman -Si $1 | grep -c 'Description'`
if [ $r -ge 1 ]; then
return 0
else
return 1
fi
}
check_package_version_match_ARCH() {
v=`get_package_version_ARCH $1`
if [ -z "$v" ]; then
return 1
fi
version_match $v $2
return $?
}
check_package_version_ge_ARCH() {
v=`get_package_version_ARCH $1`
if [ -z "$v" ]; then
return 1
fi
version_ge $v $2
return $?
}
install_packages_ARCH() {
sudo pacman -S --needed --noconfirm $@
if [ $? -ge 1 ]; then
ERROR "pacman failed to install requested packages, exiting."
exit 1
fi
}
install_ARCH() {
INFO ""
INFO "Installing dependencies for ARCH-based distribution"
INFO ""
INFO "`eval _echo "$COMMON_INFO"`"
INFO ""
read -p "Do you want to continue (Y/n)?"
[ "$(echo ${REPLY:=Y} | tr [:upper:] [:lower:])" != "y" ] && exit
# Check for sudo...
if [ ! -x "/usr/bin/sudo" ]; then
INFO ""
INFO "This script requires sudo but it is not installed."
INFO "Please setup sudo according to:"
INFO "https://wiki.archlinux.org/index.php/Sudo"
INFO "and try again."
INFO ""
exit
fi
sudo pacman -Sy
# These libs should always be available in arch official repository...
OPENJPEG_DEV="openjpeg"
VORBIS_DEV="libvorbis"
THEORA_DEV="libtheora"
_packages="base-devel scons cmake libxi glew libpng libtiff wget openal \
$OPENJPEG_DEV $VORBIS_DEV $THEORA_DEV openexr yasm sdl fftw"
OPENJPEG_USE=true
VORBIS_USE=true
THEORA_USE=true
if $WITH_ALL; then
# No libspacenav in official arch repos...
_packages="$_packages jack"
fi
INFO ""
install_packages_ARCH $_packages
INFO ""
X264_DEV="x264"
check_package_version_ge_ARCH $X264_DEV $X264_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_ARCH $X264_DEV
X264_USE=true
fi
if $WITH_ALL; then
INFO ""
XVID_DEV="xvidcore"
check_package_ARCH $XVID_DEV
if [ $? -eq 0 ]; then
install_packages_ARCH $XVID_DEV
XVID_USE=true
fi
INFO ""
MP3LAME_DEV="lame"
check_package_ARCH $MP3LAME_DEV
if [ $? -eq 0 ]; then
install_packages_ARCH $MP3LAME_DEV
MP3LAME_USE=true
fi
INFO ""
VPX_DEV="libvpx"
check_package_version_ge_ARCH $VPX_DEV $VPX_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_ARCH $VPX_DEV
VPX_USE=true
fi
fi
INFO ""
if $PYTHON_SKIP; then
INFO "WARNING! Skipping Python installation, as requested..."
else
check_package_version_ge_ARCH python $PYTHON_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_ARCH python
INFO ""
if $WITH_NUMPY; then
if $NUMPY_SKIP; then
INFO "WARNING! Skipping NumPy installation, as requested..."
else
check_package_version_ge_ARCH python-numpy $NUMPY_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_ARCH python-numpy
else
INFO "WARNING! Sorry, using python package but no numpy package available!"
fi
fi
fi
else
compile_Python
INFO ""
if $WITH_NUMPY; then
if $NUMPY_SKIP; then
INFO "WARNING! Skipping NumPy installation, as requested..."
else
compile_Numpy
fi
fi
fi
fi
INFO ""
if $BOOST_SKIP; then
INFO "WARNING! Skipping Boost installation, as requested..."
else
check_package_version_ge_ARCH boost $BOOST_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_ARCH boost
else
compile_Boost
fi
fi
INFO ""
if $OCIO_SKIP; then
INFO "WARNING! Skipping OpenColorIO installation, as requested..."
else
check_package_version_ge_ARCH opencolorio $OCIO_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_ARCH opencolorio yaml-cpp tinyxml
else
install_packages_ARCH yaml-cpp tinyxml
compile_OCIO
fi
fi
INFO ""
if $OIIO_SKIP; then
INFO "WARNING! Skipping OpenImageIO installation, as requested..."
else
check_package_version_ge_ARCH openimageio $OIIO_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_ARCH openimageio
else
compile_OIIO
fi
fi
if $WITH_OSL; then
have_llvm=false
INFO ""
if $LLVM_SKIP; then
INFO "WARNING! Skipping LLVM installation, as requested (this also implies skipping OSL!)..."
else
check_package_version_ge_ARCH llvm $LLVM_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_ARCH llvm clang
have_llvm=true
LLVM_VERSION=`check_package_version_ge_ARCH llvm`
LLVM_VERSION_FOUND=$LLVM_VERSION
else
install_packages_ARCH libffi
# LLVM can't find the arch ffi header dir...
_FFI_INCLUDE_DIR=`pacman -Ql libffi | grep -e ".*/ffi.h" | awk '{print $2}' | sed -r 's/(.*)\/ffi.h/\1/'`
# LLVM 3.1 needs python2 to build and arch defaults to python3
_PYTHON2_BIN="/usr/bin/python2"
INFO ""
compile_LLVM
have_llvm=true
LLVM_VERSION_FOUND=$LLVM_VERSION
fi
fi
if $OSL_SKIP; then
INFO ""
INFO "WARNING! Skipping OpenShadingLanguage installation, as requested..."
else
if $have_llvm; then
check_package_version_ge_ARCH openshadinglanguage $OSL_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_ARCH openshadinglanguage
else
#XXX Note: will fail to build with LLVM 3.2!
INFO ""
install_packages_ARCH git intel-tbb
INFO ""
compile_OSL
fi
fi
fi
fi
INFO ""
if $WITH_OPENCOLLADA; then
if $OPENCOLLADA_SKIP; then
INFO "WARNING! Skipping OpenCOLLADA installation, as requested..."
else
INFO ""
check_package_ARCH opencollada
if [ $? -eq 0 ]; then
install_packages_ARCH opencollada
else
install_packages_ARCH pcre git
INFO ""
compile_OpenCOLLADA
fi
# Find path to libxml shared lib...
_XML2_LIB=`pacman -Ql libxml2 | grep -e ".*/libxml2.so$" | gawk '{print $2}'`
fi
fi
INFO "" INFO ""
if $FFMPEG_SKIP; then if $FFMPEG_SKIP; then
INFO "WARNING! Skipping FFMpeg installation, as requested..." INFO "WARNING! Skipping FFMpeg installation, as requested..."
else else
# Always for now, not sure which packages should be installed check_package_version_ge_ARCH ffmpeg $FFMPEG_VERSION_MIN
compile_FFmpeg if [ $? -eq 0 ]; then
install_packages_ARCH ffmpeg
else
compile_FFmpeg
fi
fi fi
} }
print_info_ffmpeglink_DEB() { print_info_ffmpeglink_DEB() {
if $ALL_STATIC; then if $ALL_STATIC; then
dpkg -L $_packages | grep -e ".*\/lib[^\/]\+\.a" | gawk '{ printf(nlines ? "'"$_ffmpeg_list_sep"'%s" : "%s", $0); nlines++ }' dpkg -L $_packages | grep -e ".*\/lib[^\/]\+\.a" | gawk '{ printf(nlines ? "'"$_ffmpeg_list_sep"'%s" : "%s", $0); nlines++ }'
@ -1900,6 +2160,11 @@ print_info_ffmpeglink_RPM() {
# fi # fi
} }
print_info_ffmpeglink_ARCH() {
# No static libs...
pacman -Ql $_packages | grep -e ".*\/lib[^\/]\+\.so$" | gawk '{ printf(nlines ? "'"$_ffmpeg_list_sep"'%s" : "%s", gensub(/.*lib([^\/]+)\.so/, "\\1", $0)); nlines++ }'
}
print_info_ffmpeglink() { print_info_ffmpeglink() {
# This func must only print a ';'-separated list of libs... # This func must only print a ';'-separated list of libs...
if [ -z "$DISTRO" ]; then if [ -z "$DISTRO" ]; then
@ -1938,16 +2203,12 @@ print_info_ffmpeglink() {
_packages="$_packages $OPENJPEG_DEV" _packages="$_packages $OPENJPEG_DEV"
fi fi
if $SCHRO_USE; then
_packages="$_packages $SCHRO_DEV"
fi
if [ "$DISTRO" = "DEB" ]; then if [ "$DISTRO" = "DEB" ]; then
print_info_ffmpeglink_DEB print_info_ffmpeglink_DEB
elif [ "$DISTRO" = "RPM" ]; then elif [ "$DISTRO" = "RPM" ]; then
print_info_ffmpeglink_RPM print_info_ffmpeglink_RPM
# elif [ "$DISTRO" = "ARCH" ]; then elif [ "$DISTRO" = "ARCH" ]; then
# print_info_ffmpeglink_ARCH print_info_ffmpeglink_ARCH
# XXX TODO! # XXX TODO!
else INFO "<Could not determine additional link libraries needed for ffmpeg, replace this by valid list of libs...>" else INFO "<Could not determine additional link libraries needed for ffmpeg, replace this by valid list of libs...>"
fi fi
@ -1966,6 +2227,12 @@ print_info() {
INFO " $_1" INFO " $_1"
INFO " $_2" INFO " $_2"
_buildargs="$_buildargs $_1 $_2" _buildargs="$_buildargs $_1 $_2"
# XXX Arch linux needs to link freetype dynamically...
if [ "$DISTRO" = "ARCH" ]; then
_1="-D FREETYPE_LIBRARY=/usr/lib/libfreetype.so"
INFO " $_1"
_buildargs="$_buildargs $_1"
fi
fi fi
if [ -d $INST/boost ]; then if [ -d $INST/boost ]; then
@ -1978,16 +2245,39 @@ print_info() {
_1="-D WITH_BOOST_ICU=ON" _1="-D WITH_BOOST_ICU=ON"
INFO " $_1" INFO " $_1"
_buildargs="$_buildargs $_1" _buildargs="$_buildargs $_1"
# XXX Arch linux fails static linking without these...
if [ "$DISTRO" = "ARCH" ]; then
_1="-D ICU_LIBRARY_DATA=/usr/lib/libicudata.so"
_2="-D ICU_LIBRARY_I18N=/usr/lib/libicui18n.so"
_3="-D ICU_LIBRARY_IO=/usr/lib/libicuio.so"
_4="-D ICU_LIBRARY_LE=/usr/lib/libicule.so"
_5="-D ICU_LIBRARY_LX=/usr/lib/libiculx.so"
_6="-D ICU_LIBRARY_TU=/usr/lib/libicutu.so"
_7="-D ICU_LIBRARY_UC=/usr/lib/libicuuc.so"
INFO " $_1"
INFO " $_2"
INFO " $_3"
INFO " $_4"
INFO " $_5"
INFO " $_6"
INFO " $_7"
_buildargs="$_buildargs $_1 $_2 $_3 $_4 $_5 $_6 $_7"
fi
fi fi
if [ -d $INST/osl -a $WITH_OSL == true ]; then if $WITH_OSL; then
_1="-D CYCLES_OSL=$INST/osl" _1="-D WITH_CYCLES_OSL=ON"
_2="-D WITH_CYCLES_OSL=ON" _2="-D WITH_LLVM=ON"
_3="-D LLVM_VERSION=$LLVM_VERSION_FOUND" _3="-D LLVM_VERSION=$LLVM_VERSION_FOUND"
INFO " $_1" INFO " $_1"
INFO " $_2" INFO " $_2"
INFO " $_3" INFO " $_3"
_buildargs="$_buildargs $_1 $_2 $_3" _buildargs="$_buildargs $_1 $_2 $_3"
if [ -d $INST/osl ]; then
_1="-D CYCLES_OSL=$INST/osl"
INFO " $_1"
_buildargs="$_buildargs $_1"
fi
if [ -d $INST/llvm ]; then if [ -d $INST/llvm ]; then
_1="-D LLVM_DIRECTORY=$INST/llvm" _1="-D LLVM_DIRECTORY=$INST/llvm"
_2="-D LLVM_STATIC=ON" _2="-D LLVM_STATIC=ON"
@ -1997,7 +2287,7 @@ print_info() {
fi fi
fi fi
if [ -d $INST/opencollada -a $WITH_OPENCOLLADA == true ]; then if $WITH_OPENCOLLADA; then
_1="-D WITH_OPENCOLLADA=ON" _1="-D WITH_OPENCOLLADA=ON"
INFO " $_1" INFO " $_1"
_buildargs="$_buildargs $_1" _buildargs="$_buildargs $_1"
@ -2008,14 +2298,15 @@ print_info() {
fi fi
fi fi
_1="-D WITH_CODEC_FFMPEG=ON"
_2="-D FFMPEG_LIBRARIES='avformat;avcodec;avutil;avdevice;swscale;rt;`print_info_ffmpeglink`'"
INFO " $_1"
INFO " $_2"
_buildargs="$_buildargs $_1 $_2"
if [ -d $INST/ffmpeg ]; then if [ -d $INST/ffmpeg ]; then
_1="-D WITH_CODEC_FFMPEG=ON" _1="-D FFMPEG=$INST/ffmpeg"
_2="-D FFMPEG=$INST/ffmpeg"
_3="-D FFMPEG_LIBRARIES='avformat;avcodec;avutil;avdevice;swscale;rt;`print_info_ffmpeglink`'"
INFO " $_1" INFO " $_1"
INFO " $_2" _buildargs="$_buildargs $_1"
INFO " $_3"
_buildargs="$_buildargs $_1 $_2 $_3"
fi fi
INFO "" INFO ""
@ -2030,27 +2321,37 @@ print_info() {
INFO "BF_PYTHON_ABI_FLAGS = 'm'" INFO "BF_PYTHON_ABI_FLAGS = 'm'"
fi fi
INFO "WITH_BF_OCIO = True"
if [ -d $INST/ocio ]; then if [ -d $INST/ocio ]; then
INFO "BF_OCIO = '$INST/ocio'" INFO "BF_OCIO = '$INST/ocio'"
fi fi
INFO "WITH_BF_OIIO = True"
if [ -d $INST/oiio ]; then if [ -d $INST/oiio ]; then
INFO "BF_OIIO = '$INST/oiio'" INFO "BF_OIIO = '$INST/oiio'"
fi fi
INFO "WITH_BF_CYCLES = True"
if [ -d $INST/osl ]; then if [ -d $INST/osl ]; then
INFO "BF_OSL = '$INST/osl'" INFO "BF_OSL = '$INST/osl'"
fi fi
INFO "WITH_BF_BOOST = True"
if [ -d $INST/boost ]; then if [ -d $INST/boost ]; then
INFO "BF_BOOST = '$INST/boost'" INFO "BF_BOOST = '$INST/boost'"
INFO "WITH_BF_BOOST = True"
fi fi
_ffmpeg_list_sep=" "
INFO "BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice `print_info_ffmpeglink`'"
if [ -d $INST/ffmpeg ]; then if [ -d $INST/ffmpeg ]; then
INFO "BF_FFMPEG = '$INST/ffmpeg'" INFO "BF_FFMPEG = '$INST/ffmpeg'"
_ffmpeg_list_sep=" " fi
INFO "BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice `print_info_ffmpeglink`'"
if ! $WITH_ALL; then
INFO "WITH_BF_3DMOUSE = False"
# No libspacenav in official arch repos...
elif [ "$DISTRO" = "ARCH" ]; then
INFO "WITH_BF_3DMOUSE = False"
fi fi
INFO "" INFO ""
@ -2073,8 +2374,8 @@ elif [ "$DISTRO" = "DEB" ]; then
install_DEB install_DEB
elif [ "$DISTRO" = "RPM" ]; then elif [ "$DISTRO" = "RPM" ]; then
install_RPM install_RPM
#elif [ "$DISTRO" = "ARCH" ]; then elif [ "$DISTRO" = "ARCH" ]; then
# install_ARCH install_ARCH
fi fi
print_info | tee BUILD_NOTES.txt print_info | tee BUILD_NOTES.txt

@ -398,6 +398,10 @@ Utility functions
.. function:: PrintMemInfo() .. function:: PrintMemInfo()
Prints engine statistics into the console Prints engine statistics into the console
.. function:: getProfileInfo()
Returns a Python dictionary that contains the same information as the on screen profiler. The keys are the profiler categories and the values are tuples with the first element being time taken (in ms) and the second element being the percentage of total time.
********* *********
Constants Constants

@ -1110,7 +1110,8 @@ namespace {
} }
// copy up to the end of the path. // copy up to the end of the path.
std::copy(base_loop.begin() + pos, base_loop.begin() + e1_1, std::back_inserter(out)); if (pos < e1_1)
std::copy(base_loop.begin() + pos, base_loop.begin() + e1_1, std::back_inserter(out));
CARVE_ASSERT(base_loop[e1_1] == p1.back()); CARVE_ASSERT(base_loop[e1_1] == p1.back());
std::copy(p1.rbegin(), p1.rend() - 1, std::back_inserter(out)); std::copy(p1.rbegin(), p1.rend() - 1, std::back_inserter(out));

@ -1,3 +1,179 @@
commit f46de9e697eb5b8756084615e29ded48600a4d39
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Thu Mar 21 15:31:35 2013 +0600
Silent no previous declaration warning for FindParameterBlockOrDie
Use anonymous namespace for this. Also move some surrounding static
function to this anonymous namespace.
Change-Id: Ie235eb7936976563a9db115ec13c59e6e6869b96
commit 16636efeffacdd69d075a60ea8a94d98fd81c6fd
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Thu Mar 21 15:12:01 2013 +0600
Compilation fix for msvc2010
Usage of back_inserter requires <iterator> header when using msvc2010
Change-Id: I92ee1649795ce0468ce337fc414eb0ca6e90c51e
commit ac0d416991274ed67fe85371f09b07f706a6db9a
Author: Pablo Speciale <pablo.speciale@gmail.com>
Date: Wed Mar 20 18:32:14 2013 -0700
google-glog link wasn't working, 'http://' twice
Change-Id: I9cd96d3609f9b1ba31cd480fef1702972be86741
commit 55b6c966c4f697cb5d11982201733aa3bce7a5a7
Author: Pablo Speciale <pablo.speciale@gmail.com>
Date: Wed Mar 20 17:44:04 2013 -0700
* Fixed the location of the Ceres doc (once installed with 'make install')
* Doing 'make ceres_docs' can be used to create the documentation (if the BUILD_DOCUMENTATION=ON)
* Included the copyright boilerplate for FindSphinx.cmake
Change-Id: Iea21eba9e68384b4fe72c85fa88c76b0ba8a7a1d
commit a986912555b304a47dd0c2a02892046fde15d091
Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Wed Mar 20 11:50:34 2013 -0700
Update version history
Change-Id: I238279719219a26d0d1bb32e0610f41007d3dcef
commit 16dbf11626c52c013f1dca6375f993a554e31d51
Author: Pablo Speciale <pablo.speciale@gmail.com>
Date: Mon Mar 11 14:44:02 2013 -0700
Added CeresConfig.cmake based on this example:
https://projects.kde.org/projects/kde/kdeexamples/repository/revisions/master/show/buildsystem/HowToInstallALibrary
Change-Id: I130cac5d43d9fbbf359abc04d3691e25c4e2bb63
commit 015d57f173fab7ea040ee01474101e208ff72be6
Author: Pablo Speciale <pablo.speciale@gmail.com>
Date: Tue Mar 19 14:05:14 2013 -0700
Avoiding the Warning: "deprecated conversion from string constant to char*"
Change-Id: Ifa47f9b0724f79c5c695828628c89818ddefd844
commit c51b11c1046366035e7da95e4d8a78100ef3f153
Author: Pablo Speciale <pablo.speciale@gmail.com>
Date: Tue Mar 12 00:56:56 2013 -0700
Sphinx and CMake, based on this example:
http://ericscottbarr.com/blog/2012/03/sphinx-and-cmake-beautiful-documentation-for-c-projects/
The 'docs/CMakeLists.txt' file was deleted in this commit: 0abfb8f46f534b05413bb4d64b960d6fd0a9befb
Thanks to Arnaud Gelas, he has passed some links:
https://github.com/InsightSoftwareConsortium/ITKExamples/blob/master/CMake/FindSphinx.cmake
https://github.com/InsightSoftwareConsortium/ITKExamples/blob/master/CMakeLists.txt#L120-L154
Change-Id: Ic65e7f8ec5280d1e71a897a144417a21761c5553
commit 793a339335d8d52279efb49bcd704d196646efb5
Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Wed Mar 13 12:14:00 2013 -0700
Make Android.mk play better with the external consraints
Change-Id: Ia0a1037d97c032a4ba1a9acbf4e04c192d12ee61
commit 700d50d8074f0273b305fe6d9f795f1dcb988048
Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Tue Mar 12 16:12:42 2013 -0700
Lint cleanup from William Rucklidge
Change-Id: Iacbf77246109f687708696eee7fb6144d23e7ec5
commit 8140f0fc979f5728f37cfb68362f31e7e37b46bb
Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Tue Mar 12 09:45:08 2013 -0700
Modularize the build.
1. Add -DLINE_SEARCH_MINIMIZER to CMake to make the line search
minimizer optional.
2. Better handling of -DSUITESPARSE/-DCXSPARSE in top level cmake
file.
3. Disable code which will never be used if SuiteSparse and/or
CXSparse is not available.
4. Update build docs.
5. Update jni/Android.mk
6. Minor lint cleanup from William Rucklidge.
Change-Id: If60460a858000df82faed7a6bb056dd2bfdde562
commit c59c1e44727c62d43523b672c1c132865cd25784
Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Mon Mar 11 17:28:38 2013 -0700
Propagate ifdefs correctly to improve build efficiency.
With -DRESTRICT_SCHUR_SPECIALIZATIONS, now the various
specializations are empty, decreasing build time and
reducing the size of the static library.
Change-Id: I8ec431279741a9a83516a4167c54a364c4608143
commit 32874b861fc54b33aa4272e8c81bb001aa1e1e60
Author: Yuliy Schwartzburg <syx818@gmail.com>
Date: Fri Mar 8 11:30:44 2013 +0100
Fix CMake "LIB_SUFFIX" for non-linux installations
Change-Id: Ieb8a2825a4378b388149e7934ecc7b96ba5a29fa
commit 58b8c68f29c2c15edbc5f77102796df661020312
Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Sat Mar 9 17:17:43 2013 -0800
Clean up rotation.h
Change-Id: I3370c9883728cda068c9650a2c2a50641fd8299c
commit 020d8e1e48f341f3b990ac449998d36aaca2771f
Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Wed Mar 6 16:19:26 2013 -0800
Better error reporting in the modeling API.
More informative error when user passes an
unknown parameter block to Problem methods.
Change-Id: I517360e4b0b55814904ca3e664877d76ad3f59e8
commit 5e7ce8a950cf5794c63817827ce66a3a4e66e7b6
Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Wed Mar 6 11:38:41 2013 -0800
Fix Problem::Evaluate documentation
Change-Id: I8c70a24743cff2d9cface99ef0f5d34c78f769c6
commit 0a4f5f8f7428148f21183e743d091d2079406604
Author: Taylor Braun-Jones <taylor@braun-jones.org>
Date: Wed Mar 6 00:00:32 2013 -0500
Fix operator() signature in several sections of the documentation
Change-Id: I73f9d150a738f7b136fbc1f98fc60b0f306bd7f9
commit 2c648dbc43025927301684fc82d95ccf6b6c21bc
Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Tue Mar 5 15:20:15 2013 -0800
Make examples independent of ceres internals.
Change-Id: I6b6913e067a86fea713646218c8da1439d349d74
commit e7148795c3f2ce1f6625a7c81545707a6cbde3eb commit e7148795c3f2ce1f6625a7c81545707a6cbde3eb
Author: Sameer Agarwal <sameeragarwal@google.com> Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Mon Mar 4 10:17:30 2013 -0800 Date: Mon Mar 4 10:17:30 2013 -0800
@ -429,199 +605,3 @@ Date: Fri Feb 15 14:26:56 2013 -0800
Solver::Summary::FullReport() supports line search now. Solver::Summary::FullReport() supports line search now.
Change-Id: Ib08d300198b85d9732cfb5785af4235ca4bd5226 Change-Id: Ib08d300198b85d9732cfb5785af4235ca4bd5226
commit fbbea464d1c9575d8224220d3e61f92d93fe9739
Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Fri Feb 15 11:25:03 2013 -0800
Update documentation.
Change-Id: Idb03741fab9facbbbda85d5a82723f0b4c1c6c60
commit 8e1f83c4c457fb7238eb342eab744c5570b73c4d
Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Fri Feb 15 08:35:40 2013 -0800
Speed up Problem construction and destruction.
Change-Id: I3147b0b60eedf40f8453d5a39ff04a572c445a2f
commit efb47f39c31f0ef1bb9c015c8c0d114153df6379
Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Thu Feb 14 19:44:11 2013 -0800
Documentation update
Change-Id: I0fec43bff4fe0ea6cd2d2a8b34dac2330a517da0
commit be418a336cae5672111e0f6989e6d8d6c1fa24a6
Author: Markus Moll <markus.moll@esat.kuleuven.be>
Date: Fri Feb 15 17:19:28 2013 +0100
Fix evaluation of initial cost and corresponding test
Commit f102a68e411d11b4864e17b69a2d781e9c2692ad seems to have introduced
a bug in both solver_impl.cc and solver_impl_test.cc
solver_impl_test showed 3 errors, where two were due to ceres NOT
failing when the test expected that, and one was due to the initial cost
being wrong (-1 instead of 0.5)
Ceres now does not attempt to evaluate the initial cost if
options.return_initial_xxx is not set. It therefore did not fail in
the tests.
It also seems that the CERES_EVALUATE macro erroneously always sets
final_cost, even when called with 'initial' as argument.
Change-Id: Ia3c3eeb476e7023a3f80b201124010d6c67e9824
commit 974513a41ff1ddc671d3dc6aa09ce708bbe447da
Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Tue Feb 12 14:22:40 2013 -0800
Bug fix in DynamicAutoDiffCostFunction
Add handling of constant parameter blocks.
Change-Id: I8b2ea79f47e190604fc4bed27705798240689f71
commit 3130b3cea4028c71d9ae18b7465d7627f29fef7d
Author: Keir Mierle <mierle@gmail.com>
Date: Mon Feb 11 19:39:29 2013 -0800
Add support for dynamic autodiff
Change-Id: I17d573696172ab691a9653db99a620e4bc1bd0d0
commit c58e6dc3ea550302c8151003b17e9bc2a1acc316
Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Mon Feb 11 16:41:06 2013 -0800
More refined event logging in solver_impl.cc
Change-Id: Ie3061c921c006d2600d16185c690f52ccf816f68
commit f102a68e411d11b4864e17b69a2d781e9c2692ad
Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Mon Feb 11 15:08:40 2013 -0800
Remove extraneous initial and final evals.
Change-Id: I80ed87435f399cbf452c68be7ea1e7139696aa4a
commit 0593747ee09e21a9c0a2b604d51e21a6cdd21315
Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Mon Feb 11 13:57:12 2013 -0800
Fix a memory leak in cxsparse.cc
Thanks to Alexander Mordvintsev for reporting it.
Change-Id: Ia872be42ce80209e46722fc16a928496cf97e256
commit 0abfb8f46f534b05413bb4d64b960d6fd0a9befb
Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Mon Feb 11 13:40:04 2013 -0800
Delete the tex documentation.
Change-Id: I15c78a8b33c5fd94941238814ac023a8fb251a20
commit 085cd4a6641c404334d17e5ea38f9e5b68a06ba7
Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Wed Feb 6 14:31:07 2013 -0800
Rewrite of the tutorial.
1. Quicker starting point.
2. Better discussion of derivatives.
3. Better hyperlinking to code and class documentation.
4. New robust estimation example.
5. Better naming of example code.
6. Removed dependency on gflags in all the core examples covered
in the tutorial.
Change-Id: Ibf3c7fe946fa2b4d22f8916a9366df267d34ca26
commit c0fdc9753909fc37fed2cb5e0fcc02fc65789d68
Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Wed Feb 6 14:31:07 2013 -0800
Update nist.cc to better evaluate results.
Ceres beats Minpack and HBN handily.
Change-Id: I7df8a47b753202ed0b53ab128ce48466bf9f8083
commit d91b671798125fd4889914d92a29cf0f7a5fef21
Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Wed Feb 6 01:08:40 2013 -0800
More small changes
More small changes to the docs.
1. Better landing page.
2. Minor tweaks to the side bar.
3. Reference to more example code.
4. Local MathJax references.
Change-Id: I39b9436dc2803732a875bbbee7f15802c4934031
commit 42a84b87fa5cc34551244a3b2b6a3e1f13a29514
Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Fri Feb 1 12:22:53 2013 -0800
Expand reporting of timing information.
1. Add an ExecutionSummary object to record execution
information about Ceres objects.
2. Add an EventLogger object to log events in a function call.
3. Add a ScopedExecutionTimer object to log times in ExecutionSummary.
4. Instrument ProgramEvaluator and all the linear solvers
to report their timing statistics.
5. Connect the timing statistics to Summary::FullReport.
6. Add high precision timer on unix systems using
gettimeofday() call.
7. Various minor clean ups all around.
Change-Id: I5e09804b730b09535484124be7dbc1c58eccd1d4
commit 08c891fcb6ea1bf66e6d4619273765a644605dfc
Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Mon Feb 4 20:18:58 2013 -0800
Various small changes.
1. Compact build instructions.
2. Lots of small edits by Simon Fuhrmann.
Change-Id: I8c0c67922021041dcf7f4ecdb6c6e6dd2e2fd7e5
commit e2e857ad6be322e9cf750d4b11ccf10800e57d96
Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Mon Feb 4 19:40:45 2013 -0800
Sidebar has global table of contents.
Change-Id: I7fe9053868a4660b0db8d7607ee618fc30ddaefd
commit b9182147d96f865673c2756ced4cbb127ca082a3
Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Mon Feb 4 17:55:25 2013 -0800
Change the theme to be closer to ReadTheDocs.org
Change-Id: I61a76f5b5e5c292b54fdf51b66940ce80bd1cd5f
commit 3d87b72c895835bbfc10965d50dc96608632114d
Author: Sameer Agarwal <sameeragarwal@google.com>
Date: Sat Feb 2 00:49:31 2013 -0800
Convert documentation from LaTeX to Sphinx.
A live version of the doc can be found at
http://homes.cs.washington.edu/~sagarwal/ceres-solver/
As it stands, the documentation has better hyperlinking
and coverage than the latex documentation now.
Change-Id: I7ede3aa83b9b9ef25104caf331e5727b4f5beae5

@ -68,11 +68,11 @@
// new IntrinsicProjection(observation_))); // new IntrinsicProjection(observation_)));
// } // }
// template <typename T> // template <typename T>
// bool operator(const T* rotation, // bool operator()(const T* rotation,
// const T* translation, // const T* translation,
// const T* intrinsics, // const T* intrinsics,
// const T* point, // const T* point,
// T* residual) const { // T* residual) const {
// T transformed_point[3]; // T transformed_point[3];
// RotateAndTranslatePoint(rotation, translation, point, transformed_point); // RotateAndTranslatePoint(rotation, translation, point, transformed_point);
// //

@ -38,7 +38,7 @@
// //
// struct F { // struct F {
// template<typename T> // template<typename T>
// bool operator(const T *x, const T *y, ..., T *z) { // bool operator()(const T *x, const T *y, ..., T *z) {
// // Compute z[] based on x[], y[], ... // // Compute z[] based on x[], y[], ...
// // return true if computation succeeded, false otherwise. // // return true if computation succeeded, false otherwise.
// } // }
@ -102,7 +102,7 @@
// //
// struct F { // struct F {
// template<typename T> // template<typename T>
// bool operator(const T *p, const T *q, T *z) { // bool operator()(const T *p, const T *q, T *z) {
// // ... // // ...
// } // }
// }; // };

@ -71,11 +71,11 @@
// } // }
// //
// template <typename T> // template <typename T>
// bool operator(const T* rotation, // bool operator()(const T* rotation,
// const T* translation, // const T* translation,
// const T* intrinsics, // const T* intrinsics,
// const T* point, // const T* point,
// T* residuals) const { // T* residuals) const {
// T transformed_point[3]; // T transformed_point[3];
// RotateAndTranslatePoint(rotation, translation, point, transformed_point); // RotateAndTranslatePoint(rotation, translation, point, transformed_point);
// return (*intrinsic_projection_)(intrinsics, transformed_point, residual); // return (*intrinsic_projection_)(intrinsics, transformed_point, residual);

@ -383,7 +383,7 @@ class Problem {
// //
// Problem problem; // Problem problem;
// double x = 1; // double x = 1;
// problem.Add(new MyCostFunction, NULL, &x); // problem.AddResidualBlock(new MyCostFunction, NULL, &x);
// //
// double cost = 0.0; // double cost = 0.0;
// problem.Evaluate(Problem::EvaluateOptions(), &cost, NULL, NULL, NULL); // problem.Evaluate(Problem::EvaluateOptions(), &cost, NULL, NULL, NULL);

@ -83,7 +83,7 @@ MatrixAdapter<T, 3, 1> RowMajorAdapter3x3(T* pointer);
// The implementation may be used with auto-differentiation up to the first // The implementation may be used with auto-differentiation up to the first
// derivative, higher derivatives may have unexpected results near the origin. // derivative, higher derivatives may have unexpected results near the origin.
template<typename T> template<typename T>
void AngleAxisToQuaternion(T const* angle_axis, T* quaternion); void AngleAxisToQuaternion(const T* angle_axis, T* quaternion);
// Convert a quaternion to the equivalent combined axis-angle representation. // Convert a quaternion to the equivalent combined axis-angle representation.
// The value quaternion must be a unit quaternion - it is not normalized first, // The value quaternion must be a unit quaternion - it is not normalized first,
@ -92,13 +92,13 @@ void AngleAxisToQuaternion(T const* angle_axis, T* quaternion);
// The implemention may be used with auto-differentiation up to the first // The implemention may be used with auto-differentiation up to the first
// derivative, higher derivatives may have unexpected results near the origin. // derivative, higher derivatives may have unexpected results near the origin.
template<typename T> template<typename T>
void QuaternionToAngleAxis(T const* quaternion, T* angle_axis); void QuaternionToAngleAxis(const T* quaternion, T* angle_axis);
// Conversions between 3x3 rotation matrix (in column major order) and // Conversions between 3x3 rotation matrix (in column major order) and
// axis-angle rotation representations. Templated for use with // axis-angle rotation representations. Templated for use with
// autodifferentiation. // autodifferentiation.
template <typename T> template <typename T>
void RotationMatrixToAngleAxis(T const* R, T* angle_axis); void RotationMatrixToAngleAxis(const T* R, T* angle_axis);
template <typename T, int row_stride, int col_stride> template <typename T, int row_stride, int col_stride>
void RotationMatrixToAngleAxis( void RotationMatrixToAngleAxis(
@ -106,11 +106,11 @@ void RotationMatrixToAngleAxis(
T* angle_axis); T* angle_axis);
template <typename T> template <typename T>
void AngleAxisToRotationMatrix(T const* angle_axis, T* R); void AngleAxisToRotationMatrix(const T* angle_axis, T* R);
template <typename T, int row_stride, int col_stride> template <typename T, int row_stride, int col_stride>
void AngleAxisToRotationMatrix( void AngleAxisToRotationMatrix(
T const* angle_axis, const T* angle_axis,
const MatrixAdapter<T, row_stride, col_stride>& R); const MatrixAdapter<T, row_stride, col_stride>& R);
// Conversions between 3x3 rotation matrix (in row major order) and // Conversions between 3x3 rotation matrix (in row major order) and
@ -300,14 +300,14 @@ inline void QuaternionToAngleAxis(const T* quaternion, T* angle_axis) {
// occurs and deals with them by taking code paths that are guaranteed // occurs and deals with them by taking code paths that are guaranteed
// to not perform division by a small number. // to not perform division by a small number.
template <typename T> template <typename T>
inline void RotationMatrixToAngleAxis(const T * R, T * angle_axis) { inline void RotationMatrixToAngleAxis(const T* R, T* angle_axis) {
RotationMatrixToAngleAxis(ColumnMajorAdapter3x3(R), angle_axis); RotationMatrixToAngleAxis(ColumnMajorAdapter3x3(R), angle_axis);
} }
template <typename T, int row_stride, int col_stride> template <typename T, int row_stride, int col_stride>
void RotationMatrixToAngleAxis( void RotationMatrixToAngleAxis(
const MatrixAdapter<const T, row_stride, col_stride>& R, const MatrixAdapter<const T, row_stride, col_stride>& R,
T * angle_axis) { T* angle_axis) {
// x = k * 2 * sin(theta), where k is the axis of rotation. // x = k * 2 * sin(theta), where k is the axis of rotation.
angle_axis[0] = R(2, 1) - R(1, 2); angle_axis[0] = R(2, 1) - R(1, 2);
angle_axis[1] = R(0, 2) - R(2, 0); angle_axis[1] = R(0, 2) - R(2, 0);
@ -385,13 +385,13 @@ void RotationMatrixToAngleAxis(
} }
template <typename T> template <typename T>
inline void AngleAxisToRotationMatrix(const T * angle_axis, T * R) { inline void AngleAxisToRotationMatrix(const T* angle_axis, T* R) {
AngleAxisToRotationMatrix(angle_axis, ColumnMajorAdapter3x3(R)); AngleAxisToRotationMatrix(angle_axis, ColumnMajorAdapter3x3(R));
} }
template <typename T, int row_stride, int col_stride> template <typename T, int row_stride, int col_stride>
void AngleAxisToRotationMatrix( void AngleAxisToRotationMatrix(
const T * angle_axis, const T* angle_axis,
const MatrixAdapter<T, row_stride, col_stride>& R) { const MatrixAdapter<T, row_stride, col_stride>& R) {
static const T kOne = T(1.0); static const T kOne = T(1.0);
const T theta2 = DotProduct(angle_axis, angle_axis); const T theta2 = DotProduct(angle_axis, angle_axis);

@ -29,6 +29,8 @@
// Author: David Gallup (dgallup@google.com) // Author: David Gallup (dgallup@google.com)
// Sameer Agarwal (sameeragarwal@google.com) // Sameer Agarwal (sameeragarwal@google.com)
#ifndef CERES_NO_SUITESPARSE
#include "ceres/canonical_views_clustering.h" #include "ceres/canonical_views_clustering.h"
#include "ceres/collections_port.h" #include "ceres/collections_port.h"
@ -236,3 +238,5 @@ void CanonicalViewsClustering::ComputeClusterMembership(
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_NO_SUITESPARSE

@ -41,6 +41,8 @@
#ifndef CERES_INTERNAL_CANONICAL_VIEWS_CLUSTERING_H_ #ifndef CERES_INTERNAL_CANONICAL_VIEWS_CLUSTERING_H_
#define CERES_INTERNAL_CANONICAL_VIEWS_CLUSTERING_H_ #define CERES_INTERNAL_CANONICAL_VIEWS_CLUSTERING_H_
#ifndef CERES_NO_SUITESPARSE
#include <vector> #include <vector>
#include "ceres/collections_port.h" #include "ceres/collections_port.h"
@ -130,4 +132,5 @@ struct CanonicalViewsClusteringOptions {
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_NO_SUITESPARSE
#endif // CERES_INTERNAL_CANONICAL_VIEWS_CLUSTERING_H_ #endif // CERES_INTERNAL_CANONICAL_VIEWS_CLUSTERING_H_

@ -65,8 +65,7 @@ SPECIALIZATIONS = [(2, 2, 2),
(4, 4, 4), (4, 4, 4),
(4, 4, "Eigen::Dynamic"), (4, 4, "Eigen::Dynamic"),
("Eigen::Dynamic", "Eigen::Dynamic", "Eigen::Dynamic")] ("Eigen::Dynamic", "Eigen::Dynamic", "Eigen::Dynamic")]
HEADER = """// Ceres Solver - A fast non-linear least squares minimizer
SPECIALIZATION_FILE = """// Ceres Solver - A fast non-linear least squares minimizer
// Copyright 2010, 2011, 2012, 2013 Google Inc. All rights reserved. // Copyright 2010, 2011, 2012, 2013 Google Inc. All rights reserved.
// http://code.google.com/p/ceres-solver/ // http://code.google.com/p/ceres-solver/
// //
@ -105,8 +104,26 @@ SPECIALIZATION_FILE = """// Ceres Solver - A fast non-linear least squares minim
// THIS FILE IS AUTOGENERATED. DO NOT EDIT. // THIS FILE IS AUTOGENERATED. DO NOT EDIT.
//========================================= //=========================================
// //
// This file is generated using generate_eliminator_specializations.py. // This file is generated using generate_eliminator_specialization.py.
// Editing it manually is not recommended. // Editing it manually is not recommended.
"""
DYNAMIC_FILE = """
#include "ceres/schur_eliminator_impl.h"
#include "ceres/internal/eigen.h"
namespace ceres {
namespace internal {
template class SchurEliminator<%s, %s, %s>;
} // namespace internal
} // namespace ceres
"""
SPECIALIZATION_FILE = """
#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION
#include "ceres/schur_eliminator_impl.h" #include "ceres/schur_eliminator_impl.h"
#include "ceres/internal/eigen.h" #include "ceres/internal/eigen.h"
@ -119,21 +136,10 @@ template class SchurEliminator<%s, %s, %s>;
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_RESTRICT_SCHUR_SPECIALIZATION
""" """
FACTORY_FILE_HEADER = """// Copyright 2011 Google Inc. All Rights Reserved. FACTORY_FILE_HEADER = """
// Author: sameeragarwal@google.com (Sameer Agarwal)
//
// ========================================
// THIS FILE IS AUTOGENERATED. DO NOT EDIT.
// THIS FILE IS AUTOGENERATED. DO NOT EDIT.
// THIS FILE IS AUTOGENERATED. DO NOT EDIT.
// THIS FILE IS AUTOGENERATED. DO NOT EDIT.
//=========================================
//
// This file is generated using generate_template_specializations.py.
// Editing it manually is not recommended.
#include "ceres/linear_solver.h" #include "ceres/linear_solver.h"
#include "ceres/schur_eliminator.h" #include "ceres/schur_eliminator.h"
#include "ceres/internal/eigen.h" #include "ceres/internal/eigen.h"
@ -184,6 +190,7 @@ def Specialize():
Generate specialization code and the conditionals to instantiate it. Generate specialization code and the conditionals to instantiate it.
""" """
f = open("schur_eliminator.cc", "w") f = open("schur_eliminator.cc", "w")
f.write(HEADER)
f.write(FACTORY_FILE_HEADER) f.write(FACTORY_FILE_HEADER)
for row_block_size, e_block_size, f_block_size in SPECIALIZATIONS: for row_block_size, e_block_size, f_block_size in SPECIALIZATIONS:
@ -192,9 +199,15 @@ def Specialize():
e_block_size, e_block_size,
f_block_size) + ".cc" f_block_size) + ".cc"
fptr = open(output, "w") fptr = open(output, "w")
fptr.write(SPECIALIZATION_FILE % (row_block_size, fptr.write(HEADER)
e_block_size,
f_block_size)) template = SPECIALIZATION_FILE
if (row_block_size == "Eigen::Dynamic" and
e_block_size == "Eigen::Dynamic" and
f_block_size == "Eigen::Dynamic"):
template = DYNAMIC_FILE
fptr.write(template % (row_block_size, e_block_size, f_block_size))
fptr.close() fptr.close()
f.write(FACTORY_CONDITIONAL % (row_block_size, f.write(FACTORY_CONDITIONAL % (row_block_size,

@ -40,6 +40,8 @@
// This file is generated using generate_eliminator_specializations.py. // This file is generated using generate_eliminator_specializations.py.
// Editing it manually is not recommended. // Editing it manually is not recommended.
#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION
#include "ceres/schur_eliminator_impl.h" #include "ceres/schur_eliminator_impl.h"
#include "ceres/internal/eigen.h" #include "ceres/internal/eigen.h"
@ -51,3 +53,4 @@ template class SchurEliminator<2, 2, 2>;
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_RESTRICT_SCHUR_SPECIALIZATION

@ -40,6 +40,8 @@
// This file is generated using generate_eliminator_specializations.py. // This file is generated using generate_eliminator_specializations.py.
// Editing it manually is not recommended. // Editing it manually is not recommended.
#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION
#include "ceres/schur_eliminator_impl.h" #include "ceres/schur_eliminator_impl.h"
#include "ceres/internal/eigen.h" #include "ceres/internal/eigen.h"
@ -51,3 +53,4 @@ template class SchurEliminator<2, 2, 3>;
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_RESTRICT_SCHUR_SPECIALIZATION

@ -40,6 +40,8 @@
// This file is generated using generate_eliminator_specializations.py. // This file is generated using generate_eliminator_specializations.py.
// Editing it manually is not recommended. // Editing it manually is not recommended.
#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION
#include "ceres/schur_eliminator_impl.h" #include "ceres/schur_eliminator_impl.h"
#include "ceres/internal/eigen.h" #include "ceres/internal/eigen.h"
@ -51,3 +53,4 @@ template class SchurEliminator<2, 2, 4>;
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_RESTRICT_SCHUR_SPECIALIZATION

@ -40,6 +40,8 @@
// This file is generated using generate_eliminator_specializations.py. // This file is generated using generate_eliminator_specializations.py.
// Editing it manually is not recommended. // Editing it manually is not recommended.
#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION
#include "ceres/schur_eliminator_impl.h" #include "ceres/schur_eliminator_impl.h"
#include "ceres/internal/eigen.h" #include "ceres/internal/eigen.h"
@ -51,3 +53,4 @@ template class SchurEliminator<2, 2, Eigen::Dynamic>;
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_RESTRICT_SCHUR_SPECIALIZATION

@ -40,6 +40,8 @@
// This file is generated using generate_eliminator_specializations.py. // This file is generated using generate_eliminator_specializations.py.
// Editing it manually is not recommended. // Editing it manually is not recommended.
#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION
#include "ceres/schur_eliminator_impl.h" #include "ceres/schur_eliminator_impl.h"
#include "ceres/internal/eigen.h" #include "ceres/internal/eigen.h"
@ -51,3 +53,4 @@ template class SchurEliminator<2, 3, 3>;
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_RESTRICT_SCHUR_SPECIALIZATION

@ -40,6 +40,8 @@
// This file is generated using generate_eliminator_specializations.py. // This file is generated using generate_eliminator_specializations.py.
// Editing it manually is not recommended. // Editing it manually is not recommended.
#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION
#include "ceres/schur_eliminator_impl.h" #include "ceres/schur_eliminator_impl.h"
#include "ceres/internal/eigen.h" #include "ceres/internal/eigen.h"
@ -51,3 +53,4 @@ template class SchurEliminator<2, 3, 4>;
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_RESTRICT_SCHUR_SPECIALIZATION

@ -40,6 +40,8 @@
// This file is generated using generate_eliminator_specializations.py. // This file is generated using generate_eliminator_specializations.py.
// Editing it manually is not recommended. // Editing it manually is not recommended.
#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION
#include "ceres/schur_eliminator_impl.h" #include "ceres/schur_eliminator_impl.h"
#include "ceres/internal/eigen.h" #include "ceres/internal/eigen.h"
@ -51,3 +53,4 @@ template class SchurEliminator<2, 3, 9>;
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_RESTRICT_SCHUR_SPECIALIZATION

@ -40,6 +40,8 @@
// This file is generated using generate_eliminator_specializations.py. // This file is generated using generate_eliminator_specializations.py.
// Editing it manually is not recommended. // Editing it manually is not recommended.
#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION
#include "ceres/schur_eliminator_impl.h" #include "ceres/schur_eliminator_impl.h"
#include "ceres/internal/eigen.h" #include "ceres/internal/eigen.h"
@ -51,3 +53,4 @@ template class SchurEliminator<2, 3, Eigen::Dynamic>;
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_RESTRICT_SCHUR_SPECIALIZATION

@ -40,6 +40,8 @@
// This file is generated using generate_eliminator_specializations.py. // This file is generated using generate_eliminator_specializations.py.
// Editing it manually is not recommended. // Editing it manually is not recommended.
#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION
#include "ceres/schur_eliminator_impl.h" #include "ceres/schur_eliminator_impl.h"
#include "ceres/internal/eigen.h" #include "ceres/internal/eigen.h"
@ -51,3 +53,4 @@ template class SchurEliminator<2, 4, 3>;
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_RESTRICT_SCHUR_SPECIALIZATION

@ -40,6 +40,8 @@
// This file is generated using generate_eliminator_specializations.py. // This file is generated using generate_eliminator_specializations.py.
// Editing it manually is not recommended. // Editing it manually is not recommended.
#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION
#include "ceres/schur_eliminator_impl.h" #include "ceres/schur_eliminator_impl.h"
#include "ceres/internal/eigen.h" #include "ceres/internal/eigen.h"
@ -51,3 +53,4 @@ template class SchurEliminator<2, 4, 4>;
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_RESTRICT_SCHUR_SPECIALIZATION

@ -40,6 +40,8 @@
// This file is generated using generate_eliminator_specializations.py. // This file is generated using generate_eliminator_specializations.py.
// Editing it manually is not recommended. // Editing it manually is not recommended.
#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION
#include "ceres/schur_eliminator_impl.h" #include "ceres/schur_eliminator_impl.h"
#include "ceres/internal/eigen.h" #include "ceres/internal/eigen.h"
@ -51,3 +53,4 @@ template class SchurEliminator<2, 4, Eigen::Dynamic>;
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_RESTRICT_SCHUR_SPECIALIZATION

@ -40,6 +40,8 @@
// This file is generated using generate_eliminator_specializations.py. // This file is generated using generate_eliminator_specializations.py.
// Editing it manually is not recommended. // Editing it manually is not recommended.
#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION
#include "ceres/schur_eliminator_impl.h" #include "ceres/schur_eliminator_impl.h"
#include "ceres/internal/eigen.h" #include "ceres/internal/eigen.h"
@ -51,3 +53,4 @@ template class SchurEliminator<4, 4, 2>;
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_RESTRICT_SCHUR_SPECIALIZATION

@ -40,6 +40,8 @@
// This file is generated using generate_eliminator_specializations.py. // This file is generated using generate_eliminator_specializations.py.
// Editing it manually is not recommended. // Editing it manually is not recommended.
#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION
#include "ceres/schur_eliminator_impl.h" #include "ceres/schur_eliminator_impl.h"
#include "ceres/internal/eigen.h" #include "ceres/internal/eigen.h"
@ -51,3 +53,4 @@ template class SchurEliminator<4, 4, 3>;
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_RESTRICT_SCHUR_SPECIALIZATION

@ -40,6 +40,8 @@
// This file is generated using generate_eliminator_specializations.py. // This file is generated using generate_eliminator_specializations.py.
// Editing it manually is not recommended. // Editing it manually is not recommended.
#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION
#include "ceres/schur_eliminator_impl.h" #include "ceres/schur_eliminator_impl.h"
#include "ceres/internal/eigen.h" #include "ceres/internal/eigen.h"
@ -51,3 +53,4 @@ template class SchurEliminator<4, 4, 4>;
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_RESTRICT_SCHUR_SPECIALIZATION

@ -40,6 +40,8 @@
// This file is generated using generate_eliminator_specializations.py. // This file is generated using generate_eliminator_specializations.py.
// Editing it manually is not recommended. // Editing it manually is not recommended.
#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION
#include "ceres/schur_eliminator_impl.h" #include "ceres/schur_eliminator_impl.h"
#include "ceres/internal/eigen.h" #include "ceres/internal/eigen.h"
@ -51,3 +53,4 @@ template class SchurEliminator<4, 4, Eigen::Dynamic>;
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_RESTRICT_SCHUR_SPECIALIZATION

@ -40,6 +40,7 @@
// This file is generated using generate_eliminator_specializations.py. // This file is generated using generate_eliminator_specializations.py.
// Editing it manually is not recommended. // Editing it manually is not recommended.
#include "ceres/schur_eliminator_impl.h" #include "ceres/schur_eliminator_impl.h"
#include "ceres/internal/eigen.h" #include "ceres/internal/eigen.h"
@ -50,4 +51,3 @@ template class SchurEliminator<Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic>;
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres

@ -28,6 +28,7 @@
// //
// Author: sameeragarwal@google.com (Sameer Agarwal) // Author: sameeragarwal@google.com (Sameer Agarwal)
#ifndef CERES_NO_LINE_SEARCH_MINIMIZER
#include "ceres/line_search.h" #include "ceres/line_search.h"
#include <glog/logging.h> #include <glog/logging.h>
@ -209,3 +210,5 @@ void ArmijoLineSearch::Search(const LineSearch::Options& options,
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_NO_LINE_SEARCH_MINIMIZER

@ -33,6 +33,8 @@
#ifndef CERES_INTERNAL_LINE_SEARCH_H_ #ifndef CERES_INTERNAL_LINE_SEARCH_H_
#define CERES_INTERNAL_LINE_SEARCH_H_ #define CERES_INTERNAL_LINE_SEARCH_H_
#ifndef CERES_NO_LINE_SEARCH_MINIMIZER
#include <glog/logging.h> #include <glog/logging.h>
#include <vector> #include <vector>
#include "ceres/internal/eigen.h" #include "ceres/internal/eigen.h"
@ -209,4 +211,5 @@ class ArmijoLineSearch : public LineSearch {
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_NO_LINE_SEARCH_MINIMIZER
#endif // CERES_INTERNAL_LINE_SEARCH_H_ #endif // CERES_INTERNAL_LINE_SEARCH_H_

@ -28,6 +28,8 @@
// //
// Author: sameeragarwal@google.com (Sameer Agarwal) // Author: sameeragarwal@google.com (Sameer Agarwal)
#ifndef CERES_NO_LINE_SEARCH_MINIMIZER
#include "ceres/line_search_direction.h" #include "ceres/line_search_direction.h"
#include "ceres/line_search_minimizer.h" #include "ceres/line_search_minimizer.h"
#include "ceres/low_rank_inverse_hessian.h" #include "ceres/low_rank_inverse_hessian.h"
@ -143,3 +145,5 @@ LineSearchDirection::Create(const LineSearchDirection::Options& options) {
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_NO_LINE_SEARCH_MINIMIZER

@ -31,6 +31,8 @@
#ifndef CERES_INTERNAL_LINE_SEARCH_DIRECTION_H_ #ifndef CERES_INTERNAL_LINE_SEARCH_DIRECTION_H_
#define CERES_INTERNAL_LINE_SEARCH_DIRECTION_H_ #define CERES_INTERNAL_LINE_SEARCH_DIRECTION_H_
#ifndef CERES_NO_LINE_SEARCH_MINIMIZER
#include "ceres/internal/eigen.h" #include "ceres/internal/eigen.h"
#include "ceres/line_search_minimizer.h" #include "ceres/line_search_minimizer.h"
#include "ceres/types.h" #include "ceres/types.h"
@ -67,4 +69,5 @@ class LineSearchDirection {
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_NO_LINE_SEARCH_MINIMIZER
#endif // CERES_INTERNAL_LINE_SEARCH_DIRECTION_H_ #endif // CERES_INTERNAL_LINE_SEARCH_DIRECTION_H_

@ -38,6 +38,8 @@
// For details on the theory and implementation see "Numerical // For details on the theory and implementation see "Numerical
// Optimization" by Nocedal & Wright. // Optimization" by Nocedal & Wright.
#ifndef CERES_NO_LINE_SEARCH_MINIMIZER
#include "ceres/line_search_minimizer.h" #include "ceres/line_search_minimizer.h"
#include <algorithm> #include <algorithm>
@ -281,3 +283,5 @@ void LineSearchMinimizer::Minimize(const Minimizer::Options& options,
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_NO_LINE_SEARCH_MINIMIZER

@ -31,6 +31,8 @@
#ifndef CERES_INTERNAL_LINE_SEARCH_MINIMIZER_H_ #ifndef CERES_INTERNAL_LINE_SEARCH_MINIMIZER_H_
#define CERES_INTERNAL_LINE_SEARCH_MINIMIZER_H_ #define CERES_INTERNAL_LINE_SEARCH_MINIMIZER_H_
#ifndef CERES_NO_LINE_SEARCH_MINIMIZER
#include "ceres/minimizer.h" #include "ceres/minimizer.h"
#include "ceres/solver.h" #include "ceres/solver.h"
#include "ceres/types.h" #include "ceres/types.h"
@ -74,4 +76,5 @@ class LineSearchMinimizer : public Minimizer {
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_NO_LINE_SEARCH_MINIMIZER
#endif // CERES_INTERNAL_LINE_SEARCH_MINIMIZER_H_ #endif // CERES_INTERNAL_LINE_SEARCH_MINIMIZER_H_

@ -33,6 +33,7 @@
#include <algorithm> #include <algorithm>
#include <cstddef> #include <cstddef>
#include <iterator>
#include <set> #include <set>
#include <string> #include <string>
#include <utility> #include <utility>
@ -56,18 +57,28 @@ namespace internal {
typedef map<double*, internal::ParameterBlock*> ParameterMap; typedef map<double*, internal::ParameterBlock*> ParameterMap;
namespace {
internal::ParameterBlock* FindParameterBlockOrDie(
const ParameterMap& parameter_map,
double* parameter_block) {
ParameterMap::const_iterator it = parameter_map.find(parameter_block);
CHECK(it != parameter_map.end())
<< "Parameter block not found: " << parameter_block;
return it->second;
}
// Returns true if two regions of memory, a and b, with sizes size_a and size_b // Returns true if two regions of memory, a and b, with sizes size_a and size_b
// respectively, overlap. // respectively, overlap.
static bool RegionsAlias(const double* a, int size_a, bool RegionsAlias(const double* a, int size_a,
const double* b, int size_b) { const double* b, int size_b) {
return (a < b) ? b < (a + size_a) return (a < b) ? b < (a + size_a)
: a < (b + size_b); : a < (b + size_b);
} }
static void CheckForNoAliasing(double* existing_block, void CheckForNoAliasing(double* existing_block,
int existing_block_size, int existing_block_size,
double* new_block, double* new_block,
int new_block_size) { int new_block_size) {
CHECK(!RegionsAlias(existing_block, existing_block_size, CHECK(!RegionsAlias(existing_block, existing_block_size,
new_block, new_block_size)) new_block, new_block_size))
<< "Aliasing detected between existing parameter block at memory " << "Aliasing detected between existing parameter block at memory "
@ -77,6 +88,8 @@ static void CheckForNoAliasing(double* existing_block,
<< "size " << new_block_size << "."; << "size " << new_block_size << ".";
} }
} // namespace
ParameterBlock* ProblemImpl::InternalAddParameterBlock(double* values, ParameterBlock* ProblemImpl::InternalAddParameterBlock(double* values,
int size) { int size) {
CHECK(values != NULL) << "Null pointer passed to AddParameterBlock " CHECK(values != NULL) << "Null pointer passed to AddParameterBlock "
@ -471,7 +484,8 @@ void ProblemImpl::RemoveResidualBlock(ResidualBlock* residual_block) {
} }
void ProblemImpl::RemoveParameterBlock(double* values) { void ProblemImpl::RemoveParameterBlock(double* values) {
ParameterBlock* parameter_block = FindOrDie(parameter_block_map_, values); ParameterBlock* parameter_block =
FindParameterBlockOrDie(parameter_block_map_, values);
if (options_.enable_fast_parameter_block_removal) { if (options_.enable_fast_parameter_block_removal) {
// Copy the dependent residuals from the parameter block because the set of // Copy the dependent residuals from the parameter block because the set of
@ -503,17 +517,17 @@ void ProblemImpl::RemoveParameterBlock(double* values) {
} }
void ProblemImpl::SetParameterBlockConstant(double* values) { void ProblemImpl::SetParameterBlockConstant(double* values) {
FindOrDie(parameter_block_map_, values)->SetConstant(); FindParameterBlockOrDie(parameter_block_map_, values)->SetConstant();
} }
void ProblemImpl::SetParameterBlockVariable(double* values) { void ProblemImpl::SetParameterBlockVariable(double* values) {
FindOrDie(parameter_block_map_, values)->SetVarying(); FindParameterBlockOrDie(parameter_block_map_, values)->SetVarying();
} }
void ProblemImpl::SetParameterization( void ProblemImpl::SetParameterization(
double* values, double* values,
LocalParameterization* local_parameterization) { LocalParameterization* local_parameterization) {
FindOrDie(parameter_block_map_, values) FindParameterBlockOrDie(parameter_block_map_, values)
->SetParameterization(local_parameterization); ->SetParameterization(local_parameterization);
} }
@ -557,7 +571,8 @@ bool ProblemImpl::Evaluate(const Problem::EvaluateOptions& evaluate_options,
parameter_blocks.resize(parameter_block_ptrs.size()); parameter_blocks.resize(parameter_block_ptrs.size());
for (int i = 0; i < parameter_block_ptrs.size(); ++i) { for (int i = 0; i < parameter_block_ptrs.size(); ++i) {
parameter_blocks[i] = parameter_blocks[i] =
FindOrDie(parameter_block_map_, parameter_block_ptrs[i]); FindParameterBlockOrDie(parameter_block_map_,
parameter_block_ptrs[i]);
} }
// 2. The user may have only supplied a subset of parameter // 2. The user may have only supplied a subset of parameter

@ -141,6 +141,7 @@ bool DenseSchurComplementSolver::SolveReducedLinearSystem(double* solution) {
return true; return true;
} }
#if !defined(CERES_NO_SUITESPARSE) || !defined(CERES_NO_CXSPARE)
SparseSchurComplementSolver::SparseSchurComplementSolver( SparseSchurComplementSolver::SparseSchurComplementSolver(
const LinearSolver::Options& options) const LinearSolver::Options& options)
@ -292,7 +293,7 @@ bool SparseSchurComplementSolver::SolveReducedLinearSystemUsingSuiteSparse(
} }
if (VLOG_IS_ON(2)) { if (VLOG_IS_ON(2)) {
cholmod_print_common("Symbolic Analysis", ss_.mutable_cc()); cholmod_print_common(const_cast<char*>("Symbolic Analysis"), ss_.mutable_cc());
} }
} }
@ -365,5 +366,6 @@ bool SparseSchurComplementSolver::SolveReducedLinearSystemUsingCXSparse(
} }
#endif // CERES_NO_CXPARSE #endif // CERES_NO_CXPARSE
#endif // !defined(CERES_NO_SUITESPARSE) || !defined(CERES_NO_CXSPARE)
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres

@ -151,7 +151,7 @@ class DenseSchurComplementSolver : public SchurComplementSolver {
CERES_DISALLOW_COPY_AND_ASSIGN(DenseSchurComplementSolver); CERES_DISALLOW_COPY_AND_ASSIGN(DenseSchurComplementSolver);
}; };
#if !defined(CERES_NO_SUITESPARSE) || !defined(CERES_NO_CXSPARE)
// Sparse Cholesky factorization based solver. // Sparse Cholesky factorization based solver.
class SparseSchurComplementSolver : public SchurComplementSolver { class SparseSchurComplementSolver : public SchurComplementSolver {
public: public:
@ -182,6 +182,7 @@ class SparseSchurComplementSolver : public SchurComplementSolver {
CERES_DISALLOW_COPY_AND_ASSIGN(SparseSchurComplementSolver); CERES_DISALLOW_COPY_AND_ASSIGN(SparseSchurComplementSolver);
}; };
#endif // !defined(CERES_NO_SUITESPARSE) || !defined(CERES_NO_CXSPARE)
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres

@ -1,6 +1,35 @@
// Copyright 2011 Google Inc. All Rights Reserved. // Ceres Solver - A fast non-linear least squares minimizer
// Copyright 2010, 2011, 2012, 2013 Google Inc. All rights reserved.
// http://code.google.com/p/ceres-solver/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither the name of Google Inc. nor the names of its contributors may be
// used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// Author: sameeragarwal@google.com (Sameer Agarwal) // Author: sameeragarwal@google.com (Sameer Agarwal)
// //
// Template specialization of SchurEliminator.
//
// ======================================== // ========================================
// THIS FILE IS AUTOGENERATED. DO NOT EDIT. // THIS FILE IS AUTOGENERATED. DO NOT EDIT.
// THIS FILE IS AUTOGENERATED. DO NOT EDIT. // THIS FILE IS AUTOGENERATED. DO NOT EDIT.
@ -8,7 +37,7 @@
// THIS FILE IS AUTOGENERATED. DO NOT EDIT. // THIS FILE IS AUTOGENERATED. DO NOT EDIT.
//========================================= //=========================================
// //
// This file is generated using generate_template_specializations.py. // This file is generated using generate_eliminator_specializations.py.
// Editing it manually is not recommended. // Editing it manually is not recommended.
#include "ceres/linear_solver.h" #include "ceres/linear_solver.h"

@ -268,7 +268,7 @@ void SolverImpl::TrustRegionMinimize(
WallTimeInSeconds() - minimizer_start_time; WallTimeInSeconds() - minimizer_start_time;
} }
#ifndef CERES_NO_LINE_SEARCH_MINIMIZER
void SolverImpl::LineSearchMinimize( void SolverImpl::LineSearchMinimize(
const Solver::Options& options, const Solver::Options& options,
Program* program, Program* program,
@ -309,6 +309,7 @@ void SolverImpl::LineSearchMinimize(
summary->minimizer_time_in_seconds = summary->minimizer_time_in_seconds =
WallTimeInSeconds() - minimizer_start_time; WallTimeInSeconds() - minimizer_start_time;
} }
#endif // CERES_NO_LINE_SEARCH_MINIMIZER
void SolverImpl::Solve(const Solver::Options& options, void SolverImpl::Solve(const Solver::Options& options,
ProblemImpl* problem_impl, ProblemImpl* problem_impl,
@ -316,7 +317,11 @@ void SolverImpl::Solve(const Solver::Options& options,
if (options.minimizer_type == TRUST_REGION) { if (options.minimizer_type == TRUST_REGION) {
TrustRegionSolve(options, problem_impl, summary); TrustRegionSolve(options, problem_impl, summary);
} else { } else {
#ifndef CERES_NO_LINE_SEARCH_MINIMIZER
LineSearchSolve(options, problem_impl, summary); LineSearchSolve(options, problem_impl, summary);
#else
LOG(FATAL) << "Ceres Solver was compiled with -DLINE_SEARCH_MINIMIZER=OFF";
#endif
} }
} }
@ -608,6 +613,8 @@ void SolverImpl::TrustRegionSolve(const Solver::Options& original_options,
event_logger.AddEvent("PostProcess"); event_logger.AddEvent("PostProcess");
} }
#ifndef CERES_NO_LINE_SEARCH_MINIMIZER
void SolverImpl::LineSearchSolve(const Solver::Options& original_options, void SolverImpl::LineSearchSolve(const Solver::Options& original_options,
ProblemImpl* original_problem_impl, ProblemImpl* original_problem_impl,
Solver::Summary* summary) { Solver::Summary* summary) {
@ -661,7 +668,7 @@ void SolverImpl::LineSearchSolve(const Solver::Options& original_options,
<< "to single threaded mode."; << "to single threaded mode.";
options.num_threads = 1; options.num_threads = 1;
} }
#endif #endif // CERES_USE_OPENMP
summary->num_threads_given = original_options.num_threads; summary->num_threads_given = original_options.num_threads;
summary->num_threads_used = options.num_threads; summary->num_threads_used = options.num_threads;
@ -800,7 +807,7 @@ void SolverImpl::LineSearchSolve(const Solver::Options& original_options,
summary->postprocessor_time_in_seconds = summary->postprocessor_time_in_seconds =
WallTimeInSeconds() - post_process_start_time; WallTimeInSeconds() - post_process_start_time;
} }
#endif // CERES_NO_LINE_SEARCH_MINIMIZER
bool SolverImpl::IsOrderingValid(const Solver::Options& options, bool SolverImpl::IsOrderingValid(const Solver::Options& options,
const ProblemImpl* problem_impl, const ProblemImpl* problem_impl,

@ -59,10 +59,29 @@ class SolverImpl {
ProblemImpl* problem_impl, ProblemImpl* problem_impl,
Solver::Summary* summary); Solver::Summary* summary);
// Run the TrustRegionMinimizer for the given evaluator and configuration.
static void TrustRegionMinimize(
const Solver::Options &options,
Program* program,
CoordinateDescentMinimizer* inner_iteration_minimizer,
Evaluator* evaluator,
LinearSolver* linear_solver,
double* parameters,
Solver::Summary* summary);
#ifndef CERES_NO_LINE_SEARCH_MINIMIZER
static void LineSearchSolve(const Solver::Options& options, static void LineSearchSolve(const Solver::Options& options,
ProblemImpl* problem_impl, ProblemImpl* problem_impl,
Solver::Summary* summary); Solver::Summary* summary);
// Run the LineSearchMinimizer for the given evaluator and configuration.
static void LineSearchMinimize(const Solver::Options &options,
Program* program,
Evaluator* evaluator,
double* parameters,
Solver::Summary* summary);
#endif // CERES_NO_LINE_SEARCH_MINIMIZER
// Create the transformed Program, which has all the fixed blocks // Create the transformed Program, which has all the fixed blocks
// and residuals eliminated, and in the case of automatic schur // and residuals eliminated, and in the case of automatic schur
// ordering, has the E blocks first in the resulting program, with // ordering, has the E blocks first in the resulting program, with
@ -108,24 +127,6 @@ class SolverImpl {
Program* program, Program* program,
string* error); string* error);
// Run the TrustRegionMinimizer for the given evaluator and configuration.
static void TrustRegionMinimize(
const Solver::Options &options,
Program* program,
CoordinateDescentMinimizer* inner_iteration_minimizer,
Evaluator* evaluator,
LinearSolver* linear_solver,
double* parameters,
Solver::Summary* summary);
// Run the LineSearchMinimizer for the given evaluator and configuration.
static void LineSearchMinimize(
const Solver::Options &options,
Program* program,
Evaluator* evaluator,
double* parameters,
Solver::Summary* summary);
// Remove the fixed or unused parameter blocks and residuals // Remove the fixed or unused parameter blocks and residuals
// depending only on fixed parameters from the problem. Also updates // depending only on fixed parameters from the problem. Also updates
// num_eliminate_blocks, since removed parameters changes the point // num_eliminate_blocks, since removed parameters changes the point

@ -28,6 +28,8 @@
// //
// Author: sameeragarwal@google.com (Sameer Agarwal) // Author: sameeragarwal@google.com (Sameer Agarwal)
#if !defined(CERES_NO_SUITESPARSE) || !defined(CERES_NO_CXSPARSE)
#include "ceres/sparse_normal_cholesky_solver.h" #include "ceres/sparse_normal_cholesky_solver.h"
#include <algorithm> #include <algorithm>
@ -213,7 +215,7 @@ LinearSolver::Summary SparseNormalCholeskySolver::SolveImplUsingSuiteSparse(
} }
if (VLOG_IS_ON(2)) { if (VLOG_IS_ON(2)) {
cholmod_print_common("Symbolic Analysis", ss_.mutable_cc()); cholmod_print_common(const_cast<char*>("Symbolic Analysis"), ss_.mutable_cc());
} }
} }
@ -257,3 +259,5 @@ LinearSolver::Summary SparseNormalCholeskySolver::SolveImplUsingSuiteSparse(
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // !defined(CERES_NO_SUITESPARSE) || !defined(CERES_NO_CXSPARSE)

@ -34,6 +34,8 @@
#ifndef CERES_INTERNAL_SPARSE_NORMAL_CHOLESKY_SOLVER_H_ #ifndef CERES_INTERNAL_SPARSE_NORMAL_CHOLESKY_SOLVER_H_
#define CERES_INTERNAL_SPARSE_NORMAL_CHOLESKY_SOLVER_H_ #define CERES_INTERNAL_SPARSE_NORMAL_CHOLESKY_SOLVER_H_
#if !defined(CERES_NO_SUITESPARSE) || !defined(CERES_NO_CXSPARSE)
#include "ceres/cxsparse.h" #include "ceres/cxsparse.h"
#include "ceres/internal/macros.h" #include "ceres/internal/macros.h"
#include "ceres/linear_solver.h" #include "ceres/linear_solver.h"
@ -90,4 +92,5 @@ class SparseNormalCholeskySolver : public CompressedRowSparseMatrixSolver {
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // !defined(CERES_NO_SUITESPARSE) || !defined(CERES_NO_CXSPARSE)
#endif // CERES_INTERNAL_SPARSE_NORMAL_CHOLESKY_SOLVER_H_ #endif // CERES_INTERNAL_SPARSE_NORMAL_CHOLESKY_SOLVER_H_

@ -28,6 +28,8 @@
// //
// Author: kushalav@google.com (Avanish Kushal) // Author: kushalav@google.com (Avanish Kushal)
#ifndef CERES_NO_SUITESPARSE
#include "ceres/visibility.h" #include "ceres/visibility.h"
#include <cmath> #include <cmath>
@ -150,3 +152,5 @@ Graph<int>* CreateSchurComplementGraph(const vector<set<int> >& visibility) {
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif

@ -35,6 +35,8 @@
#ifndef CERES_INTERNAL_VISIBILITY_H_ #ifndef CERES_INTERNAL_VISIBILITY_H_
#define CERES_INTERNAL_VISIBILITY_H_ #define CERES_INTERNAL_VISIBILITY_H_
#ifndef CERES_NO_SUITESPARSE
#include <set> #include <set>
#include <vector> #include <vector>
#include "ceres/graph.h" #include "ceres/graph.h"
@ -74,4 +76,5 @@ Graph<int>* CreateSchurComplementGraph(const vector<set<int> >& visibility);
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_NO_SUITESPARSE
#endif // CERES_INTERNAL_VISIBILITY_H_ #endif // CERES_INTERNAL_VISIBILITY_H_

@ -28,6 +28,8 @@
// //
// Author: sameeragarwal@google.com (Sameer Agarwal) // Author: sameeragarwal@google.com (Sameer Agarwal)
#ifndef CERES_NO_SUITESPARSE
#include "ceres/visibility_based_preconditioner.h" #include "ceres/visibility_based_preconditioner.h"
#include <algorithm> #include <algorithm>
@ -62,7 +64,6 @@ namespace internal {
static const double kSizePenaltyWeight = 3.0; static const double kSizePenaltyWeight = 3.0;
static const double kSimilarityPenaltyWeight = 0.0; static const double kSimilarityPenaltyWeight = 0.0;
#ifndef CERES_NO_SUITESPARSE
VisibilityBasedPreconditioner::VisibilityBasedPreconditioner( VisibilityBasedPreconditioner::VisibilityBasedPreconditioner(
const CompressedRowBlockStructure& bs, const CompressedRowBlockStructure& bs,
const Preconditioner::Options& options) const Preconditioner::Options& options)
@ -427,7 +428,7 @@ bool VisibilityBasedPreconditioner::Factorize() {
} }
if (VLOG_IS_ON(2)) { if (VLOG_IS_ON(2)) {
cholmod_print_common("Symbolic Analysis", ss_.mutable_cc()); cholmod_print_common(const_cast<char*>("Symbolic Analysis"), ss_.mutable_cc());
} }
} }
@ -584,7 +585,7 @@ void VisibilityBasedPreconditioner::FlattenMembershipMap(
} }
} }
#endif // CERES_NO_SUITESPARSE
} // namespace internal } // namespace internal
} // namespace ceres } // namespace ceres
#endif // CERES_NO_SUITESPARSE

@ -33,6 +33,8 @@ set(INC_SYS
set(SRC set(SRC
wcwidth.c wcwidth.c
wcwidth.h
) )
blender_add_lib(extern_wcwidth "${SRC}" "${INC}" "${INC_SYS}") blender_add_lib(extern_wcwidth "${SRC}" "${INC}" "${INC_SYS}")

@ -26,15 +26,14 @@
* \ingroup audaspaceintern * \ingroup audaspaceintern
*/ */
// needed for INT64_C // needed for INT64_C
#ifndef __STDC_CONSTANT_MACROS #ifndef __STDC_CONSTANT_MACROS
#define __STDC_CONSTANT_MACROS #define __STDC_CONSTANT_MACROS
#endif #endif
#ifdef WITH_PYTHON #ifdef WITH_PYTHON
#include "AUD_PyInit.h" # include "AUD_PyInit.h"
#include "AUD_PyAPI.h" # include "AUD_PyAPI.h"
#endif #endif
#include <set> #include <set>

@ -168,19 +168,6 @@ class CyclesRender_PT_film(CyclesButtonsPanel, Panel):
if cscene.filter_type != 'BOX': if cscene.filter_type != 'BOX':
sub.prop(cscene, "filter_width", text="Width") sub.prop(cscene, "filter_width", text="Width")
layout.separator()
rd = scene.render
col = layout.column()
split = col.split(percentage=0.40)
split.prop(rd, "use_antialiasing", "OpenGL AA")
row = split.row()
row.active = rd.use_antialiasing
row.prop(rd, "antialiasing_samples", expand=True)
col.prop(rd, "alpha_mode", text="OpenGL Alpha")
class CyclesRender_PT_performance(CyclesButtonsPanel, Panel): class CyclesRender_PT_performance(CyclesButtonsPanel, Panel):
bl_label = "Performance" bl_label = "Performance"
@ -232,9 +219,9 @@ class CyclesRender_PT_performance(CyclesButtonsPanel, Panel):
sub.label(text="Final Render:") sub.label(text="Final Render:")
sub.prop(rd, "use_persistent_data", text="Persistent Images") sub.prop(rd, "use_persistent_data", text="Persistent Images")
class Cycles_PT_post_processing(CyclesButtonsPanel, Panel): class CyclesRender_PT_opengl(CyclesButtonsPanel, Panel):
bl_label = "Post Processing" bl_label = "OpenGL Render"
bl_options = {'DEFAULT_CLOSED'} bl_options = {'DEFAULT_CLOSED'}
def draw(self, context): def draw(self, context):
@ -243,54 +230,18 @@ class Cycles_PT_post_processing(CyclesButtonsPanel, Panel):
rd = context.scene.render rd = context.scene.render
split = layout.split() split = layout.split()
col = split.column() col = split.column()
col.prop(rd, "use_compositing") col.prop(rd, "use_antialiasing")
col.prop(rd, "use_sequencer")
col = split.column()
col.prop(rd, "dither_intensity", text="Dither", slider=True)
class CyclesCamera_PT_dof(CyclesButtonsPanel, Panel):
bl_label = "Depth of Field"
bl_context = "data"
@classmethod
def poll(cls, context):
return context.camera and CyclesButtonsPanel.poll(context)
def draw(self, context):
layout = self.layout
cam = context.camera
ccam = cam.cycles
split = layout.split()
col = split.column()
col.label("Focus:")
col.prop(cam, "dof_object", text="")
sub = col.row() sub = col.row()
sub.active = cam.dof_object is None sub.active = rd.use_antialiasing
sub.prop(cam, "dof_distance", text="Distance") sub.prop(rd, "antialiasing_samples", expand=True)
col = split.column() col = split.column()
col.label(text="Alpha:")
col.label("Aperture:") col.prop(rd, "alpha_mode", text="")
sub = col.column(align=True)
sub.prop(ccam, "aperture_type", text="")
if ccam.aperture_type == 'RADIUS':
sub.prop(ccam, "aperture_size", text="Size")
elif ccam.aperture_type == 'FSTOP':
sub.prop(ccam, "aperture_fstop", text="Number")
sub = col.column(align=True)
sub.prop(ccam, "aperture_blades", text="Blades")
sub.prop(ccam, "aperture_rotation", text="Rotation")
class CyclesRender_PT_layers(CyclesButtonsPanel, Panel): class CyclesRender_PT_layers(CyclesButtonsPanel, Panel):
bl_label = "Layers" bl_label = "Layers"
bl_options = {'HIDE_HEADER'} bl_options = {'HIDE_HEADER'}
@ -401,6 +352,64 @@ class CyclesRender_PT_layer_passes(CyclesButtonsPanel, Panel):
col.prop(rl, "use_pass_environment") col.prop(rl, "use_pass_environment")
class Cycles_PT_post_processing(CyclesButtonsPanel, Panel):
bl_label = "Post Processing"
bl_options = {'DEFAULT_CLOSED'}
def draw(self, context):
layout = self.layout
rd = context.scene.render
split = layout.split()
col = split.column()
col.prop(rd, "use_compositing")
col.prop(rd, "use_sequencer")
col = split.column()
col.prop(rd, "dither_intensity", text="Dither", slider=True)
class CyclesCamera_PT_dof(CyclesButtonsPanel, Panel):
bl_label = "Depth of Field"
bl_context = "data"
@classmethod
def poll(cls, context):
return context.camera and CyclesButtonsPanel.poll(context)
def draw(self, context):
layout = self.layout
cam = context.camera
ccam = cam.cycles
split = layout.split()
col = split.column()
col.label("Focus:")
col.prop(cam, "dof_object", text="")
sub = col.row()
sub.active = cam.dof_object is None
sub.prop(cam, "dof_distance", text="Distance")
col = split.column()
col.label("Aperture:")
sub = col.column(align=True)
sub.prop(ccam, "aperture_type", text="")
if ccam.aperture_type == 'RADIUS':
sub.prop(ccam, "aperture_size", text="Size")
elif ccam.aperture_type == 'FSTOP':
sub.prop(ccam, "aperture_fstop", text="Number")
sub = col.column(align=True)
sub.prop(ccam, "aperture_blades", text="Blades")
sub.prop(ccam, "aperture_rotation", text="Rotation")
class Cycles_PT_context_material(CyclesButtonsPanel, Panel): class Cycles_PT_context_material(CyclesButtonsPanel, Panel):
bl_label = "" bl_label = ""
bl_context = "material" bl_context = "material"

@ -156,7 +156,12 @@ static void blender_camera_from_object(BlenderCamera *bcam, BL::Object b_ob, boo
if(aperture_type == 1) { if(aperture_type == 1) {
float fstop = RNA_float_get(&ccamera, "aperture_fstop"); float fstop = RNA_float_get(&ccamera, "aperture_fstop");
bcam->aperturesize = (bcam->lens*1e-3f)/(2.0f*max(fstop, 1e-5f)); fstop = max(fstop, 1e-5f);
if(bcam->type == CAMERA_ORTHOGRAPHIC)
bcam->aperturesize = 1.0f/(2.0f*fstop);
else
bcam->aperturesize = (bcam->lens*1e-3f)/(2.0f*fstop);
} }
else else
bcam->aperturesize = RNA_float_get(&ccamera, "aperture_size"); bcam->aperturesize = RNA_float_get(&ccamera, "aperture_size");

@ -464,7 +464,7 @@ Mesh *BlenderSync::sync_mesh(BL::Object b_ob, bool object_updated, bool hide_tri
/* displacement method */ /* displacement method */
if(cmesh.data) { if(cmesh.data) {
int method = RNA_enum_get(&cmesh, "displacement_method"); const int method = RNA_enum_get(&cmesh, "displacement_method");
if(method == 0 || !experimental) if(method == 0 || !experimental)
mesh->displacement_method = Mesh::DISPLACE_BUMP; mesh->displacement_method = Mesh::DISPLACE_BUMP;

@ -680,66 +680,65 @@ static void add_nodes(Scene *scene, BL::BlendData b_data, BL::Scene b_scene, Sha
} }
} }
else if (b_node->is_a(&RNA_ShaderNodeGroup)) { else if (b_node->is_a(&RNA_ShaderNodeGroup)) {
BL::NodeGroup b_gnode(*b_node); BL::NodeGroup b_gnode(*b_node);
BL::ShaderNodeTree b_group_ntree(b_gnode.node_tree()); BL::ShaderNodeTree b_group_ntree(b_gnode.node_tree());
ProxyMap group_proxy_map; ProxyMap group_proxy_map;
if (!b_group_ntree) /* Add a proxy node for each socket
continue; * Do this even if the node group has no internal tree,
* so that links have something to connect to and assert won't fail.
add_nodes(scene, b_data, b_scene, graph, b_group_ntree, group_proxy_map); */
/* map the outer socket to the internal proxy nodes */
for(b_node->inputs.begin(b_input); b_input != b_node->inputs.end(); ++b_input) { for(b_node->inputs.begin(b_input); b_input != b_node->inputs.end(); ++b_input) {
ProxyNode *proxy = new ProxyNode(convert_socket_type(*b_input));
graph->add(proxy);
/* get internal proxy node from group proxy map */ /* register the proxy node for internal binding */
assert(group_proxy_map.find(b_input->identifier()) != group_proxy_map.end()); group_proxy_map[b_input->identifier()] = proxy;
assert(group_proxy_map[b_input->identifier()]->special_type == SHADER_SPECIAL_TYPE_PROXY);
ProxyNode *proxy = group_proxy_map[b_input->identifier()];
input_map[b_input->ptr.data] = proxy->inputs[0]; input_map[b_input->ptr.data] = proxy->inputs[0];
/* input value for proxy inputs is defined by group node */
set_default_value(proxy->inputs[0], *b_node, *b_input, b_data, b_ntree); set_default_value(proxy->inputs[0], *b_node, *b_input, b_data, b_ntree);
} }
/* map the outer socket to the internal proxy nodes */
for(b_node->outputs.begin(b_output); b_output != b_node->outputs.end(); ++b_output) { for(b_node->outputs.begin(b_output); b_output != b_node->outputs.end(); ++b_output) {
ProxyNode *proxy = new ProxyNode(convert_socket_type(*b_output));
graph->add(proxy);
/* get internal proxy node from group node map */ /* register the proxy node for internal binding */
assert(group_proxy_map.find(b_output->identifier()) != group_proxy_map.end()); group_proxy_map[b_output->identifier()] = proxy;
assert(group_proxy_map[b_output->identifier()]->special_type == SHADER_SPECIAL_TYPE_PROXY);
ProxyNode *proxy = group_proxy_map[b_output->identifier()];
output_map[b_output->ptr.data] = proxy->outputs[0]; output_map[b_output->ptr.data] = proxy->outputs[0];
} }
if (b_group_ntree)
add_nodes(scene, b_data, b_scene, graph, b_group_ntree, group_proxy_map);
} }
else if (b_node->is_a(&RNA_NodeGroupInput)) { else if (b_node->is_a(&RNA_NodeGroupInput)) {
/* add a proxy node for each socket */ /* map each socket to a proxy node */
for(b_node->outputs.begin(b_output); b_output != b_node->outputs.end(); ++b_output) { for(b_node->outputs.begin(b_output); b_output != b_node->outputs.end(); ++b_output) {
ProxyNode *proxy = new ProxyNode(convert_socket_type(*b_output)); ProxyMap::iterator proxy_it = proxy_map.find(b_output->identifier());
if (proxy_it != proxy_map.end()) {
output_map[b_output->ptr.data] = proxy->outputs[0]; ProxyNode *proxy = proxy_it->second;
/* register the proxy node for external binding */ output_map[b_output->ptr.data] = proxy->outputs[0];
proxy_map[b_output->identifier()] = proxy; }
graph->add(proxy);
} }
} }
else if (b_node->is_a(&RNA_NodeGroupOutput)) { else if (b_node->is_a(&RNA_NodeGroupOutput)) {
/* add a proxy node for each socket */ BL::NodeGroupOutput b_output_node(*b_node);
for(b_node->inputs.begin(b_input); b_input != b_node->inputs.end(); ++b_input) { /* only the active group output is used */
ProxyNode *proxy = new ProxyNode(convert_socket_type(*b_input)); if (b_output_node.is_active_output()) {
/* map each socket to a proxy node */
input_map[b_input->ptr.data] = proxy->inputs[0]; for(b_node->inputs.begin(b_input); b_input != b_node->inputs.end(); ++b_input) {
ProxyMap::iterator proxy_it = proxy_map.find(b_input->identifier());
set_default_value(proxy->inputs[0], *b_node, *b_input, b_data, b_ntree); if (proxy_it != proxy_map.end()) {
ProxyNode *proxy = proxy_it->second;
/* register the proxy node for external binding */
proxy_map[b_input->identifier()] = proxy; input_map[b_input->ptr.data] = proxy->inputs[0];
graph->add(proxy); set_default_value(proxy->inputs[0], *b_node, *b_input, b_data, b_ntree);
}
}
} }
} }
else { else {

@ -94,7 +94,7 @@ __device void camera_sample_perspective(KernelGlobals *kg, float raster_x, float
/* Orthographic Camera */ /* Orthographic Camera */
__device void camera_sample_orthographic(KernelGlobals *kg, float raster_x, float raster_y, Ray *ray) __device void camera_sample_orthographic(KernelGlobals *kg, float raster_x, float raster_y, float lens_u, float lens_v, Ray *ray)
{ {
/* create ray form raster position */ /* create ray form raster position */
Transform rastertocamera = kernel_data.cam.rastertocamera; Transform rastertocamera = kernel_data.cam.rastertocamera;
@ -103,6 +103,22 @@ __device void camera_sample_orthographic(KernelGlobals *kg, float raster_x, floa
ray->P = Pcamera; ray->P = Pcamera;
ray->D = make_float3(0.0f, 0.0f, 1.0f); ray->D = make_float3(0.0f, 0.0f, 1.0f);
/* modify ray for depth of field */
float aperturesize = kernel_data.cam.aperturesize;
if(aperturesize > 0.0f) {
/* sample point on aperture */
float2 lensuv = camera_sample_aperture(kg, lens_u, lens_v)*aperturesize;
/* compute point on plane of focus */
float ft = kernel_data.cam.focaldistance/ray->D.z;
float3 Pfocus = ray->P + ray->D*ft;
/* update ray for effect of lens */
ray->P = make_float3(lensuv.x, lensuv.y, 0.0f);
ray->D = normalize(Pfocus - ray->P);
}
/* transform ray from camera to world */ /* transform ray from camera to world */
Transform cameratoworld = kernel_data.cam.cameratoworld; Transform cameratoworld = kernel_data.cam.cameratoworld;
@ -223,7 +239,7 @@ __device void camera_sample(KernelGlobals *kg, int x, int y, float filter_u, flo
if(kernel_data.cam.type == CAMERA_PERSPECTIVE) if(kernel_data.cam.type == CAMERA_PERSPECTIVE)
camera_sample_perspective(kg, raster_x, raster_y, lens_u, lens_v, ray); camera_sample_perspective(kg, raster_x, raster_y, lens_u, lens_v, ray);
else if(kernel_data.cam.type == CAMERA_ORTHOGRAPHIC) else if(kernel_data.cam.type == CAMERA_ORTHOGRAPHIC)
camera_sample_orthographic(kg, raster_x, raster_y, ray); camera_sample_orthographic(kg, raster_x, raster_y, lens_u, lens_v, ray);
else else
camera_sample_panorama(kg, raster_x, raster_y, lens_u, lens_v, ray); camera_sample_panorama(kg, raster_x, raster_y, lens_u, lens_v, ray);
} }

@ -332,7 +332,7 @@ void LightManager::device_update_distribution(Device *device, DeviceScene *dscen
if(kintegrator->use_direct_light) { if(kintegrator->use_direct_light) {
/* number of emissives */ /* number of emissives */
kintegrator->num_distribution = (totarea > 0.0f)? num_distribution: 0; kintegrator->num_distribution = num_distribution;
/* precompute pdfs */ /* precompute pdfs */
kintegrator->pdf_triangles = 0.0f; kintegrator->pdf_triangles = 0.0f;

@ -500,6 +500,7 @@ int cocoa_request_qtcodec_settings(bContext *C, wmOperator *op)
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender; - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender;
- (void)applicationWillTerminate:(NSNotification *)aNotification; - (void)applicationWillTerminate:(NSNotification *)aNotification;
- (void)applicationWillBecomeActive:(NSNotification *)aNotification; - (void)applicationWillBecomeActive:(NSNotification *)aNotification;
- (void)toggleFullScreen:(NSNotification *)notification;
@end @end
@implementation CocoaAppDelegate : NSObject @implementation CocoaAppDelegate : NSObject
@ -536,10 +537,16 @@ int cocoa_request_qtcodec_settings(bContext *C, wmOperator *op)
{ {
systemCocoa->handleApplicationBecomeActiveEvent(); systemCocoa->handleApplicationBecomeActiveEvent();
} }
- (void)toggleFullScreen:(NSNotification *)notification
{
}
@end @end
#pragma mark initialization/finalization #pragma mark initialization/finalization
const char *user_locale; // Global current user locale const char *user_locale; // Global current user locale
@ -655,6 +662,11 @@ GHOST_TSuccess GHOST_SystemCocoa::init()
[windowMenu addItemWithTitle:@"Zoom" action:@selector(performZoom:) keyEquivalent:@""]; [windowMenu addItemWithTitle:@"Zoom" action:@selector(performZoom:) keyEquivalent:@""];
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 // make it build with 10.6 deployment target, but as it is not available in 10.6, it will get weaklinked
menuItem = [windowMenu addItemWithTitle:@"Enter Full Screen" action:@selector(toggleFullScreen:) keyEquivalent:@"f" ];
[menuItem setKeyEquivalentModifierMask:NSCommandKeyMask];
#endif
menuItem = [windowMenu addItemWithTitle:@"Close" action:@selector(performClose:) keyEquivalent:@"w"]; menuItem = [windowMenu addItemWithTitle:@"Close" action:@selector(performClose:) keyEquivalent:@"w"];
[menuItem setKeyEquivalentModifierMask:NSCommandKeyMask]; [menuItem setKeyEquivalentModifierMask:NSCommandKeyMask];
@ -1404,7 +1416,13 @@ GHOST_TSuccess GHOST_SystemCocoa::handleTabletEvent(void *eventPtr, short eventT
switch (eventType) { switch (eventType) {
case NSTabletPoint: case NSTabletPoint:
ct.Pressure = [event pressure]; // workaround 2 cornercases:
// 1. if [event isEnteringProximity] was not triggered since program-start
// 2. device is not sending [event pointingDeviceType], due no eraser
if (ct.Active == GHOST_kTabletModeNone)
ct.Active = GHOST_kTabletModeStylus;
ct.Pressure = sqrtf(powf([event pressure], 5 )); // experimental: change sensivity curve
ct.Xtilt = [event tilt].x; ct.Xtilt = [event tilt].x;
ct.Ytilt = [event tilt].y; ct.Ytilt = [event tilt].y;
break; break;

@ -622,7 +622,13 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(
[m_window registerForDraggedTypes:[NSArray arrayWithObjects:NSFilenamesPboardType, [m_window registerForDraggedTypes:[NSArray arrayWithObjects:NSFilenamesPboardType,
NSStringPboardType, NSTIFFPboardType, nil]]; NSStringPboardType, NSTIFFPboardType, nil]];
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
if (state != GHOST_kWindowStateFullScreen) {
[m_window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
}
#endif
if (state == GHOST_kWindowStateFullScreen) if (state == GHOST_kWindowStateFullScreen)
setState(GHOST_kWindowStateFullScreen); setState(GHOST_kWindowStateFullScreen);
@ -964,9 +970,9 @@ GHOST_TSuccess GHOST_WindowCocoa::setState(GHOST_TWindowState state)
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
//10.6 provides Cocoa functions to autoshow menu bar, and to change a window style //10.6 provides Cocoa functions to autoshow menu bar, and to change a window style
//Hide menu & dock if needed //Hide menu & dock if on primary screen. else only menu
if ([[m_window screen] isEqual:[[NSScreen screens] objectAtIndex:0]]) { if ([[m_window screen] isEqual:[[NSScreen screens] objectAtIndex:0]]) {
[NSApp setPresentationOptions:(NSApplicationPresentationHideDock | NSApplicationPresentationAutoHideMenuBar)]; [NSApp setPresentationOptions:(NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)];
} }
//Make window borderless and enlarge it //Make window borderless and enlarge it
[m_window setStyleMask:NSBorderlessWindowMask]; [m_window setStyleMask:NSBorderlessWindowMask];

@ -79,74 +79,73 @@ typedef struct {
// #define _NET_WM_STATE_TOGGLE 2 // UNUSED // #define _NET_WM_STATE_TOGGLE 2 // UNUSED
/* /*
import bpy * import bpy
I = bpy.data.images['blender.png'] # the 48x48 icon * ima = bpy.data.images["blender.png"]
* w, h = ima.size
# Write to a file that can be * print("%d,%d," % (w, h))
# used within static unsigned char BLENDER_ICON_48x48x24[] = {...} * for y in range(h - 1, -1, -1):
f = open('/myicon.txt', 'w') * px = []
for j in xrange(48): * for x in range(w):
for k in xrange(48): * p = ((y * w) + x) * 4
v = I.getPixelI(j,47-k) * rgba = ima.pixels[p : p + 4]
v.pop() * rgba = rgba[2], rgba[1], rgba[0], rgba[3]
for p in v: * px.append(sum((int(p * 255) << (8 * i)) for i, p in enumerate(rgba)))
f.write(str(hex(p))+',') * print(", ".join([str(p) for p in px]), end=",\n")
f.write('\n')
*/ */
/* See the python script above to regenerate the 48x48 icon within blender */ /* See the python script above to regenerate the 48x48 icon within blender */
#define BLENDER_ICON_WIDTH 48 #define BLENDER_ICON_WIDTH 48
#define BLENDER_ICON_HEIGHT 48 #define BLENDER_ICON_HEIGHT 48
static unsigned char BLENDER_ICON_48x48x24[] = { static long BLENDER_ICON_48x48x32[] = {
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 48,48,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x4f, 0x2a, 0xd, 0xa7, 0x5b, 0x1f, 0xb8, 0x66, 0x22, 0x6c, 0x3b, 0x14, 0x5, 0x3, 0x1, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x6f, 0x3a, 0x13, 0xea, 0x7f, 0x2c, 0xee, 0x7e, 0x2b, 0xee, 0x7e, 0x2b, 0xef, 0x85, 0x2e, 0x5f, 0x35, 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x43, 0x22, 0xb, 0xed, 0x7f, 0x2c, 0xed, 0x7c, 0x2b, 0xee, 0x7f, 0x2c, 0xee, 0x80, 0x2c, 0xee, 0x80, 0x2c, 0xa8, 0x5f, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x2e, 0x16, 0x6, 0xd0, 0x6f, 0x26, 0xed, 0x7b, 0x2a, 0xed, 0x7d, 0x2b, 0xee, 0x7f, 0x2c, 0xee, 0x80, 0x2c, 0xee, 0x82, 0x2d, 0x9a, 0x57, 0x1d, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 131820800, 1305304320, 2547014912, 1808620800, 432823296, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x17, 0xb, 0x4, 0xb9, 0x60, 0x21, 0xed, 0x7a, 0x2a, 0xed, 0x7b, 0x2a, 0xed, 0x7e, 0x2b, 0xee, 0x7f, 0x2c, 0xee, 0x7f, 0x2c, 0xee, 0x86, 0x2e, 0x4e, 0x2b, 0xe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 3218103552, 4074070530, 4276450320, 4124995601, 4090518785, 1624202496, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x1, 0x0, 0x0, 0x96, 0x4d, 0x19, 0xee, 0x7a, 0x2a, 0xed, 0x79, 0x2a, 0xed, 0x7c, 0x2b, 0xed, 0x7e, 0x2b, 0xed, 0x7e, 0x2b, 0xef, 0x83, 0x2d, 0x98, 0x55, 0x1c, 0x3, 0x1, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 1053710848, 4140916224, 4294348072, 4294483011, 4294483268, 4294153273, 4107626765, 2765053184, 146759680, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x20, 0xf, 0x5, 0x4b, 0x27, 0xe, 0x21, 0x11, 0x5, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x67, 0x34, 0x11, 0xed, 0x7b, 0x2a, 0xec, 0x79, 0x29, 0xed, 0x7b, 0x2a, 0xed, 0x7c, 0x2b, 0xed, 0x7d, 0x2b, 0xee, 0x7f, 0x2c, 0xbb, 0x69, 0x24, 0x11, 0x9, 0x3, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 282025984, 4124007680, 4293884685, 4294482752, 4294483785, 4294483785, 4294417734, 4141905692, 3671088640, 600596224, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x38, 0x1c, 0x9, 0xc9, 0x6d, 0x2c, 0xf1, 0x86, 0x36, 0xd7, 0x79, 0x2a, 0x22, 0x12, 0x5, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x3b, 0x1d, 0x9, 0xe0, 0x74, 0x27, 0xed, 0x7a, 0x2a, 0xed, 0x7c, 0x2a, 0xed, 0x7d, 0x2b, 0xed, 0x7d, 0x2b, 0xed, 0x7d, 0x2b, 0xdc, 0x7a, 0x2a, 0x1e, 0xf, 0x5, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 1573804544, 4124073472, 4293555207, 4294416700, 4294484558, 4294484558, 4294484558, 4260005935, 4073807875, 1355766784, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xa6, 0x56, 0x23, 0xee, 0x83, 0x3b, 0xed, 0x7d, 0x2c, 0xf0, 0x85, 0x2e, 0x75, 0x43, 0x17, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x25, 0x12, 0x5, 0xc9, 0x68, 0x24, 0xed, 0x7b, 0x2a, 0xed, 0x7d, 0x2b, 0xed, 0x7e, 0x2b, 0xee, 0x7e, 0x2c, 0xed, 0x7d, 0x2b, 0xe3, 0x7d, 0x2b, 0x3b, 0x1f, 0xa, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 936140032, 3973012736, 4192300034, 4294415154, 4294485331, 4294485074, 4294485074, 4294088514, 4107560459, 2463128832, 79642624, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x1c, 0xd, 0x4, 0xd9, 0x74, 0x35, 0xee, 0x83, 0x3a, 0xee, 0x7f, 0x2b, 0xf0, 0x86, 0x2e, 0x83, 0x4d, 0x1a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xa, 0x5, 0x1, 0xa1, 0x54, 0x1c, 0xee, 0x7e, 0x2c, 0xed, 0x7e, 0x2c, 0xed, 0x7f, 0x2c, 0xed, 0x80, 0x2c, 0xed, 0x7f, 0x2b, 0xec, 0x81, 0x2d, 0x60, 0x33, 0x11, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 399726848, 3452984576, 4107887616, 4294281765, 4294485590, 4294485591, 4294485590, 4294418767, 4124931612, 3469762048, 449730560, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x24, 0x11, 0x5, 0xe0, 0x7a, 0x38, 0xee, 0x84, 0x3a, 0xee, 0x82, 0x2c, 0xf0, 0x88, 0x2f, 0x82, 0x4d, 0x1a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x6f, 0x39, 0x13, 0xef, 0x82, 0x30, 0xed, 0x82, 0x2f, 0xee, 0x82, 0x2e, 0xee, 0x82, 0x2d, 0xee, 0x81, 0x2c, 0xf0, 0x83, 0x2d, 0x88, 0x49, 0x18, 0x3, 0x2, 0x1, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 97281536, 2597412096, 4107427584, 4293951767, 4294485590, 4294551642, 4294486105, 4294485847, 4226320176, 4023344642, 1120754944, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x24, 0x11, 0x5, 0xe0, 0x7c, 0x3a, 0xee, 0x86, 0x3b, 0xee, 0x84, 0x2d, 0xf1, 0x8b, 0x30, 0x82, 0x4d, 0x1a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x54, 0x2b, 0xf, 0xe9, 0x80, 0x30, 0xee, 0x87, 0x33, 0xef, 0x88, 0x32, 0xef, 0x88, 0x30, 0xee, 0x85, 0x2f, 0xef, 0x83, 0x2e, 0xae, 0x5f, 0x20, 0x4, 0x2, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 1389190400, 2949668096, 4073741568, 4291714048, 4291714048, 4291714048, 4291714048, 4291714048, 4291714048, 4291714048, 4291714048, 4291714048, 4291714048, 4291714048, 4291714048, 4291714048, 4291714048, 4291714048, 4291714048, 4291714048, 4158482693, 4294484301, 4294552415, 4294552157, 4294551899, 4294486105, 4293957442, 4124206089, 2144427008, 33488896, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x24, 0x11, 0x5, 0xe0, 0x7e, 0x3d, 0xef, 0x8a, 0x3d, 0xef, 0x88, 0x2e, 0xf1, 0x8d, 0x31, 0x81, 0x4d, 0x1a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0x29, 0x15, 0x7, 0xd2, 0x74, 0x2d, 0xf0, 0x8b, 0x36, 0xf0, 0x8d, 0x35, 0xef, 0x8d, 0x35, 0xef, 0x8b, 0x33, 0xef, 0x88, 0x30, 0xc4, 0x6d, 0x26, 0x18, 0xc, 0x4, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 1171217408, 4107361792, 4293425685, 4294218035, 4294482753, 4294483268, 4294483783, 4294484043, 4294484558, 4294484817, 4294485331, 4294485591, 4294486105, 4294551899, 4294552157, 4294552415, 4294552672, 4294552673, 4294552930, 4294552674, 4294552674, 4294553188, 4294553190, 4294552932, 4294552674, 4294552415, 4294552156, 4294551642, 4294287696, 4124733464, 3234946560, 315970816, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x24, 0x11, 0x5, 0xe1, 0x80, 0x3f, 0xf0, 0x8d, 0x3f, 0xef, 0x8a, 0x2f, 0xf1, 0x8f, 0x32, 0x81, 0x4e, 0x1a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9, 0x3, 0x0, 0xb1, 0x61, 0x26, 0xf1, 0x8e, 0x3a, 0xf1, 0x90, 0x3a, 0xf0, 0x90, 0x38, 0xf0, 0x90, 0x36, 0xef, 0x8e, 0x35, 0xd3, 0x7a, 0x2c, 0x22, 0x11, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 3838860800, 4293620999, 4294416700, 4294482753, 4294483269, 4294483784, 4294484300, 4294484816, 4294485331, 4294485591, 4294551642, 4294552157, 4294552672, 4294552931, 4294553446, 4294553704, 4294553962, 4294554220, 4294554221, 4294554221, 4294554220, 4294554220, 4294553962, 4294553704, 4294553190, 4294552931, 4294552416, 4294552157, 4294551642, 4294485590, 4192502315, 3939458305, 919624192, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x24, 0x12, 0x5, 0xe1, 0x83, 0x42, 0xf0, 0x90, 0x42, 0xf0, 0x8d, 0x30, 0xf2, 0x92, 0x33, 0x80, 0x4e, 0x1b, 0x0, 0x0, 0x0, 0x3, 0x2, 0x0, 0x81, 0x45, 0x1b, 0xf1, 0x90, 0x3e, 0xf1, 0x94, 0x3d, 0xf1, 0x95, 0x3c, 0xf0, 0x94, 0x3b, 0xf0, 0x92, 0x39, 0xf0, 0x90, 0x35, 0xd0, 0x7b, 0x2b, 0xc2, 0x6e, 0x26, 0xbe, 0x6c, 0x25, 0x94, 0x54, 0x1c, 0x5b, 0x33, 0x11, 0x1a, 0xe, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 3838860800, 4293751810, 4294415669, 4294482753, 4294483268, 4294483784, 4294484300, 4294484816, 4294485331, 4294485591, 4294551642, 4294552157, 4294552932, 4294553447, 4294553962, 4294554220, 4294554479, 4294554737, 4294554994, 4294554994, 4294554994, 4294554737, 4294554479, 4294554220, 4294553705, 4294553446, 4294552931, 4294552416, 4294552156, 4294486105, 4294485589, 4293824827, 4124140038, 1741708800, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x25, 0x14, 0x6, 0xe2, 0x86, 0x44, 0xf1, 0x94, 0x45, 0xf0, 0x90, 0x31, 0xf2, 0x94, 0x33, 0x80, 0x4e, 0x1b, 0x0, 0x0, 0x0, 0x60, 0x34, 0x14, 0xed, 0x8c, 0x3e, 0xf0, 0x96, 0x42, 0xf1, 0x97, 0x40, 0xf1, 0x95, 0x3f, 0xf0, 0x91, 0x39, 0xef, 0x8e, 0x33, 0xef, 0x8d, 0x31, 0xf0, 0x8d, 0x31, 0xef, 0x8c, 0x30, 0xef, 0x8c, 0x30, 0xf0, 0x8d, 0x31, 0xf1, 0x8e, 0x31, 0xe1, 0x85, 0x2e, 0x92, 0x55, 0x1d, 0x25, 0x14, 0x7, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 2463128832, 4191905024, 4294145792, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294345234, 4294553447, 4294554221, 4294554736, 4294620787, 4294621045, 4294621047, 4294621303, 4294621047, 4294621045, 4294554995, 4294554737, 4294554220, 4294553705, 4294553190, 4294552930, 4294552414, 4294551899, 4294485847, 4294485590, 4294155594, 4141050128, 1573936384, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x26, 0x14, 0x6, 0xe2, 0x89, 0x46, 0xf2, 0x97, 0x47, 0xf1, 0x92, 0x32, 0xf2, 0x96, 0x34, 0x80, 0x4e, 0x1a, 0x32, 0x1a, 0xa, 0xe3, 0x87, 0x3d, 0xf1, 0x97, 0x45, 0xf1, 0x98, 0x44, 0xf1, 0x95, 0x41, 0xf0, 0x90, 0x39, 0xef, 0x8d, 0x30, 0xef, 0x8f, 0x31, 0xf0, 0x90, 0x32, 0xf0, 0x92, 0x33, 0xf1, 0x93, 0x33, 0xf1, 0x94, 0x34, 0xf1, 0x94, 0x34, 0xf0, 0x93, 0x34, 0xf0, 0x91, 0x32, 0xf1, 0x91, 0x33, 0xe2, 0x8a, 0x30, 0x6b, 0x3f, 0x15, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 248011520, 2983288320, 4191116288, 4174405120, 4174405120, 4174405120, 4174405120, 4174405120, 4174405120, 4174405120, 4174405120, 4207959552, 4294214422, 4294554220, 4294554736, 4294620787, 4294621046, 4294621562, 4294621820, 4294690967, 4294761660, 4294830292, 4294899180, 4294966780, 4294898406, 4294829002, 4294759597, 4294621304, 4294552416, 4294551900, 4294485848, 4294485332, 4294485590, 4294221646, 4140984079, 1204641024, 4671303, 4671303, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x26, 0x14, 0x6, 0xe3, 0x8b, 0x49, 0xf2, 0x9a, 0x49, 0xf1, 0x93, 0x32, 0xf2, 0x98, 0x35, 0x8f, 0x57, 0x1d, 0xcf, 0x7c, 0x38, 0xf2, 0x99, 0x48, 0xf1, 0x98, 0x47, 0xf1, 0x96, 0x44, 0xf0, 0x90, 0x39, 0xef, 0x8d, 0x31, 0xf0, 0x90, 0x31, 0xf0, 0x92, 0x33, 0xf1, 0x94, 0x33, 0xf1, 0x96, 0x35, 0xf1, 0x98, 0x35, 0xf1, 0x9a, 0x36, 0xf1, 0x9c, 0x37, 0xf2, 0x9d, 0x37, 0xf2, 0x9c, 0x37, 0xf2, 0x99, 0x36, 0xf0, 0x94, 0x34, 0xf3, 0x97, 0x35, 0x9f, 0x60, 0x21, 0x13, 0xb, 0x3, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 79642624, 282025984, 282025984, 282025984, 282025984, 282025984, 282025984, 1540316160, 4124007680, 4226185237, 4294552156, 4294554221, 4294554737, 4294620789, 4294621561, 4294623367, 4294829774, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, 4294966778, 4294759856, 4294552674, 4294486105, 4294485589, 4294484817, 4294551127, 4294089804, 4090651658, 885939456, 4671303, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x26, 0x14, 0x6, 0xe3, 0x8d, 0x4b, 0xf2, 0x9b, 0x4c, 0xf1, 0x93, 0x32, 0xf1, 0x97, 0x35, 0xea, 0x98, 0x43, 0xf2, 0x9d, 0x4d, 0xf1, 0x9a, 0x4b, 0xf1, 0x99, 0x49, 0xf0, 0x93, 0x3d, 0xf0, 0x8d, 0x30, 0xf0, 0x90, 0x32, 0xf0, 0x92, 0x32, 0xf0, 0x94, 0x34, 0xf1, 0x96, 0x34, 0xf1, 0x98, 0x36, 0xf1, 0x9a, 0x36, 0xf2, 0x9c, 0x38, 0xf2, 0x9f, 0x38, 0xf2, 0xa2, 0x39, 0xf3, 0xa2, 0x39, 0xf3, 0xa2, 0x39, 0xf2, 0x9f, 0x38, 0xf1, 0x99, 0x35, 0xf2, 0x97, 0x35, 0xba, 0x74, 0x29, 0x13, 0xb, 0x4, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 97281536, 2513394688, 4124139264, 4293888040, 4294552931, 4294553705, 4294554478, 4294554737, 4294621045, 4294692513, 4294900470, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, 4294898922, 4294621046, 4294485589, 4294484817, 4294484558, 4294551383, 4293891393, 4023344385, 432823296, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x26, 0x14, 0x6, 0xe4, 0x8e, 0x4d, 0xf2, 0x9d, 0x4e, 0xf1, 0x93, 0x32, 0xf2, 0x9d, 0x3f, 0xf3, 0xa4, 0x54, 0xf2, 0x9d, 0x50, 0xf1, 0x9b, 0x4d, 0xf2, 0x98, 0x46, 0xef, 0x8d, 0x31, 0xf0, 0x8f, 0x31, 0xf0, 0x91, 0x32, 0xf0, 0x93, 0x32, 0xf1, 0x94, 0x32, 0xf1, 0x95, 0x32, 0xf1, 0x98, 0x34, 0xf1, 0x9b, 0x36, 0xf2, 0x9e, 0x38, 0xf2, 0xa1, 0x39, 0xf2, 0xa4, 0x3a, 0xf3, 0xa6, 0x3b, 0xf4, 0xa8, 0x3c, 0xf3, 0xa7, 0x3c, 0xf3, 0xa4, 0x3a, 0xf2, 0x9c, 0x37, 0xf2, 0x99, 0x36, 0xa9, 0x69, 0x25, 0x2, 0x1, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 583752192, 3604045056, 4124796420, 4294285115, 4294552672, 4294553189, 4294553704, 4294554220, 4294554736, 4294623367, 4294769142, 4294835709, 4294835709, 4294835709, 4293192946, 4289446870, 4287803851, 4286620866, 4287738058, 4289446871, 4293850103, 4294901502, 4294901502, 4294901502, 4294898406, 4294552157, 4294484816, 4294484301, 4294484299, 4294486105, 4192502057, 2530172416, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x26, 0x14, 0x6, 0xe4, 0x90, 0x50, 0xf2, 0x9e, 0x51, 0xf1, 0x95, 0x35, 0xf4, 0xa6, 0x54, 0xf3, 0xa2, 0x55, 0xf2, 0x9e, 0x51, 0xf2, 0x9c, 0x4e, 0xf0, 0x8f, 0x35, 0xf0, 0x8e, 0x31, 0xf0, 0x90, 0x32, 0xf3, 0xa5, 0x56, 0xf7, 0xc4, 0x8e, 0xfa, 0xd8, 0xb6, 0xfb, 0xdf, 0xc2, 0xfa, 0xd8, 0xb2, 0xf7, 0xc4, 0x89, 0xf4, 0xae, 0x59, 0xf2, 0xa1, 0x38, 0xf3, 0xa5, 0x3b, 0xf4, 0xa8, 0x3c, 0xf4, 0xab, 0x3d, 0xf4, 0xac, 0x3e, 0xf4, 0xab, 0x3d, 0xf3, 0xa7, 0x3b, 0xf2, 0x9e, 0x38, 0xf4, 0x9e, 0x38, 0x6f, 0x45, 0x17, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 1473075968, 4090518784, 4259673101, 4294484042, 4294551899, 4294552415, 4294552931, 4294553447, 4294553962, 4294554995, 4294700770, 4294704123, 4294704123, 4294769916, 4290169563, 4286555330, 4286423745, 4286292416, 4286095038, 4285897917, 4285635259, 4285766844, 4291155427, 4294769916, 4294769916, 4294769916, 4294628011, 4294278923, 4294278408, 4294278149, 4294279181, 4294149404, 4140784896, 365846784, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x19, 0xc, 0x5, 0x63, 0x36, 0x18, 0x3f, 0x20, 0x9, 0x2, 0x1, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x26, 0x14, 0x6, 0xe4, 0x91, 0x52, 0xf3, 0xa2, 0x55, 0xf2, 0x9d, 0x43, 0xf4, 0xa7, 0x5b, 0xf3, 0xa2, 0x57, 0xf3, 0xa0, 0x55, 0xf1, 0x97, 0x43, 0xf0, 0x8d, 0x30, 0xf2, 0x9d, 0x4c, 0xfa, 0xda, 0xbc, 0xfe, 0xfb, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfb, 0xf6, 0xfa, 0xdc, 0xb5, 0xf4, 0xae, 0x4e, 0xf4, 0xa9, 0x3c, 0xf4, 0xac, 0x3d, 0xf4, 0xae, 0x3f, 0xf4, 0xaf, 0x3f, 0xf4, 0xad, 0x3f, 0xf3, 0xa8, 0x3d, 0xf2, 0x9d, 0x38, 0xe2, 0x94, 0x34, 0x23, 0x14, 0x6, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 163992832, 2731564288, 4124205057, 4293952286, 4294484816, 4294485590, 4294551642, 4294552157, 4294552673, 4294553188, 4294553704, 4294561702, 4294572537, 4294572537, 4294638330, 4291023841, 4286226623, 4286226623, 4286160831, 4286029502, 4285832381, 4285700795, 4284977846, 4282414755, 4280706199, 4290629597, 4294572537, 4294572537, 4294572537, 4294350393, 4294277376, 4294277376, 4294277633, 4294413864, 4158482692, 1875663872, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x11, 0x8, 0x3, 0x9e, 0x62, 0x39, 0xf2, 0x91, 0x4e, 0xe7, 0x79, 0x29, 0x48, 0x25, 0xc, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x27, 0x13, 0x6, 0xe5, 0x93, 0x54, 0xf3, 0xa7, 0x59, 0xf4, 0xa6, 0x56, 0xf4, 0xa7, 0x5d, 0xf3, 0xa4, 0x59, 0xf3, 0xa2, 0x57, 0xf1, 0x90, 0x36, 0xf4, 0xa7, 0x5d, 0xfe, 0xf4, 0xeb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xf2, 0xe3, 0xf6, 0xb8, 0x5f, 0xf4, 0xac, 0x3e, 0xf4, 0xaf, 0x3f, 0xf4, 0xb1, 0x40, 0xf4, 0xb2, 0x40, 0xf5, 0xaf, 0x3f, 0xf3, 0xa6, 0x3c, 0xf3, 0x9f, 0x38, 0x90, 0x5d, 0x21, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 718166784, 3738197248, 4141705477, 4294283568, 4294484815, 4294484816, 4294485332, 4294485848, 4294551899, 4294552158, 4294552673, 4294553188, 4294500036, 4294440951, 4294506744, 4294243830, 4286292159, 4285963709, 4285898173, 4285832381, 4285766588, 4285372345, 4282349219, 4279391885, 4279063179, 4279063179, 4281954719, 4294375158, 4294375158, 4294375158, 4294357617, 4294277376, 4294277376, 4294277376, 4294346781, 4293557270, 3218103552, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x3d, 0x1f, 0xf, 0xed, 0x9c, 0x6a, 0xef, 0x8b, 0x4a, 0xec, 0x78, 0x29, 0xe4, 0x79, 0x2a, 0x29, 0x15, 0x7, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0x28, 0x14, 0x6, 0xe6, 0x97, 0x57, 0xf5, 0xad, 0x63, 0xf5, 0xac, 0x62, 0xf4, 0xa8, 0x5f, 0xf4, 0xa6, 0x5c, 0xf3, 0xa0, 0x53, 0xf4, 0xa9, 0x64, 0xfe, 0xf8, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xff, 0xf2, 0xf7, 0xfa, 0xed, 0xf4, 0xf8, 0xfd, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf7, 0xed, 0xf5, 0xb5, 0x53, 0xf5, 0xb0, 0x3f, 0xf5, 0xb3, 0x41, 0xf5, 0xb4, 0x42, 0xf5, 0xb3, 0x41, 0xf4, 0xad, 0x3f, 0xf3, 0xa1, 0x39, 0xe4, 0x98, 0x37, 0x1d, 0x11, 0x5, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 1691311104, 4124007936, 4276647182, 4294416701, 4294483784, 4294484043, 4294484558, 4294485073, 4294485332, 4294485848, 4294551899, 4294552158, 4294552672, 4294372579, 4294375158, 4294375158, 4291943654, 4285569467, 4285635003, 4285569467, 4285503674, 4282875047, 4279654800, 4279063179, 4279063179, 4279063179, 4279063179, 4279128971, 4292732137, 4294177779, 4294177779, 4294233511, 4294277376, 4294277376, 4294277376, 4294344717, 4294217516, 4140784640, 50298880, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x43, 0x23, 0x10, 0xf2, 0xa1, 0x70, 0xf1, 0x99, 0x61, 0xec, 0x78, 0x2a, 0xed, 0x7b, 0x2a, 0xc4, 0x69, 0x23, 0x15, 0xa, 0x3, 0x0, 0x0, 0x0, 0x1d, 0xf, 0x5, 0xe7, 0x9b, 0x5b, 0xf5, 0xb1, 0x68, 0xf5, 0xad, 0x65, 0xf4, 0xaa, 0x62, 0xf4, 0xa8, 0x5f, 0xf3, 0xa4, 0x59, 0xfd, 0xec, 0xde, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xfd, 0xfe, 0xc3, 0xda, 0xe9, 0x5c, 0x9a, 0xc5, 0x2a, 0x7b, 0xb4, 0x17, 0x6f, 0xae, 0x36, 0x81, 0xb8, 0x91, 0xbb, 0xd9, 0xf0, 0xf6, 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xe7, 0xc7, 0xf5, 0xb2, 0x43, 0xf6, 0xb3, 0x41, 0xf5, 0xb5, 0x43, 0xf5, 0xb6, 0x43, 0xf5, 0xb3, 0x42, 0xf4, 0xa8, 0x3c, 0xf4, 0xa2, 0x3a, 0x66, 0x41, 0x17, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 232284672, 2949668096, 4107559426, 4294017820, 4294416960, 4294482753, 4294483268, 4294416959, 4294413348, 4294347296, 4294417474, 4294485332, 4294485848, 4294551642, 4294487137, 4294177779, 4294243572, 4294243572, 4290958047, 4285306552, 4285306553, 4284583603, 4280509077, 4279063179, 4279063179, 4279063179, 4279063179, 4279063179, 4279063179, 4279063179, 4291417567, 4293980400, 4294046193, 4294107085, 4294277376, 4294277376, 4294277376, 4294277376, 4294416185, 4207959811, 232284672, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x22, 0x10, 0x7, 0xd6, 0x88, 0x5b, 0xf2, 0xa5, 0x76, 0xee, 0x84, 0x3f, 0xed, 0x7a, 0x2a, 0xee, 0x80, 0x2c, 0xa5, 0x59, 0x1e, 0x7, 0x3, 0x1, 0x19, 0xd, 0x4, 0xe7, 0x9e, 0x5e, 0xf6, 0xb2, 0x6b, 0xf5, 0xae, 0x67, 0xf5, 0xac, 0x65, 0xf4, 0xa9, 0x61, 0xf8, 0xcc, 0xa1, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfd, 0xfe, 0xfe, 0x97, 0xbf, 0xdb, 0x33, 0x83, 0xbb, 0x24, 0x7e, 0xb9, 0x3, 0x6a, 0xae, 0x0, 0x66, 0xab, 0x0, 0x64, 0xa9, 0x1, 0x63, 0xa9, 0x3c, 0x87, 0xbd, 0xee, 0xf5, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfd, 0xf8, 0xc7, 0x76, 0xf6, 0xb4, 0x41, 0xf5, 0xb7, 0x43, 0xf6, 0xb8, 0x44, 0xf6, 0xb6, 0x43, 0xf5, 0xae, 0x3f, 0xf3, 0xa2, 0x3a, 0xac, 0x71, 0x29, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 852253696, 3855638016, 4158614278, 4294348586, 4294416701, 4294416443, 4294416958, 4294415411, 4294280731, 4108283403, 4243290129, 4294414638, 4294484817, 4294485331, 4294485590, 4294485848, 4294174941, 4294111986, 4294111986, 4292206309, 4284977846, 4283137961, 4279457678, 4279063179, 4279063179, 4279063179, 4279063179, 4279063179, 4279063179, 4279063179, 4279457422, 4293454571, 4293848814, 4293848814, 4294035617, 4294277376, 4294277376, 4294277376, 4294277376, 4294416443, 4140916998, 365846784, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x52, 0x2c, 0x16, 0xf0, 0xa1, 0x71, 0xf2, 0xa2, 0x6f, 0xed, 0x7e, 0x32, 0xed, 0x7e, 0x2b, 0xef, 0x82, 0x2d, 0x8a, 0x49, 0x18, 0x1b, 0xe, 0x4, 0xe7, 0xa2, 0x61, 0xf6, 0xb3, 0x6e, 0xf6, 0xb0, 0x6a, 0xf5, 0xae, 0x67, 0xf5, 0xab, 0x64, 0xfe, 0xf4, 0xeb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb4, 0xd1, 0xe5, 0x3e, 0x8d, 0xc3, 0x37, 0x8e, 0xc5, 0x16, 0x7a, 0xb9, 0x0, 0x6b, 0xaf, 0x0, 0x68, 0xac, 0x0, 0x65, 0xaa, 0x0, 0x65, 0xab, 0x0, 0x66, 0xac, 0x4d, 0x93, 0xc4, 0xf8, 0xfb, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xe7, 0xc5, 0xf6, 0xb3, 0x40, 0xf6, 0xb7, 0x43, 0xf6, 0xb9, 0x44, 0xf6, 0xb8, 0x45, 0xf5, 0xb2, 0x41, 0xf3, 0xa5, 0x3b, 0xe2, 0x98, 0x37, 0x3, 0x1, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 1909480704, 4124073472, 4293490704, 4294415154, 4294415669, 4294415669, 4294416184, 4294414123, 4294083611, 4090914310, 4040055808, 4293161999, 4294414379, 4294484557, 4294484815, 4294485074, 4294485331, 4294104247, 4293914607, 4293914607, 4293783279, 4283334569, 4279063179, 4279063179, 4279063179, 4279063179, 4279063179, 4279063179, 4279063179, 4279063179, 4279063179, 4284057260, 4293585642, 4293651435, 4293651435, 4293962857, 4294277376, 4294277376, 4294277376, 4294277376, 4294416959, 4124205832, 499800064, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x86, 0x4e, 0x2e, 0xf3, 0xa6, 0x77, 0xf1, 0x9e, 0x66, 0xed, 0x7e, 0x2d, 0xee, 0x82, 0x2c, 0xf0, 0x85, 0x2d, 0x7e, 0x47, 0x17, 0xe8, 0xa6, 0x64, 0xf6, 0xb5, 0x70, 0xf6, 0xb2, 0x6d, 0xf5, 0xb0, 0x6a, 0xf7, 0xbb, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xfb, 0xfd, 0x5b, 0x9c, 0xca, 0x42, 0x96, 0xcb, 0x3c, 0x93, 0xc9, 0x9, 0x73, 0xb6, 0x0, 0x6b, 0xb0, 0x0, 0x69, 0xad, 0x0, 0x66, 0xab, 0x0, 0x66, 0xab, 0x0, 0x67, 0xad, 0x4, 0x6a, 0xaf, 0xbb, 0xd7, 0xe9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xee, 0xf6, 0xb9, 0x4f, 0xf6, 0xb7, 0x44, 0xf6, 0xba, 0x45, 0xf6, 0xba, 0x45, 0xf5, 0xb5, 0x43, 0xf4, 0xa8, 0x3d, 0xf5, 0xa7, 0x3d, 0x1b, 0xf, 0x4, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 298998272, 3150929152, 4107690755, 4294018076, 4294415410, 4294414636, 4294414638, 4294415153, 4294413606, 4293886234, 4124205059, 2110675968, 2060409856, 4225921807, 4294414895, 4294483785, 4294484043, 4294484557, 4294484815, 4294164622, 4293783021, 4293717228, 4293388263, 4290299602, 4279326093, 4279063179, 4279063179, 4279063179, 4279063179, 4279063179, 4279063179, 4279063179, 4280245907, 4292205535, 4293454056, 4293454056, 4293454056, 4294086704, 4294277376, 4294277376, 4294277376, 4294277891, 4294417992, 4207894017, 97281536, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x11, 0x8, 0x3, 0xb0, 0x6d, 0x45, 0xf4, 0xaa, 0x7b, 0xf1, 0x9a, 0x5b, 0xee, 0x82, 0x2d, 0xef, 0x86, 0x2e, 0xee, 0x91, 0x36, 0xf5, 0xb5, 0x70, 0xf6, 0xb7, 0x73, 0xf6, 0xb4, 0x70, 0xf5, 0xb1, 0x6c, 0xf9, 0xcc, 0xa1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd1, 0xe2, 0xef, 0x4b, 0x97, 0xca, 0x47, 0x9a, 0xce, 0x3f, 0x95, 0xcb, 0x3, 0x71, 0xb5, 0x0, 0x6c, 0xb0, 0x0, 0x69, 0xae, 0x0, 0x67, 0xac, 0x0, 0x66, 0xac, 0x0, 0x67, 0xad, 0x0, 0x69, 0xaf, 0x66, 0xa5, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xfa, 0xf8, 0xc3, 0x67, 0xf6, 0xb8, 0x44, 0xf6, 0xba, 0x45, 0xf6, 0xbb, 0x46, 0xf6, 0xb7, 0x44, 0xf4, 0xab, 0x3e, 0xf8, 0xab, 0x3f, 0x2a, 0x19, 0x8, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 50298880, 3503250688, 4192169224, 4294282278, 4294414381, 4294347813, 4294413865, 4294414122, 4294348070, 4259937303, 4090519041, 1305304320, 4671303, 1238260480, 4024002053, 4294415926, 4294483269, 4294483527, 4294483784, 4294484043, 4294419022, 4293712069, 4293190884, 4293059298, 4293059298, 4289905102, 4281297305, 4279063179, 4279063179, 4279063179, 4279063179, 4279063179, 4282677154, 4291351001, 4293256677, 4293256677, 4293256677, 4293639310, 4294277376, 4294277376, 4294277376, 4294277376, 4294345490, 4294022463, 3671088640, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x2b, 0x15, 0x9, 0xd4, 0x8a, 0x5c, 0xf4, 0xac, 0x7c, 0xf1, 0x98, 0x54, 0xee, 0x85, 0x2e, 0xf1, 0x93, 0x38, 0xf6, 0xba, 0x75, 0xf6, 0xb9, 0x75, 0xf6, 0xb6, 0x72, 0xf6, 0xb3, 0x6f, 0xfa, 0xd5, 0xb1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb0, 0xcf, 0xe5, 0x51, 0x9e, 0xcf, 0x4b, 0x9d, 0xd0, 0x43, 0x97, 0xcc, 0x3, 0x71, 0xb5, 0x0, 0x6d, 0xb1, 0x0, 0x6a, 0xae, 0x0, 0x67, 0xac, 0x0, 0x67, 0xad, 0x0, 0x68, 0xae, 0x0, 0x6a, 0xb0, 0x3b, 0x8c, 0xc2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf9, 0xc9, 0x77, 0xf6, 0xb8, 0x44, 0xf6, 0xba, 0x45, 0xf6, 0xbc, 0x46, 0xf6, 0xb8, 0x44, 0xf4, 0xad, 0x3f, 0xf8, 0xac, 0x3f, 0x2a, 0x1a, 0x8, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 2077187328, 4107822598, 4294348586, 4294347555, 4294347039, 4294347554, 4294348069, 4294348327, 4175590163, 3872349440, 718166784, 4671303, 4671303, 449730560, 4124073472, 4294414379, 4294417217, 4294483010, 4294483268, 4294483269, 4294415927, 4294084898, 4292925905, 4292861919, 4292861919, 4292927712, 4292533470, 4288656582, 4286094006, 4284517036, 4286685370, 4289379531, 4292927713, 4293059298, 4293059298, 4293059298, 4293251260, 4294212873, 4294277376, 4294277376, 4294277376, 4294277376, 4294414896, 4259939884, 2681167104, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x47, 0x26, 0x12, 0xee, 0xa3, 0x72, 0xf4, 0xae, 0x7b, 0xf1, 0x97, 0x4e, 0xf1, 0x92, 0x38, 0xf6, 0xbb, 0x78, 0xf6, 0xbb, 0x78, 0xf6, 0xb7, 0x75, 0xf6, 0xb5, 0x71, 0xfa, 0xd6, 0xb2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xad, 0xcd, 0xe4, 0x54, 0xa0, 0xd1, 0x4e, 0xa0, 0xd1, 0x48, 0x9b, 0xce, 0xb, 0x76, 0xb8, 0x0, 0x6d, 0xb2, 0x0, 0x6a, 0xaf, 0x0, 0x68, 0xad, 0x0, 0x68, 0xad, 0x0, 0x69, 0xae, 0x0, 0x6b, 0xb1, 0x36, 0x89, 0xc1, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xf9, 0xc9, 0x76, 0xf6, 0xb9, 0x44, 0xf6, 0xbb, 0x46, 0xf6, 0xbc, 0x47, 0xf6, 0xb9, 0x44, 0xf4, 0xad, 0x3f, 0xf8, 0xad, 0x40, 0x2a, 0x1a, 0x8, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 97281536, 4191116288, 4294084386, 4294413347, 4294346265, 4294346780, 4294413091, 4294282281, 4124732172, 3335609856, 315970816, 4671303, 4671303, 4671303, 16777216, 3452853504, 4293624609, 4294415670, 4294416702, 4294416959, 4294414121, 4294277634, 4294277376, 4293825597, 4292793547, 4292664540, 4292730333, 4292730333, 4292730333, 4292730333, 4292796126, 4292796126, 4292796126, 4292796126, 4292861919, 4292861919, 4293120190, 4294085156, 4294277376, 4294277376, 4294277376, 4294277376, 4294278149, 4294485332, 4074071305, 969825792, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x70, 0x42, 0x26, 0xf4, 0xad, 0x7b, 0xf5, 0xb1, 0x7d, 0xf3, 0x9f, 0x50, 0xf7, 0xbc, 0x7b, 0xf7, 0xbc, 0x7b, 0xf6, 0xb9, 0x78, 0xf6, 0xb7, 0x74, 0xf9, 0xd0, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0xda, 0xeb, 0x56, 0xa0, 0xd0, 0x51, 0xa1, 0xd2, 0x4a, 0x9c, 0xcf, 0x20, 0x82, 0xbf, 0x0, 0x6e, 0xb2, 0x0, 0x6b, 0xb0, 0x0, 0x68, 0xae, 0x0, 0x68, 0xae, 0x0, 0x69, 0xaf, 0x0, 0x6b, 0xb1, 0x50, 0x98, 0xc9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xf9, 0xf8, 0xc3, 0x66, 0xf6, 0xb9, 0x45, 0xf7, 0xbb, 0x46, 0xf6, 0xbc, 0x47, 0xf6, 0xb8, 0x45, 0xf4, 0xad, 0x3f, 0xf8, 0xac, 0x3f, 0x2a, 0x19, 0x7, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 198270208, 4224605184, 4294282535, 4294413347, 4294346524, 4294348070, 4294085417, 4107559687, 2563792384, 79642624, 4671303, 4671303, 83886080, 184549376, 268435456, 1605258752, 4074137355, 4294416185, 4294346522, 4294278666, 4294277376, 4294277376, 4294277376, 4294277376, 4294213647, 4293243263, 4292532696, 4292532954, 4292532954, 4292598747, 4292598747, 4292598747, 4292598747, 4292664540, 4292794579, 4293568616, 4294212357, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294414895, 4293890877, 3570425344, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xc, 0x5, 0x0, 0xa5, 0x67, 0x40, 0xf5, 0xb1, 0x7f, 0xf5, 0xb7, 0x7e, 0xf7, 0xbf, 0x80, 0xf7, 0xbe, 0x7d, 0xf7, 0xbb, 0x7b, 0xf6, 0xb9, 0x78, 0xf8, 0xc2, 0x8b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xee, 0xf5, 0xf9, 0x5b, 0xa0, 0xce, 0x53, 0xa2, 0xd2, 0x4c, 0x9e, 0xd0, 0x3c, 0x93, 0xc8, 0x6, 0x71, 0xb4, 0x0, 0x6c, 0xb0, 0x0, 0x69, 0xae, 0x0, 0x69, 0xae, 0x0, 0x6a, 0xaf, 0x0, 0x6b, 0xb1, 0x9b, 0xc5, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf7, 0xec, 0xf6, 0xba, 0x4e, 0xf6, 0xb9, 0x45, 0xf7, 0xbb, 0x46, 0xf6, 0xbc, 0x47, 0xf5, 0xb7, 0x44, 0xf4, 0xab, 0x3e, 0xf5, 0xa8, 0x3e, 0x18, 0xd, 0x4, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 3352387072, 4192301839, 4294282279, 4294019626, 4192302873, 4124139523, 1708088576, 4671303, 4671303, 67108864, 184549376, 285212672, 385875968, 486539264, 638387968, 3888864256, 4276847393, 4294414896, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4293954086, 4293502050, 4293179274, 4292855728, 4292662218, 4292920489, 4293243778, 4293501275, 4294083608, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294345491, 4294420571, 4107626251, 1322146816, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x1f, 0x10, 0x7, 0xc9, 0x84, 0x56, 0xf5, 0xb5, 0x81, 0xf7, 0xbf, 0x82, 0xf8, 0xc0, 0x80, 0xf7, 0xbd, 0x7d, 0xf7, 0xba, 0x7a, 0xf6, 0xb8, 0x77, 0xfe, 0xf5, 0xec, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x9a, 0xc2, 0xdf, 0x55, 0x9f, 0xd0, 0x4e, 0x9f, 0xd0, 0x47, 0x99, 0xcc, 0x2a, 0x87, 0xc1, 0x3, 0x6d, 0xb1, 0x0, 0x69, 0xaf, 0x0, 0x6a, 0xaf, 0x0, 0x6a, 0xb0, 0x27, 0x80, 0xbc, 0xec, 0xf4, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xe5, 0xbf, 0xf6, 0xb6, 0x42, 0xf6, 0xba, 0x46, 0xf7, 0xbb, 0x46, 0xf7, 0xbb, 0x47, 0xf5, 0xb5, 0x43, 0xf3, 0xa8, 0x3d, 0xdd, 0x97, 0x37, 0x2, 0x1, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 382819584, 3134217472, 4191116288, 3939458560, 2211470592, 533617152, 4671303, 4671303, 117440512, 218103808, 335544320, 436207616, 553648128, 654311424, 771751936, 1534079488, 4157496833, 4294219326, 4294346523, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294278150, 4294485590, 4175527207, 2932497152, 117440512, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x32, 0x1a, 0xb, 0xe4, 0x9d, 0x6a, 0xf7, 0xbd, 0x84, 0xf8, 0xc1, 0x83, 0xf8, 0xbe, 0x80, 0xf7, 0xbd, 0x7d, 0xf7, 0xba, 0x79, 0xfa, 0xd9, 0xb6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf6, 0xfa, 0x74, 0xac, 0xd4, 0x4f, 0x9b, 0xcd, 0x48, 0x99, 0xcc, 0x41, 0x94, 0xc8, 0x2c, 0x85, 0xbe, 0xb, 0x70, 0xb3, 0x1, 0x6a, 0xb0, 0xb, 0x6e, 0xb2, 0xbf, 0xd9, 0xeb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfd, 0xf8, 0xc8, 0x74, 0xf6, 0xb7, 0x44, 0xf6, 0xba, 0x46, 0xf7, 0xbb, 0x46, 0xf7, 0xb9, 0x46, 0xf6, 0xb2, 0x42, 0xf4, 0xa7, 0x3d, 0xa6, 0x70, 0x29, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 50298880, 33488896, 4671303, 4671303, 4671303, 83886080, 201326592, 318767104, 436207616, 553648128, 671088640, 788529152, 889192448, 1006632960, 2493203712, 4157958415, 4294352457, 4294347039, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294278924, 4294486105, 4260073533, 3872218112, 525476096, 218103808, 100663296, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x4f, 0x2e, 0x18, 0xef, 0xaf, 0x78, 0xf8, 0xc1, 0x85, 0xf8, 0xc0, 0x82, 0xf7, 0xbe, 0x7f, 0xf7, 0xbc, 0x7d, 0xf7, 0xbe, 0x81, 0xfe, 0xf3, 0xe8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf2, 0xf7, 0xfa, 0x91, 0xbd, 0xdb, 0x4f, 0x97, 0xc8, 0x40, 0x8e, 0xc3, 0x37, 0x8a, 0xc0, 0x34, 0x88, 0xbf, 0x57, 0x9c, 0xca, 0xcc, 0xe1, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xe4, 0xbf, 0xf5, 0xb6, 0x45, 0xf6, 0xb8, 0x45, 0xf6, 0xba, 0x46, 0xf7, 0xba, 0x46, 0xf6, 0xb7, 0x45, 0xf5, 0xad, 0x3f, 0xf4, 0xa9, 0x40, 0x5c, 0x3d, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 16777216, 134217728, 251658240, 369098752, 486539264, 603979776, 721420288, 855638016, 973078528, 1090519040, 1207959552, 2930002688, 4174604044, 4294221386, 4294414637, 4294277634, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294346522, 4294552931, 4226189107, 3888929792, 997536768, 385875968, 251658240, 150994944, 16777216, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x85, 0x55, 0x31, 0xf7, 0xbd, 0x84, 0xf8, 0xc2, 0x85, 0xf8, 0xc0, 0x82, 0xf7, 0xbe, 0x80, 0xf7, 0xbc, 0x7d, 0xf9, 0xcb, 0x99, 0xfe, 0xf9, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xfe, 0xfe, 0xe5, 0xef, 0xf6, 0xc1, 0xda, 0xeb, 0xba, 0xd5, 0xe9, 0xd8, 0xe8, 0xf2, 0xf9, 0xfb, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf3, 0xe4, 0xf6, 0xb9, 0x51, 0xf5, 0xb5, 0x43, 0xf6, 0xb8, 0x45, 0xf6, 0xb9, 0x46, 0xf6, 0xb8, 0x46, 0xf6, 0xb3, 0x43, 0xf4, 0xa7, 0x3e, 0xdf, 0x9d, 0x43, 0x17, 0xd, 0x4, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 16777216, 134217728, 251658240, 369098752, 486539264, 603979776, 721420288, 855638016, 956301312, 1073741824, 1191182336, 1325400064, 2693873664, 4191117319, 4293891393, 4294485073, 4294347296, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294344717, 4294484299, 4294421863, 4208884260, 3687340544, 910958848, 503316480, 385875968, 251658240, 134217728, 16777216, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x14, 0xa, 0x4, 0xb2, 0x7b, 0x4b, 0xf8, 0xc2, 0x88, 0xf8, 0xc1, 0x85, 0xf7, 0xbf, 0x82, 0xf7, 0xbe, 0x80, 0xf7, 0xbd, 0x7d, 0xf9, 0xca, 0x97, 0xfe, 0xf9, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xf2, 0xe1, 0xf7, 0xbc, 0x5d, 0xf5, 0xb3, 0x42, 0xf5, 0xb6, 0x44, 0xf5, 0xb7, 0x45, 0xf6, 0xb8, 0x45, 0xf6, 0xb5, 0x44, 0xf5, 0xad, 0x40, 0xf6, 0xae, 0x4c, 0x88, 0x5d, 0x27, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 83886080, 201326592, 318767104, 436207616, 536870912, 671088640, 771751936, 889192448, 989855744, 1107296256, 1207959552, 1325400064, 2187996928, 3972487680, 4191711513, 4294156111, 4294485591, 4294415926, 4294346007, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294277376, 4294278408, 4294414379, 4294484817, 4294554221, 4259941691, 4157628420, 2746568960, 807735296, 553648128, 436207616, 318767104, 218103808, 83886080, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x1d, 0x10, 0x6, 0xdb, 0xa0, 0x68, 0xf8, 0xc3, 0x88, 0xf7, 0xc1, 0x85, 0xf7, 0xc0, 0x82, 0xf7, 0xbf, 0x80, 0xf7, 0xbe, 0x7e, 0xf8, 0xc4, 0x88, 0xfc, 0xe6, 0xcc, 0xfe, 0xfb, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfa, 0xf3, 0xfa, 0xda, 0xa9, 0xf5, 0xb3, 0x4a, 0xf5, 0xb2, 0x42, 0xf5, 0xb3, 0x43, 0xf5, 0xb6, 0x44, 0xf5, 0xb7, 0x45, 0xf5, 0xb5, 0x44, 0xf5, 0xb0, 0x42, 0xf5, 0xad, 0x4d, 0xdd, 0x9e, 0x4a, 0x19, 0xf, 0x5, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 100663296, 218103808, 318767104, 436207616, 536870912, 637534208, 754974720, 855638016, 956301312, 1040187392, 1140850688, 1224736768, 1342833408, 2677293568, 4174142464, 4157959447, 4276718648, 4294288986, 4294554220, 4294552415, 4294485074, 4294484300, 4294551641, 4294553705, 4294554738, 4294025043, 4175528237, 4174405895, 3384956928, 1264790528, 654311424, 553648128, 436207616, 335544320, 218103808, 117440512, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x50, 0x33, 0x19, 0xec, 0xb4, 0x7a, 0xf8, 0xc2, 0x87, 0xf7, 0xc1, 0x85, 0xf7, 0xc1, 0x83, 0xf7, 0xc0, 0x80, 0xf7, 0xc0, 0x7f, 0xf7, 0xc0, 0x7c, 0xf7, 0xc2, 0x7e, 0xf8, 0xcc, 0x92, 0xfa, 0xda, 0xb0, 0xfb, 0xdf, 0xb9, 0xfa, 0xd9, 0xad, 0xf7, 0xc8, 0x84, 0xf5, 0xb4, 0x54, 0xf4, 0xad, 0x3f, 0xf4, 0xaf, 0x41, 0xf5, 0xb2, 0x42, 0xf5, 0xb4, 0x43, 0xf5, 0xb5, 0x44, 0xf5, 0xb4, 0x44, 0xf5, 0xb2, 0x46, 0xf5, 0xb2, 0x54, 0xf5, 0xb4, 0x5a, 0x5e, 0x3e, 0x1a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 50331648, 167772160, 268435456, 385875968, 469762048, 553648128, 654311424, 738197504, 822083584, 905969664, 973078528, 1023410176, 1090519040, 1208878848, 2054632960, 3165868032, 4123810816, 4224671493, 4157762069, 4124604196, 4141644844, 4124471839, 4174538769, 4241448451, 3586611712, 2275493888, 1078731776, 671088640, 570425344, 486539264, 385875968, 285212672, 184549376, 67108864, 4671303, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x71, 0x4b, 0x29, 0xf8, 0xc0, 0x86, 0xf7, 0xc3, 0x87, 0xf7, 0xc2, 0x85, 0xf7, 0xc1, 0x83, 0xf7, 0xc2, 0x82, 0xf7, 0xc2, 0x7f, 0xf7, 0xc2, 0x7e, 0xf6, 0xc0, 0x76, 0xf4, 0xb4, 0x59, 0xf3, 0xa8, 0x3e, 0xf3, 0xa7, 0x39, 0xf3, 0xa9, 0x3d, 0xf4, 0xab, 0x3e, 0xf4, 0xad, 0x40, 0xf4, 0xb0, 0x41, 0xf4, 0xb2, 0x42, 0xf5, 0xb2, 0x42, 0xf5, 0xb3, 0x45, 0xf6, 0xb7, 0x54, 0xf6, 0xb7, 0x60, 0xf6, 0xb5, 0x5f, 0x9d, 0x6b, 0x31, 0x2, 0x1, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 67108864, 167772160, 251658240, 335544320, 419430400, 503316480, 570425344, 637534208, 704643072, 738197504, 788529152, 822083584, 855638016, 872415232, 889192448, 1042616320, 1365125376, 1702770688, 1821064448, 1467299072, 1095443200, 738985472, 637534208, 587202560, 503316480, 436207616, 352321536, 268435456, 184549376, 67108864, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x8b, 0x5f, 0x36, 0xf9, 0xc1, 0x87, 0xf7, 0xc3, 0x88, 0xf8, 0xc3, 0x86, 0xf7, 0xc3, 0x84, 0xf8, 0xc3, 0x81, 0xf7, 0xc4, 0x80, 0xf7, 0xc4, 0x7e, 0xf7, 0xc4, 0x7d, 0xf7, 0xc3, 0x7a, 0xf6, 0xbd, 0x6c, 0xf5, 0xb7, 0x5c, 0xf5, 0xb5, 0x54, 0xf5, 0xb4, 0x50, 0xf5, 0xb6, 0x52, 0xf6, 0xb9, 0x58, 0xf6, 0xbd, 0x62, 0xf7, 0xbf, 0x6a, 0xf6, 0xba, 0x66, 0xf6, 0xb6, 0x63, 0xab, 0x78, 0x39, 0xa, 0x6, 0x2, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 16777216, 67108864, 150994944, 234881024, 301989888, 352321536, 402653184, 452984832, 486539264, 520093696, 536870912, 553648128, 570425344, 570425344, 553648128, 536870912, 520093696, 486539264, 452984832, 402653184, 352321536, 301989888, 234881024, 167772160, 67108864, 16777216, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x83, 0x58, 0x32, 0xf0, 0xb9, 0x7f, 0xf7, 0xc3, 0x88, 0xf7, 0xc3, 0x86, 0xf8, 0xc4, 0x84, 0xf7, 0xc5, 0x82, 0xf7, 0xc5, 0x80, 0xf7, 0xc5, 0x7f, 0xf8, 0xc5, 0x7d, 0xf7, 0xc4, 0x7b, 0xf7, 0xc4, 0x79, 0xf7, 0xc4, 0x78, 0xf7, 0xc3, 0x76, 0xf7, 0xc3, 0x74, 0xf7, 0xc2, 0x71, 0xf6, 0xbe, 0x6d, 0xf6, 0xba, 0x6a, 0xf4, 0xb6, 0x65, 0x8a, 0x5e, 0x2c, 0xc, 0x7, 0x3, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 50331648, 83886080, 134217728, 167772160, 201326592, 218103808, 234881024, 251658240, 251658240, 234881024, 218103808, 201326592, 167772160, 134217728, 83886080, 50331648, 16777216, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x4f, 0x33, 0x1a, 0xd2, 0x99, 0x60, 0xf8, 0xc4, 0x89, 0xf8, 0xc3, 0x86, 0xf8, 0xc4, 0x84, 0xf7, 0xc5, 0x82, 0xf7, 0xc5, 0x80, 0xf7, 0xc5, 0x7f, 0xf7, 0xc4, 0x7e, 0xf7, 0xc4, 0x7b, 0xf7, 0xc3, 0x79, 0xf7, 0xc2, 0x77, 0xf6, 0xc0, 0x74, 0xf6, 0xbd, 0x71, 0xf6, 0xbb, 0x6e, 0xe1, 0xa4, 0x59, 0x5c, 0x3d, 0x1b, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xe, 0x6, 0x0, 0x72, 0x4b, 0x28, 0xd0, 0x9a, 0x62, 0xf7, 0xbf, 0x80, 0xf8, 0xc4, 0x85, 0xf7, 0xc3, 0x82, 0xf7, 0xc3, 0x80, 0xf7, 0xc3, 0x7e, 0xf7, 0xc1, 0x7c, 0xf6, 0xc0, 0x7a, 0xf7, 0xbf, 0x78, 0xf8, 0xbc, 0x72, 0xde, 0xa2, 0x5d, 0x80, 0x57, 0x2b, 0x13, 0xb, 0x4, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x19, 0xe, 0x5, 0x44, 0x2c, 0x15, 0x81, 0x59, 0x32, 0xb2, 0x80, 0x4c, 0xcb, 0x95, 0x5b, 0xd2, 0x9c, 0x5f, 0xcd, 0x97, 0x5a, 0xb9, 0x86, 0x4d, 0x8b, 0x61, 0x34, 0x4a, 0x30, 0x17, 0x15, 0xc, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303,
0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x3, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303,
4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303,
}; };
@ -426,57 +425,20 @@ GHOST_WindowX11(
m_xic = NULL; m_xic = NULL;
#endif #endif
/* Set the window icon */ /* Set the window hints */
XWMHints *xwmhints = XAllocWMHints(); XWMHints *xwmhints = XAllocWMHints();
XImage *x_image, *mask_image;
Pixmap icon_pixmap, mask_pixmap;
icon_pixmap = XCreatePixmap(display, m_window, BLENDER_ICON_WIDTH, BLENDER_ICON_HEIGHT, 24);
mask_pixmap = XCreatePixmap(display, m_window, BLENDER_ICON_WIDTH, BLENDER_ICON_HEIGHT, 1);
GC gc_icon = XCreateGC(display, icon_pixmap, 0, NULL);
GC gc_mask = XCreateGC(display, mask_pixmap, 0, NULL);
x_image = XCreateImage(display, m_visual->visual, 24, ZPixmap, 0, NULL, BLENDER_ICON_WIDTH, BLENDER_ICON_HEIGHT, 32, 0);
mask_image = XCreateImage(display, m_visual->visual, 1, ZPixmap, 0, NULL, BLENDER_ICON_WIDTH, BLENDER_ICON_HEIGHT, 8, 0);
x_image->data = (char *)calloc(x_image->bytes_per_line * BLENDER_ICON_HEIGHT, 1);
mask_image->data = (char *)calloc(mask_image->bytes_per_line * BLENDER_ICON_HEIGHT, 1);
/* copy the BLENDER_ICON_48x48x24 into the XImage */
unsigned char *col = BLENDER_ICON_48x48x24;
int px, py;
for (px = 0; px < BLENDER_ICON_WIDTH; px++) {
for (py = 0; py < BLENDER_ICON_HEIGHT; py++, col += 3) {
/* mask out pink */
if (col[0] == 255 && col[1] == 0 && col[2] == 255) {
#if 0
/* instead, use calloc above */
XPutPixel(x_image, px, py, 0); /* avoid uninitialized memory, otherwise not needed */
XPutPixel(mask_image, px, py, 0);
#endif
}
else {
XPutPixel(x_image, px, py, (col[0] << 16) + (col[1] << 8) + col[2]);
XPutPixel(mask_image, px, py, 1);
}
}
}
XPutImage(display, icon_pixmap, gc_icon, x_image, 0, 0, 0, 0, BLENDER_ICON_WIDTH, BLENDER_ICON_HEIGHT);
XPutImage(display, mask_pixmap, gc_mask, mask_image, 0, 0, 0, 0, BLENDER_ICON_WIDTH, BLENDER_ICON_HEIGHT);
/* Now the pixmap is ok to assign to the window as a hint */
xwmhints->icon_pixmap = icon_pixmap;
xwmhints->icon_mask = mask_pixmap;
XFreeGC(display, gc_icon);
XFreeGC(display, gc_mask);
XDestroyImage(x_image); /* frees x_image->data too */
XDestroyImage(mask_image);
xwmhints->initial_state = NormalState; xwmhints->initial_state = NormalState;
xwmhints->input = True; xwmhints->input = True;
xwmhints->flags = InputHint | IconPixmapHint | IconMaskHint | StateHint; xwmhints->flags = InputHint | StateHint;
XSetWMHints(display, m_window, xwmhints); XSetWMHints(display, m_window, xwmhints);
XFree(xwmhints); XFree(xwmhints);
/* done setting the hints */
/* set the icon */
Atom _NET_WM_ICON = XInternAtom(m_display, "_NET_WM_ICON", False);
XChangeProperty(m_display, m_window, _NET_WM_ICON, XA_CARDINAL,
32, PropModeReplace, (unsigned char *)BLENDER_ICON_48x48x32,
BLENDER_ICON_48x48x32[0] * BLENDER_ICON_48x48x32[1] + 2);
/* done setting the icon */ /* done setting the icon */
setTitle(title); setTitle(title);

@ -161,6 +161,13 @@ public:
delete handle; delete handle;
} }
size_t get_memory_in_use() {
if (getDataSize)
return total_size();
else
return MEM_get_memory_in_use();
}
void enforce_limits() { void enforce_limits() {
size_t max = MEM_CacheLimiter_get_maximum(); size_t max = MEM_CacheLimiter_get_maximum();
size_t mem_in_use, cur_size; size_t mem_in_use, cur_size;
@ -169,12 +176,7 @@ public:
return; return;
} }
if (getDataSize) { mem_in_use = get_memory_in_use();
mem_in_use = total_size();
}
else {
mem_in_use = MEM_get_memory_in_use();
}
if (mem_in_use <= max) { if (mem_in_use <= max) {
return; return;

@ -49,7 +49,7 @@ typedef int (*MEM_CacheLimiter_ItemPriority_Func) (void*, int);
#ifndef __MEM_CACHELIMITER_H__ #ifndef __MEM_CACHELIMITER_H__
void MEM_CacheLimiter_set_maximum(size_t m); void MEM_CacheLimiter_set_maximum(size_t m);
int MEM_CacheLimiter_get_maximum(void); size_t MEM_CacheLimiter_get_maximum(void);
#endif /* __MEM_CACHELIMITER_H__ */ #endif /* __MEM_CACHELIMITER_H__ */
/** /**
@ -145,6 +145,8 @@ void *MEM_CacheLimiter_get(MEM_CacheLimiterHandleC *handle);
void MEM_CacheLimiter_ItemPriority_Func_set(MEM_CacheLimiterC *This, void MEM_CacheLimiter_ItemPriority_Func_set(MEM_CacheLimiterC *This,
MEM_CacheLimiter_ItemPriority_Func item_priority_func); MEM_CacheLimiter_ItemPriority_Func item_priority_func);
size_t MEM_CacheLimiter_get_memory_in_use(MEM_CacheLimiterC *This);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

@ -202,3 +202,8 @@ void MEM_CacheLimiter_ItemPriority_Func_set(MEM_CacheLimiterC *This,
{ {
cast(This)->get_cache()->set_item_priority_func(item_priority_func); cast(This)->get_cache()->set_item_priority_func(item_priority_func);
} }
size_t MEM_CacheLimiter_get_memory_in_use(MEM_CacheLimiterC *This)
{
return cast(This)->get_cache()->get_memory_in_use();
}

@ -420,7 +420,7 @@ int PLX_raskterize(float(*base_verts)[2], int num_base_verts,
{ {
int i; /* i: Loop counter. */ int i; /* i: Loop counter. */
struct PolyVert *ply; /* ply: Pointer to a list of integer buffer-space vertex coordinates. */ struct PolyVert *ply; /* ply: Pointer to a list of integer buffer-space vertex coordinates. */
struct r_FillContext ctx = {0}; struct r_FillContext ctx = {NULL};
const float buf_x_f = (float)(buf_x); const float buf_x_f = (float)(buf_x);
const float buf_y_f = (float)(buf_y); const float buf_y_f = (float)(buf_y);
/* /*

@ -21,11 +21,15 @@
# #
# ***** END GPL LICENSE BLOCK ***** # ***** END GPL LICENSE BLOCK *****
SET(INC set(INC
. .
../../extern/bullet2/src ../../extern/bullet2/src
) )
set(INC_SYS
)
set(SRC set(SRC
rb_bullet_api.cpp rb_bullet_api.cpp

@ -187,11 +187,11 @@ public:
inline friend bool operator>=(rcSTR_String lhs, const char *rhs) { return (strcmp(lhs, rhs)>=0); } inline friend bool operator>=(rcSTR_String lhs, const char *rhs) { return (strcmp(lhs, rhs)>=0); }
inline friend bool operator>=(const char *lhs, rcSTR_String rhs) { return (strcmp(lhs, rhs)>=0); } inline friend bool operator>=(const char *lhs, rcSTR_String rhs) { return (strcmp(lhs, rhs)>=0); }
inline friend bool operator==(rcSTR_String lhs, rcSTR_String rhs) { return ((lhs.Length() == rhs.Length()) && (memcmp(lhs, rhs, lhs.Length()) == 0)); } inline friend bool operator==(rcSTR_String lhs, rcSTR_String rhs) { return ((lhs.Length() == rhs.Length()) && (memcmp(lhs, rhs, lhs.Length()) == 0)); }
inline friend bool operator==(rcSTR_String lhs, const char *rhs) { return (memcmp(lhs, rhs, lhs.Length() + 1) == 0); } inline friend bool operator==(rcSTR_String lhs, const char *rhs) { return (strncmp(lhs, rhs, lhs.Length() + 1) == 0); }
inline friend bool operator==(const char *lhs, rcSTR_String rhs) { return (memcmp(lhs, rhs, rhs.Length() + 1) == 0); } inline friend bool operator==(const char *lhs, rcSTR_String rhs) { return (strncmp(lhs, rhs, rhs.Length() + 1) == 0); }
inline friend bool operator!=(rcSTR_String lhs, rcSTR_String rhs) { return ((lhs.Length() != rhs.Length()) || (memcmp(lhs, rhs, lhs.Length())!=0)); } inline friend bool operator!=(rcSTR_String lhs, rcSTR_String rhs) { return ((lhs.Length() != rhs.Length()) || (memcmp(lhs, rhs, lhs.Length()) != 0)); }
inline friend bool operator!=(rcSTR_String lhs, const char *rhs) { return (memcmp(lhs, rhs, lhs.Length() + 1) != 0); } inline friend bool operator!=(rcSTR_String lhs, const char *rhs) { return (strncmp(lhs, rhs, lhs.Length() + 1) != 0); }
inline friend bool operator!=(const char *lhs, rcSTR_String rhs) { return (memcmp(lhs, rhs, rhs.Length() + 1) != 0); } inline friend bool operator!=(const char *lhs, rcSTR_String rhs) { return (strncmp(lhs, rhs, rhs.Length() + 1) != 0); }
// serializing // serializing
//int Serialize(pCStream stream); //int Serialize(pCStream stream);

@ -0,0 +1,90 @@
Blender Mono I18n font includes glyphs imported from the following fonts:
1. DejaVu Sans Mono
2. M+ 1M Regular
3. Wen Quan Yi Micro Hei Mono
4. Droid Sans Hebrew Regular (with some edits)
These were merged using FontForge in the above order. For each glyph,
a license of the font from which it was imported is applied.
----------------------------------------------------------------------
Summary of Copyrights and Licenses
(1) DejaVu Sans Mono
Copyright: 2003 Bitstream, Inc. (Bitstream font glyphs)
2006 Tavmjong Bah (Arev font glyphs)
DejaVu changes are in public domain
License:
DejaVu font glyphs are same as bmonofont.ttf. See LICENSE-bfont.ttf.txt.
(2) M+ 1M Regular
Copyright: 2002-2012 M+ FONTS PROJECT
License:
These fonts are free software.
Unlimited permission is granted to use, copy, and distribute it, with or
without modification, either commercially and noncommercially.
THESE FONTS ARE PROVIDED "AS IS" WITHOUT WARRANTY.
(3) Wen Quan Yi Micro Hei Mono
Copyright: 2007 Google Corporation (Digitized data)
2008-2009 WenQuanYi Project Board of Trustees
2008-2009 mozbug and Qianqian Fang (Droid Sans Fallback extension interface)
License: Apache-2.0 or GPL-3 with font embedding exception
See Appendices A and B.
(4) Droid Sans Hebrew Regular
Copyright: 2011 Google Corporation
License: Apache-2.0
See Appendix A.
----------------------------------------------------------------------
Appendix A. Apache License Version 2.0
Licensed under the Apache License, Version 2.0 (the "License"); you
may not use this file except in compliance with the License. You may
obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing
permissions and limitations under the License.
----------------------------------------------------------------------
Appendix B. GNU GPL Version 3 with font embedding exception
GPL-3:
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 3 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, see <http://www.gnu.org/licenses/>.
Font embedding exception:
As a special exception, if you create a document which uses this
font, and embed this font or unaltered portions of this font into
the document, this font does not by itself cause the resulting
document to be covered by the GNU General Public License. This
exception does not however invalidate any other reasons why the
document might be covered by the GNU General Public License. If you
modify this font, you may extend this exception to your version of
the font, but you are not obligated to do so. If you do not wish to
do so, delete this exception statement from your version.

@ -0,0 +1,83 @@
Blender Main I18n font ("droidsans.ttf") includes glyphs imported from the following fonts:
1. DejaVu Sans
2. Droid Sans Regular
3. Samyak-devanagari
4. Droid Sans Hebrew Regular
5. Droid Sans Ethiopic Regular
These were merged using FontForge in (approximately) the above order. For each glyph,
a license of the font from which it was imported is applied.
----------------------------------------------------------------------
Summary of Copyrights and Licenses
(1) DejaVu Sans
Copyright: 2003 Bitstream, Inc. (Bitstream font glyphs)
2006 Tavmjong Bah (Arev font glyphs)
DejaVu changes are in public domain
License:
DejaVu font glyphs are same as bfont.ttf. See LICENSE-bfont.ttf.txt.
(2), (4), (5) Droid Sans Fonts family
Copyright:
Copyright © 2006, 2007, 2008, 2009, 2010 Google Corp.
Droid is a trademark of Google Corp.
License: Apache-2.0
See Appendix A.
(3) Samyak-devanagari
Copyright: 2005-2006, Rahul Bhalerao <b.rahul.pm@gmail.com>
2005-2006, Bageshri Salvi <sbageshri@gmail.com>
2005-2006, Pravin Satpute <pravin.d.s@gmail.com>
2005-2006, Sandeep Shedmake <Sandeep.shedmake@gmail.com>
License: GPL-3 with font embedding exception
See Appendices B.
----------------------------------------------------------------------
Appendix A. Apache License Version 2.0
Licensed under the Apache License, Version 2.0 (the "License"); you
may not use this file except in compliance with the License. You may
obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing
permissions and limitations under the License.
----------------------------------------------------------------------
Appendix B. GNU GPL Version 3 with font embedding exception
GPL-3:
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 3 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, see <http://www.gnu.org/licenses/>.
Font embedding exception:
As a special exception, if you create a document which uses this
font, and embed this font or unaltered portions of this font into
the document, this font does not by itself cause the resulting
document to be covered by the GNU General Public License. This
exception does not however invalidate any other reasons why the
document might be covered by the GNU General Public License. If you
modify this font, you may extend this exception to your version of
the font, but you are not obligated to do so. If you do not wish to
do so, delete this exception statement from your version.

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 4.1 MiB

After

Width:  |  Height:  |  Size: 4.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 KiB

After

Width:  |  Height:  |  Size: 234 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 586 KiB

After

Width:  |  Height:  |  Size: 588 KiB

@ -30,7 +30,7 @@ import re
import sys import sys
# XXX Relative import does not work here when used from Blender... # XXX Relative import does not work here when used from Blender...
from bl_i18n_utils import settings as i18n_settings, utils from bl_i18n_utils import settings as settings_i18n, utils
import bpy import bpy
@ -43,10 +43,10 @@ filter_message = ignore_reg.match
def init_spell_check(settings, lang="en_US"): def init_spell_check(settings, lang="en_US"):
try: try:
from bl_i18n_utils import spell_check_utils from bl_i18n_utils import utils_spell_check
return spell_check_utils.SpellChecker(settings, lang) return utils_spell_check.SpellChecker(settings, lang)
except Exception as e: except Exception as e:
print("Failed to import spell_check_utils ({})".format(str(e))) print("Failed to import utils_spell_check ({})".format(str(e)))
return None return None
@ -901,7 +901,7 @@ def main():
help="Override (some) default settings. Either a JSon file name, or a JSon string.") help="Override (some) default settings. Either a JSon file name, or a JSon string.")
args = parser.parse_args() args = parser.parse_args()
settings = i18n_settings.I18nSettings() settings = settings_i18n.I18nSettings()
settings.from_json(args.settings) settings.from_json(args.settings)
if args.output: if args.output:

@ -1,178 +0,0 @@
#!/usr/bin/python3
# ***** 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>
# Check pos in branches (or in trunk) for missing/unneeded messages.
import os
import sys
from codecs import open
try:
import settings
import utils
except:
from . import (settings, utils)
TRUNK_PO_DIR = settings.TRUNK_PO_DIR
BRANCHES_DIR = settings.BRANCHES_DIR
FILE_NAME_POT = settings.FILE_NAME_POT
def print_diff(ref_msgs, msgs):
# Remove comments from messages list!
messages = set(msgs.msgs.keys()) - msgs.comm_msgs
unneeded = (messages - ref_msgs.msgs.keys())
for msgkey in unneeded:
print('\tUnneeded message context/id "{}"'.format(msgkey))
missing = (ref_msgs.msgs.keys() - messages)
for msgkey in missing:
print('\tMissing message context/id "{}"'.format(msgkey))
for msgid in msgs.comm_msgs:
print('\tCommented message context/id "{}"'.format(msgkey))
print("\t{} unneeded messages, {} missing messages, {} commented messages."
"".format(len(unneeded), len(missing), len(msgs.comm_msgs)))
return 0
#def process_po(ref_messages, po, glob_stats, do_stats, do_messages):
def process_po(ref_messages, po, do_stats, do_messages):
print("Checking {}...".format(po))
ret = 0
messages = utils.I18nMessages(kind='PO', src=po)
if do_messages:
t = print_diff(ref_messages, messages)
if t:
ret = t
if do_stats:
print("\tStats:")
t = messages.print_stats(prefix=" ")
if t:
ret = t
if messages.parsing_errors:
print("\tERROR! This .po is broken!")
ret = 1
return ret
# XXX Quick update for new I18Nfoo objects, need rework!
def main():
import argparse
parser = argparse.ArgumentParser(description="Check pos in branches " \
"(or in trunk) for missing" \
"/unneeded messages.")
parser.add_argument('-s', '--stats', action="store_true",
help="Print pos stats.")
parser.add_argument('-m', '--messages', action="store_true",
help="Print pos missing/unneeded/commented messages.")
parser.add_argument('-t', '--trunk', action="store_true",
help="Check pos in /trunk/po rather than /branches.")
parser.add_argument('-p', '--pot',
help="Specify the .pot file used as reference.")
parser.add_argument('langs', metavar='ISO_code', nargs='*',
help="Restrict processed languages to those.")
args = parser.parse_args()
if args.pot:
global FILE_NAME_POT
FILE_NAME_POT = args.pot
#glob_stats = {"nbr" : 0.0,
#"lvl" : 0.0,
#"lvl_ttips" : 0.0,
#"lvl_trans_ttips" : 0.0,
#"lvl_ttips_in_trans": 0.0,
#"lvl_comm" : 0.0,
#"nbr_signs" : 0,
#"nbr_trans_signs" : 0,
#"contexts" : set()}
ret = 0
pot_messages = None
if args.messages:
pot_messages = utils.I18nMessages(kind='PO', src=FILE_NAME_POT)
#glob_stats["nbr_signs"] = pot_stats["nbr_signs"]
if args.langs:
for lang in args.langs:
if args.trunk:
po = os.path.join(TRUNK_PO_DIR, ".".join((lang, "po")))
else:
po = os.path.join(BRANCHES_DIR, lang, ".".join((lang, "po")))
if os.path.exists(po):
#t = process_po(pot_messages, po, glob_stats, args.stats, args.messages)
t = process_po(pot_messages, po, args.stats, args.messages)
if t:
ret = t
elif args.trunk:
for po in os.listdir(TRUNK_PO_DIR):
if po.endswith(".po"):
po = os.path.join(TRUNK_PO_DIR, po)
#t = process_po(pot_messages, po, glob_stats, args.stats, args.messages)
t = process_po(pot_messages, po, args.stats, args.messages)
if t:
ret = t
else:
for lang in os.listdir(BRANCHES_DIR):
for po in os.listdir(os.path.join(BRANCHES_DIR, lang)):
if po.endswith(".po"):
po = os.path.join(BRANCHES_DIR, lang, po)
#t = process_po(pot_messages, po, glob_stats, args.stats, args.messages)
t = process_po(pot_messages, po, args.stats, args.messages)
if t:
ret = t
#if args.stats and glob_stats["nbr"] != 0.0:
#nbr_contexts = len(glob_stats["contexts"] - {""})
#if nbr_contexts != 1:
#if nbr_contexts == 0:
#nbr_contexts = "No"
#_ctx_txt = "s are"
#else:
#_ctx_txt = " is"
#print("\nAverage stats for all {:.0f} processed files:\n"
#" {:>6.1%} done!\n"
#" {:>6.1%} of messages are tooltips.\n"
#" {:>6.1%} of tooltips are translated.\n"
#" {:>6.1%} of translated messages are tooltips.\n"
#" {:>6.1%} of messages are commented.\n"
#" The org msgids are currently made of {} signs.\n"
#" All processed translations are currently made of {} signs.\n"
#" {} specific context{} present:\n {}\n"
#"".format(glob_stats["nbr"], glob_stats["lvl"] / glob_stats["nbr"],
#glob_stats["lvl_ttips"] / glob_stats["nbr"],
#glob_stats["lvl_trans_ttips"] / glob_stats["nbr"],
#glob_stats["lvl_ttips_in_trans"] / glob_stats["nbr"],
#glob_stats["lvl_comm"] / glob_stats["nbr"], glob_stats["nbr_signs"],
#glob_stats["nbr_trans_signs"], nbr_contexts, _ctx_txt,
#"\n ".join(glob_stats["contexts"]-{""})))
return ret
if __name__ == "__main__":
print("\n\n *** Running {} *** \n".format(__file__))
print(" *** WARNING! Number of tooltips is only an estimation! ***\n")
sys.exit(main())

@ -1,96 +0,0 @@
#!/usr/bin/python3
# ***** 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>
# Clean (i.e. remove commented messages) pos in branches or trunk.
import os
import sys
import collections
try:
import settings
import utils
except:
from . import (settings, utils)
TRUNK_PO_DIR = settings.TRUNK_PO_DIR
BRANCHES_DIR = settings.BRANCHES_DIR
def do_clean(po, strict):
print("Cleaning {}...".format(po))
msgs = utils.I18nMessages(kind='PO', src=po)
if strict and msgs.parsing_errors:
print("ERROR! This .po file is broken!")
return 1
nbr_rem = len(msgs.comm_msgs)
for msgkey in msgs.comm_msgs:
del msgs.msgs[msgkey]
msgs.write(kind='PO', dest=po)
print("Removed {} commented messages.".format(nbr_rem))
return 0
def main():
import argparse
parser = argparse.ArgumentParser(description="Clean pos in branches or trunk (i.e. remove all commented "
"messages).")
parser.add_argument('-t', '--trunk', action="store_true", help="Clean pos in trunk rather than branches.")
parser.add_argument('-s', '--strict', action="store_true", help="Raise an error if a po is broken.")
parser.add_argument('langs', metavar='ISO_code', nargs='*', help="Restrict processed languages to those.")
args = parser.parse_args()
ret = 0
if args.langs:
for lang in args.langs:
if args.trunk:
po = os.path.join(TRUNK_PO_DIR, ".".join((lang, "po")))
else:
po = os.path.join(BRANCHES_DIR, lang, ".".join((lang, "po")))
if os.path.exists(po):
t = do_clean(po, args.strict)
if t:
ret = t
elif args.trunk:
for po in os.listdir(TRUNK_PO_DIR):
if po.endswith(".po"):
po = os.path.join(TRUNK_PO_DIR, po)
t = do_clean(po, args.strict)
if t:
ret = t
else:
for lang in os.listdir(BRANCHES_DIR):
for po in os.listdir(os.path.join(BRANCHES_DIR, lang)):
if po.endswith(".po"):
po = os.path.join(BRANCHES_DIR, lang, po)
t = do_clean(po, args.strict)
if t:
ret = t
if __name__ == "__main__":
print("\n\n *** Running {} *** \n".format(__file__))
sys.exit(main())

@ -1,107 +0,0 @@
#!/usr/bin/python3
# ***** 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>
# Import in trunk/po all po from branches translated above the given threshold.
import os
import shutil
import sys
import subprocess
try:
import settings
import utils
import rtl_preprocess
except:
from . import (settings, utils, rtl_preprocess)
TRUNK_PO_DIR = settings.TRUNK_PO_DIR
BRANCHES_DIR = settings.BRANCHES_DIR
IMPORT_LANGUAGES_SKIP = settings.IMPORT_LANGUAGES_SKIP
RTL_PREPROCESS_FILE = settings.RTL_PREPROCESS_FILE
PY3 = settings.PYTHON3_EXEC
def main():
import argparse
parser = argparse.ArgumentParser(description="Import advanced enough pos from branches to trunk.")
parser.add_argument('-t', '--threshold', type=float, help="Import threshold, as a percentage.")
parser.add_argument('-s', '--strict', action="store_true", help="Raise an error if a po is broken.")
parser.add_argument('langs', metavar='ISO_code', nargs='*', help="Restrict processed languages to those.")
args = parser.parse_args()
ret = 0
threshold = float(settings.IMPORT_MIN_LEVEL) / 100.0
if args.threshold is not None:
threshold = float(args.threshold) / 100.0
for lang in os.listdir(BRANCHES_DIR):
if (args.langs and lang not in args.langs) or lang in IMPORT_LANGUAGES_SKIP:
continue
po = os.path.join(BRANCHES_DIR, lang, ".".join((lang, "po")))
if os.path.exists(po):
po_is_rtl = os.path.join(BRANCHES_DIR, lang, RTL_PREPROCESS_FILE)
msgs = utils.I18nMessages(iso=lang, kind='PO', src=po)
lvl = 0.0
if msgs.nbr_msgs:
lvl = msgs.nbr_trans_msgs / msgs.nbr_msgs
if lvl > threshold:
if msgs.parsing_errors and args.strict:
print("{:<10}: {:>6.1%} done, but BROKEN, skipped.".format(lang, lvl))
ret = 1
else:
if os.path.exists(po_is_rtl):
out_po = os.path.join(TRUNK_PO_DIR, ".".join((lang, "po")))
out_raw_po = os.path.join(TRUNK_PO_DIR, "_".join((lang, "raw.po")))
keys = []
trans = []
for k, m in msgs.msgs.items():
keys.append(k)
trans.append(m.msgstr)
trans = rtl_preprocess.log2vis(trans)
for k, t in zip(keys, trans):
msgs.msgs[k].msgstr = t
msgs.write(kind='PO', dest=out_po)
# Also copies org po!
shutil.copy(po, out_raw_po)
print("{:<10}: {:>6.1%} done, enough translated messages, processed and copied to trunk."
"".format(lang, lvl))
else:
shutil.copy(po, TRUNK_PO_DIR)
print("{:<10}: {:>6.1%} done, enough translated messages, copied to trunk.".format(lang, lvl))
else:
if msgs.parsing_errors and args.strict:
print("{:<10}: {:>6.1%} done, BROKEN and not enough translated messages, skipped".format(lang, lvl))
ret = 1
else:
print("{:<10}: {:>6.1%} done, not enough translated messages, skipped.".format(lang, lvl))
return ret
if __name__ == "__main__":
print("\n\n *** Running {} *** \n".format(__file__))
sys.exit(main())

@ -101,7 +101,7 @@ IMPORT_MIN_LEVEL = 0.0
# Languages in /branches we do not want to import in /trunk currently... # Languages in /branches we do not want to import in /trunk currently...
IMPORT_LANGUAGES_SKIP = { IMPORT_LANGUAGES_SKIP = {
'am_ET', 'bg_BG', 'fi_FI', 'el_GR', 'et_EE', 'ne_NP', 'pl_PL', 'ro_RO', 'uz_UZ', 'uz_UZ@cyrillic', 'am_ET', 'bg_BG', 'fi_FI', 'el_GR', 'et_EE', 'ne_NP', 'nl_NL', 'pl_PL', 'ro_RO', 'uz_UZ', 'uz_UZ@cyrillic',
} }
# Languages that need RTL pre-processing. # Languages that need RTL pre-processing.
@ -441,13 +441,13 @@ INTERN_PY_SYS_PATHS = ""
# Custom override settings must be one dir above i18n tools itself! # Custom override settings must be one dir above i18n tools itself!
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
try: try:
from bl_i18n_override_settings import * from bl_i18n_settings_override import *
except ImportError: # If no i18n_override_settings available, its no error! except ImportError: # If no i18n_override_settings available, its no error!
pass pass
# Override with custom user settings, if available. # Override with custom user settings, if available.
try: try:
from user_settings import * from settings_user import *
except ImportError: # If no user_settings available, its no error! except ImportError: # If no user_settings available, its no error!
pass pass

@ -1,96 +0,0 @@
#!/usr/bin/python3
# ***** 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 branches:
# * Generate a temp messages.txt file.
# * Use it to generate a temp .pot file.
# * Use it to update all .pos in /branches.
import subprocess
import os
import sys
import tempfile
try:
import settings
except:
from . import settings
PY3 = settings.PYTHON3_EXEC
FILE_NAME_POT = settings.FILE_NAME_POT
def main():
import argparse
parser = argparse.ArgumentParser(description="Update all branches:\n"
"* Generate a temp messages.txt file.\n"
"* Use it to generate a blender.pot file.\n"
"* Use it to update all .pos in /branches.")
#parser.add_argument('--pproc-contexts', action="store_true",
#help="Pre-process pos to avoid having plenty of fuzzy msgids just because a context was "
#"added/changed!")
parser.add_argument('-c', '--no_checks', default=True, action="store_false", help="No checks over UI messages.")
parser.add_argument('-a', '--add', action="store_true",
help="Add missing pos (useful only when one or more languages are given!).")
parser.add_argument('langs', metavar='ISO_code', nargs='*', help="Restrict processed languages to those.")
args = parser.parse_args()
ret = 0
# Generate a temp messages file.
dummy, msgfile = tempfile.mkstemp(suffix=".txt", prefix="blender_messages_")
os.close(dummy)
cmd = (PY3, "./update_msg.py", "-o", msgfile)
t = subprocess.call(cmd)
if t:
ret = t
# Generate blender.pot file in trunk/po. It's quite useful for translators that want to start
# a new translation and not not want to bother generating their own po from scratch!
potfile = FILE_NAME_POT
cmd = [PY3, "./update_pot.py", "-i", msgfile, "-o", potfile]
if not args.no_checks:
cmd.append("-c")
t = subprocess.call(cmd)
if t:
ret = t
# Update branches po files.
cmd = [PY3, "./update_po.py", "-i", potfile]
if args.langs:
if args.add:
cmd.append("-a")
cmd += args.langs
#if args.pproc_contexts:
#cmd.append("--pproc-contexts")
t = subprocess.call(cmd)
if t:
ret = t
return ret
if __name__ == "__main__":
print("\n\n *** Running {} *** \n".format(__file__))
sys.exit(main())

@ -1,106 +0,0 @@
#!/usr/bin/python3
# ***** 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>
# Create or update mos under /trunk/locale/…
import subprocess
import os
import sys
try:
import settings
import utils
except:
from . import (settings, utils)
GETTEXT_MSGFMT_EXECUTABLE = settings.GETTEXT_MSGFMT_EXECUTABLE
SOURCE_DIR = settings.SOURCE_DIR
TRUNK_MO_DIR = settings.TRUNK_MO_DIR
TRUNK_PO_DIR = settings.TRUNK_PO_DIR
DOMAIN = settings.DOMAIN
def process_po(po, lang, mo=None):
if not mo:
mo_dir = os.path.join(TRUNK_MO_DIR, lang, "LC_MESSAGES")
# Create dirs if not existing!
if not os.path.isdir(mo_dir):
os.makedirs(mo_dir, exist_ok=True)
# show stats
cmd = (GETTEXT_MSGFMT_EXECUTABLE,
"--statistics",
po,
"-o",
mo or os.path.join(mo_dir, ".".join((DOMAIN, "mo"))),
)
print("Running ", " ".join(cmd))
ret = subprocess.call(cmd)
print("Finished.")
return ret
def main():
import argparse
parser = argparse.ArgumentParser(description="Create or update mos " \
"under {}.".format(TRUNK_MO_DIR))
parser.add_argument('langs', metavar='ISO_code', nargs='*',
help="Restrict processed languages to those.")
parser.add_argument('--po', help="Only process that po file (implies --mo).",
nargs='?')
parser.add_argument('--mo', help="Mo file to generate (implies --po).",
nargs='?')
args = parser.parse_args()
ret = 0
if args.po and args.mo:
if os.path.exists(args.po):
t = process_po(args.po, None, args.mo)
if t:
ret = t
elif args.langs:
for lang in args.langs:
po = os.path.join(TRUNK_PO_DIR, ".".join((lang, "po")))
if os.path.exists(po):
t = process_po(po, lang)
if t:
ret = t
else:
for po in os.listdir(TRUNK_PO_DIR):
if po.endswith(".po") and not po.endswith("_raw.po"):
lang = os.path.basename(po)[:-3]
po = os.path.join(TRUNK_PO_DIR, po)
t = process_po(po, lang)
if t:
ret = t
return ret
if __name__ == "__main__":
print("\n\n *** Running {} *** \n".format(__file__))
sys.exit(main())

@ -1,72 +0,0 @@
#!/usr/bin/python3
# ***** 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-80 compliant>
# Write out messages.txt from Blender.
import os
import sys
import subprocess
try:
import settings
except:
from . import settings
BLENDER_ARGS = [
settings.BLENDER_EXEC,
"--background",
"--factory-startup",
"--python",
os.path.join(settings.TOOLS_DIR, "bl_process_msg.py"),
"--",
"-m",
]
def main():
import argparse
parser = argparse.ArgumentParser(description="Write out messages.txt " \
"from Blender.")
parser.add_argument('-c', '--no_checks', default=True,
action="store_false",
help="No checks over UI messages.")
parser.add_argument('-b', '--blender', help="Blender executable path.")
parser.add_argument('-o', '--output', help="Output messages file path.")
args = parser.parse_args()
if args.blender:
BLENDER_ARGS[0] = args.blender
if not args.no_checks:
BLENDER_ARGS.append("-c")
if args.output:
BLENDER_ARGS.append("-o")
BLENDER_ARGS.append(args.output)
ret = subprocess.call(BLENDER_ARGS)
return ret
if __name__ == "__main__":
print("\n\n *** Running {} *** \n".format(__file__))
ret = main()
if ret:
raise(Exception(ret))

@ -1,113 +0,0 @@
#!/usr/bin/python3
# ***** 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 pos in the branches from blender.pot in /trunk/po dir.
import concurrent.futures
import os
import sys
from codecs import open
import shutil
try:
import settings
import utils
except:
from . import (settings, utils)
GETTEXT_MSGMERGE_EXECUTABLE = settings.GETTEXT_MSGMERGE_EXECUTABLE
BRANCHES_DIR = settings.BRANCHES_DIR
TRUNK_PO_DIR = settings.TRUNK_PO_DIR
FILE_NAME_POT = settings.FILE_NAME_POT
def process_po(data):
po, lang, pot_msgs = data
# update po file
msg = utils.I18nMessages(iso=lang, kind='PO', src=po)
print("Updating {}...".format(po))
msg.update(pot_msgs)
msg.write(kind='PO', dest=po)
print("Finished updating {}!\n".format(po))
return 0
def main():
import argparse
parser = argparse.ArgumentParser(description="Write out messages.txt from Blender.")
parser.add_argument('-t', '--trunk', action="store_true", help="Update pos in /trunk/po rather than /branches.")
parser.add_argument('-i', '--input', metavar="File", help="Input pot file path.")
parser.add_argument('-a', '--add', action="store_true",
help="Add missing pos (useful only when one or more languages are given!).")
parser.add_argument('langs', metavar='ISO_code', nargs='*', help="Restrict processed languages to those.")
args = parser.parse_args()
if args.input:
global FILE_NAME_POT
FILE_NAME_POT = args.input
ret = 0
pot_msgs = utils.I18nMessages(kind='PO', src=FILE_NAME_POT)
pool_data = []
if args.langs:
for lang in args.langs:
if args.trunk:
dr = TRUNK_PO_DIR
po = os.path.join(dr, ".".join((lang, "po")))
else:
dr = os.path.join(BRANCHES_DIR, lang)
po = os.path.join(dr, ".".join((lang, "po")))
if args.add:
if not os.path.exists(dr):
os.makedirs(dr)
if not os.path.exists(po):
shutil.copy(FILE_NAME_POT, po)
if args.add or os.path.exists(po):
pool_data.append((po, lang, pot_msgs))
elif args.trunk:
for po in os.listdir(TRUNK_PO_DIR):
if po.endswith(".po"):
lang = os.path.basename(po)[:-3]
po = os.path.join(TRUNK_PO_DIR, po)
pool_data.append((po, lang, pot_msgs))
else:
for lang in os.listdir(BRANCHES_DIR):
po = os.path.join(BRANCHES_DIR, lang, ".".join((lang, "po")))
if os.path.exists(po):
pool_data.append((po, lang, pot_msgs))
for r in map(process_po, pool_data):
if r != 0:
ret = r
#with concurrent.futures.ProcessPoolExecutor() as executor:
#for r in executor.map(process_po, pool_data, timeout=600):
#if r != 0:
#ret = r
return ret
if __name__ == "__main__":
print("\n\n *** Running {} *** \n".format(__file__))
sys.exit(main())

@ -1,338 +0,0 @@
#!/usr/bin/python3
# ***** 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 blender.pot file from messages.txt
import subprocess
import collections
import os
import sys
import re
import tempfile
import argparse
import time
import pickle
try:
import settings
import utils
except:
from . import (settings, utils)
LANGUAGES_CATEGORIES = settings.LANGUAGES_CATEGORIES
LANGUAGES = settings.LANGUAGES
PO_COMMENT_PREFIX = settings.PO_COMMENT_PREFIX
PO_COMMENT_PREFIX_SOURCE = settings.PO_COMMENT_PREFIX_SOURCE
PO_COMMENT_PREFIX_SOURCE_CUSTOM = settings.PO_COMMENT_PREFIX_SOURCE_CUSTOM
MSG_COMMENT_PREFIX = settings.MSG_COMMENT_PREFIX
MSG_CONTEXT_PREFIX = settings.MSG_CONTEXT_PREFIX
FILE_NAME_MESSAGES = settings.FILE_NAME_MESSAGES
FILE_NAME_POT = settings.FILE_NAME_POT
SOURCE_DIR = settings.SOURCE_DIR
POTFILES_DIR = settings.POTFILES_SOURCE_DIR
SRC_POTFILES = settings.FILE_NAME_SRC_POTFILES
CONTEXT_DEFAULT = settings.CONTEXT_DEFAULT
PYGETTEXT_ALLOWED_EXTS = settings.PYGETTEXT_ALLOWED_EXTS
PYGETTEXT_MAX_MULTI_CTXT = settings.PYGETTEXT_MAX_MULTI_CTXT
SVN_EXECUTABLE = settings.SVN_EXECUTABLE
WARN_NC = settings.WARN_MSGID_NOT_CAPITALIZED
NC_ALLOWED = settings.WARN_MSGID_NOT_CAPITALIZED_ALLOWED
SPELL_CACHE = settings.SPELL_CACHE
# Do this only once!
# Get contexts defined in blf.
CONTEXTS = {}
with open(os.path.join(SOURCE_DIR, settings.PYGETTEXT_CONTEXTS_DEFSRC)) as f:
reg = re.compile(settings.PYGETTEXT_CONTEXTS)
f = f.read()
# This regex is supposed to yield tuples
# (key=C_macro_name, value=C_string).
CONTEXTS = dict(m.groups() for m in reg.finditer(f))
# Build regexes to extract messages (with optional contexts) from C source.
pygettexts = tuple(re.compile(r).search
for r in settings.PYGETTEXT_KEYWORDS)
_clean_str = re.compile(settings.str_clean_re).finditer
clean_str = lambda s: "".join(m.group("clean") for m in _clean_str(s))
def _new_messages():
return getattr(collections, "OrderedDict", dict)()
def check_file(path, rel_path, messages):
def process_entry(ctxt, msg):
# Context.
if ctxt:
if ctxt in CONTEXTS:
ctxt = CONTEXTS[ctxt]
elif '"' in ctxt or "'" in ctxt:
ctxt = clean_str(ctxt)
else:
print("WARNING: raw context “{}” couldnt be resolved!"
"".format(ctxt))
ctxt = CONTEXT_DEFAULT
else:
ctxt = CONTEXT_DEFAULT
# Message.
if msg:
if '"' in msg or "'" in msg:
msg = clean_str(msg)
else:
print("WARNING: raw message “{}” couldnt be resolved!"
"".format(msg))
msg = ""
else:
msg = ""
return (ctxt, msg)
with open(path, encoding="utf-8") as f:
f = f.read()
for srch in pygettexts:
m = srch(f)
line = pos = 0
while m:
d = m.groupdict()
# Line.
line += f[pos:m.start()].count('\n')
msg = d.get("msg_raw")
# First, try the "multi-contexts" stuff!
ctxts = tuple(d.get("ctxt_raw{}".format(i)) for i in range(PYGETTEXT_MAX_MULTI_CTXT))
if ctxts[0]:
for ctxt in ctxts:
if not ctxt:
break
ctxt, _msg = process_entry(ctxt, msg)
# And we are done for this item!
messages.setdefault((ctxt, _msg), []).append(":".join((rel_path, str(line))))
else:
ctxt = d.get("ctxt_raw")
ctxt, msg = process_entry(ctxt, msg)
# And we are done for this item!
messages.setdefault((ctxt, msg), []).append(":".join((rel_path, str(line))))
pos = m.end()
line += f[m.start():pos].count('\n')
m = srch(f, pos)
def py_xgettext(messages):
forbidden = set()
forced = set()
with open(SRC_POTFILES) as src:
for l in src:
if l[0] == '-':
forbidden.add(l[1:].rstrip('\n'))
elif l[0] != '#':
forced.add(l.rstrip('\n'))
for root, dirs, files in os.walk(POTFILES_DIR):
if "/.svn" in root:
continue
for fname in files:
if os.path.splitext(fname)[1] not in PYGETTEXT_ALLOWED_EXTS:
continue
path = os.path.join(root, fname)
rel_path = os.path.relpath(path, SOURCE_DIR)
if rel_path in forbidden:
continue
elif rel_path not in forced:
forced.add(rel_path)
for rel_path in sorted(forced):
path = os.path.join(SOURCE_DIR, rel_path)
if os.path.exists(path):
check_file(path, rel_path, messages)
# Spell checking!
import enchant
dict_spelling = enchant.Dict("en_US")
from spell_check_utils import (dict_uimsgs,
split_words,
)
_spell_checked = set()
def spell_check(txt, cache):
ret = []
if cache is not None and txt in cache:
return ret
for w in split_words(txt):
w_lower = w.lower()
if w_lower in dict_uimsgs | _spell_checked:
continue
if not dict_spelling.check(w):
ret.append("{}: suggestions are ({})"
.format(w, "'" + "', '".join(dict_spelling.suggest(w))
+ "'"))
else:
_spell_checked.add(w_lower)
if not ret:
if cache is not None:
cache.add(txt)
return ret
def get_svnrev():
cmd = [SVN_EXECUTABLE,
"info",
"--xml",
SOURCE_DIR,
]
xml = subprocess.check_output(cmd)
return re.search(b'revision="(\d+)"', xml).group(1)
def gen_empty_pot():
blender_ver = ""
blender_rev = get_svnrev().decode()
utctime = time.gmtime()
time_str = time.strftime("%Y-%m-%d %H:%M+0000", utctime)
year_str = time.strftime("%Y", utctime)
return utils.I18nMessages.gen_empty_messages("__POT__", blender_ver, blender_rev, time_str, year_str)
escape_re = tuple(re.compile(r[0]) for r in settings.ESCAPE_RE)
escape = lambda s, n: escape_re[n].sub(settings.ESCAPE_RE[n][1], s)
def merge_messages(msgs, messages, do_checks, spell_cache):
num_added = 0
num_present = msgs.nbr_msgs
for (context, msgid), srcs in messages.items():
if do_checks:
err = spell_check(msgid, spell_cache)
if err:
print("WARNING: spell check failed on “" + msgid + "”:")
print("\t\t" + "\n\t\t".join(err))
print("\tFrom:\n\t\t" + "\n\t\t".join(srcs))
# Escape some chars in msgid!
for n in range(len(escape_re)):
msgid = escape(msgid, n)
key = (context, msgid)
if key not in msgs.msgs:
msg = utils.I18nMessage([context], [msgid], [""], [])
msg.sources = srcs
msgs.msgs[key] = msg
num_added += 1
else:
# We need to merge sources!
msgs.msgs[key].sources += srcs
return num_added, num_present
def main():
parser = argparse.ArgumentParser(description="Update blender.pot file from messages.txt and source code parsing, "
"and performs some checks over msgids.")
parser.add_argument('-w', '--warning', action="store_true",
help="Show warnings.")
parser.add_argument('-i', '--input', metavar="File",
help="Input messages file path.")
parser.add_argument('-o', '--output', metavar="File",
help="Output pot file path.")
args = parser.parse_args()
if args.input:
global FILE_NAME_MESSAGES
FILE_NAME_MESSAGES = args.input
if args.output:
global FILE_NAME_POT
FILE_NAME_POT = args.output
print("Running fake py gettext…")
# Not using any more xgettext, simpler to do it ourself!
messages = _new_messages()
py_xgettext(messages)
print("Finished, found {} messages.".format(len(messages)))
if SPELL_CACHE and os.path.exists(SPELL_CACHE):
with open(SPELL_CACHE, 'rb') as f:
spell_cache = pickle.load(f)
else:
spell_cache = set()
print("Generating POT file {}".format(FILE_NAME_POT))
msgs = gen_empty_pot()
tot_messages, _a = merge_messages(msgs, messages, True, spell_cache)
# add messages collected automatically from RNA
print("\tMerging RNA messages from {}".format(FILE_NAME_MESSAGES))
messages.clear()
with open(FILE_NAME_MESSAGES, encoding="utf-8") as f:
srcs = []
context = ""
for line in f:
line = utils.stripeol(line)
if line.startswith(MSG_COMMENT_PREFIX):
srcs.append(line[len(MSG_COMMENT_PREFIX):].strip())
elif line.startswith(MSG_CONTEXT_PREFIX):
context = line[len(MSG_CONTEXT_PREFIX):].strip()
else:
key = (context, line)
messages[key] = srcs
srcs = []
context = ""
num_added, num_present = merge_messages(msgs, messages, True, spell_cache)
tot_messages += num_added
print("\tMerged {} messages ({} were already present).".format(num_added, num_present))
print("\tAdding languages labels...")
messages.clear()
messages.update(((CONTEXT_DEFAULT, lng[1]), ("Languages labels from bl_i18n_utils/settings.py",))
for lng in LANGUAGES)
messages.update(((CONTEXT_DEFAULT, cat[1]), ("Language categories labels from bl_i18n_utils/settings.py",))
for cat in LANGUAGES_CATEGORIES)
num_added, num_present = merge_messages(msgs, messages, True, spell_cache)
tot_messages += num_added
print("\tAdded {} language messages.".format(num_added))
# Write back all messages into blender.pot.
msgs.write('PO', FILE_NAME_POT)
if SPELL_CACHE and spell_cache:
with open(SPELL_CACHE, 'wb') as f:
pickle.dump(spell_cache, f)
print("Finished, total: {} messages!".format(tot_messages))
return 0
if __name__ == "__main__":
print("\n\n *** Running {} *** \n".format(__file__))
sys.exit(main())

@ -1,144 +0,0 @@
#!/usr/bin/python3
# ***** 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 trunk from branches:
# * Remove pos in trunk.
# * Copy pos from branches advanced enough.
# * Clean pos in trunk.
# * Compile pos in trunk in mos, keeping track of those failing.
# * Remove pos, mos (and their dirs) that failed to compile or are no more present in trunk.
import subprocess
import os
import sys
import shutil
try:
import settings
import utils
except:
from . import (settings, utils)
BRANCHES_DIR = settings.BRANCHES_DIR
TRUNK_PO_DIR = settings.TRUNK_PO_DIR
TRUNK_MO_DIR = settings.TRUNK_MO_DIR
LANGUAGES_CATEGORIES = settings.LANGUAGES_CATEGORIES
LANGUAGES = settings.LANGUAGES
LANGUAGES_FILE = settings.LANGUAGES_FILE
PY3 = settings.PYTHON3_EXEC
def main():
import argparse
parser = argparse.ArgumentParser(description=""
"Update trunk from branches:\n"
"* Remove pos in trunk.\n"
"* Copy pos from branches advanced enough.\n"
"* Clean pos in trunk.\n"
"* Compile pos in trunk in mos, keeping track of those failing.\n"
"* Remove pos and mos (and their dirs) that "
"failed to compile or are no more present in trunk."
"* Generate languages file used by Blender's i18n.")
parser.add_argument('-t', '--threshold', type=int, help="Import threshold, as a percentage.")
parser.add_argument('-p', '--po', action="store_true", help="Remove failing pos.")
parser.add_argument('-m', '--mo', action="store_true", help="Remove failing mos.")
parser.add_argument('langs', metavar='ISO_code', nargs='*', help="Restrict processed languages to those.")
args = parser.parse_args()
ret = 0
failed = set()
# Remove pos in trunk.
for po in os.listdir(TRUNK_PO_DIR):
if po.endswith(".po"):
lang = os.path.basename(po)[:-3]
if args.langs and lang not in args.langs:
continue
po = os.path.join(TRUNK_PO_DIR, po)
os.remove(po)
# Copy pos from branches.
#cmd = [PY3, "./import_po_from_branches.py", "-s"]
cmd = [PY3, "./import_po_from_branches.py"]
if args.threshold is not None:
cmd += ["-t", str(args.threshold)]
if args.langs:
cmd += args.langs
t = subprocess.call(cmd)
if t:
ret = t
# Add in failed all mos no more having relevant pos in trunk.
for lang in os.listdir(TRUNK_MO_DIR):
if lang in {".svn", LANGUAGES_FILE}:
continue # !!!
if not os.path.exists(os.path.join(TRUNK_PO_DIR, ".".join((lang, "po")))):
failed.add(lang)
# Check and compile each po separately, to keep track of those failing.
# XXX There should not be any failing at this stage, import step is
# supposed to have already filtered them out!
for po in os.listdir(TRUNK_PO_DIR):
if po.endswith(".po") and not po.endswith("_raw.po"):
lang = os.path.basename(po)[:-3]
if args.langs and lang not in args.langs:
continue
#cmd = [PY3, "./clean_po.py", "-t", "-s", lang]
cmd = [PY3, "./clean_po.py", "-t", lang]
t = subprocess.call(cmd)
if t:
ret = t
failed.add(lang)
continue
cmd = [PY3, "./update_mo.py", lang]
t = subprocess.call(cmd)
if t:
ret = t
failed.add(lang)
continue
# Generate languages file used by Blender's i18n system.
cmd = [PY3, "./update_languages_menu.py"]
t = subprocess.call(cmd)
if t:
ret = t
# Remove failing pos, mos and related dirs.
for lang in failed:
print("Lang “{}” failed, removing it...".format(lang))
if args.po:
po = os.path.join(TRUNK_PO_DIR, ".".join((lang, "po")))
if os.path.exists(po):
os.remove(po)
if args.mo:
mo = os.path.join(TRUNK_MO_DIR, lang)
if os.path.exists(mo):
shutil.rmtree(mo)
if __name__ == "__main__":
print("\n\n *** Running {} *** \n".format(__file__))
sys.exit(main())

@ -31,7 +31,9 @@ import sys
import tempfile import tempfile
#import time #import time
from bl_i18n_utils import settings, rtl_utils from bl_i18n_utils import (settings,
utils_rtl,
)
import bpy import bpy
@ -402,7 +404,7 @@ class I18nMessages:
for k, m in self.msgs.items(): for k, m in self.msgs.items():
keys.append(k) keys.append(k)
trans.append(m.msgstr) trans.append(m.msgstr)
trans = rtl_utils.log2vis(trans, self.settings) trans = utils_rtl.log2vis(trans, self.settings)
for k, t in zip(keys, trans): for k, t in zip(keys, trans):
self.msgs[k].msgstr = t self.msgs[k].msgstr = t
@ -511,14 +513,14 @@ class I18nMessages:
self.nbr_signs += len(msg.msgid) self.nbr_signs += len(msg.msgid)
self.nbr_trans_signs += len(msg.msgstr) self.nbr_trans_signs += len(msg.msgstr)
self.nbr_msgs = len(self.msgs) self.nbr_msgs = len(self.msgs)
self.nbr_trans_msgs = len(self.trans_msgs) self.nbr_trans_msgs = len(self.trans_msgs - self.fuzzy_msgs)
self.nbr_ttips = len(self.ttip_msgs) self.nbr_ttips = len(self.ttip_msgs)
self.nbr_trans_ttips = len(self.ttip_msgs & self.trans_msgs) self.nbr_trans_ttips = len(self.ttip_msgs & (self.trans_msgs - self.fuzzy_msgs))
self.nbr_comm_msgs = len(self.comm_msgs) self.nbr_comm_msgs = len(self.comm_msgs)
def print_stats(self, prefix="", output=print): def print_info(self, prefix="", output=print, print_stats=True, print_errors=True):
""" """
Print out some stats about an I18nMessages object. Print out some info about an I18nMessages object.
""" """
lvl = 0.0 lvl = 0.0
lvl_ttips = 0.0 lvl_ttips = 0.0
@ -534,18 +536,25 @@ class I18nMessages:
if self.nbr_trans_msgs > 0: if self.nbr_trans_msgs > 0:
lvl_ttips_in_trans = float(self.nbr_trans_ttips) / float(self.nbr_trans_msgs) lvl_ttips_in_trans = float(self.nbr_trans_ttips) / float(self.nbr_trans_msgs)
lines = ("", lines = []
"{:>6.1%} done! ({} translated messages over {}).\n" if print_stats:
"".format(lvl, self.nbr_trans_msgs, self.nbr_msgs), lines += [
"{:>6.1%} of messages are tooltips ({} over {}).\n" "",
"".format(lvl_ttips, self.nbr_ttips, self.nbr_msgs), "{:>6.1%} done! ({} translated messages over {}).\n"
"{:>6.1%} of tooltips are translated ({} over {}).\n" "".format(lvl, self.nbr_trans_msgs, self.nbr_msgs),
"".format(lvl_trans_ttips, self.nbr_trans_ttips, self.nbr_ttips), "{:>6.1%} of messages are tooltips ({} over {}).\n"
"{:>6.1%} of translated messages are tooltips ({} over {}).\n" "".format(lvl_ttips, self.nbr_ttips, self.nbr_msgs),
"".format(lvl_ttips_in_trans, self.nbr_trans_ttips, self.nbr_trans_msgs), "{:>6.1%} of tooltips are translated ({} over {}).\n"
"{:>6.1%} of messages are commented ({} over {}).\n" "".format(lvl_trans_ttips, self.nbr_trans_ttips, self.nbr_ttips),
"".format(lvl_comm, self.nbr_comm_msgs, self.nbr_comm_msgs + self.nbr_msgs), "{:>6.1%} of translated messages are tooltips ({} over {}).\n"
"This translation is currently made of {} signs.\n".format(self.nbr_trans_signs)) "".format(lvl_ttips_in_trans, self.nbr_trans_ttips, self.nbr_trans_msgs),
"{:>6.1%} of messages are commented ({} over {}).\n"
"".format(lvl_comm, self.nbr_comm_msgs, self.nbr_comm_msgs + self.nbr_msgs),
"This translation is currently made of {} signs.\n".format(self.nbr_trans_signs)
]
if print_errors and self.parsing_errors:
lines += ["WARNING! Errors during parsing:\n"]
lines += [" Around line {}: {}\n".format(line, error) for line, error in self.parsing_errors]
output(prefix.join(lines)) output(prefix.join(lines))
def invalidate_reverse_cache(self, rebuild_now=False): def invalidate_reverse_cache(self, rebuild_now=False):
@ -694,9 +703,8 @@ class I18nMessages:
del self.parsing_errors[:] del self.parsing_errors[:]
self.parsers[kind](self, src, key) self.parsers[kind](self, src, key)
if self.parsing_errors: if self.parsing_errors:
print("WARNING! Errors while parsing {}:".format(key)) print("{} ({}):".format(key, src))
for line, error in self.parsing_errors: self.print_info(print_stats=False)
print(" Around line {}: {}".format(line, error))
print("The parser solved them as well as it could...") print("The parser solved them as well as it could...")
self.update_info() self.update_info()

@ -44,6 +44,9 @@ class NodeAddOperator():
node = tree.nodes.new(type=node_type) node = tree.nodes.new(type=node_type)
if space.use_hidden_preview:
node.show_preview = False
node.select = True node.select = True
tree.nodes.active = node tree.nodes.active = node
node.location = space.cursor_location node.location = space.cursor_location

@ -509,7 +509,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
row.label() row.label()
def OCEAN(self, layout, ob, md): def OCEAN(self, layout, ob, md):
if not md.is_build_enabled: if not bpy.app.build_options.mod_oceansim:
layout.label("Built without OceanSim modifier") layout.label("Built without OceanSim modifier")
return return

@ -162,7 +162,10 @@ class OBJECT_PT_groups(ObjectButtonsPanel, Panel):
obj = context.object obj = context.object
row = layout.row(align=True) row = layout.row(align=True)
row.operator("object.group_link", text="Add to Group") if bpy.data.groups:
row.operator("object.group_link", text="Add to Group")
else:
row.operator("object.group_add", text="Add to Group")
row.operator("object.group_add", text="", icon='ZOOMIN') row.operator("object.group_add", text="", icon='ZOOMIN')
# XXX, this is bad practice, yes, I wrote it :( - campbell # XXX, this is bad practice, yes, I wrote it :( - campbell

@ -843,7 +843,12 @@ class PARTICLE_PT_render(ParticleButtonsPanel, Panel):
col = split.column() col = split.column()
col.label(text="Timing:") col.label(text="Timing:")
col.prop(part, "use_absolute_path_time") col.prop(part, "use_absolute_path_time")
col.prop(part, "path_start", text="Start", slider=not part.use_absolute_path_time)
if part.type == 'HAIR' or psys.point_cache.is_baked:
col.prop(part, "path_start", text="Start", slider=not part.use_absolute_path_time)
else:
col.prop(part, "trail_count")
col.prop(part, "path_end", text="End", slider=not part.use_absolute_path_time) col.prop(part, "path_end", text="End", slider=not part.use_absolute_path_time)
col.prop(part, "length_random", text="Random", slider=True) col.prop(part, "length_random", text="Random", slider=True)

@ -51,7 +51,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
fluid = md.settings fluid = md.settings
col = layout.column() col = layout.column()
if fluid is None: if not bpy.app.build_options.mod_fluid:
col.label("Built without fluids") col.label("Built without fluids")
return return

@ -157,7 +157,7 @@ class INFO_MT_file_import(Menu):
bl_label = "Import" bl_label = "Import"
def draw(self, context): def draw(self, context):
if hasattr(bpy.types, "WM_OT_collada_import"): if bpy.app.build_options.collada:
self.layout.operator("wm.collada_import", text="Collada (Default) (.dae)") self.layout.operator("wm.collada_import", text="Collada (Default) (.dae)")
@ -166,7 +166,7 @@ class INFO_MT_file_export(Menu):
bl_label = "Export" bl_label = "Export"
def draw(self, context): def draw(self, context):
if hasattr(bpy.types, "WM_OT_collada_export"): if bpy.app.build_options.collada:
self.layout.operator("wm.collada_export", text="Collada (Default) (.dae)") self.layout.operator("wm.collada_export", text="Collada (Default) (.dae)")

@ -528,9 +528,11 @@ class USERPREF_PT_system(Panel):
if system.use_international_fonts: if system.use_international_fonts:
column.prop(system, "language") column.prop(system, "language")
row = column.row() row = column.row()
row.label(text="Translate:") row.label(text="Translate:", text_ctxt=bpy.app.translations.contexts.id_windowmanager)
row.prop(system, "use_translate_interface", text="Interface") row = column.row(True)
row.prop(system, "use_translate_tooltips", text="Tooltips") row.prop(system, "use_translate_interface", text="Interface", toggle=True)
row.prop(system, "use_translate_tooltips", text="Tooltips", toggle=True)
row.prop(system, "use_translate_new_dataname", text="New Data", toggle=True)
class USERPREF_MT_interface_theme_presets(Menu): class USERPREF_MT_interface_theme_presets(Menu):

@ -111,6 +111,11 @@ class VIEW3D_HT_header(Header):
elif snap_element == 'FACE': elif snap_element == 'FACE':
row.prop(toolsettings, "use_snap_project", text="") row.prop(toolsettings, "use_snap_project", text="")
# AutoMerge editing
if obj:
if (mode == 'EDIT' and obj.type == 'MESH'):
layout.prop(toolsettings, "use_mesh_automerge", text="", icon='AUTOMERGE_ON')
# OpenGL render # OpenGL render
row = layout.row(align=True) row = layout.row(align=True)
row.operator("render.opengl", text="", icon='RENDER_STILL') row.operator("render.opengl", text="", icon='RENDER_STILL')

@ -180,6 +180,7 @@ class VIEW3D_PT_tools_meshedit(View3DPanel, Panel):
props = row.operator("mesh.knife_tool", text="Select") props = row.operator("mesh.knife_tool", text="Select")
props.use_occlude_geometry = False props.use_occlude_geometry = False
props.only_selected = True props.only_selected = True
col.operator("mesh.knife_project")
col = layout.column(align=True) col = layout.column(align=True)
col.label(text="Remove:") col.label(text="Remove:")

@ -37,8 +37,6 @@ class MyCustomSocket(bpy.types.NodeSocket):
bl_idname = 'CustomSocketType' bl_idname = 'CustomSocketType'
# Label for nice name display # Label for nice name display
bl_label = 'Custom Node Socket' bl_label = 'Custom Node Socket'
# Socket color
bl_color = (1.0, 0.4, 0.216, 0.5)
# Enum items list # Enum items list
my_items = [ my_items = [
@ -54,6 +52,9 @@ class MyCustomSocket(bpy.types.NodeSocket):
def draw(self, context, layout, node): def draw(self, context, layout, node):
layout.prop(self, "myEnumProperty", text=self.name) layout.prop(self, "myEnumProperty", text=self.name)
# Socket color
def draw_color(self, context, node):
return (1.0, 0.4, 0.216, 0.5)
# Base class for all custom nodes in this tree type. # Base class for all custom nodes in this tree type.
# Defines a poll function to enable instantiation. # Defines a poll function to enable instantiation.

@ -71,13 +71,16 @@ void BLF_free_unifont(void);
unsigned char *BLF_get_unifont_mono(int *unifont_size); unsigned char *BLF_get_unifont_mono(int *unifont_size);
void BLF_free_unifont_mono(void); void BLF_free_unifont_mono(void);
bool BLF_is_default_context(const char *msgctxt);
const char *BLF_pgettext(const char *msgctxt, const char *msgid); const char *BLF_pgettext(const char *msgctxt, const char *msgid);
/* translation */ /* translation */
bool BLF_translate_iface(void); bool BLF_translate_iface(void);
bool BLF_translate_tooltips(void); bool BLF_translate_tooltips(void);
bool BLF_translate_new_dataname(void);
const char *BLF_translate_do_iface(const char *msgctxt, const char *msgid); const char *BLF_translate_do_iface(const char *msgctxt, const char *msgid);
const char *BLF_translate_do_tooltip(const char *msgctxt, const char *msgid); const char *BLF_translate_do_tooltip(const char *msgctxt, const char *msgid);
const char *BLF_translate_do_new_dataname(const char *msgctxt, const char *msgid);
/* The "translation-marker" macro. */ /* The "translation-marker" macro. */
@ -89,19 +92,23 @@ const char *BLF_translate_do_tooltip(const char *msgctxt, const char *msgid);
/*# define _(msgid) BLF_gettext(msgid) */ /*# define _(msgid) BLF_gettext(msgid) */
# define IFACE_(msgid) BLF_translate_do_iface(NULL, msgid) # define IFACE_(msgid) BLF_translate_do_iface(NULL, msgid)
# define TIP_(msgid) BLF_translate_do_tooltip(NULL, msgid) # define TIP_(msgid) BLF_translate_do_tooltip(NULL, msgid)
# define DATA_(msgid) BLF_translate_do_new_dataname(NULL, msgid)
# define CTX_IFACE_(context, msgid) BLF_translate_do_iface(context, msgid) # define CTX_IFACE_(context, msgid) BLF_translate_do_iface(context, msgid)
# define CTX_TIP_(context, msgid) BLF_translate_do_tooltip(context, msgid) # define CTX_TIP_(context, msgid) BLF_translate_do_tooltip(context, msgid)
# define CTX_DATA_(context, msgid) BLF_translate_do_new_dataname(context, msgid)
#else #else
/*# define _(msgid) msgid */ /*# define _(msgid) msgid */
# define IFACE_(msgid) msgid # define IFACE_(msgid) msgid
# define TIP_(msgid) msgid # define TIP_(msgid) msgid
# define DATA_(msgid) msgid
# define CTX_IFACE_(context, msgid) msgid # define CTX_IFACE_(context, msgid) msgid
# define CTX_TIP_(context, msgid) msgid # define CTX_TIP_(context, msgid) msgid
# define CTX_DATA_(context, msgid) msgid
#endif #endif
/* Helper macro, when we want to define a same msgid for multiple msgctxt... /* Helper macro, when we want to define a same msgid for multiple msgctxt...
* Does nothing in C, but is "parsed" by our i18n py tools. * Does nothing in C, but is "parsed" by our i18n py tools.
* XXX Currently limited to at most 16 contexts at most * XXX Currently limited to at most 16 contexts at once
* (but you can call it several times with the same msgid, should you need more contexts!). * (but you can call it several times with the same msgid, should you need more contexts!).
*/ */
#define BLF_I18N_MSGID_MULTI_CTXT(msgid, ...) #define BLF_I18N_MSGID_MULTI_CTXT(msgid, ...)
@ -122,7 +129,7 @@ const char *BLF_translate_do_tooltip(const char *msgctxt, const char *msgid);
* with the same char! * with the same char!
*/ */
#define BLF_I18NCONTEXT_DEFAULT NULL #define BLF_I18NCONTEXT_DEFAULT NULL
#define BLF_I18NCONTEXT_DEFAULT_BPY "*" #define BLF_I18NCONTEXT_DEFAULT_BPYRNA "*"
/* Default context for operator names/labels. */ /* Default context for operator names/labels. */
#define BLF_I18NCONTEXT_OPERATOR_DEFAULT "Operator" #define BLF_I18NCONTEXT_OPERATOR_DEFAULT "Operator"
@ -175,7 +182,7 @@ typedef struct
#define BLF_I18NCONTEXTS_DESC { \ #define BLF_I18NCONTEXTS_DESC { \
BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_DEFAULT, "default_real"), \ BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_DEFAULT, "default_real"), \
BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_DEFAULT_BPY, "default"), \ BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_DEFAULT_BPYRNA, "default"), \
BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "operator_default"), \ BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "operator_default"), \
BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_ACTION, "id_action"), \ BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_ACTION, "id_action"), \
BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_ARMATURE, "id_armature"), \ BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_ARMATURE, "id_armature"), \

@ -619,6 +619,7 @@ void BLF_width_and_height_default(const char *str, float *width, float *height)
return; return;
} }
BLF_size(global_font_default, global_font_points, global_font_dpi);
BLF_width_and_height(global_font_default, str, width, height); BLF_width_and_height(global_font_default, str, width, height);
} }

@ -207,8 +207,10 @@ void BLF_lang_free(void)
#endif #endif
} }
#define ULANGUAGE ((U.language >= 0 && U.language < num_locales) ? U.language : 0) #ifdef WITH_INTERNATIONAL
#define LOCALE(_id) (locales ? locales[(_id)] : "") # define ULANGUAGE ((U.language >= 0 && U.language < num_locales) ? U.language : 0)
# define LOCALE(_id) (locales ? locales[(_id)] : "")
#endif
void BLF_lang_set(const char *str) void BLF_lang_set(const char *str)
{ {

@ -125,15 +125,22 @@ void BLF_free_unifont_mono(void)
#endif #endif
} }
bool BLF_is_default_context(const char *msgctxt)
{
/* We use the "short" test, a more complete one could be:
* return (!msgctxt || !msgctxt[0] || !strcmp(msgctxt == BLF_I18NCONTEXT_DEFAULT_BPYRNA))
*/
/* Note: trying without the void string check for now, it *should* not be necessary... */
return (!msgctxt || msgctxt[0] == BLF_I18NCONTEXT_DEFAULT_BPYRNA[0]);
}
const char *BLF_pgettext(const char *msgctxt, const char *msgid) const char *BLF_pgettext(const char *msgctxt, const char *msgid)
{ {
#ifdef WITH_INTERNATIONAL #ifdef WITH_INTERNATIONAL
const char *ret = msgid; const char *ret = msgid;
if (msgid && msgid[0]) { if (msgid && msgid[0]) {
/*if (msgctxt && !strcmp(msgctxt, BLF_I18NCONTEXT_DEFAULT_BPY_INTERN)) { */ if (BLF_is_default_context(msgctxt)) {
if (msgctxt && (!msgctxt[0] || msgctxt[0] == BLF_I18NCONTEXT_DEFAULT_BPY[0])) {
/* BLF_I18NCONTEXT_DEFAULT_BPY context is reserved and considered the same as default NULL one. */
msgctxt = BLF_I18NCONTEXT_DEFAULT; msgctxt = BLF_I18NCONTEXT_DEFAULT;
} }
ret = bl_locale_pgettext(msgctxt, msgid); ret = bl_locale_pgettext(msgctxt, msgid);
@ -170,6 +177,15 @@ bool BLF_translate_tooltips(void)
#endif #endif
} }
bool BLF_translate_new_dataname(void)
{
#ifdef WITH_INTERNATIONAL
return (U.transopts & USER_DOTRANSLATE) && (U.transopts & USER_TR_NEWDATANAME);
#else
return false;
#endif
}
const char *BLF_translate_do_iface(const char *msgctxt, const char *msgid) const char *BLF_translate_do_iface(const char *msgctxt, const char *msgid)
{ {
#ifdef WITH_INTERNATIONAL #ifdef WITH_INTERNATIONAL
@ -199,3 +215,18 @@ const char *BLF_translate_do_tooltip(const char *msgctxt, const char *msgid)
return msgid; return msgid;
#endif #endif
} }
const char *BLF_translate_do_new_dataname(const char *msgctxt, const char *msgid)
{
#ifdef WITH_INTERNATIONAL
if (BLF_translate_new_dataname()) {
return BLF_pgettext(msgctxt, msgid);
}
else {
return msgid;
}
#else
(void)msgctxt;
return msgid;
#endif
}

@ -65,8 +65,8 @@ int where_on_path(struct Object *ob, float ctime, float vec[4], float dir[3], fl
/* ---------------------------------------------------- */ /* ---------------------------------------------------- */
/* Dupli-Geometry */ /* Dupli-Geometry */
struct ListBase *object_duplilist_ex(struct Scene *sce, struct Object *ob, int update, int for_render); struct ListBase *object_duplilist_ex(struct Scene *sce, struct Object *ob, bool update, bool for_render);
struct ListBase *object_duplilist(struct Scene *sce, struct Object *ob, int for_render); struct ListBase *object_duplilist(struct Scene *sce, struct Object *ob, bool for_render);
void free_object_duplilist(struct ListBase *lb); void free_object_duplilist(struct ListBase *lb);
int count_duplilist(struct Object *ob); int count_duplilist(struct Object *ob);

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