diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0cdf1fb9da9..77f0bed1dce 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -62,6 +62,22 @@ set(CMAKE_BUILD_TYPE_INIT "Release")
# quiet output for Makefiles, 'make -s' helps too
# set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
+#-----------------------------------------------------------------------------
+# Set policy
+
+# see "cmake --help-policy CMP0003"
+# So library linking is more sane
+cmake_policy(SET CMP0003 NEW)
+
+# So BUILDINFO and BLENDERPATH strings are automatically quoted
+cmake_policy(SET CMP0005 NEW)
+
+# So syntax problems are errors
+cmake_policy(SET CMP0010 NEW)
+
+# Input directories must have CMakeLists.txt
+cmake_policy(SET CMP0014 NEW)
+
#-----------------------------------------------------------------------------
# Load some macros.
include(build_files/cmake/macros.cmake)
@@ -258,6 +274,11 @@ endif()
TEST_SSE_SUPPORT()
+# don't store paths to libs for portable distrobution
+if(WITH_INSTALL_PORTABLE)
+ set(CMAKE_SKIP_BUILD_RPATH TRUE)
+endif()
+
#-----------------------------------------------------------------------------
# Initialize un-cached vars, avoid unused warning
@@ -429,21 +450,20 @@ if(UNIX AND NOT APPLE)
endif()
if(WITH_OPENCOLLADA)
- set(OPENCOLLADA /usr/local/opencollada CACHE PATH "OpenCollada Directory")
- mark_as_advanced(OPENCOLLADA)
- set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
- set(OPENCOLLADA_LIBRARIES OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre ftoa buffer xml2)
- set(OPENCOLLADA_INCLUDE_DIR ${OPENCOLLADA})
+ find_package(OpenCOLLADA)
+ if(OPENCOLLADA_FOUND)
+ set(PCRE /usr CACHE PATH "PCRE Directory")
+ mark_as_advanced(PCRE)
+ set(PCRE_LIBPATH ${PCRE}/lib)
+ set(PCRE_LIB pcre)
- set(PCRE /usr CACHE PATH "PCRE Directory")
- mark_as_advanced(PCRE)
- set(PCRE_LIBPATH ${PCRE}/lib)
- set(PCRE_LIB pcre)
-
- set(EXPAT /usr CACHE PATH "Expat Directory")
- mark_as_advanced(EXPAT)
- set(EXPAT_LIBPATH ${EXPAT}/lib)
- set(EXPAT_LIB expat)
+ set(EXPAT /usr CACHE PATH "Expat Directory")
+ mark_as_advanced(EXPAT)
+ set(EXPAT_LIBPATH ${EXPAT}/lib)
+ set(EXPAT_LIB expat)
+ else()
+ set(WITH_OPENCOLLADA OFF)
+ endif()
endif()
if(WITH_MEM_JEMALLOC)
@@ -668,9 +688,15 @@ elseif(WIN32)
endif()
if(WITH_OPENCOLLADA)
- set(OPENCOLLADA_INCLUDE_DIR
- ${LIBDIR}/opencollada/include
+
+ set(OPENCOLLADA_INCLUDE_DIRS
+ ${LIBDIR}/opencollada/include/COLLADAStreamWriter/include
+ ${LIBDIR}/opencollada/include/COLLADABaseUtils/include
+ ${LIBDIR}/opencollada/include/COLLADAFramework/include
+ ${LIBDIR}/opencollada/include/COLLADASaxFrameworkLoader/include
+ ${LIBDIR}/opencollada/include/GeneratedSaxParser/include
)
+
set(OPENCOLLADA_LIBRARIES
${LIBDIR}/opencollada/lib/OpenCOLLADASaxFrameworkLoader.lib
${LIBDIR}/opencollada/lib/OpenCOLLADAFramework.lib
@@ -694,11 +720,11 @@ elseif(WIN32)
${LIBDIR}/ffmpeg/include/msvc
)
set(FFMPEG_LIBRARIES
- ${LIBDIR}/ffmpeg/lib/avcodec-52.lib
- ${LIBDIR}/ffmpeg/lib/avformat-52.lib
- ${LIBDIR}/ffmpeg/lib/avdevice-52.lib
- ${LIBDIR}/ffmpeg/lib/avutil-50.lib
- ${LIBDIR}/ffmpeg/lib/swscale-0.lib
+ ${LIBDIR}/ffmpeg/lib/avcodec-53.lib
+ ${LIBDIR}/ffmpeg/lib/avformat-53.lib
+ ${LIBDIR}/ffmpeg/lib/avdevice-53.lib
+ ${LIBDIR}/ffmpeg/lib/avutil-51.lib
+ ${LIBDIR}/ffmpeg/lib/swscale-2.lib
)
endif()
@@ -816,7 +842,13 @@ elseif(WIN32)
if(WITH_OPENCOLLADA)
set(OPENCOLLADA ${LIBDIR}/gcc/opencollada)
- set(OPENCOLLADA_INCLUDE_DIR ${OPENCOLLADA}/include)
+ set(OPENCOLLADA_INCLUDE_DIRS
+ ${LIBDIR}/gcc/opencollada/include/COLLADAStreamWriter/include
+ ${LIBDIR}/gcc/opencollada/include/COLLADABaseUtils/include
+ ${LIBDIR}/gcc/opencollada/include/COLLADAFramework/include
+ ${LIBDIR}/gcc/opencollada/include/COLLADASaxFrameworkLoader/include
+ ${LIBDIR}/gcc/opencollada/include/GeneratedSaxParser/include
+ )
set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib ${OPENCOLLADA}/lib)
set(OPENCOLLADA_LIBRARIES OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa)
set(PCRE_LIB pcre)
@@ -825,7 +857,7 @@ elseif(WIN32)
if(WITH_CODEC_FFMPEG)
set(FFMPEG ${LIBDIR}/ffmpeg)
set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include ${FFMPEG}/include)
- set(FFMPEG_LIBRARIES avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0)
+ set(FFMPEG_LIBRARIES avcodec-53 avformat-53 avdevice-53 avutil-51 swscale-2)
set(FFMPEG_LIBPATH ${FFMPEG}/lib)
endif()
@@ -1027,7 +1059,15 @@ elseif(APPLE)
if(WITH_OPENCOLLADA)
set(OPENCOLLADA ${LIBDIR}/opencollada)
- set(OPENCOLLADA_INCLUDE_DIR ${OPENCOLLADA}/include)
+
+ set(OPENCOLLADA_INCLUDE_DIRS
+ ${LIBDIR}/opencollada/include/COLLADAStreamWriter
+ ${LIBDIR}/opencollada/include/COLLADABaseUtils
+ ${LIBDIR}/opencollada/include/COLLADAFramework
+ ${LIBDIR}/opencollada/include/COLLADASaxFrameworkLoader
+ ${LIBDIR}/opencollada/include/GeneratedSaxParser
+ )
+
set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
set(OPENCOLLADA_LIBRARIES "OpenCOLLADASaxFrameworkLoader -lOpenCOLLADAFramework -lOpenCOLLADABaseUtils -lOpenCOLLADAStreamWriter -lMathMLSolver -lGeneratedSaxParser -lUTF -lxml2 -lbuffer -lftoa" )
#pcre is bundled with openCollada
diff --git a/SConstruct b/SConstruct
index e2b83f2811f..2531872af6c 100644
--- a/SConstruct
+++ b/SConstruct
@@ -269,15 +269,15 @@ if env['OURPLATFORM']=='darwin':
else:
print B.bc.OKGREEN + "Found recommended sdk :" + B.bc.ENDC + " using MacOSX10.5.sdk"
- # for now, Mac builders must download and install the driver framework from 3Dconnexion
+ # for now, Mac builders must download and install the 3DxWare 10 Beta 4 driver framework from 3Dconnexion
# necessary header file lives here when installed:
# /Library/Frameworks/3DconnexionClient.framework/Versions/Current/Headers/ConnexionClientAPI.h
- if env['WITH_BF_3DMOUSE'] == 1 and not os.path.exists('/Library/Frameworks/3DconnexionClient.framework'):
- print "3D_CONNEXION_CLIENT_LIBRARY not found, disabling WITH_BF_3DMOUSE" # avoid build errors !
- env['WITH_BF_3DMOUSE'] = 0
- else:
- env.Append(LINKFLAGS=['-weak_framework','3DconnexionClient'])
-
+ if env['WITH_BF_3DMOUSE'] == 1:
+ if not os.path.exists('/Library/Frameworks/3DconnexionClient.framework'):
+ print "3D_CONNEXION_CLIENT_LIBRARY not found, disabling WITH_BF_3DMOUSE" # avoid build errors !
+ env['WITH_BF_3DMOUSE'] = 0
+ else:
+ env.Append(LINKFLAGS=['-weak_framework','3DconnexionClient'])
if env['WITH_BF_OPENMP'] == 1:
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
diff --git a/build_files/buildbot/config/user-config-i686.py b/build_files/buildbot/config/user-config-i686.py
index e09fecede59..07dc4a9d831 100644
--- a/build_files/buildbot/config/user-config-i686.py
+++ b/build_files/buildbot/config/user-config-i686.py
@@ -22,7 +22,7 @@ BF_EXPAT_LIB = ''
WITH_BF_FFMPEG = True
WITH_BF_STATICFFMPEG = True
-BF_FFMPEG = '/home/sources/staticlibs/ffmpeg-0.8'
+BF_FFMPEG = '/home/sources/staticlibs/ffmpeg'
BF_FFMPEG_LIBPATH = '${BF_FFMPEG}/lib32'
BF_FFMPEG_LIB_STATIC = '${BF_FFMPEG_LIBPATH}/libavformat.a ${BF_FFMPEG_LIBPATH}/libswscale.a ' + \
'${BF_FFMPEG_LIBPATH}/libavcodec.a ${BF_FFMPEG_LIBPATH}/libavdevice.a ${BF_FFMPEG_LIBPATH}/libavutil.a ' + \
diff --git a/build_files/buildbot/config/user-config-player-i686.py b/build_files/buildbot/config/user-config-player-i686.py
index 279f2d66804..54e66e847df 100644
--- a/build_files/buildbot/config/user-config-player-i686.py
+++ b/build_files/buildbot/config/user-config-player-i686.py
@@ -16,7 +16,7 @@ WITH_BF_COLLADA = False
WITH_BF_FFMPEG = True
WITH_BF_STATICFFMPEG = True
-BF_FFMPEG = '/home/sources/staticlibs/ffmpeg-0.8'
+BF_FFMPEG = '/home/sources/staticlibs/ffmpeg'
BF_FFMPEG_LIBPATH = '${BF_FFMPEG}/lib32'
BF_FFMPEG_LIB_STATIC = '${BF_FFMPEG_LIBPATH}/libavformat.a ${BF_FFMPEG_LIBPATH}/libswscale.a ' + \
'${BF_FFMPEG_LIBPATH}/libavcodec.a ${BF_FFMPEG_LIBPATH}/libavdevice.a ${BF_FFMPEG_LIBPATH}/libavutil.a ' + \
diff --git a/build_files/buildbot/config/user-config-player-x86_64.py b/build_files/buildbot/config/user-config-player-x86_64.py
index d1914338510..5d594229d3e 100644
--- a/build_files/buildbot/config/user-config-player-x86_64.py
+++ b/build_files/buildbot/config/user-config-player-x86_64.py
@@ -16,7 +16,7 @@ WITH_BF_COLLADA = False
WITH_BF_FFMPEG = True
WITH_BF_STATICFFMPEG = True
-BF_FFMPEG = '/home/sources/staticlibs/ffmpeg-0.8'
+BF_FFMPEG = '/home/sources/staticlibs/ffmpeg'
BF_FFMPEG_LIBPATH = '${BF_FFMPEG}/lib64'
BF_FFMPEG_LIB_STATIC = '${BF_FFMPEG_LIBPATH}/libavformat.a ${BF_FFMPEG_LIBPATH}/libswscale.a ' + \
'${BF_FFMPEG_LIBPATH}/libavcodec.a ${BF_FFMPEG_LIBPATH}/libavdevice.a ${BF_FFMPEG_LIBPATH}/libavutil.a ' + \
diff --git a/build_files/buildbot/config/user-config-x86_64.py b/build_files/buildbot/config/user-config-x86_64.py
index bdba8892bf8..9c569ff4458 100644
--- a/build_files/buildbot/config/user-config-x86_64.py
+++ b/build_files/buildbot/config/user-config-x86_64.py
@@ -22,7 +22,7 @@ BF_EXPAT_LIB = ''
WITH_BF_FFMPEG = True
WITH_BF_STATICFFMPEG = True
-BF_FFMPEG = '/home/sources/staticlibs/ffmpeg-0.8'
+BF_FFMPEG = '/home/sources/staticlibs/ffmpeg'
BF_FFMPEG_LIBPATH = '${BF_FFMPEG}/lib64'
BF_FFMPEG_LIB_STATIC = '${BF_FFMPEG_LIBPATH}/libavformat.a ${BF_FFMPEG_LIBPATH}/libswscale.a ' + \
'${BF_FFMPEG_LIBPATH}/libavcodec.a ${BF_FFMPEG_LIBPATH}/libavdevice.a ${BF_FFMPEG_LIBPATH}/libavutil.a ' + \
diff --git a/build_files/buildbot/slave_compile.py b/build_files/buildbot/slave_compile.py
index b83a65f2466..415f95a516f 100644
--- a/build_files/buildbot/slave_compile.py
+++ b/build_files/buildbot/slave_compile.py
@@ -108,32 +108,12 @@ else:
sys.exit(0)
else:
- bitness = '32'
- # Switch to new FFmpeg library
if builder.find('win') != -1:
- if builder.find('win32') != -1:
- LCGDIR = '#../lib/windows'
- elif builder.find('win64') != -1:
- LCGDIR = '#../lib/win64'
+ bitness = '32'
+
+ if builder.find('win64') != -1:
bitness = '64'
- all_ffmpeg_libs = ['avcodec-53',
- 'avdevice-53',
- 'avformat-53',
- 'avutil-51',
- 'swscale-2']
-
- ffmpeg_lib = []
- ffmpeg_dll = []
-
- for lib in all_ffmpeg_libs:
- ffmpeg_lib.append(lib + '.lib')
- ffmpeg_dll.append('${BF_FFMPEG_LIBPATH}/' + lib + '.dll')
-
- scons_options.append('BF_FFMPEG=' + LCGDIR + '/ffmpeg-0.8')
- scons_options.append('BF_FFMPEG_LIB=' + (' '.join(ffmpeg_lib)))
- scons_options.append('BF_FFMPEG_DLL=' + (' '.join(ffmpeg_dll)))
-
scons_options.append('BF_BITNESS=' + bitness)
retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options)
diff --git a/build_files/buildbot/slave_pack.py b/build_files/buildbot/slave_pack.py
index 5fdeb4a8ad5..af8d99893b4 100644
--- a/build_files/buildbot/slave_pack.py
+++ b/build_files/buildbot/slave_pack.py
@@ -72,32 +72,12 @@ if builder.find('scons') != -1:
retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options)
sys.exit(retcode)
else:
- bitness = '32'
- # Switch to new FFmpeg library
if builder.find('win') != -1:
- if builder.find('win32') != -1:
- LCGDIR = '#../lib/windows'
- elif builder.find('win64') != -1:
- LCGDIR = '#../lib/win64'
+ bitness = '32'
+
+ if builder.find('win64') != -1:
bitness = '64'
- all_ffmpeg_libs = ['avcodec-53',
- 'avdevice-53',
- 'avformat-53',
- 'avutil-51',
- 'swscale-2']
-
- ffmpeg_lib = []
- ffmpeg_dll = []
-
- for lib in all_ffmpeg_libs:
- ffmpeg_lib.append(lib + '.lib')
- ffmpeg_dll.append('${BF_FFMPEG_LIBPATH}/' + lib + '.dll')
-
- scons_options.append('BF_FFMPEG=' + LCGDIR + '/ffmpeg-0.8')
- scons_options.append('BF_FFMPEG_LIB=' + (' '.join(ffmpeg_lib)))
- scons_options.append('BF_FFMPEG_DLL=' + (' '.join(ffmpeg_dll)))
-
scons_options.append('BF_BITNESS=' + bitness)
retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options)
diff --git a/build_files/cmake/Modules/FindOpenCOLLADA.cmake b/build_files/cmake/Modules/FindOpenCOLLADA.cmake
new file mode 100644
index 00000000000..c7637283514
--- /dev/null
+++ b/build_files/cmake/Modules/FindOpenCOLLADA.cmake
@@ -0,0 +1,118 @@
+# - Find OpenCOLLADA library
+# Find the native OpenCOLLADA includes and library
+# This module defines
+# OPENCOLLADA_INCLUDE_DIRS, where to find COLLADABaseUtils/ and
+# COLLADAFramework/, Set when OPENCOLLADA_INCLUDE_DIR is found.
+# OPENCOLLADA_LIBRARIES, libraries to link against to use OpenCOLLADA.
+# OPENCOLLADA_ROOT_DIR, The base directory to search for OpenCOLLADA.
+# This can also be an environment variable.
+# OPENCOLLADA_FOUND, If false, do not try to use OpenCOLLADA.
+#
+# also defined, but not for general use are
+# OPENCOLLADA_LIBRARY, where to find the OpenCOLLADA library.
+
+#=============================================================================
+# Copyright 2011 Blender Foundation.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+# note about include paths, there are 2 ways includes are set
+#
+# Where '/usr/include/opencollada' is the root dir:
+# /usr/include/opencollada/COLLADABaseUtils/COLLADABUPlatform.h
+#
+# Where '/opt/opencollada' is the base dir:
+# /opt/opencollada/COLLADABaseUtils/include/COLLADABUPlatform.h
+
+# If OPENCOLLADA_ROOT_DIR was defined in the environment, use it.
+IF(NOT OPENCOLLADA_ROOT_DIR AND NOT $ENV{OPENCOLLADA_ROOT_DIR} STREQUAL "")
+ SET(OPENCOLLADA_ROOT_DIR $ENV{OPENCOLLADA_ROOT_DIR})
+ENDIF()
+
+SET(_opencollada_FIND_INCLUDES
+ COLLADAStreamWriter
+ COLLADABaseUtils
+ COLLADAFramework
+ COLLADASaxFrameworkLoader
+ GeneratedSaxParser
+)
+
+SET(_opencollada_FIND_COMPONENTS
+ OpenCOLLADAStreamWriter
+ OpenCOLLADASaxFrameworkLoader
+ OpenCOLLADAFramework
+ OpenCOLLADABaseUtils
+ GeneratedSaxParser
+ UTF
+ MathMLSolver
+ pcre
+ ftoa
+ buffer
+ xml2
+)
+
+SET(_opencollada_SEARCH_DIRS
+ ${OPENCOLLADA_ROOT_DIR}
+ /usr/local
+ /sw # Fink
+ /opt/local # DarwinPorts
+ /opt/csw # Blastwave
+)
+
+SET(_opencollada_INCLUDES)
+FOREACH(COMPONENT ${_opencollada_FIND_INCLUDES})
+ STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
+
+ # need to use this even thouh we are looking for a dir
+ FIND_FILE(OPENCOLLADA_${UPPERCOMPONENT}_INCLUDE_DIR
+ NAMES
+ ${COMPONENT}/include
+ ${COMPONENT}
+ # Ubuntu ppa needs this.
+ # Alternative would be to suffix all members of search path
+ # but this is less trouble, just looks strange.
+ include/opencollada/${COMPONENT}
+ HINTS
+ ${_opencollada_SEARCH_DIRS}
+ )
+ MARK_AS_ADVANCED(OPENCOLLADA_${UPPERCOMPONENT}_INCLUDE_DIR)
+ LIST(APPEND _opencollada_INCLUDES "${OPENCOLLADA_${UPPERCOMPONENT}_INCLUDE_DIR}")
+ENDFOREACH()
+
+
+SET(_opencollada_LIBRARIES)
+FOREACH(COMPONENT ${_opencollada_FIND_COMPONENTS})
+ STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
+
+ FIND_LIBRARY(OPENCOLLADA_${UPPERCOMPONENT}_LIBRARY
+ NAMES
+ ${COMPONENT}
+ HINTS
+ ${_opencollada_SEARCH_DIRS}
+ PATH_SUFFIXES
+ lib64 lib
+ # Ubuntu ppa needs this.
+ lib64/opencollada lib/opencollada
+ )
+ MARK_AS_ADVANCED(OPENCOLLADA_${UPPERCOMPONENT}_LIBRARY)
+ LIST(APPEND _opencollada_LIBRARIES "${OPENCOLLADA_${UPPERCOMPONENT}_LIBRARY}")
+ENDFOREACH()
+
+
+# handle the QUIETLY and REQUIRED arguments and set OPENCOLLADA_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenCOLLADA DEFAULT_MSG
+ _opencollada_LIBRARIES _opencollada_INCLUDES)
+
+
+IF(OPENCOLLADA_FOUND)
+ SET(OPENCOLLADA_LIBRARIES ${_opencollada_LIBRARIES})
+ SET(OPENCOLLADA_INCLUDE_DIRS ${_opencollada_INCLUDES})
+ENDIF(OPENCOLLADA_FOUND)
diff --git a/build_files/cmake/buildinfo.cmake b/build_files/cmake/buildinfo.cmake
index bfc17ae2cfe..e68015e36d3 100644
--- a/build_files/cmake/buildinfo.cmake
+++ b/build_files/cmake/buildinfo.cmake
@@ -27,9 +27,9 @@ endif()
# Write a file with the SVNVERSION define
file(WRITE buildinfo.h.txt
- "#define BUILD_REV ${MY_WC_REVISION}\n"
- "#define BUILD_DATE ${BUILD_DATE}\n"
- "#define BUILD_TIME ${BUILD_TIME}\n"
+ "#define BUILD_REV \"${MY_WC_REVISION}\"\n"
+ "#define BUILD_DATE \"${BUILD_DATE}\"\n"
+ "#define BUILD_TIME \"${BUILD_TIME}\"\n"
)
# Copy the file to the final header only if the version changes
diff --git a/build_files/cmake/config/blender_lite.cmake b/build_files/cmake/config/blender_lite.cmake
index d2b791baede..f09a8058f14 100644
--- a/build_files/cmake/config/blender_lite.cmake
+++ b/build_files/cmake/config/blender_lite.cmake
@@ -1,4 +1,4 @@
-# turn everything OFF CACHE FORCE BOOL) except for python which defaults to ON
+# turn everything OFF except for python which defaults to ON
# and is needed for the UI
#
# Example usage:
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 27694bcb875..58938c8b0b0 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -145,11 +145,6 @@ endmacro()
macro(SETUP_LIBDIRS)
- # see "cmake --help-policy CMP0003"
- if(COMMAND cmake_policy)
- cmake_policy(SET CMP0003 NEW)
- endif()
-
link_directories(${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${FREETYPE_LIBPATH})
if(WITH_PYTHON) # AND NOT WITH_PYTHON_MODULE # WIN32 needs
diff --git a/build_files/cmake/packaging.cmake b/build_files/cmake/packaging.cmake
index 6cda62b487f..c0124fe8199 100644
--- a/build_files/cmake/packaging.cmake
+++ b/build_files/cmake/packaging.cmake
@@ -43,7 +43,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}")
set(CPACK_PACKAGE_RELOCATABLE "false")
set(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
- set(CPACK_RPM_PACKAGE_GROUP "Amusements/Graphics")
+ set(CPACK_RPM_PACKAGE_GROUP "Amusements/Multimedia")
set(CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_SOURCE_DIR}/build_files/package_spec/rpm/blender.spec.in")
endif()
endif()
@@ -75,14 +75,14 @@ endmacro()
if(APPLE)
add_package_archive(
- "blender-${BLENDER_VERSION}-r${BUILD_REV}-OSX-${CMAKE_OSX_ARCHITECTURES}"
+ "${PROJECT_NAME}-${BLENDER_VERSION}-r${BUILD_REV}-OSX-${CMAKE_OSX_ARCHITECTURES}"
"zip")
elseif(UNIX)
# platform name could be tweaked, to include glibc, and ensure processor is correct (i386 vs i686)
string(TOLOWER ${CMAKE_SYSTEM_NAME} PACKAGE_SYSTEM_NAME)
add_package_archive(
- "blender-${BLENDER_VERSION}-r${BUILD_REV}-${PACKAGE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}"
+ "${PROJECT_NAME}-${BLENDER_VERSION}-r${BUILD_REV}-${PACKAGE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}"
"tar.bz2")
endif()
diff --git a/build_files/package_spec/rpm/blender.spec.in b/build_files/package_spec/rpm/blender.spec.in
index 502e9f36251..25ad5344721 100644
--- a/build_files/package_spec/rpm/blender.spec.in
+++ b/build_files/package_spec/rpm/blender.spec.in
@@ -9,6 +9,7 @@ Release: @CPACK_RPM_PACKAGE_RELEASE@%{?dist}
License: @CPACK_RPM_PACKAGE_LICENSE@
Group: @CPACK_RPM_PACKAGE_GROUP@
Vendor: @CPACK_RPM_PACKAGE_VENDOR@
+Epoch: 1
%define _rpmdir @CPACK_RPM_DIRECTORY@
%define _rpmfilename @CPACK_RPM_FILE_NAME@
diff --git a/build_files/scons/config/darwin-config.py b/build_files/scons/config/darwin-config.py
index ec6a3b082b8..06abaf468dd 100644
--- a/build_files/scons/config/darwin-config.py
+++ b/build_files/scons/config/darwin-config.py
@@ -316,7 +316,11 @@ if WITH_BF_QUICKTIME:
PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','QuickTime']
#note to build succesfully on 10.3.9 SDK you need to patch 10.3.9 by adding the SystemStubs.a lib from 10.4
-LLIBS = ['stdc++', 'SystemStubs']
+#for 10.7.sdk, SystemStubs needs to be excluded (lib doesn't exist anymore)
+if MACOSX_DEPLOYMENT_TARGET == '10.7':
+ LLIBS = ['stdc++']
+else:
+ LLIBS = ['stdc++', 'SystemStubs']
# some flags shuffling for different OS versions
if MAC_MIN_VERS == '10.3':
diff --git a/build_files/scons/config/linuxcross-config.py b/build_files/scons/config/linuxcross-config.py
index 62474527825..1bdf735f458 100644
--- a/build_files/scons/config/linuxcross-config.py
+++ b/build_files/scons/config/linuxcross-config.py
@@ -126,9 +126,10 @@ WITH_BF_BINRELOC = False
# enable ffmpeg support
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
BF_FFMPEG = LIBDIR + '/ffmpeg'
-BF_FFMPEG_LIB = 'avformat-52 avcodec-52 avdevice-52 avutil-50 swscale-0'
+BF_FFMPEG_LIB = 'avformat-53 avcodec-53 avdevice-53 avutil-51 swscale-2'
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
BF_FFMPEG_LIBPATH = '${BF_FFMPEG}/lib'
+BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
WITH_BF_OPENJPEG = True
BF_OPENJPEG = '#extern/libopenjpeg'
diff --git a/build_files/scons/config/win32-mingw-config.py b/build_files/scons/config/win32-mingw-config.py
index 6dac29b37f7..c815b76ef73 100644
--- a/build_files/scons/config/win32-mingw-config.py
+++ b/build_files/scons/config/win32-mingw-config.py
@@ -18,9 +18,10 @@ BF_OPENAL_LIB = 'wrap_oal'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
WITH_BF_FFMPEG = False
-BF_FFMPEG_LIB = 'avformat-52 avcodec-52 avdevice-52 avutil-50 swscale-0'
+BF_FFMPEG_LIB = 'avformat-53 avcodec-53 avdevice-53 avutil-51 swscale-2'
BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib'
BF_FFMPEG_INC = LIBDIR + '/ffmpeg/include'
+BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
BF_LIBSAMPLERATE = LIBDIR + '/samplerate'
BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
diff --git a/build_files/scons/config/win32-vc-config.py b/build_files/scons/config/win32-vc-config.py
index 4baada7f9bf..2f8fa297667 100644
--- a/build_files/scons/config/win32-vc-config.py
+++ b/build_files/scons/config/win32-vc-config.py
@@ -6,8 +6,8 @@ WITH_BF_FFMPEG = True # -DWITH_FFMPEG
BF_FFMPEG = LIBDIR +'/ffmpeg'
BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}/include/msvc'
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
-BF_FFMPEG_LIB = 'avformat-52.lib avcodec-52.lib avdevice-52.lib avutil-50.lib swscale-0.lib'
-BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-52.dll ${BF_FFMPEG_LIBPATH}/avcodec-52.dll ${BF_FFMPEG_LIBPATH}/avdevice-52.dll ${BF_FFMPEG_LIBPATH}/avutil-50.dll ${BF_FFMPEG_LIBPATH}/swscale-0.dll'
+BF_FFMPEG_LIB = 'avformat-53.lib avcodec-53.lib avdevice-53.lib avutil-51.lib swscale-2.lib'
+BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_VERSION = '3.2'
diff --git a/build_files/scons/config/win64-vc-config.py b/build_files/scons/config/win64-vc-config.py
index db7c8d09af8..ba9633a6b4c 100644
--- a/build_files/scons/config/win64-vc-config.py
+++ b/build_files/scons/config/win64-vc-config.py
@@ -6,8 +6,8 @@ WITH_BF_FFMPEG = True # -DWITH_FFMPEG
BF_FFMPEG = LIBDIR +'/ffmpeg'
BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}/include/msvc '
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
-BF_FFMPEG_LIB = 'avformat-52.lib avcodec-52.lib avdevice-52.lib avutil-50.lib swscale-0.lib'
-BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-52.dll ${BF_FFMPEG_LIBPATH}/avcodec-52.dll ${BF_FFMPEG_LIBPATH}/avdevice-52.dll ${BF_FFMPEG_LIBPATH}/avutil-50.dll ${BF_FFMPEG_LIBPATH}/swscale-0.dll'
+BF_FFMPEG_LIB = 'avformat-53.lib avcodec-53.lib avdevice-53.lib avutil-51.lib swscale-2.lib'
+BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_VERSION = '3.2'
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index 0b1f3fcd8a8..94d09732be7 100644
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -364,16 +364,16 @@ def buildinfo(lenv, build_type):
obj = []
if lenv['BF_BUILDINFO']:
- lenv.Append (CPPDEFINES = ['BUILD_TIME="%s"'%(build_time),
- 'BUILD_DATE="%s"'%(build_date),
- 'BUILD_TYPE="%s"'%(build_type),
- 'BUILD_REV="%s"'%(build_rev),
- 'NAN_BUILDINFO',
- 'BUILD_PLATFORM="%s:%s"'%(platform.system(), platform.architecture()[0]),
+ lenv.Append (CPPDEFINES = ['BUILD_TIME=\\"%s\\"'%(build_time),
+ 'BUILD_DATE=\\"%s\\"'%(build_date),
+ 'BUILD_TYPE=\\"%s\\"'%(build_type),
+ 'BUILD_REV=\\"%s\\"'%(build_rev),
+ 'WITH_BUILDINFO',
+ 'BUILD_PLATFORM=\\"%s:%s\\"'%(platform.system(), platform.architecture()[0]),
'BUILD_CFLAGS=\\"%s\\"'%(build_cflags),
'BUILD_CXXFLAGS=\\"%s\\"'%(build_cxxflags),
'BUILD_LINKFLAGS=\\"%s\\"'%(build_linkflags),
- 'BUILD_SYSTEM="SCons"'
+ 'BUILD_SYSTEM=\\"SCons\\"'
])
lenv.Append (CPPPATH = [root_build_dir+'source/blender/blenkernel'])
diff --git a/doc/python_api/examples/bpy.types.BlendDataLibraries.load.py b/doc/python_api/examples/bpy.types.BlendDataLibraries.load.py
index 42e2a71cc70..5e7022c88b4 100644
--- a/doc/python_api/examples/bpy.types.BlendDataLibraries.load.py
+++ b/doc/python_api/examples/bpy.types.BlendDataLibraries.load.py
@@ -23,11 +23,6 @@ with bpy.data.libraries.load(filepath) as (data_from, data_to):
setattr(data_to, attr, getattr(data_from, attr))
-# the 'data_to' variables lists are
-with bpy.data.libraries.load(filepath) as (data_from, data_to):
- data_to.scenes = ["Scene"]
-
-
# the loaded objects can be accessed from 'data_to' outside of the context
# since loading the data replaces the strings for the datablocks or None
# if the datablock could not be loaded.
diff --git a/doc/python_api/examples/bpy.types.ID.user_clear.1.py b/doc/python_api/examples/bpy.types.ID.user_clear.1.py
new file mode 100644
index 00000000000..68c35caa7d4
--- /dev/null
+++ b/doc/python_api/examples/bpy.types.ID.user_clear.1.py
@@ -0,0 +1,19 @@
+"""
+User Clear
+++++++++++
+This function is for advanced use only, misuse can crash blender since the user
+count is used to prevent data being removed when it is used.
+"""
+
+# This example shows what _not_ to do, and will crash blender.
+import bpy
+
+# object which is in the scene.
+obj = bpy.data.objects["Cube"]
+
+# without this, removal would raise an error.
+obj.user_clear()
+
+# runs without an exception
+# but will crash on redraw.
+bpy.data.objects.remove(obj)
diff --git a/doc/python_api/rst/info_gotcha.rst b/doc/python_api/rst/info_gotcha.rst
new file mode 100644
index 00000000000..c97fc3ab427
--- /dev/null
+++ b/doc/python_api/rst/info_gotcha.rst
@@ -0,0 +1,405 @@
+********
+Gotcha's
+********
+
+This document attempts to help you work with the Blender API in areas that can be troublesome and avoid practices that are known to give instability.
+
+
+Using Operators
+===============
+
+Blender's operators are tools for users to access, that python can access them too is very useful nevertheless operators have limitations that can make them cumbersome to script.
+
+Main limits are...
+
+* Can't pass data such as objects, meshes or materials to operate on (operators use the context instead)
+
+* The return value from calling an operator gives the success (if it finished or was canceled),
+ in some cases it would be more logical from an API perspective to return the result of the operation.
+
+* Operators poll function can fail where an API function would raise an exception giving details on exactly why.
+
+
+Why does an operator's poll fail?
+---------------------------------
+
+When calling an operator gives an error like this:
+
+ >>> bpy.ops.action.clean(threshold=0.001)
+ RuntimeError: Operator bpy.ops.action.clean.poll() failed, context is incorrect
+
+Which raises the question as to what the correct context might be?
+
+Typically operators check for the active area type, a selection or active object they can operate on, but some operators are more picky about when they run.
+
+In most cases you can figure out what context an operator needs simply be seeing how its used in Blender and thinking about what it does.
+
+
+Unfortunately if you're still stuck - the only way to **really** know whats going on is to read the source code for the poll function and see what its checking.
+
+For python operators its not so hard to find the source since its included with with Blender and the source file/line is included in the operator reference docs.
+
+Downloading and searching the C code isn't so simple, especially if you're not familiar with the C language but by searching the operator name or description you should be able to find the poll function with no knowledge of C.
+
+.. note::
+
+ Blender does have the functionality for poll functions to describe why they fail, but its currently not used much, if you're interested to help improve our API feel free to add calls to ``CTX_wm_operator_poll_msg_set`` where its not obvious why poll fails.
+
+ >>> bpy.ops.gpencil.draw()
+ RuntimeError: Operator bpy.ops.gpencil.draw.poll() Failed to find Grease Pencil data to draw into
+
+
+The operator still doesn't work!
+--------------------------------
+
+Certain operators in Blender are only intended for use in a specific context, some operators for example are only called from the properties window where they check the current material, modifier or constraint.
+
+Examples of this are:
+
+* :mod:`bpy.ops.texture.slot_move`
+* :mod:`bpy.ops.constraint.limitdistance_reset`
+* :mod:`bpy.ops.object.modifier_copy`
+* :mod:`bpy.ops.buttons.file_browse`
+
+Another possibility is that you are the first person to attempt to use this operator in a script and some modifications need to be made to the operator to run in a different context, if the operator should logically be able to run but fails when accessed from a script it should be reported to the bug tracker.
+
+
+Stale Data
+==========
+
+No updates after setting values
+-------------------------------
+
+Sometimes you want to modify values from python and immediately access the updated values, eg:
+
+Once changing the objects :class:`bpy.types.Object.location` you may want to access its transformation right after from :class:`bpy.types.Object.matrix_world`, but this doesn't work as you might expect.
+
+Consider the calculations that might go into working out the objects final transformation, this includes:
+
+* animation function curves.
+* drivers and their pythons expressions.
+* constraints
+* parent objects and all of their f-curves, constraints etc.
+
+To avoid expensive recalculations every time a property is modified, Blender defers making the actual calculations until they are needed.
+
+However, while the script runs you may want to access the updated values.
+
+This can be done by calling :class:`bpy.types.Scene.update` after modifying values which recalculates all data that is tagged to be updated.
+
+
+Can I redraw during the script?
+-------------------------------
+
+The official answer to this is no, or... *"You don't want to do that"*.
+
+To give some background on the topic...
+
+While a script executes Blender waits for it to finish and is effectively locked until its done, while in this state Blender won't redraw or respond to user input.
+Normally this is not such a problem because scripts distributed with Blender tend not to run for an extended period of time, nevertheless scripts *can* take ages to execute and its nice to see whats going on in the view port.
+
+Tools that lock Blender in a loop and redraw are highly discouraged since they conflict with Blenders ability to run multiple operators at once and update different parts of the interface as the tool runs.
+
+So the solution here is to write a **modal** operator, that is - an operator which defines a modal() function, See the modal operator template in the text editor.
+
+Modal operators execute on user input or setup their own timers to run frequently, they can handle the events or pass through to be handled by the keymap or other modal operators.
+
+Transform, Painting, Fly-Mode and File-Select are example of a modal operators.
+
+Writing modal operators takes more effort then a simple ``for`` loop that happens to redraw but is more flexible and integrates better with Blenders design.
+
+
+**Ok, Ok! I still want to draw from python**
+
+If you insist - yes its possible, but scripts that use this hack wont be considered for inclusion in Blender and any issues with using it wont be considered bugs, this is also not guaranteed to work in future releases.
+
+.. code-block:: python
+
+ bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1)
+
+
+Matrix multiplication is wrong
+==============================
+
+Every so often users complain that Blenders matrix math is wrong, the confusion comes from mathutils matrices being column-major to match OpenGL and the rest of Blenders matrix operations and stored matrix data.
+
+This is different to **numpy** which is row-major which matches what you would expect when using conventional matrix math notation.
+
+
+I can't edit the mesh in edit-mode!
+===================================
+
+Blenders EditMesh is an internal data structure (not saved and not exposed to python), this gives the main annoyance that you need to exit edit-mode to edit the mesh from python.
+
+The reason we have not made much attempt to fix this yet is because we
+will likely move to BMesh mesh API eventually, so any work on the API now will be wasted effort.
+
+With the BMesh API we may expose mesh data to python so we can
+write useful tools in python which are also fast to execute while in edit-mode.
+
+For the time being this limitation just has to be worked around but we're aware its frustrating needs to be addressed.
+
+
+EditBones, PoseBones, Bone... Bones
+===================================
+
+Armature Bones in Blender have three distinct data structures that contain them. If you are accessing the bones through one of them, you may not have access to the properties you really need.
+
+.. note::
+
+ In the following examples ``bpy.context.object`` is assumed to be an armature object.
+
+
+Edit Bones
+----------
+
+``bpy.context.object.data.edit_bones`` contains a editbones; to access them you must set the armature mode to edit mode first (editbones do not exist in object or pose mode). Use these to create new bones, set their head/tail or roll, change their parenting relationships to other bones, etc.
+
+Example using :class:`bpy.types.EditBone` in armature editmode:
+
+This is only possible in edit mode.
+
+ >>> bpy.context.object.data.edit_bones["Bone"].head = Vector((1.0, 2.0, 3.0))
+
+This will be empty outside of editmode.
+
+ >>> mybones = bpy.context.selected_editable_bones
+
+Returns an editbone only in edit mode.
+
+ >>> bpy.context.active_bone
+
+
+Bones (Object Mode)
+-------------------
+
+``bpy.context.object.data.bones`` contains bones. These *live* in object mode, and have various properties you can change, note that the head and tail properties are read-only.
+
+Example using :class:`bpy.types.Bone` in object or pose mode:
+
+Returns a bone (not an editbone) outside of edit mode
+
+ >>> bpy.context.active_bone
+
+This works, as with blender the setting can be edited in any mode
+
+ >>> bpy.context.object.data.bones["Bone"].use_deform = True
+
+Accessible but read-only
+
+ >>> tail = myobj.data.bones["Bone"].tail
+
+
+Pose Bones
+----------
+
+``bpy.context.object.pose.bones`` contains pose bones. This is where animation data resides, i.e. animatable transformations are applied to pose bones, as are constraints and ik-settings.
+
+Examples using :class:`bpy.types.PoseBone` in object or pose mode:
+
+.. code-block:: python
+
+ # Gets the name of the first constraint (if it exists)
+ bpy.context.object.pose.bones["Bone"].constraints[0].name
+
+ # Gets the last selected pose bone (pose mode only)
+ bpy.context.active_pose_bone
+
+
+.. note::
+
+ Notice the pose is accessed from the object rather than the object data, this is why blender can have 2 or more objects sharing the same armature in different poses.
+
+.. note::
+
+ Strictly speaking PoseBone's are not bones, they are just the state of the armature, stored in the :class:`bpy.types.Object` rather than the :class:`bpy.types.Armature`, the real bones are however accessible from the pose bones - :class:`bpy.types.PoseBone.bone`
+
+
+Armature Mode Switching
+-----------------------
+
+While writing scripts that deal with armatures you may find you have to switch between modes, when doing so take care when switching out of editmode not to keep references to the edit-bones or their head/tail vectors. Further access to these will crash blender so its important the script clearly separates sections of the code which operate in different modes.
+
+This is mainly an issue with editmode since pose data can be manipulated without having to be in pose mode, however for operator access you may still need to enter pose mode.
+
+
+Unicode Problems
+================
+
+Python supports many different encpdings so there is nothing stopping you from writing a script in latin1 or iso-8859-15.
+
+See `pep-0263 `_
+
+However this complicates things for the python api because blend files themselves dont have an encoding.
+
+To simplify the problem for python integration and script authors we have decieded all strings in blend files **must** be UTF-8 or ASCII compatible.
+
+This means assigning strings with different encodings to an object names for instance will raise an error.
+
+Paths are an exception to this rule since we cannot ignore the existane of non-utf-8 paths on peoples filesystems.
+
+This means seemingly harmless expressions can raise errors, eg.
+
+ >>> print(bpy.data.filepath)
+ UnicodeEncodeError: 'ascii' codec can't encode characters in position 10-21: ordinal not in range(128)
+
+ >>> bpy.context.object.name = bpy.data.filepath
+ Traceback (most recent call last):
+ File "", line 1, in
+ TypeError: bpy_struct: item.attr= val: Object.name expected a string type, not str
+
+
+Here are 2 ways around filesystem encoding issues:
+
+ >>> print(repr(bpy.data.filepath))
+
+ >>> import os
+ >>> filepath_bytes = os.fsencode(bpy.data.filepath)
+ >>> filepath_utf8 = filepath_bytes.decode('utf-8', "replace")
+ >>> bpy.context.object.name = filepath_utf8
+
+
+Unicode encoding/decoding is a big topic with comprehensive python documentation, to avoid getting stuck too deep in encoding problems - here are some suggestions:
+
+* Always use utf-8 encoiding or convert to utf-8 where the input is unknown.
+
+* Avoid manipulating filepaths as strings directly, use ``os.path`` functions instead.
+
+* Use ``os.fsencode()`` / ``os.fsdecode()`` rather then the built in string decoding functions when operating on paths.
+
+* To print paths or to include them in the user interface use ``repr(path)`` first or ``"%r" % path`` with string formatting.
+
+* **Possibly** - use bytes instead of python strings, when reading some input its less trouble to read it as binary data though you will still need to deciede how to treat any strings you want to use with Blender, some importers do this.
+
+
+Strange errors using 'threading' module
+=======================================
+
+Python threading with Blender only works properly when the threads finish up before the script does. By using ``threading.join()`` for example.
+
+Heres an example of threading supported by Blender:
+
+.. code-block:: python
+
+ import threading
+ import time
+
+ def prod():
+ print(threading.current_thread().name, "Starting")
+
+ # do something vaguely useful
+ import bpy
+ from mathutils import Vector
+ from random import random
+
+ prod_vec = Vector((random() - 0.5, random() - 0.5, random() - 0.5))
+ print("Prodding", prod_vec)
+ bpy.data.objects["Cube"].location += prod_vec
+ time.sleep(random() + 1.0)
+ # finish
+
+ print(threading.current_thread().name, "Exiting")
+
+ threads = [threading.Thread(name="Prod %d" % i, target=prod) for i in range(10)]
+
+
+ print("Starting threads...")
+
+ for t in threads:
+ t.start()
+
+ print("Waiting for threads to finish...")
+
+ for t in threads:
+ t.join()
+
+
+This an example of a timer which runs many times a second and moves the default cube continuously while Blender runs (Unsupported).
+
+.. code-block:: python
+
+ def func():
+ print("Running...")
+ import bpy
+ bpy.data.objects['Cube'].location.x += 0.05
+
+ def my_timer():
+ from threading import Timer
+ t = Timer(0.1, my_timer)
+ t.start()
+ func()
+
+ my_timer()
+
+Use cases like the one above which leave the thread running once the script finishes may seem to work for a while but end up causing random crashes or errors in Blenders own drawing code.
+
+So far no work has gone into making Blenders python integration thread safe, so until its properly supported, best not make use of this.
+
+.. note::
+
+ Pythons threads only allow co-currency and wont speed up you're scripts on multi-processor systems, the ``subprocess`` and ``multiprocess`` modules can be used with blender and make use of multiple CPU's too.
+
+
+Help! My script crashes Blender
+===============================
+
+Ideally it would be impossible to crash Blender from python however there are some problems with the API where it can be made to crash.
+
+Strictly speaking this is a bug in the API but fixing it would mean adding memory verification on every access since most crashes are caused by the python objects referencing Blenders memory directly, whenever the memory is freed, further python access to it can crash the script. But fixing this would make the scripts run very slow, or writing a very different kind of API which doesn't reference the memory directly.
+
+Here are some general hints to avoid running into these problems.
+
+* Be aware of memory limits, especially when working with large lists since Blender can crash simply by running out of memory.
+
+* Many hard to fix crashes end up being because of referencing freed data, when removing data be sure not to hold any references to it.
+
+* Modules or classes that remain active while Blender is used, should not hold references to data the user may remove, instead, fetch data from the context each time the script is activated.
+
+* Crashes may not happen every time, they may happen more on some configurations/operating-systems.
+
+
+Undo/Redo
+---------
+
+Undo invalidates all :class:`bpy.types.ID` instances (Object, Scene, Mesh etc).
+
+This example shows how you can tell undo changes the memory locations.
+
+ >>> hash(bpy.context.object)
+ -9223372036849950810
+ >>> hash(bpy.context.object)
+ -9223372036849950810
+
+ # ... move the active object, then undo
+
+ >>> hash(bpy.context.object)
+ -9223372036849951740
+
+As suggested above, simply not holding references to data when Blender is used interactively by the user is the only way to ensure the script doesn't become unstable.
+
+
+Array Re-Allocation
+-------------------
+
+When adding new points to a curve or vertices's/edges/faces to a mesh, internally the array which stores this data is re-allocated.
+
+.. code-block:: python
+
+ bpy.ops.curve.primitive_bezier_curve_add()
+ point = bpy.context.object.data.splines[0].bezier_points[0]
+ bpy.context.object.data.splines[0].bezier_points.add()
+
+ # this will crash!
+ point.co = 1.0, 2.0, 3.0
+
+This can be avoided by re-assigning the point variables after adding the new one or by storing indices's to the points rather then the points themselves.
+
+The best way is to sidestep the problem altogether add all the points to the curve at once. This means you don't have to worry about array re-allocation and its faster too since reallocating the entire array for every point added is inefficient.
+
+
+Removing Data
+-------------
+
+**Any** data that you remove shouldn't be modified or accessed afterwards, this includes f-curves, drivers, render layers, timeline markers, modifiers, constraints along with objects, scenes, groups, bones.. etc.
+
+This is a problem in the API at the moment that we should eventually solve.
diff --git a/doc/python_api/rst/info_overview.rst b/doc/python_api/rst/info_overview.rst
new file mode 100644
index 00000000000..fe730088c44
--- /dev/null
+++ b/doc/python_api/rst/info_overview.rst
@@ -0,0 +1,373 @@
+*******************
+Python API Overview
+*******************
+
+This document is to give an understanding of how python and blender fit together, covering some of the functionality that isn't obvious from reading the API reference and example scripts.
+
+
+Python in Blender
+=================
+
+Blender embeds a python interpreter which is started with blender and stays active. This interpreter runs scripts to draw the user interface and is used for some of Blender's internal tools too.
+
+This is a typical python environment so tutorials on how to write python scripts will work running the scripts in blender too. Blender provides the :mod:`bpy` module to the python interpreter. This module can be imported in a script and gives access to blender data, classes, and functions. Scripts that deal with blender data will need to import this module.
+
+Here is a simple example of moving a vertex of the object named **Cube**:
+
+.. code-block:: python
+
+ import bpy
+ bpy.data.objects["Cube"].data.vertices[0].co.x += 1.0
+
+This modifies Blender's internal data directly. When you run this in the interactive console you will see the 3D viewport update.
+
+
+The Default Environment
+=======================
+
+When developing your own scripts it may help to understand how blender sets up its python environment. Many python scripts come bundled with blender and can be used as a reference because they use the same API that script authors write tools in. Typical usage for scripts include: user interface, import/export, scene manipulation, automation, defining your own toolset and customization.
+
+On startup blender scans the ``scripts/startup/`` directory for python modules and imports them. The exact location of this directory depends on your installation. `See the directory layout docs `_
+
+
+Script Loading
+==============
+
+This may seem obvious but it's important to note the difference between executing a script directly or importing it as a module.
+
+Scripts that extend blender - define classes that exist beyond the scripts execution, this makes future access to these classes (to unregister for example) more difficult than importing as a module where class instance is kept in the module and can be accessed by importing that module later on.
+
+For this reason it's preferable to only use directly execute scripts that don't extend blender by registering classes.
+
+
+Here are some ways to run scripts directly in blender.
+
+* Loaded in the text editor and press **Run Script**.
+
+* Typed or pasted into the interactive console.
+
+* Execute a python file from the command line with blender, eg:
+
+ ``blender --python /home/me/my_script.py``
+
+
+To run as modules:
+
+* The obvious way, ``import some_module`` command from the text window or interactive console.
+
+* Open as a text block and tick "Register" option, this will load with the blend file.
+
+* copy into one of the directories ``scripts/startup``, where they will be automatically imported on startup.
+
+* define as an addon, enabling the addon will load it as a python module.
+
+
+Addons
+------
+
+Some of blenders functionality is best kept optional, alongside scripts loaded at startup we have addons which are kept in their own directory ``scripts/addons``, and only load on startup if selected from the user preferences.
+
+The only difference between addons and built-in python modules is that addons must contain a **bl_info** variable which blender uses to read metadata such as name, author, category and URL.
+
+The user preferences addon listing uses **bl_info** to display information about each addon.
+
+`See Addons `_ for details on the **bl_info** dictionary.
+
+
+Integration through Classes
+===========================
+
+Running python scripts in the text editor is useful for testing but you’ll want to extend blender to make tools accessible like other built-in functionality.
+
+The blender python api allows integration for:
+
+* :class:`bpy.types.Panel`
+
+* :class:`bpy.types.Menu`
+
+* :class:`bpy.types.Operator`
+
+* :class:`bpy.types.PropertyGroup`
+
+* :class:`bpy.types.KeyingSet`
+
+* :class:`bpy.types.RenderEngine`
+
+
+This is intentionally limited. Currently, for more advanced features such as mesh modifiers, object types, or shader nodes, C/C++ must be used.
+
+For python intergration Blender defines methods which are common to all types. This works by creating a python subclass of a Blender class which contains variables and functions specified by the parent class which are pre-defined to interface with Blender.
+
+For example:
+
+.. code-block:: python
+
+ import bpy
+ class SimpleOperator(bpy.types.Operator):
+ bl_idname = "object.simple_operator"
+ bl_label = "Tool Name"
+
+ def execute(self, context):
+ print("Hello World")
+ return {'FINISHED'}
+
+ bpy.utils.register_class(SimpleOperator)
+
+First note that we subclass a member of :mod:`bpy.types`, this is common for all classes which can be integrated with blender and used so we know if this is an Operator and not a Panel when registering.
+
+Both class properties start with a **bl_** prefix. This is a convention used to distinguish blender properties from those you add yourself.
+
+Next see the execute function, which takes an instance of the operator and the current context. A common prefix is not used for functions.
+
+Lastly the register function is called, this takes the class and loads it into blender. See `Class Registration`_.
+
+Regarding inheritance, blender doesn't impose restrictions on the kinds of class inheritance used, the registration checks will use attributes and functions defined in parent classes.
+
+class mix-in example:
+
+.. code-block:: python
+
+ import bpy
+ class BaseOperator:
+ def execute(self, context):
+ print("Hello World BaseClass")
+ return {'FINISHED'}
+
+ class SimpleOperator(bpy.types.Operator, BaseOperator):
+ bl_idname = "object.simple_operator"
+ bl_label = "Tool Name"
+
+ bpy.utils.register_class(SimpleOperator)
+
+Notice these classes don't define an ``__init__(self)`` function. While ``__init__()`` and ``__del__()`` will be called if defined, the class instances lifetime only spans the execution. So a panel for example will have a new instance for every redraw, for this reason there is rarely a cause to store variables in the panel instance. Instead, persistent variables should be stored in Blenders data so that the state can be restored when blender is restarted.
+
+.. note:: Modal operators are an exception, keeping their instance variable as blender runs, see modal operator template.
+
+So once the class is registered with blender, instancing the class and calling the functions is left up to blender. In fact you cannot instance these classes from the script as you would expect with most python API's.
+
+To run operators you can call them through the operator api, eg:
+
+.. code-block:: python
+
+ import bpy
+ bpy.ops.object.simple_operator()
+
+User interface classes are given a context in which to draw, buttons window, file header, toolbar etc, then they are drawn when that area is displayed so they are never called by python scripts directly.
+
+
+Registration
+============
+
+
+Module Registration
+-------------------
+
+Blender modules loaded at startup require ``register()`` and ``unregister()`` functions. These are the *only* functions that blender calls from your code, which is otherwise a regular python module.
+
+A simple blender/python module can look like this:
+
+.. code-block:: python
+
+ import bpy
+
+ class SimpleOperator(bpy.types.Operator):
+ """ See example above """
+
+ def register():
+ bpy.utils.register_class(SimpleOperator)
+
+ def unregister():
+ bpy.utils.unregister_class(SimpleOperator)
+
+ if __name__ == "__main__":
+ register()
+
+These functions usually appear at the bottom of the script containing class registration sometimes adding menu items. You can also use them for internal purposes setting up data for your own tools but take care since register won't re-run when a new blend file is loaded.
+
+The register/unregister calls are used so it's possible to toggle addons and reload scripts while blender runs.
+If the register calls were placed in the body of the script, registration would be called on import, meaning there would be no distinction between importing a module or loading its classes into blender.
+
+This becomes problematic when a script imports classes from another module making it difficult to manage which classes are being loaded and when.
+
+The last 2 lines are only for testing:
+
+.. code-block:: python
+
+ if __name__ == "__main__":
+ register()
+
+This allows the script to be run directly in the text editor to test changes.
+This ``register()`` call won't run when the script is imported as a module since ``__main__`` is reserved for direct execution.
+
+
+Class Registration
+------------------
+
+Registering a class with blender results in the class definition being loaded into blender, where it becomes available alongside existing functionality.
+
+Once this class is loaded you can access it from :mod:`bpy.types`, using the bl_idname rather than the classes original name.
+
+When loading a class, blender performs sanity checks making sure all required properties and functions are found, that properties have the correct type, and that functions have the right number of arguments.
+
+Mostly you will not need concern yourself with this but if there is a problem with the class definition it will be raised on registering:
+
+Using the function arguments ``def execute(self, context, spam)``, will raise an exception:
+
+``ValueError: expected Operator, SimpleOperator class "execute" function to have 2 args, found 3``
+
+Using ``bl_idname = 1`` will raise.
+
+``TypeError: validating class error: Operator.bl_idname expected a string type, not int``
+
+
+Multiple-Classes
+^^^^^^^^^^^^^^^^
+
+Loading classes into blender is described above, for simple cases calling :mod:`bpy.utils.register_class` (SomeClass) is sufficient, but when there are many classes or a packages submodule has its own classes it can be tedious to list them all for registration.
+
+For more convenient loading/unloading :mod:`bpy.utils.register_module` (module) and :mod:`bpy.utils.unregister_module` (module) functions exist.
+
+A script which defines many of its own operators, panels menus etc. you only need to write:
+
+.. code-block:: python
+
+ def register():
+ bpy.utils.register_module(__name__)
+
+ def unregister():
+ bpy.utils.unregister_module(__name__)
+
+Internally blender collects subclasses on registrable types, storing them by the module in which they are defined. By passing the module name to :mod:`bpy.utils.register_module` blender can register all classes created by this module and its submodules.
+
+
+Inter Classes Dependencies
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+When customizing blender you may want to group your own settings together, after all, they will likely have to co-exist with other scripts. To group these properties classes need to be defined, for groups within groups or collections within groups you can find yourself having to deal with order of registration/unregistration.
+
+Custom properties groups are themselves classes which need to be registered.
+
+Say you want to store material settings for a custom engine.
+
+.. code-block:: python
+
+ # Create new property
+ # bpy.data.materials[0].my_custom_props.my_float
+ import bpy
+
+ class MyMaterialProps(bpy.types.PropertyGroup):
+ my_float = bpy.props.FloatProperty()
+
+ def register():
+ bpy.utils.register_class(MyMaterialProps)
+ bpy.types.Material.my_custom_props = bpy.props.PointerProperty(type=MyMaterialProps)
+
+ def unregister():
+ del bpy.types.Material.my_custom_props
+ bpy.utils.unregister_class(MyMaterialProps)
+
+ if __name__ == "__main__":
+ register()
+
+.. note::
+
+ *The class must be registered before being used in a property, failing to do so will raise an error:*
+
+ ``ValueError: bpy_struct "Material" registration error: my_custom_props could not register``
+
+
+.. code-block:: python
+
+ # Create new property group with a sub property
+ # bpy.data.materials[0].my_custom_props.sub_group.my_float
+ import bpy
+
+ class MyMaterialSubProps(bpy.types.PropertyGroup):
+ my_float = bpy.props.FloatProperty()
+
+ class MyMaterialGroupProps(bpy.types.PropertyGroup):
+ sub_group = bpy.props.PointerProperty(type=MyMaterialSubProps)
+
+ def register():
+ bpy.utils.register_class(MyMaterialSubProps)
+ bpy.utils.register_class(MyMaterialGroupProps)
+ bpy.types.Material.my_custom_props = bpy.props.PointerProperty(type=MyMaterialGroupProps)
+
+ def unregister():
+ del bpy.types.Material.my_custom_props
+ bpy.utils.unregister_class(MyMaterialGroupProps)
+ bpy.utils.unregister_class(MyMaterialSubProps)
+
+ if __name__ == "__main__":
+ register()
+
+.. note::
+
+ *The lower most class needs to be registered first and that unregister() is a mirror of register()*
+
+
+Manipulating Classes
+^^^^^^^^^^^^^^^^^^^^
+
+Properties can be added and removed as blender runs, normally happens on register or unregister but for some special cases it may be useful to modify types as the script runs.
+
+For example:
+
+.. code-block:: python
+
+ # add a new property to an existing type
+ bpy.types.Object.my_float = bpy.props.FloatProperty()
+ # remove
+ del bpy.types.Object.my_float
+
+This works just as well for PropertyGroup subclasses you define yourself.
+
+.. code-block:: python
+
+ class MyPropGroup(bpy.types.PropertyGroup):
+ pass
+ MyPropGroup.my_float = bpy.props.FloatProperty()
+
+...this is equivalent to:
+
+.. code-block:: python
+
+ class MyPropGroup(bpy.types.PropertyGroup):
+ my_float = bpy.props.FloatProperty()
+
+
+Dynamic Defined-Classes (Advanced)
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+In some cases the specifier for data may not be in blender, renderman shader definitions for example and it may be useful to define types and remove them on the fly.
+
+.. code-block:: python
+
+ for i in range(10):
+ idname = "object.operator_%d" % i
+
+ def func(self, context):
+ print("Hello World", self.bl_idname)
+ return {'FINISHED'}
+
+ opclass = type("DynOp%d" % i,
+ (bpy.types.Operator, ),
+ {"bl_idname": idname, "bl_label": "Test", "execute": func},
+ )
+ bpy.utils.register_class(opclass)
+
+.. note::
+
+ Notice ``type()`` is called to define the class. This is an alternative syntax for class creation in python, better suited to constructing classes dynamically.
+
+
+Calling these operators:
+
+ >>> bpy.ops.object.operator_1()
+ Hello World OBJECT_OT_operator_1
+ {'FINISHED'}
+
+ >>> bpy.ops.object.operator_2()
+ Hello World OBJECT_OT_operator_2
+ {'FINISHED'}
+
diff --git a/doc/python_api/rst/info_quickstart.rst b/doc/python_api/rst/info_quickstart.rst
new file mode 100644
index 00000000000..e77e9a76d7f
--- /dev/null
+++ b/doc/python_api/rst/info_quickstart.rst
@@ -0,0 +1,468 @@
+***********************
+Quickstart Introduction
+***********************
+
+Intro
+=====
+
+This API is generally stable but some areas are still being added and improved.
+
+The Blender/Python API can do the following:
+
+* Edit any data the user interface can (Scenes, Meshes, Particles etc.)
+
+* Modify user preferences, keymaps and themes
+
+* Run tools with own settings
+
+* Create user interface elements such as menus, headers and panels
+
+* Create new tools
+
+* Create interactive tools
+
+* Create new rendering engines that integrate with Blender
+
+* Define new settings in existing Blender data
+
+* Draw in the 3D view using OpenGL commands from Python
+
+
+The Blender/Python API **can't** (yet)...
+
+* Create new space types.
+
+* Assign custom properties to every type.
+
+* Define callbacks or listeners to be notified when data is changed.
+
+
+Before Starting
+===============
+
+This document isn't intended to fully cover each topic. Rather, its purpose is to familiarize you with Blender 2.5's new Python API.
+
+
+A quick list of helpful things to know before starting:
+
+* Blender uses Python 3.x; some 3rd party extensions are not available yet.
+
+* The interactive console in Blender 2.5 has been improved; testing one-liners in the console is a good way to learn.
+
+* Button tool tips show Python attributes and operator names.
+
+* Right clicking on buttons and menu items directly links to API documentation.
+
+* For more examples, the text menu has a templates section where some example operators can be found.
+
+* To examine further scripts distributed with Blender, see ``~/.blender/scripts/startup/bl_ui`` for the user interface and ``~/.blender/scripts/startup/bl_op`` for operators.
+
+
+Key Concepts
+============
+
+Data Access
+-----------
+
+Accessing datablocks
+^^^^^^^^^^^^^^^^^^^^
+
+Python accesses Blender's data in the same way as the animation system and user interface, which means any setting that is changed via a button can also be changed from Python.
+
+Accessing data from the currently loaded blend file is done with the module :mod:`bpy.data`. This gives access to library data. For example:
+
+ >>> bpy.data.objects
+
+
+ >>> bpy.data.scenes
+
+
+ >>> bpy.data.materials
+
+
+
+About Collections
+^^^^^^^^^^^^^^^^^
+
+You'll notice that an index as well as a string can be used to access members of the collection.
+
+Unlike Python's dictionaries, both methods are acceptable; however, the index of a member may change while running Blender.
+
+ >>> list(bpy.data.objects)
+ [bpy.data.objects["Cube"], bpy.data.objects["Plane"]]
+
+ >>> bpy.data.objects['Cube']
+ bpy.data.objects["Cube"]
+
+ >>> bpy.data.objects[0]
+ bpy.data.objects["Cube"]
+
+
+Accessing attributes
+^^^^^^^^^^^^^^^^^^^^
+
+Once you have a data block such as a material, object, groups etc. its attributes can be accessed just like changing a setting in the interface; in fact, the button tooltip also displays the Python attribute which can help in finding what settings to change in a script.
+
+ >>> bpy.data.objects[0].name
+ 'Camera'
+
+ >>> bpy.data.scenes["Scene"]
+ bpy.data.scenes['Scene']
+
+ >>> bpy.data.materials.new("MyMaterial")
+ bpy.data.materials['MyMaterial']
+
+
+For testing what data to access it's useful to use the "Console", which is its own space type in Blender 2.5. This supports auto-complete, giving you a fast way to dig into different data in your file.
+
+Example of a data path that can be quickly found via the console:
+
+ >>> bpy.data.scenes[0].render.resolution_percentage
+ 100
+ >>> bpy.data.scenes[0].objects["Torus"].data.vertices[0].co.x
+ 1.0
+
+
+Custom Properties
+^^^^^^^^^^^^^^^^^
+
+Python can access properties on any datablock that has an ID (data that can be linked in and accessed from :mod:`bpy.data`. When assigning a property, you can make up your own names, these will be created when needed or overwritten if they exist.
+
+This data is saved with the blend file and copied with objects.
+
+Example:
+
+.. code-block:: python
+
+ bpy.context.object["MyOwnProperty"] = 42
+
+ if "SomeProp" in bpy.context.object:
+ print("Property found")
+
+ # Use the get function like a python dictionary
+ # which can have a fallback value.
+ value = bpy.data.scenes["Scene"].get("test_prop", "fallback value")
+
+ # dictionaries can be assigned as long as they only use basic types.
+ group = bpy.data.groups.new("MyTestGroup")
+ group["GameSettings"] = {"foo": 10, "bar": "spam", "baz": {}}
+
+ del group["GameSettings"]
+
+
+Note that these properties can only be assigned basic Python types.
+
+* int, float, string
+
+* array of ints/floats
+
+* dictionary (only string keys types on this list)
+
+These properties are valid outside of Python. They can be animated by curves or used in driver paths.
+
+
+Context
+-------
+
+While it's useful to be able to access data directly by name or as a list, it's more common to operate on the user's selection. The context is always available from '''bpy.context''' and can be used to get the active object, scene, tool settings along with many other attributes.
+
+Common-use cases:
+
+ >>> bpy.context.object
+ >>> bpy.context.selected_objects
+ >>> bpy.context.visible_bones
+
+Note that the context is read-only. These values cannot be modified directly, though they may be changed by running API functions or by using the data API.
+
+So ``bpy.context.object = obj`` will raise an error.
+
+But ``bpy.context.scene.objects.active = obj`` will work as expected.
+
+
+The context attributes change depending on where it is accessed. The 3D view has different context members to the Console, so take care when accessing context attributes that the user state is known.
+
+See :mod:`bpy.context` API reference
+
+
+Operators (Tools)
+-----------------
+
+Operators are tools generally accessed by the user from buttons, menu items or key shortcuts. From the user perspective they are a tool but Python can run these with its own settings through the :mod:`bpy.ops` module.
+
+Examples:
+
+ >>> bpy.ops.mesh.flip_normals()
+ {'FINISHED'}
+ >>> bpy.ops.mesh.hide(unselected=False)
+ {'FINISHED'}
+ >>> bpy.ops.object.scale_apply()
+ {'FINISHED'}
+
+.. note::
+
+ The menu item: Help -> Operator Cheat Sheet" gives a list of all operators and their default values in Python syntax, along with the generated docs. This is a good way to get an overview of all blender's operators.
+
+
+Operator Poll()
+^^^^^^^^^^^^^^^
+
+Many operators have a "poll" function which may check that the mouse is a valid area or that the object is in the correct mode (Edit Mode, Weight Paint etc). When an operator's poll function fails within python, an exception is raised.
+
+For example, calling bpy.ops.view3d.render_border() from the console raises the following error:
+
+.. code-block:: python
+
+ RuntimeError: Operator bpy.ops.view3d.render_border.poll() failed, context is incorrect
+
+In this case the context must be the 3d view with an active camera.
+
+To avoid using try/except clauses wherever operators are called you can call the operators own .poll() function to check if it can run in the current context.
+
+.. code-block:: python
+
+ if bpy.ops.view3d.render_border.poll():
+ bpy.ops.view3d.render_border()
+
+
+Integration
+===========
+
+Python scripts can integrate with Blender in the following ways:
+
+* By defining a rendering engine.
+
+* By defining operators.
+
+* By defining menus, headers and panels.
+
+* By inserting new buttons into existing menus, headers and panels
+
+
+In Python, this is done by defining a class, which is a subclass of an existing type.
+
+
+Example Operator
+----------------
+
+.. literalinclude:: ../../../release/scripts/templates/operator_simple.py
+
+Once this script runs, ``SimpleOperator`` is registered with Blender and can be called from the operator search popup or added to the toolbar.
+
+To run the script:
+
+#. Highlight the above code then press Ctrl+C to copy it.
+
+#. Start Blender
+
+#. Press Ctrl+Right twice to change to the Scripting layout.
+
+#. Press Ctrl+V to paste the code into the text panel (the upper left frame).
+
+#. Click on the button **Run Script**.
+
+#. Move you're mouse into the 3D view, press spacebar for the operator search
+ menu, and type "Simple".
+
+#. Click on the "Simple Operator" item found in search.
+
+
+.. seealso:: The class members with the **bl_** prefix are documented in the API
+ reference :class:`bpy.types.Operator`
+
+
+Example Panel
+-------------
+
+Panels register themselves as a class, like an operator. Notice the extra **bl_** variables used to set the context they display in.
+
+.. literalinclude:: ../../../release/scripts/templates/ui_panel_simple.py
+
+To run the script:
+
+#. Highlight the above code then press Ctrl+C to copy it
+
+#. Start Blender
+
+#. Press Ctrl+Right twice to change to the Scripting layout
+
+#. Press Ctrl+V to paste the code into the text panel (the upper left frame)
+
+#. Click on the button **Run Script**.
+
+
+To view the results:
+
+#. Select the the default cube.
+
+#. Click on the Object properties icon in the buttons panel (far right; appears as a tiny cube).
+
+#. Scroll down to see a panel named **Hello World Panel**.
+
+#. Changing the object name also updates **Hello World Panel's** Name: field.
+
+Note the row distribution and the label and properties that are available through the code.
+
+.. seealso:: :class:`bpy.types.Panel`
+
+
+Types
+=====
+
+Blender defines a number of Python types but also uses Python native types.
+
+Blender's Python API can be split up into 3 categories.
+
+
+Native Types
+------------
+
+In simple cases returning a number or a string as a custom type would be cumbersome, so these are accessed as normal python types.
+
+* blender float/int/boolean -> float/int/boolean
+
+* blender enumerator -> string
+
+ >>> C.object.rotation_mode = 'AXIS_ANGLE'
+
+
+* blender enumerator (multiple) -> set of strings
+
+ .. code-block:: python
+
+ # setting multiple camera overlay guides
+ bpy.context.scene.camera.data.show_guide = {'GOLDEN', 'CENTER'}
+
+ # passing as an operator argument for report types
+ self.report({'WARNING', 'INFO'}, "Some message!")
+
+
+Internal Types
+--------------
+
+Used for Blender datablocks and collections: :class:`bpy.types.bpy_struct`
+
+For data that contains its own attributes groups/meshes/bones/scenes... etc.
+
+There are 2 main types that wrap Blenders data, one for datablocks (known internally as bpy_struct), another for properties.
+
+ >>> bpy.context.object
+ bpy.data.objects['Cube']
+
+ >>> C.scene.objects
+ bpy.data.scenes['Scene'].objects
+
+Note that these types reference Blender's data so modifying them is immediately visible.
+
+
+Mathutils Types
+---------------
+
+Used for vectors, quaternion, eulers, matrix and color types, accessible from :mod:`mathutils`
+
+Some attributes such as :class:`bpy.types.Object.location`, :class:`bpy.types.PoseBone.rotation_euler` and :class:`bpy.types.Scene.cursor_location` can be accessed as special math types which can be used together and manipulated in various useful ways.
+
+Example of a matrix, vector multiplication:
+
+.. code-block:: python
+
+ bpy.context.object.matrix_world * bpy.context.object.data.verts[0].co
+
+.. note::
+
+ mathutils types keep a reference to Blender's internal data so changes can
+ be applied back.
+
+
+ Example:
+
+ .. code-block:: python
+
+ # modifies the Z axis in place.
+ bpy.context.object.location.z += 2.0
+
+ # location variable holds a reference to the object too.
+ location = bpy.context.object.location
+ location *= 2.0
+
+ # Copying the value drops the reference so the value can be passed to
+ # functions and modified without unwanted side effects.
+ location = bpy.context.object.location.copy()
+
+
+Animation
+=========
+
+There are 2 ways to add keyframes through Python.
+
+The first is through key properties directly, which is similar to inserting a keyframe from the button as a user. You can also manually create the curves and keyframe data, then set the path to the property. Here are examples of both methods.
+
+Both examples insert a keyframe on the active object's Z axis.
+
+Simple example:
+
+.. code-block:: python
+
+ obj = bpy.context.object
+ obj.location[2] = 0.0
+ obj.keyframe_insert(data_path="location", frame=10.0, index=2)
+ obj.location[2] = 1.0
+ obj.keyframe_insert(data_path="location", frame=20.0, index=2)
+
+Using Low-Level Functions:
+
+.. code-block:: python
+
+ obj = bpy.context.object
+ obj.animation_data_create()
+ obj.animation_data.action = bpy.data.actions.new(name="MyAction")
+ fcu_z = obj.animation_data.action.fcurves.new(data_path="location", index=2)
+ fcu_z.keyframe_points.add(2)
+ fcu_z.keyframe_points[0].co = 10.0, 0.0
+ fcu_z.keyframe_points[1].co = 20.0, 1.0
+
+
+Style Conventions
+=================
+
+For Blender 2.5 we have chosen to follow python suggested style guide to avoid mixing styles amongst our own scripts and make it easier to use python scripts from other projects.
+
+Using our style guide for your own scripts makes it easier if you eventually want to contribute them to blender.
+
+This style guide is known as pep8 and can be found `here `_
+
+A brief listing of pep8 criteria.
+
+* camel caps for class names: MyClass
+
+* all lower case underscore separated module names: my_module
+
+* indentation of 4 spaces (no tabs)
+
+* spaces around operators. ``1 + 1``, not ``1+1``
+
+* only use explicit imports, (no importing '*')
+
+* don't use single line: ``if val: body``, separate onto 2 lines instead.
+
+
+As well as pep8 we have other conventions used for blender python scripts.
+
+* Use single quotes for enums, and double quotes for strings.
+
+ Both are of course strings but in our internal API enums are unique items from a limited set. eg.
+
+ .. code-block:: python
+
+ bpy.context.scene.render.file_format = 'PNG'
+ bpy.context.scene.render.filepath = "//render_out"
+
+* pep8 also defines that lines should not exceed 79 characters, we felt this is too restrictive so this is optional per script.
+
+Periodically we run checks for pep8 compliance on blender scripts, for scripts to be included in this check add this line as a comment at the top of the script.
+
+``# ``
+
+To enable line length checks use this instead.
+
+``# ``
+
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index f8561c719bc..6d29c57c91f 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -60,11 +60,13 @@ if __import__("sys").modules.get("bpy") is None:
# Switch for quick testing
if 1:
# full build
+ EXCLUDE_INFO_DOCS = False
EXCLUDE_MODULES = ()
FILTER_BPY_TYPES = None
FILTER_BPY_OPS = None
else:
+ EXCLUDE_INFO_DOCS = False
# for testing so doc-builds dont take so long.
EXCLUDE_MODULES = (
"bpy.context",
@@ -77,7 +79,7 @@ else:
"bpy.types", # supports filtering
"bpy.ops", # supports filtering
"bpy_extras",
- # "bge",
+ "bge",
"aud",
"bgl",
"blf",
@@ -85,7 +87,7 @@ else:
"mathutils.geometry",
)
- FILTER_BPY_TYPES = ("bpy_struct", "Panel", "Menu", "Operator", "RenderEngine") # allow
+ FILTER_BPY_TYPES = ("bpy_struct", "Panel", "ID") # allow
FILTER_BPY_OPS = ("import.scene", ) # allow
# for quick rebuilds
@@ -96,6 +98,13 @@ sphinx-build doc/python_api/sphinx-in doc/python_api/sphinx-out
"""
+# extra info, not api reference docs
+# stored in ./rst/info/
+INFO_DOCS = (
+ ("info_quickstart.rst", "Blender/Python Quickstart: new to blender/scripting and want to get you're feet wet?"),
+ ("info_overview.rst", "Blender/Python API Overview: a more complete explanation of python integration"),
+ ("info_gotcha.rst", "Gotcha's: some of the problems you may come up against when writing scripts"),
+ )
# import rpdb2; rpdb2.start_embedded_debugger('test')
@@ -744,6 +753,8 @@ def pyrna2sphinx(BASEPATH):
descr = prop.name
fw(" `%s`, %s, %s\n\n" % (prop.identifier, descr, type_descr))
+ write_example_ref(" ", fw, "bpy.types." + struct.identifier + "." + func.identifier)
+
fw("\n")
# python methods
@@ -999,14 +1010,17 @@ def rna2sphinx(BASEPATH):
fw("\n")
- fw("============================\n")
- fw("Blender/Python Documentation\n")
- fw("============================\n")
- fw("\n")
- fw("\n")
- fw("* `Quickstart Intro `_ if you are new to scripting in blender and want to get you're feet wet!\n")
- fw("* `Blender/Python Overview `_ for a more complete explanation of python integration in blender\n")
- fw("\n")
+ if not EXCLUDE_INFO_DOCS:
+ fw("============================\n")
+ fw("Blender/Python Documentation\n")
+ fw("============================\n")
+ fw("\n")
+ fw("\n")
+ fw(".. toctree::\n")
+ fw(" :maxdepth: 1\n\n")
+ for info, info_desc in INFO_DOCS:
+ fw(" %s <%s>\n\n" % (info_desc, info))
+ fw("\n")
fw("===================\n")
fw("Application Modules\n")
@@ -1208,6 +1222,11 @@ def rna2sphinx(BASEPATH):
shutil.copy2(os.path.join(BASEPATH, "..", "rst", "change_log.rst"), BASEPATH)
+
+ if not EXCLUDE_INFO_DOCS:
+ for info, info_desc in INFO_DOCS:
+ shutil.copy2(os.path.join(BASEPATH, "..", "rst", info), BASEPATH)
+
if 0:
filepath = os.path.join(BASEPATH, "bpy.rst")
file = open(filepath, "w")
diff --git a/doc/python_api/sphinx_doc_gen.sh b/doc/python_api/sphinx_doc_gen.sh
index a3befe1b7cb..ea55fbb3907 100755
--- a/doc/python_api/sphinx_doc_gen.sh
+++ b/doc/python_api/sphinx_doc_gen.sh
@@ -3,11 +3,21 @@
# bash source/blender/python/doc/sphinx_doc_gen.sh
# ssh upload means you need an account on the server
+
+# ----------------------------------------------------------------------------
+# Upload vars
+
+# disable for testing
+DO_UPLOAD=true
+
BLENDER="./blender.bin"
SSH_USER="ideasman42"
SSH_HOST=$SSH_USER"@emo.blender.org"
SSH_UPLOAD="/data/www/vhosts/www.blender.org/documentation" # blender_python_api_VERSION, added after
+# ----------------------------------------------------------------------------
+# Blender Version & Info
+
# 'Blender 2.53 (sub 1) Build' --> '2_53_1' as a shell script.
# "_".join(str(v) for v in bpy.app.version)
# custom blender vars
@@ -28,28 +38,52 @@ SSH_UPLOAD_FULL=$SSH_UPLOAD/"blender_python_api_"$BLENDER_VERSION
SPHINXBASE=doc/python_api/
+
+# ----------------------------------------------------------------------------
+# Generate reStructuredText (blender/python only)
+
# dont delete existing docs, now partial updates are used for quick builds.
$BLENDER --background --factory-startup --python $SPHINXBASE/sphinx_doc_gen.py
-# html
-sphinx-build $SPHINXBASE/sphinx-in $SPHINXBASE/sphinx-out
-cp $SPHINXBASE/sphinx-out/contents.html $SPHINXBASE/sphinx-out/index.html
-ssh $SSH_USER@emo.blender.org 'rm -rf '$SSH_UPLOAD_FULL'/*'
-rsync --progress -avze "ssh -p 22" $SPHINXBASE/sphinx-out/* $SSH_HOST:$SSH_UPLOAD_FULL/
+# ----------------------------------------------------------------------------
+# Generate HTML (sphinx)
-## symlink the dir to a static URL
-#ssh $SSH_USER@emo.blender.org 'rm '$SSH_UPLOAD'/250PythonDoc && ln -s '$SSH_UPLOAD_FULL' '$SSH_UPLOAD'/250PythonDoc'
+sphinx-build -n -b html $SPHINXBASE/sphinx-in $SPHINXBASE/sphinx-out
-# better redirect
-ssh $SSH_USER@emo.blender.org 'echo "Redirecting...Redirecting..." > '$SSH_UPLOAD'/250PythonDoc/index.html'
-# pdf
-sphinx-build -b latex $SPHINXBASE/sphinx-in $SPHINXBASE/sphinx-out
-cd $SPHINXBASE/sphinx-out
-make
-cd -
+# ----------------------------------------------------------------------------
+# Generate PDF (sphinx/laytex)
-# rename so local PDF has matching name.
+sphinx-build -n -b latex $SPHINXBASE/sphinx-in $SPHINXBASE/sphinx-out
+make -C $SPHINXBASE/sphinx-out
mv $SPHINXBASE/sphinx-out/contents.pdf $SPHINXBASE/sphinx-out/blender_python_reference_$BLENDER_VERSION.pdf
-rsync --progress -avze "ssh -p 22" $SPHINXBASE/sphinx-out/blender_python_reference_$BLENDER_VERSION.pdf $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.pdf
+
+# ----------------------------------------------------------------------------
+# Upload to blender servers, comment this section for testing
+
+if $DO_UPLOAD ; then
+
+ cp $SPHINXBASE/sphinx-out/contents.html $SPHINXBASE/sphinx-out/index.html
+ ssh $SSH_USER@emo.blender.org 'rm -rf '$SSH_UPLOAD_FULL'/*'
+ rsync --progress -avze "ssh -p 22" $SPHINXBASE/sphinx-out/* $SSH_HOST:$SSH_UPLOAD_FULL/
+
+ ## symlink the dir to a static URL
+ #ssh $SSH_USER@emo.blender.org 'rm '$SSH_UPLOAD'/250PythonDoc && ln -s '$SSH_UPLOAD_FULL' '$SSH_UPLOAD'/250PythonDoc'
+
+ # better redirect
+ ssh $SSH_USER@emo.blender.org 'echo "Redirecting...Redirecting..." > '$SSH_UPLOAD'/250PythonDoc/index.html'
+
+ # rename so local PDF has matching name.
+ rsync --progress -avze "ssh -p 22" $SPHINXBASE/sphinx-out/blender_python_reference_$BLENDER_VERSION.pdf $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.pdf
+
+fi
+
+
+# ----------------------------------------------------------------------------
+# Print some useful text
+
+echo ""
+echo "Finished! view the docs from: "
+echo " html:" $SPHINXBASE/sphinx-out/contents.html
+echo " pdf:" $SPHINXBASE/sphinx-out/blender_python_reference_$BLENDER_VERSION.pdf
diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h
index fae8590568d..d8172902a4c 100644
--- a/intern/ffmpeg/ffmpeg_compat.h
+++ b/intern/ffmpeg/ffmpeg_compat.h
@@ -71,6 +71,7 @@
#define avio_open url_fopen
#define avio_tell url_ftell
#define avio_close url_fclose
+#define avio_size url_fsize
#endif
/* there are some version inbetween, which have avio_... functions but no
@@ -130,4 +131,19 @@ int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
}
#endif
+static inline
+int64_t av_get_pts_from_frame(AVFormatContext *avctx, AVFrame * picture)
+{
+ int64_t pts = picture->pkt_pts;
+
+ if (pts == AV_NOPTS_VALUE) {
+ pts = picture->pkt_dts;
+ }
+ if (pts == AV_NOPTS_VALUE) {
+ pts = 0;
+ }
+
+ return pts;
+}
+
#endif
diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c
index 55340d6011d..2421c25398a 100644
--- a/intern/guardedalloc/intern/mallocn.c
+++ b/intern/guardedalloc/intern/mallocn.c
@@ -429,7 +429,7 @@ static int compare_len(const void *p1, const void *p2)
return -1;
}
-void MEM_printmemlist_stats()
+void MEM_printmemlist_stats(void)
{
MemHead *membl;
MemPrintBlock *pb, *printblock;
diff --git a/intern/itasc/kdl/frames_io.cpp b/intern/itasc/kdl/frames_io.cpp
index d84e95c766b..3db0790cabf 100644
--- a/intern/itasc/kdl/frames_io.cpp
+++ b/intern/itasc/kdl/frames_io.cpp
@@ -133,7 +133,7 @@ std::istream& operator >> (std::istream& is,Vector& v)
{ IOTrace("Stream input Vector (vector or ZERO)");
char storage[10];
EatWord(is,"[]",storage,10);
- if (strlen(storage)==0) {
+ if (storage[0]=='\0') {
Eat(is,'[');
is >> v(0);
Eat(is,',');
@@ -194,7 +194,7 @@ std::istream& operator >> (std::istream& is,Rotation& r)
{ IOTrace("Stream input Rotation (Matrix or EULERZYX, EULERZYZ,RPY, ROT, IDENTITY)");
char storage[10];
EatWord(is,"[]",storage,10);
- if (strlen(storage)==0) {
+ if (storage[0]=='\0') {
Eat(is,'[');
for (int i=0;i<3;i++) {
is >> r(i,0);
@@ -255,7 +255,7 @@ std::istream& operator >> (std::istream& is,Frame& T)
{ IOTrace("Stream input Frame (Rotation,Vector) or DH[...]");
char storage[10];
EatWord(is,"[",storage,10);
- if (strlen(storage)==0) {
+ if (storage[0]=='\0') {
Eat(is,'[');
is >> T.M;
is >> T.p;
diff --git a/release/scripts/modules/bpy_extras/image_utils.py b/release/scripts/modules/bpy_extras/image_utils.py
index eab75c3bd16..02959fae534 100644
--- a/release/scripts/modules/bpy_extras/image_utils.py
+++ b/release/scripts/modules/bpy_extras/image_utils.py
@@ -58,7 +58,7 @@ def load_image(imagepath,
For formats blender can read, simply return the path that is given.
:type convert_callback: function
:return: an image or None
- :rtype: :class:`Image`
+ :rtype: :class:`bpy.types.Image`
"""
import os
import bpy
diff --git a/release/scripts/modules/bpy_extras/io_utils.py b/release/scripts/modules/bpy_extras/io_utils.py
index 6271c1f77b5..3f6a3682e7c 100644
--- a/release/scripts/modules/bpy_extras/io_utils.py
+++ b/release/scripts/modules/bpy_extras/io_utils.py
@@ -252,10 +252,10 @@ def axis_conversion(from_forward='Y', from_up='Z', to_forward='Y', to_up='Z'):
def axis_conversion_ensure(operator, forward_attr, up_attr):
"""
Function to ensure an operator has valid axis conversion settings, intended
- to be used from :class:`Operator.check`.
+ to be used from :class:`bpy.types.Operator.check`.
:arg operator: the operator to access axis attributes from.
- :type operator: :class:`Operator`
+ :type operator: :class:`bpy.types.Operator`
:arg forward_attr: attribute storing the forward axis
:type forward_attr: string
:arg up_attr: attribute storing the up axis
diff --git a/release/scripts/modules/bpy_extras/mesh_utils.py b/release/scripts/modules/bpy_extras/mesh_utils.py
index c965169ff04..7bc6dae3cc6 100644
--- a/release/scripts/modules/bpy_extras/mesh_utils.py
+++ b/release/scripts/modules/bpy_extras/mesh_utils.py
@@ -35,7 +35,7 @@ def mesh_linked_faces(mesh):
other mesh elements within 1 mesh datablock.
:arg mesh: the mesh used to group with.
- :type mesh: :class:`Mesh`
+ :type mesh: :class:`bpy.types.Mesh`
:return: lists of lists containing faces.
:rtype: list
"""
@@ -125,9 +125,9 @@ def edge_loops_from_faces(mesh, faces=None, seams=()):
[[(0, 1), (4, 8), (3, 8)], ...]
:arg mesh: the mesh used to get edge loops from.
- :type mesh: :class:`Mesh`
+ :type mesh: :class:`bpy.types.Mesh`
:arg faces: optional face list to only use some of the meshes faces.
- :type faces: :class:`MeshFaces`, sequence or or NoneType
+ :type faces: :class:`bpy.types.MeshFaces`, sequence or or NoneType
:return: return a list of edge vertex index lists.
:rtype: list
"""
@@ -426,7 +426,7 @@ def ngon_tesselate(from_data, indices, fix_loops=True):
# See if its flipped the wrong way.
flip = None
for fi in fill:
- if flip != None:
+ if flip is not None:
break
for i, vi in enumerate(fi):
if vi == 0 and fi[i - 1] == 1:
@@ -450,7 +450,7 @@ def face_random_points(num_points, faces):
:arg num_points: the number of random points to generate on each face.
:type int:
:arg faces: list of the faces to generate points on.
- :type faces: :class:`MeshFaces`, sequence
+ :type faces: :class:`bpy.types.MeshFaces`, sequence
:return: list of random points over all faces.
:rtype: list
"""
diff --git a/release/scripts/modules/bpy_extras/object_utils.py b/release/scripts/modules/bpy_extras/object_utils.py
index 790f5ba48cb..3081e6f172e 100644
--- a/release/scripts/modules/bpy_extras/object_utils.py
+++ b/release/scripts/modules/bpy_extras/object_utils.py
@@ -33,11 +33,11 @@ def add_object_align_init(context, operator):
Return a matrix using the operator settings and view context.
:arg context: The context to use.
- :type context: :class:`Context`
+ :type context: :class:`bpy.types.Context`
:arg operator: The operator, checked for location and rotation properties.
- :type operator: :class:`Operator`
+ :type operator: :class:`bpy.types.Operator`
:return: the matrix from the context and settings.
- :rtype: :class:`Matrix`
+ :rtype: :class:`mathutils.Matrix`
"""
from mathutils import Matrix, Vector, Euler
@@ -92,13 +92,13 @@ def object_data_add(context, obdata, operator=None):
location, rotation and layer.
:arg context: The context to use.
- :type context: :class:`Context`
+ :type context: :class:`bpy.types.Context`
:arg obdata: the data used for the new object.
:type obdata: valid object data type or None.
:arg operator: The operator, checked for location and rotation properties.
- :type operator: :class:`Operator`
+ :type operator: :class:`bpy.types.Operator`
:return: the newly created object in the scene.
- :rtype: :class:`ObjectBase`
+ :rtype: :class:`bpy.types.ObjectBase`
"""
scene = context.scene
diff --git a/release/scripts/modules/bpy_extras/view3d_utils.py b/release/scripts/modules/bpy_extras/view3d_utils.py
index 26325633a05..c18a74bbb09 100644
--- a/release/scripts/modules/bpy_extras/view3d_utils.py
+++ b/release/scripts/modules/bpy_extras/view3d_utils.py
@@ -31,14 +31,14 @@ def region_2d_to_vector_3d(region, rv3d, coord):
coordinate.
:arg region: region of the 3D viewport, typically bpy.context.region.
- :type region: :class:`Region`
+ :type region: :class:`bpy.types.Region`
:arg rv3d: 3D region data, typically bpy.context.space_data.region_3d.
- :type rv3d: :class:`RegionView3D`
+ :type rv3d: :class:`bpy.types.RegionView3D`
:arg coord: 2d coordinates relative to the region:
(event.mouse_region_x, event.mouse_region_y) for example.
:type coord: 2d vector
:return: normalized 3d vector.
- :rtype: :class:`Vector`
+ :rtype: :class:`mathutils.Vector`
"""
from mathutils import Vector
@@ -65,9 +65,9 @@ def region_2d_to_location_3d(region, rv3d, coord, depth_location):
*depth_location*.
:arg region: region of the 3D viewport, typically bpy.context.region.
- :type region: :class:`Region`
+ :type region: :class:`bpy.types.Region`
:arg rv3d: 3D region data, typically bpy.context.space_data.region_3d.
- :type rv3d: :class:`RegionView3D`
+ :type rv3d: :class:`bpy.types.RegionView3D`
:arg coord: 2d coordinates relative to the region;
(event.mouse_region_x, event.mouse_region_y) for example.
:type coord: 2d vector
@@ -75,7 +75,7 @@ def region_2d_to_location_3d(region, rv3d, coord, depth_location):
there is no defined depth with a 2d region input.
:type depth_location: 3d vector
:return: normalized 3d vector.
- :rtype: :class:`Vector`
+ :rtype: :class:`mathutils.Vector`
"""
from mathutils import Vector
from mathutils.geometry import intersect_point_line
@@ -114,13 +114,13 @@ def location_3d_to_region_2d(region, rv3d, coord):
Return the *region* relative 2d location of a 3d position.
:arg region: region of the 3D viewport, typically bpy.context.region.
- :type region: :class:`Region`
+ :type region: :class:`bpy.types.Region`
:arg rv3d: 3D region data, typically bpy.context.space_data.region_3d.
- :type rv3d: :class:`RegionView3D`
+ :type rv3d: :class:`bpy.types.RegionView3D`
:arg coord: 3d worldspace location.
:type coord: 3d vector
:return: 2d location
- :rtype: :class:`Vector`
+ :rtype: :class:`mathutils.Vector`
"""
from mathutils import Vector
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index 8766c873dd8..e8c58105d94 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -287,7 +287,7 @@ class EditBone(StructRNA, _GenericBone, metaclass=StructMetaPropGroup):
Transform the the bones head, tail, roll and envalope (when the matrix has a scale component).
:arg matrix: 3x3 or 4x4 transformation matrix.
- :type matrix: :class:`Matrix`
+ :type matrix: :class:`mathutils.Matrix`
:arg scale: Scale the bone envalope by the matrix.
:type scale: bool
:arg roll: Correct the roll to point in the same relative direction to the head and tail.
diff --git a/release/scripts/modules/console_python.py b/release/scripts/modules/console_python.py
index 455eabe377b..425ea210104 100644
--- a/release/scripts/modules/console_python.py
+++ b/release/scripts/modules/console_python.py
@@ -179,7 +179,7 @@ def execute(context):
# special exception. its possible the command loaded a new user interface
if hash(sc) != hash(context.space_data):
- return
+ return {'FINISHED'}
bpy.ops.console.scrollback_append(text=sc.prompt + line, type='INPUT')
diff --git a/release/scripts/startup/bl_operators/nla.py b/release/scripts/startup/bl_operators/nla.py
index 44ed846e530..714b889da26 100644
--- a/release/scripts/startup/bl_operators/nla.py
+++ b/release/scripts/startup/bl_operators/nla.py
@@ -84,6 +84,7 @@ def bake(frame_start,
do_pose=True,
do_object=True,
do_constraint_clear=False,
+ action=None,
):
scene = bpy.context.scene
@@ -121,7 +122,8 @@ def bake(frame_start,
# incase animation data hassnt been created
atd = obj.animation_data_create()
- action = bpy.data.actions.new("Action")
+ if action is None:
+ action = bpy.data.actions.new("Action")
atd.action = action
if do_pose:
diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
index 78b68418322..23838588f43 100644
--- a/release/scripts/startup/bl_operators/uvcalc_smart_project.py
+++ b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
@@ -178,7 +178,7 @@ def pointInEdges(pt, edges):
intersectCount = 0
for ed in edges:
xi, yi = lineIntersection2D(x1,y1, x2,y2, ed[0][0], ed[0][1], ed[1][0], ed[1][1])
- if xi != None: # Is there an intersection.
+ if xi is not None: # Is there an intersection.
intersectCount+=1
return intersectCount % 2
@@ -1131,7 +1131,7 @@ class SmartProject(Operator):
@classmethod
def poll(cls, context):
- return context.active_object != None
+ return context.active_object is not None
def execute(self, context):
main(context,
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 74f125e0ad3..aa09a088c4f 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -738,7 +738,6 @@ class WM_OT_url_open(Operator):
def execute(self, context):
import webbrowser
- _webbrowser_bug_fix()
webbrowser.open(self.url)
return {'FINISHED'}
@@ -830,7 +829,6 @@ class WM_OT_doc_view(Operator):
return {'PASS_THROUGH'}
import webbrowser
- _webbrowser_bug_fix()
webbrowser.open(url)
return {'FINISHED'}
@@ -1181,65 +1179,3 @@ class WM_OT_copy_prev_settings(Operator):
return {'FINISHED'}
return {'CANCELLED'}
-
-
-def _webbrowser_bug_fix():
- # test for X11
- import os
-
- if os.environ.get("DISPLAY"):
-
- # BSD licenced code copied from python, temp fix for bug
- # http://bugs.python.org/issue11432, XXX == added code
- def _invoke(self, args, remote, autoraise):
- # XXX, added imports
- import io
- import subprocess
- import time
-
- raise_opt = []
- if remote and self.raise_opts:
- # use autoraise argument only for remote invocation
- autoraise = int(autoraise)
- opt = self.raise_opts[autoraise]
- if opt:
- raise_opt = [opt]
-
- cmdline = [self.name] + raise_opt + args
-
- if remote or self.background:
- inout = io.open(os.devnull, "r+")
- else:
- # for TTY browsers, we need stdin/out
- inout = None
- # if possible, put browser in separate process group, so
- # keyboard interrupts don't affect browser as well as Python
- setsid = getattr(os, 'setsid', None)
- if not setsid:
- setsid = getattr(os, 'setpgrp', None)
-
- p = subprocess.Popen(cmdline, close_fds=True, # XXX, stdin=inout,
- stdout=(self.redirect_stdout and inout or None),
- stderr=inout, preexec_fn=setsid)
- if remote:
- # wait five secons. If the subprocess is not finished, the
- # remote invocation has (hopefully) started a new instance.
- time.sleep(1)
- rc = p.poll()
- if rc is None:
- time.sleep(4)
- rc = p.poll()
- if rc is None:
- return True
- # if remote call failed, open() will try direct invocation
- return not rc
- elif self.background:
- if p.poll() is None:
- return True
- else:
- return False
- else:
- return not p.wait()
-
- import webbrowser
- webbrowser.UnixBrowser._invoke = _invoke
diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py
index f484d7b59e1..5255af40951 100644
--- a/release/scripts/startup/bl_ui/properties_data_camera.py
+++ b/release/scripts/startup/bl_ui/properties_data_camera.py
@@ -107,7 +107,7 @@ class DATA_PT_camera(CameraButtonsPanel, Panel):
col = split.column()
- if cam.dof_object != None:
+ if cam.dof_object is not None:
col.enabled = False
col.prop(cam, "dof_distance", text="Distance")
diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py
index 896b76c59f6..75df7dad5f2 100644
--- a/release/scripts/startup/bl_ui/properties_data_mesh.py
+++ b/release/scripts/startup/bl_ui/properties_data_mesh.py
@@ -73,7 +73,7 @@ class DATA_PT_context_mesh(MeshButtonsPanel, Panel):
ob = context.object
mesh = context.mesh
space = context.space_data
- layout.prop(context.scene.tool_settings, "mesh_select_mode", index=0, text="Vertex")
+
if ob:
layout.template_ID(ob, "data")
elif mesh:
diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py
index 03243d1153b..6f58f060504 100644
--- a/release/scripts/startup/bl_ui/properties_particle.py
+++ b/release/scripts/startup/bl_ui/properties_particle.py
@@ -156,7 +156,7 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel):
if part:
split = layout.split(percentage=0.65)
if part.type == 'HAIR':
- if psys != None and psys.is_edited:
+ if psys is not None and psys.is_edited:
split.operator("particle.edited_clear", text="Free Edit")
else:
row = split.row()
@@ -166,12 +166,12 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel):
row = split.row()
row.enabled = particle_panel_enabled(context, psys)
row.prop(part, "hair_step")
- if psys != None and psys.is_edited:
+ if psys is not None and psys.is_edited:
if psys.is_global_hair:
layout.operator("particle.connect_hair")
else:
layout.operator("particle.disconnect_hair")
- elif psys != None and part.type == 'REACTOR':
+ elif psys is not None and part.type == 'REACTOR':
split.enabled = particle_panel_enabled(context, psys)
split.prop(psys, "reactor_target_object")
split.prop(psys, "reactor_target_particle_system", text="Particle System")
@@ -654,7 +654,7 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel, Panel):
if settings is None:
return False
- if psys != None and psys.point_cache.use_external:
+ if psys is not None and psys.point_cache.use_external:
return False
return settings.physics_type == 'BOIDS' and engine in cls.COMPAT_ENGINES
diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py
index ead65b92c3f..0172fbcbadd 100644
--- a/release/scripts/startup/bl_ui/properties_texture.py
+++ b/release/scripts/startup/bl_ui/properties_texture.py
@@ -414,6 +414,10 @@ class TEXTURE_PT_image_sampling(TextureTypePanel, Panel):
row = col.row()
row.active = tex.use_normal_map
row.prop(slot, "normal_map_space", text="")
+
+ row = col.row()
+ row.active = not tex.use_normal_map
+ row.prop(tex, "use_derivative_map")
col.prop(tex, "use_mipmap")
row = col.row()
@@ -1025,12 +1029,14 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel):
# only show bump settings if activated but not for normalmap images
row = layout.row()
- row.active = (tex.use_map_normal or tex.use_map_warp) and not (tex.texture.type == 'IMAGE' and tex.texture.use_normal_map)
-
- row.prop(tex, "bump_method", text="Method")
-
+
sub = row.row()
- sub.active = tex.bump_method in {'BUMP_DEFAULT', 'BUMP_BEST_QUALITY'}
+ sub.active = (tex.use_map_normal or tex.use_map_warp) and not (tex.texture.type == 'IMAGE' and (tex.texture.use_normal_map or tex.texture.use_derivative_map))
+ sub.prop(tex, "bump_method", text="Method")
+
+ # the space setting is supported for: derivmaps + bumpmaps (DEFAULT,BEST_QUALITY), not for normalmaps
+ sub = row.row()
+ sub.active = (tex.use_map_normal or tex.use_map_warp) and not (tex.texture.type == 'IMAGE' and tex.texture.use_normal_map) and ((tex.bump_method in {'BUMP_DEFAULT', 'BUMP_BEST_QUALITY'}) or (tex.texture.type == 'IMAGE' and tex.texture.use_derivative_map))
sub.prop(tex, "bump_objectspace", text="Space")
diff --git a/release/scripts/startup/bl_ui/space_console.py b/release/scripts/startup/bl_ui/space_console.py
index b517e0d86fb..cbbefa01a3c 100644
--- a/release/scripts/startup/bl_ui/space_console.py
+++ b/release/scripts/startup/bl_ui/space_console.py
@@ -41,7 +41,7 @@ class CONSOLE_MT_console(Menu):
def draw(self, context):
layout = self.layout
-
+
layout.operator("console.clear")
layout.operator("console.copy")
layout.operator("console.paste")
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py
index dfbd7b3ae14..ae55e1373db 100644
--- a/release/scripts/startup/bl_ui/space_dopesheet.py
+++ b/release/scripts/startup/bl_ui/space_dopesheet.py
@@ -101,7 +101,7 @@ class DOPESHEET_HT_header(Header):
row.menu("DOPESHEET_MT_select")
row.menu("DOPESHEET_MT_marker")
- if st.mode == 'DOPESHEET' or (st.mode == 'ACTION' and st.action != None):
+ if st.mode == 'DOPESHEET' or (st.mode == 'ACTION' and st.action is not None):
row.menu("DOPESHEET_MT_channel")
elif st.mode == 'GPENCIL':
row.menu("DOPESHEET_MT_gpencil_channel")
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index 2042fa1729d..97b5d8457e0 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -452,7 +452,7 @@ class IMAGE_PT_game_properties(Panel):
split = layout.split()
col = split.column()
-
+
col.prop(ima, "use_animation")
sub = col.column(align=True)
sub.active = ima.use_animation
@@ -507,7 +507,7 @@ class IMAGE_PT_view_waveform(Panel):
layout = self.layout
sima = context.space_data
-
+
layout.template_waveform(sima, "scopes")
row = layout.split(percentage=0.75)
row.prop(sima.scopes, "waveform_alpha")
@@ -544,9 +544,9 @@ class IMAGE_PT_sample_line(Panel):
def draw(self, context):
layout = self.layout
-
+
sima = context.space_data
-
+
layout.operator("image.sample_line")
layout.template_histogram(sima, "sample_histogram")
layout.prop(sima.sample_histogram, "mode")
@@ -564,9 +564,9 @@ class IMAGE_PT_scope_sample(Panel):
def draw(self, context):
layout = self.layout
-
+
sima = context.space_data
-
+
row = layout.row()
row.prop(sima.scopes, "use_full_resolution")
sub = row.row()
@@ -613,14 +613,14 @@ class IMAGE_PT_view_properties(Panel):
col = layout.column()
col.label("Cursor Location:")
col.row().prop(uvedit, "cursor_location", text="")
-
+
col.separator()
-
+
col.label(text="UVs:")
col.row().prop(uvedit, "edge_draw_type", expand=True)
split = layout.split()
-
+
col = split.column()
col.prop(uvedit, "show_faces")
col.prop(uvedit, "show_smooth_edges", text="Smooth")
diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py
index 38c1e24f27e..5afc5edf6eb 100644
--- a/release/scripts/startup/bl_ui/space_info.py
+++ b/release/scripts/startup/bl_ui/space_info.py
@@ -194,7 +194,7 @@ class INFO_MT_mesh_add(Menu):
def draw(self, context):
layout = self.layout
-
+
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("mesh.primitive_plane_add", icon='MESH_PLANE', text="Plane")
layout.operator("mesh.primitive_cube_add", icon='MESH_CUBE', text="Cube")
@@ -215,7 +215,7 @@ class INFO_MT_curve_add(Menu):
def draw(self, context):
layout = self.layout
-
+
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("curve.primitive_bezier_curve_add", icon='CURVE_BEZCURVE', text="Bezier")
layout.operator("curve.primitive_bezier_circle_add", icon='CURVE_BEZCIRCLE', text="Circle")
@@ -246,7 +246,7 @@ class INFO_MT_surface_add(Menu):
def draw(self, context):
layout = self.layout
-
+
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("surface.primitive_nurbs_surface_curve_add", icon='SURFACE_NCURVE', text="NURBS Curve")
layout.operator("surface.primitive_nurbs_surface_circle_add", icon='SURFACE_NCIRCLE', text="NURBS Circle")
@@ -262,7 +262,7 @@ class INFO_MT_armature_add(Menu):
def draw(self, context):
layout = self.layout
-
+
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("object.armature_add", text="Single Bone", icon='BONE_DATA')
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index 84cc365425e..1902e9345d6 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -60,6 +60,7 @@ class SEQUENCER_HT_header(Header):
layout.separator()
layout.operator("sequencer.refresh_all")
+ layout.template_running_jobs()
elif st.view_type == 'SEQUENCER_PREVIEW':
layout.separator()
layout.operator("sequencer.refresh_all")
@@ -241,6 +242,7 @@ class SEQUENCER_MT_strip(Menu):
layout.operator("sequencer.images_separate")
layout.operator("sequencer.offset_clear")
layout.operator("sequencer.deinterlace_selected_movies")
+ layout.operator("sequencer.rebuild_proxy")
layout.separator()
layout.operator("sequencer.duplicate")
@@ -578,6 +580,7 @@ class SEQUENCER_PT_input(SequencerButtonsPanel, Panel):
col = split.column()
col.prop(strip, "filepath", text="")
col.prop(strip, "mpeg_preseek", text="MPEG Preseek")
+ col.prop(strip, "streamindex", text="Stream Index")
# TODO, sound???
# end drawing filename
@@ -746,7 +749,7 @@ class SEQUENCER_PT_filter(SequencerButtonsPanel, Panel):
class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel):
- bl_label = "Proxy"
+ bl_label = "Proxy / Timecode"
@classmethod
def poll(cls, context):
@@ -772,12 +775,29 @@ class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel):
flow = layout.column_flow()
flow.prop(strip, "use_proxy_custom_directory")
flow.prop(strip, "use_proxy_custom_file")
- if strip.proxy: # TODO - need to add this somehow
+ if strip.proxy:
if strip.use_proxy_custom_directory and not strip.use_proxy_custom_file:
flow.prop(strip.proxy, "directory")
if strip.use_proxy_custom_file:
flow.prop(strip.proxy, "filepath")
+ row = layout.row()
+ row.prop(strip.proxy, "build_25")
+ row.prop(strip.proxy, "build_50")
+ row.prop(strip.proxy, "build_75")
+ row.prop(strip.proxy, "build_100")
+
+ col = layout.column()
+ col.label(text="Build JPEG quality")
+ col.prop(strip.proxy, "quality")
+
+ if strip.type == "MOVIE":
+ col = layout.column()
+ col.label(text="Use timecode index:")
+
+ col.prop(strip.proxy, "timecode")
+
+
class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, Panel):
bl_label = "Scene Preview/Render"
diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py
index 300211a26bf..12e07c19ca1 100644
--- a/release/scripts/startup/bl_ui/space_text.py
+++ b/release/scripts/startup/bl_ui/space_text.py
@@ -172,7 +172,9 @@ class TEXT_MT_text(Menu):
st = context.space_data
text = st.text
+ layout.operator_context = 'EXEC_AREA'
layout.operator("text.new")
+ layout.operator_context = 'INVOKE_AREA'
layout.operator("text.open")
if text:
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index fa22e216ec9..dd705f76feb 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -2073,9 +2073,11 @@ class VIEW3D_PT_view3d_properties(Panel):
col.prop(view, "lens")
col.label(text="Lock to Object:")
col.prop(view, "lock_object", text="")
- if view.lock_object and view.lock_object.type == 'ARMATURE':
- col.prop_search(view, "lock_bone", view.lock_object.data, "bones", text="")
- elif not view.lock_object:
+ lock_object = view.lock_object
+ if lock_object:
+ if lock_object.type == 'ARMATURE':
+ col.prop_search(view, "lock_bone", lock_object.data, "edit_bones" if lock_object.mode == 'EDIT' else "bones", text="")
+ else:
col.prop(view, "lock_cursor", text="Lock to Cursor")
col = layout.column()
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 864d59f0cdb..b71593add96 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -1049,7 +1049,7 @@ class VIEW3D_PT_tools_weightpaint(View3DPanel, Panel):
ob = context.active_object
col = layout.column()
- col.active = ob.vertex_groups.active != None
+ col.active = ob.vertex_groups.active is not None
col.operator("object.vertex_group_normalize_all", text="Normalize All")
col.operator("object.vertex_group_normalize", text="Normalize")
col.operator("object.vertex_group_invert", text="Invert")
diff --git a/release/scripts/templates/operator_export.py b/release/scripts/templates/operator_export.py
index aeda4ce36fb..b1d53e6ee0c 100644
--- a/release/scripts/templates/operator_export.py
+++ b/release/scripts/templates/operator_export.py
@@ -47,7 +47,7 @@ class ExportSomeData(bpy.types.Operator, ExportHelper):
@classmethod
def poll(cls, context):
- return context.active_object != None
+ return context.active_object is not None
def execute(self, context):
return write_some_data(context, self.filepath, self.use_setting)
diff --git a/release/scripts/templates/operator_simple.py b/release/scripts/templates/operator_simple.py
index 8348c7a95b1..05d9afc0ad1 100644
--- a/release/scripts/templates/operator_simple.py
+++ b/release/scripts/templates/operator_simple.py
@@ -13,7 +13,7 @@ class SimpleOperator(bpy.types.Operator):
@classmethod
def poll(cls, context):
- return context.active_object != None
+ return context.active_object is not None
def execute(self, context):
main(context)
diff --git a/source/blender/avi/intern/avi.c b/source/blender/avi/intern/avi.c
index ff3aafbf065..8ad751a5b40 100644
--- a/source/blender/avi/intern/avi.c
+++ b/source/blender/avi/intern/avi.c
@@ -87,17 +87,17 @@ unsigned int GET_TCC (FILE *fp) {
}
char *fcc_to_char (unsigned int fcc) {
- DEBUG_FCC[0]= (fcc)&0177;
- DEBUG_FCC[1]= (fcc>>8)&0177;
- DEBUG_FCC[2]= (fcc>>16)&0177;
- DEBUG_FCC[3]= (fcc>>24)&0177;
+ DEBUG_FCC[0]= (fcc)&127;
+ DEBUG_FCC[1]= (fcc>>8)&127;
+ DEBUG_FCC[2]= (fcc>>16)&127;
+ DEBUG_FCC[3]= (fcc>>24)&127;
return DEBUG_FCC;
}
char *tcc_to_char (unsigned int tcc) {
- DEBUG_FCC[0]= (tcc)&0177;
- DEBUG_FCC[1]= (tcc>>8)&0177;
+ DEBUG_FCC[0]= (tcc)&127;
+ DEBUG_FCC[1]= (tcc>>8)&127;
DEBUG_FCC[2]= 0;
DEBUG_FCC[3]= 0;
diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h
index 10910493ec9..0c31083a266 100644
--- a/source/blender/blenkernel/BKE_image.h
+++ b/source/blender/blenkernel/BKE_image.h
@@ -60,7 +60,7 @@ int BKE_ftype_to_imtype(int ftype);
int BKE_imtype_to_ftype(int imtype);
int BKE_imtype_is_movie(int imtype);
-struct anim *openanim(char * name, int flags);
+struct anim *openanim(char * name, int flags, int streamindex);
void image_de_interlace(struct Image *ima, int odd);
diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h
index bedd58876bc..b20811724f4 100644
--- a/source/blender/blenkernel/BKE_sequencer.h
+++ b/source/blender/blenkernel/BKE_sequencer.h
@@ -177,6 +177,7 @@ int seq_recursive_apply(struct Sequence *seq, int (*apply_func)(struct Sequence
/* maintainance functions, mostly for RNA */
// extern
void seq_free_sequence(struct Scene *scene, struct Sequence *seq);
+void seq_free_sequence_recurse(struct Scene *scene, struct Sequence *seq);
void seq_free_strip(struct Strip *strip);
void seq_free_editing(struct Scene *scene);
void seq_free_clipboard(void);
@@ -199,6 +200,11 @@ void update_changed_seq_and_deps(struct Scene *scene, struct Sequence *changed_s
int input_have_to_preprocess(
SeqRenderData context, struct Sequence * seq, float cfra);
+void seq_proxy_rebuild(struct Main * bmain,
+ struct Scene *scene, struct Sequence * seq,
+ short *stop, short *do_update, float *progress);
+
+
/* **********************************************************************
seqcache.c
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index ebe7325d96a..fcb8da48962 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -1351,6 +1351,10 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
continue;
if(part->ren_as==PART_DRAW_GR) {
+ /* prevent divide by zero below [#28336] */
+ if(totgroup == 0)
+ continue;
+
/* for groups, pick the object based on settings */
if(part->draw&PART_DRAW_RAND_GR)
b= BLI_rand() % totgroup;
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index ab67d7e3f25..4ce5de78895 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -1371,15 +1371,15 @@ void BKE_makepicstring(char *string, const char *base, int frame, int imtype, co
}
/* used by sequencer too */
-struct anim *openanim(char *name, int flags)
+struct anim *openanim(char *name, int flags, int streamindex)
{
struct anim *anim;
struct ImBuf *ibuf;
- anim = IMB_open_anim(name, flags);
+ anim = IMB_open_anim(name, flags, streamindex);
if (anim == NULL) return NULL;
- ibuf = IMB_anim_absolute(anim, 0);
+ ibuf = IMB_anim_absolute(anim, 0, IMB_TC_NONE, IMB_PROXY_NONE);
if (ibuf == NULL) {
if(BLI_exists(name))
printf("not an anim: %s\n", name);
@@ -1773,20 +1773,26 @@ static ImBuf *image_load_movie_file(Image *ima, ImageUser *iuser, int frame)
else
BLI_path_abs(str, G.main->name);
- ima->anim = openanim(str, IB_rect);
+ /* FIXME: make several stream accessible in image editor, too*/
+ ima->anim = openanim(str, IB_rect, 0);
/* let's initialize this user */
if(ima->anim && iuser && iuser->frames==0)
- iuser->frames= IMB_anim_get_duration(ima->anim);
+ iuser->frames= IMB_anim_get_duration(ima->anim,
+ IMB_TC_RECORD_RUN);
}
if(ima->anim) {
- int dur = IMB_anim_get_duration(ima->anim);
+ int dur = IMB_anim_get_duration(ima->anim,
+ IMB_TC_RECORD_RUN);
int fra= frame-1;
if(fra<0) fra = 0;
if(fra>(dur-1)) fra= dur-1;
- ibuf = IMB_anim_absolute(ima->anim, fra);
+ ibuf = IMB_makeSingleUser(
+ IMB_anim_absolute(ima->anim, fra,
+ IMB_TC_RECORD_RUN,
+ IMB_PROXY_NONE));
if(ibuf) {
image_initialize_after_load(ima, ibuf);
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 0b07f40cad6..4d158a6c26c 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -671,7 +671,7 @@ void *copy_libblock(void *rt)
assert(idn != NULL);
idn_len= MEM_allocN_len(idn);
- if(idn_len - sizeof(ID) > 0) {
+ if((int)idn_len - (int)sizeof(ID) > 0) { /* signed to allow neg result */
cp= (char *)id;
cpn= (char *)idn;
memcpy(cpn+sizeof(ID), cp+sizeof(ID), idn_len - sizeof(ID));
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 9c455e84109..29615986191 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -515,7 +515,7 @@ short *give_totcolp_id(ID *id)
return NULL;
}
-void data_delete_material_index_id(ID *id, int index)
+static void data_delete_material_index_id(ID *id, int index)
{
switch(GS(id->name)) {
case ID_ME:
@@ -1365,7 +1365,7 @@ void ramp_blend(int type, float *r, float *g, float *b, float fac, float *col)
}
/* copy/paste buffer, if we had a propper py api that would be better */
-Material matcopybuf;
+static Material matcopybuf;
static short matcopied= 0;
void clear_matcopybuf(void)
diff --git a/source/blender/blenkernel/intern/mesh_validate.c b/source/blender/blenkernel/intern/mesh_validate.c
index 34618a19ae9..9c916d517c5 100644
--- a/source/blender/blenkernel/intern/mesh_validate.c
+++ b/source/blender/blenkernel/intern/mesh_validate.c
@@ -80,7 +80,7 @@ static void edge_store_from_mface_quad(EdgeUUID es[4], MFace *mf)
edge_store_assign(es[3].verts, mf->v4, mf->v1);
}
-static void edge_store_from_mface_tri(EdgeUUID es[3], MFace *mf)
+static void edge_store_from_mface_tri(EdgeUUID es[4], MFace *mf)
{
edge_store_assign(es[0].verts, mf->v1, mf->v2);
edge_store_assign(es[1].verts, mf->v2, mf->v3);
@@ -143,30 +143,30 @@ int BKE_mesh_validate_arrays(Mesh *me, MVert *UNUSED(mverts), unsigned int totve
BLI_assert(!(do_fixes && me == NULL));
- PRINT("ED_mesh_validate: verts(%d), edges(%d), faces(%d)\n", totvert, totedge, totface);
+ PRINT("ED_mesh_validate: verts(%u), edges(%u), faces(%u)\n", totvert, totedge, totface);
if(totedge == 0 && totface != 0) {
- PRINT(" locical error, %d faces and 0 edges\n", totface);
+ PRINT(" locical error, %u faces and 0 edges\n", totface);
do_edge_recalc= TRUE;
}
for(i=0, med= medges; iv1 == med->v2) {
- PRINT(" edge %d: has matching verts, both %d\n", i, med->v1);
+ PRINT(" edge %u: has matching verts, both %u\n", i, med->v1);
remove= do_fixes;
}
if(med->v1 >= totvert) {
- PRINT(" edge %d: v1 index out of range, %d\n", i, med->v1);
+ PRINT(" edge %u: v1 index out of range, %u\n", i, med->v1);
remove= do_fixes;
}
if(med->v2 >= totvert) {
- PRINT(" edge %d: v2 index out of range, %d\n", i, med->v2);
+ PRINT(" edge %u: v2 index out of range, %u\n", i, med->v2);
remove= do_fixes;
}
if(BLI_edgehash_haskey(edge_hash, med->v1, med->v2)) {
- PRINT(" edge %d: is a duplicate of, %d\n", i, GET_INT_FROM_POINTER(BLI_edgehash_lookup(edge_hash, med->v1, med->v2)));
+ PRINT(" edge %u: is a duplicate of, %u\n", i, GET_INT_FROM_POINTER(BLI_edgehash_lookup(edge_hash, med->v1, med->v2)));
remove= do_fixes;
}
@@ -187,41 +187,41 @@ int BKE_mesh_validate_arrays(Mesh *me, MVert *UNUSED(mverts), unsigned int totve
do {
fv[fidx]= *(&(mf->v1) + fidx);
if(fv[fidx] >= totvert) {
- PRINT(" face %d: 'v%d' index out of range, %d\n", i, fidx + 1, fv[fidx]);
+ PRINT(" face %u: 'v%d' index out of range, %u\n", i, fidx + 1, fv[fidx]);
remove= do_fixes;
}
} while (fidx--);
if(remove == FALSE) {
if(mf->v4) {
- if(mf->v1 == mf->v2) { PRINT(" face %d: verts invalid, v1/v2 both %d\n", i, mf->v1); remove= do_fixes; }
- if(mf->v1 == mf->v3) { PRINT(" face %d: verts invalid, v1/v3 both %d\n", i, mf->v1); remove= do_fixes; }
- if(mf->v1 == mf->v4) { PRINT(" face %d: verts invalid, v1/v4 both %d\n", i, mf->v1); remove= do_fixes; }
+ if(mf->v1 == mf->v2) { PRINT(" face %u: verts invalid, v1/v2 both %u\n", i, mf->v1); remove= do_fixes; }
+ if(mf->v1 == mf->v3) { PRINT(" face %u: verts invalid, v1/v3 both %u\n", i, mf->v1); remove= do_fixes; }
+ if(mf->v1 == mf->v4) { PRINT(" face %u: verts invalid, v1/v4 both %u\n", i, mf->v1); remove= do_fixes; }
- if(mf->v2 == mf->v3) { PRINT(" face %d: verts invalid, v2/v3 both %d\n", i, mf->v2); remove= do_fixes; }
- if(mf->v2 == mf->v4) { PRINT(" face %d: verts invalid, v2/v4 both %d\n", i, mf->v2); remove= do_fixes; }
+ if(mf->v2 == mf->v3) { PRINT(" face %u: verts invalid, v2/v3 both %u\n", i, mf->v2); remove= do_fixes; }
+ if(mf->v2 == mf->v4) { PRINT(" face %u: verts invalid, v2/v4 both %u\n", i, mf->v2); remove= do_fixes; }
- if(mf->v3 == mf->v4) { PRINT(" face %d: verts invalid, v3/v4 both %d\n", i, mf->v3); remove= do_fixes; }
+ if(mf->v3 == mf->v4) { PRINT(" face %u: verts invalid, v3/v4 both %u\n", i, mf->v3); remove= do_fixes; }
}
else {
- if(mf->v1 == mf->v2) { PRINT(" faceT %d: verts invalid, v1/v2 both %d\n", i, mf->v1); remove= do_fixes; }
- if(mf->v1 == mf->v3) { PRINT(" faceT %d: verts invalid, v1/v3 both %d\n", i, mf->v1); remove= do_fixes; }
+ if(mf->v1 == mf->v2) { PRINT(" faceT %u: verts invalid, v1/v2 both %u\n", i, mf->v1); remove= do_fixes; }
+ if(mf->v1 == mf->v3) { PRINT(" faceT %u: verts invalid, v1/v3 both %u\n", i, mf->v1); remove= do_fixes; }
- if(mf->v2 == mf->v3) { PRINT(" faceT %d: verts invalid, v2/v3 both %d\n", i, mf->v2); remove= do_fixes; }
+ if(mf->v2 == mf->v3) { PRINT(" faceT %u: verts invalid, v2/v3 both %u\n", i, mf->v2); remove= do_fixes; }
}
if(remove == FALSE) {
if(totedge) {
if(mf->v4) {
- if(!BLI_edgehash_haskey(edge_hash, mf->v1, mf->v2)) { PRINT(" face %d: edge v1/v2 (%d,%d) is missing egde data\n", i, mf->v1, mf->v2); do_edge_recalc= TRUE; }
- if(!BLI_edgehash_haskey(edge_hash, mf->v2, mf->v3)) { PRINT(" face %d: edge v2/v3 (%d,%d) is missing egde data\n", i, mf->v2, mf->v3); do_edge_recalc= TRUE; }
- if(!BLI_edgehash_haskey(edge_hash, mf->v3, mf->v4)) { PRINT(" face %d: edge v3/v4 (%d,%d) is missing egde data\n", i, mf->v3, mf->v4); do_edge_recalc= TRUE; }
- if(!BLI_edgehash_haskey(edge_hash, mf->v4, mf->v1)) { PRINT(" face %d: edge v4/v1 (%d,%d) is missing egde data\n", i, mf->v4, mf->v1); do_edge_recalc= TRUE; }
+ if(!BLI_edgehash_haskey(edge_hash, mf->v1, mf->v2)) { PRINT(" face %u: edge v1/v2 (%u,%u) is missing egde data\n", i, mf->v1, mf->v2); do_edge_recalc= TRUE; }
+ if(!BLI_edgehash_haskey(edge_hash, mf->v2, mf->v3)) { PRINT(" face %u: edge v2/v3 (%u,%u) is missing egde data\n", i, mf->v2, mf->v3); do_edge_recalc= TRUE; }
+ if(!BLI_edgehash_haskey(edge_hash, mf->v3, mf->v4)) { PRINT(" face %u: edge v3/v4 (%u,%u) is missing egde data\n", i, mf->v3, mf->v4); do_edge_recalc= TRUE; }
+ if(!BLI_edgehash_haskey(edge_hash, mf->v4, mf->v1)) { PRINT(" face %u: edge v4/v1 (%u,%u) is missing egde data\n", i, mf->v4, mf->v1); do_edge_recalc= TRUE; }
}
else {
- if(!BLI_edgehash_haskey(edge_hash, mf->v1, mf->v2)) { PRINT(" face %d: edge v1/v2 (%d,%d) is missing egde data\n", i, mf->v1, mf->v2); do_edge_recalc= TRUE; }
- if(!BLI_edgehash_haskey(edge_hash, mf->v2, mf->v3)) { PRINT(" face %d: edge v2/v3 (%d,%d) is missing egde data\n", i, mf->v2, mf->v3); do_edge_recalc= TRUE; }
- if(!BLI_edgehash_haskey(edge_hash, mf->v3, mf->v1)) { PRINT(" face %d: edge v3/v1 (%d,%d) is missing egde data\n", i, mf->v3, mf->v1); do_edge_recalc= TRUE; }
+ if(!BLI_edgehash_haskey(edge_hash, mf->v1, mf->v2)) { PRINT(" face %u: edge v1/v2 (%u,%u) is missing egde data\n", i, mf->v1, mf->v2); do_edge_recalc= TRUE; }
+ if(!BLI_edgehash_haskey(edge_hash, mf->v2, mf->v3)) { PRINT(" face %u: edge v2/v3 (%u,%u) is missing egde data\n", i, mf->v2, mf->v3); do_edge_recalc= TRUE; }
+ if(!BLI_edgehash_haskey(edge_hash, mf->v3, mf->v1)) { PRINT(" face %u: edge v3/v1 (%u,%u) is missing egde data\n", i, mf->v3, mf->v1); do_edge_recalc= TRUE; }
}
}
@@ -261,10 +261,10 @@ int BKE_mesh_validate_arrays(Mesh *me, MVert *UNUSED(mverts), unsigned int totve
if(do_verbose) {
mf_prev= mfaces + sf_prev->index;
if(mf->v4) {
- PRINT(" face %d & %d: are duplicates (%d,%d,%d,%d) (%d,%d,%d,%d)\n", sf->index, sf_prev->index, mf->v1, mf->v2, mf->v3, mf->v4, mf_prev->v1, mf_prev->v2, mf_prev->v3, mf_prev->v4);
+ PRINT(" face %u & %u: are duplicates (%u,%u,%u,%u) (%u,%u,%u,%u)\n", sf->index, sf_prev->index, mf->v1, mf->v2, mf->v3, mf->v4, mf_prev->v1, mf_prev->v2, mf_prev->v3, mf_prev->v4);
}
else {
- PRINT(" face %d & %d: are duplicates (%d,%d,%d) (%d,%d,%d)\n", sf->index, sf_prev->index, mf->v1, mf->v2, mf->v3, mf_prev->v1, mf_prev->v2, mf_prev->v3);
+ PRINT(" face %u & %u: are duplicates (%u,%u,%u) (%u,%u,%u)\n", sf->index, sf_prev->index, mf->v1, mf->v2, mf->v3, mf_prev->v1, mf_prev->v2, mf_prev->v3);
}
}
diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c
index 88a670ecb22..e621e800520 100644
--- a/source/blender/blenkernel/intern/multires.c
+++ b/source/blender/blenkernel/intern/multires.c
@@ -1537,6 +1537,7 @@ void multires_load_old(Object *ob, Mesh *me)
me->mface[i].v2 = lvl->faces[i].v[1];
me->mface[i].v3 = lvl->faces[i].v[2];
me->mface[i].v4 = lvl->faces[i].v[3];
+ me->mface[i].mat_nr = lvl->faces[i].mat_nr;
}
/* Add a multires modifier to the object */
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index dff62b05bd3..5bdda8d5867 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -3134,7 +3134,7 @@ int object_is_modified(Scene *scene, Object *ob)
int flag= 0;
if(ob_get_key(ob)) {
- flag |= eModifierMode_Render | eModifierMode_Render;
+ flag |= eModifierMode_Render;
}
else {
ModifierData *md;
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index 3099b26357a..9478f9c6518 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -3162,7 +3162,7 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf
}
else {
ca->vel[0] = ca->vel[1] = 0.0f;
- ca->vel[1] = 1.0f;
+ ca->vel[2] = 1.0f;
}
/* selection coloring in edit mode */
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 48c6b49f319..d761923859e 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -1096,12 +1096,12 @@ static int ptcache_filename(PTCacheID *pid, char *filename, int cfra, short do_p
if(pid->cache->flag & PTCACHE_EXTERNAL) {
if(pid->cache->index >= 0)
- snprintf(newname, MAX_PTCACHE_FILE, "_%06d_%02d"PTCACHE_EXT, cfra, pid->stack_index); /* always 6 chars */
+ snprintf(newname, MAX_PTCACHE_FILE, "_%06d_%02u"PTCACHE_EXT, cfra, pid->stack_index); /* always 6 chars */
else
snprintf(newname, MAX_PTCACHE_FILE, "_%06d"PTCACHE_EXT, cfra); /* always 6 chars */
}
else {
- snprintf(newname, MAX_PTCACHE_FILE, "_%06d_%02d"PTCACHE_EXT, cfra, pid->stack_index); /* always 6 chars */
+ snprintf(newname, MAX_PTCACHE_FILE, "_%06d_%02u"PTCACHE_EXT, cfra, pid->stack_index); /* always 6 chars */
}
len += 16;
}
@@ -2141,7 +2141,7 @@ void BKE_ptcache_id_clear(PTCacheID *pid, int mode, unsigned int cfra)
if (dir==NULL)
return;
- snprintf(ext, sizeof(ext), "_%02d"PTCACHE_EXT, pid->stack_index);
+ snprintf(ext, sizeof(ext), "_%02u"PTCACHE_EXT, pid->stack_index);
while ((de = readdir(dir)) != NULL) {
if (strstr(de->d_name, ext)) { /* do we have the right extension?*/
@@ -2343,7 +2343,7 @@ void BKE_ptcache_id_time(PTCacheID *pid, Scene *scene, float cfra, int *startfra
if (dir==NULL)
return;
- snprintf(ext, sizeof(ext), "_%02d"PTCACHE_EXT, pid->stack_index);
+ snprintf(ext, sizeof(ext), "_%02u"PTCACHE_EXT, pid->stack_index);
while ((de = readdir(dir)) != NULL) {
if (strstr(de->d_name, ext)) { /* do we have the right extension?*/
@@ -3057,7 +3057,7 @@ void BKE_ptcache_disk_cache_rename(PTCacheID *pid, char *from, char *to)
return;
}
- snprintf(ext, sizeof(ext), "_%02d"PTCACHE_EXT, pid->stack_index);
+ snprintf(ext, sizeof(ext), "_%02u"PTCACHE_EXT, pid->stack_index);
/* put new name into cache */
strcpy(pid->cache->name, to);
diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c
index 8c19b0c15c3..8b50ad2b042 100644
--- a/source/blender/blenkernel/intern/seqeffects.c
+++ b/source/blender/blenkernel/intern/seqeffects.c
@@ -2029,16 +2029,11 @@ static void init_transform_effect(Sequence *seq)
transform->ScalexIni = 1.0f;
transform->ScaleyIni = 1.0f;
- transform->ScalexFin = 1.0f;
- transform->ScalexFin = 1.0f;
transform->xIni=0.0f;
- transform->xFin=0.0f;
transform->yIni=0.0f;
- transform->yFin=0.0f;
transform->rotIni=0.0f;
- transform->rotFin=0.0f;
transform->interpolation=1;
transform->percent=1;
@@ -2878,7 +2873,7 @@ static struct ImBuf * do_adjustment_impl(SeqRenderData context, Sequence * seq,
{
Editing * ed;
ListBase * seqbasep;
- struct ImBuf * i = 0;
+ struct ImBuf * i= NULL;
ed = context.scene->ed;
@@ -2913,7 +2908,7 @@ static struct ImBuf * do_adjustment(
struct ImBuf *UNUSED(ibuf1), struct ImBuf *UNUSED(ibuf2),
struct ImBuf *UNUSED(ibuf3))
{
- struct ImBuf * i = 0;
+ struct ImBuf * i = NULL;
struct ImBuf * out;
Editing * ed;
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 3aebbea789f..60479da64a9 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -218,6 +218,18 @@ void seq_free_sequence(Scene *scene, Sequence *seq)
MEM_freeN(seq);
}
+void seq_free_sequence_recurse(Scene *scene, Sequence *seq)
+{
+ Sequence *iseq;
+
+ for(iseq= seq->seqbase.first; iseq; iseq= iseq->next) {
+ seq_free_sequence_recurse(scene, iseq);
+ }
+
+ seq_free_sequence(scene, seq);
+}
+
+
Editing *seq_give_editing(Scene *scene, int alloc)
{
if (scene->ed == NULL && alloc) {
@@ -683,13 +695,16 @@ void reload_sequence_new_file(Scene *scene, Sequence * seq, int lock_range)
}
case SEQ_MOVIE:
if(seq->anim) IMB_free_anim(seq->anim);
- seq->anim = openanim(str, IB_rect | ((seq->flag & SEQ_FILTERY) ? IB_animdeinterlace : 0));
+ seq->anim = openanim(str, IB_rect | ((seq->flag & SEQ_FILTERY) ? IB_animdeinterlace : 0), seq->streamindex);
if (!seq->anim) {
return;
}
- seq->len = IMB_anim_get_duration(seq->anim);
+ seq->len = IMB_anim_get_duration(seq->anim,
+ seq->strip->proxy ?
+ seq->strip->proxy->tc :
+ IMB_TC_RECORD_RUN);
seq->anim_preseek = IMB_anim_get_preseek(seq->anim);
@@ -1117,7 +1132,7 @@ static int get_shown_sequences( ListBase * seqbasep, int cfra, int chanshown, Se
return cnt;
}
-
+
/* **********************************************************************
proxy management
@@ -1125,48 +1140,105 @@ static int get_shown_sequences( ListBase * seqbasep, int cfra, int chanshown, Se
#define PROXY_MAXFILE (2*FILE_MAXDIR+FILE_MAXFILE)
+static IMB_Proxy_Size seq_rendersize_to_proxysize(int size)
+{
+ if (size >= 100) {
+ return IMB_PROXY_NONE;
+ }
+ if (size >= 99) {
+ return IMB_PROXY_100;
+ }
+ if (size >= 75) {
+ return IMB_PROXY_75;
+ }
+ if (size >= 50) {
+ return IMB_PROXY_50;
+ }
+ return IMB_PROXY_25;
+}
+
+static void seq_open_anim_file(Sequence * seq)
+{
+ char name[FILE_MAXDIR+FILE_MAXFILE];
+ StripProxy * proxy;
+
+ if(seq->anim != NULL) {
+ return;
+ }
+
+ BLI_join_dirfile(name, sizeof(name),
+ seq->strip->dir, seq->strip->stripdata->name);
+ BLI_path_abs(name, G.main->name);
+
+ seq->anim = openanim(name, IB_rect |
+ ((seq->flag & SEQ_FILTERY) ?
+ IB_animdeinterlace : 0), seq->streamindex);
+
+ if (seq->anim == NULL) {
+ return;
+ }
+
+ proxy = seq->strip->proxy;
+
+ if (proxy == NULL) {
+ return;
+ }
+
+ if (seq->flag & SEQ_USE_PROXY_CUSTOM_DIR) {
+ IMB_anim_set_index_dir(seq->anim, seq->strip->proxy->dir);
+ }
+}
+
+
static int seq_proxy_get_fname(SeqRenderData context, Sequence * seq, int cfra, char * name)
{
int frameno;
char dir[FILE_MAXDIR];
+ int render_size = context.preview_render_size;
if (!seq->strip->proxy) {
return FALSE;
}
+ /* MOVIE tracks (only exception: custom files) are now handled
+ internally by ImBuf module for various reasons: proper time code
+ support, quicker index build, using one file instead
+ of a full directory of jpeg files, etc. Trying to support old
+ and new method at once could lead to funny effects, if people
+ have both, a directory full of jpeg files and proxy avis, so
+ sorry folks, please rebuild your proxies... */
+
if (seq->flag & (SEQ_USE_PROXY_CUSTOM_DIR|SEQ_USE_PROXY_CUSTOM_FILE)) {
strcpy(dir, seq->strip->proxy->dir);
+ } else if (seq->type == SEQ_IMAGE) {
+ snprintf(dir, PROXY_MAXFILE, "%s/BL_proxy", seq->strip->dir);
} else {
- if (ELEM(seq->type, SEQ_IMAGE, SEQ_MOVIE)) {
- snprintf(dir, FILE_MAXDIR, "%s/BL_proxy", seq->strip->dir);
- } else {
- return FALSE;
- }
+ return FALSE;
}
if (seq->flag & SEQ_USE_PROXY_CUSTOM_FILE) {
- BLI_join_dirfile(name, FILE_MAX, dir, seq->strip->proxy->file); /* XXX, not real length */
+ BLI_join_dirfile(name, PROXY_MAXFILE,
+ dir, seq->strip->proxy->file);
BLI_path_abs(name, G.main->name);
return TRUE;
}
+ /* dirty hack to distinguish 100% render size from PROXY_100 */
+ if (render_size == 99) {
+ render_size = 100;
+ }
+
/* generate a separate proxy directory for each preview size */
- switch(seq->type) {
- case SEQ_IMAGE:
+ if (seq->type == SEQ_IMAGE) {
snprintf(name, PROXY_MAXFILE, "%s/images/%d/%s_proxy", dir,
context.preview_render_size,
give_stripelem(seq, cfra)->name);
frameno = 1;
- break;
- case SEQ_MOVIE:
- frameno = (int) give_stripelem_index(seq, cfra) + seq->anim_startofs;
- snprintf(name, PROXY_MAXFILE, "%s/%s/%d/####", dir,
- seq->strip->stripdata->name, context.preview_render_size);
- break;
- default:
- frameno = (int) give_stripelem_index(seq, cfra) + seq->anim_startofs;
+ } else {
+ frameno = (int) give_stripelem_index(seq, cfra)
+ + seq->anim_startofs;
snprintf(name, PROXY_MAXFILE, "%s/proxy_misc/%d/####", dir,
context.preview_render_size);
}
@@ -1182,13 +1254,18 @@ static int seq_proxy_get_fname(SeqRenderData context, Sequence * seq, int cfra,
static struct ImBuf * seq_proxy_fetch(SeqRenderData context, Sequence * seq, int cfra)
{
char name[PROXY_MAXFILE];
+ IMB_Proxy_Size psize = seq_rendersize_to_proxysize(
+ context.preview_render_size);
+ int size_flags;
if (!(seq->flag & SEQ_USE_PROXY)) {
return NULL;
}
- /* rendering at 100% ? No real sense in proxy-ing, right? */
- if (context.preview_render_size == 100) {
+ size_flags = seq->strip->proxy->build_size_flags;
+
+ /* only use proxies, if they are enabled (even if present!) */
+ if (psize != IMB_PROXY_NONE && ((size_flags & psize) != psize)) {
return NULL;
}
@@ -1199,13 +1276,19 @@ static struct ImBuf * seq_proxy_fetch(SeqRenderData context, Sequence * seq, int
return NULL;
}
- seq->strip->proxy->anim = openanim(name, IB_rect);
+ seq->strip->proxy->anim = openanim(name, IB_rect, 0);
}
if (seq->strip->proxy->anim==NULL) {
return NULL;
}
- return IMB_anim_absolute(seq->strip->proxy->anim, frameno);
+ seq_open_anim_file(seq);
+
+ frameno = IMB_anim_index_get_frame_index(
+ seq->anim, seq->strip->proxy->tc, frameno);
+
+ return IMB_anim_absolute(seq->strip->proxy->anim, frameno,
+ IMB_TC_NONE, IMB_PROXY_NONE);
}
if (seq_proxy_get_fname(context, seq, cfra, name) == 0) {
@@ -1219,67 +1302,30 @@ static struct ImBuf * seq_proxy_fetch(SeqRenderData context, Sequence * seq, int
}
}
-#if 0
-static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int cfra,
- int build_proxy_run, int preview_render_size);
-
-static void seq_proxy_build_frame(Scene *scene, Sequence * seq, int cfra, int preview_render_size, int seqrectx, int seqrecty)
+static void seq_proxy_build_frame(SeqRenderData context,
+ Sequence* seq, int cfra,
+ int proxy_render_size)
{
char name[PROXY_MAXFILE];
int quality;
- TStripElem * se;
- int ok;
int rectx, recty;
+ int ok;
struct ImBuf * ibuf;
- if (!(seq->flag & SEQ_USE_PROXY)) {
+ if (!seq_proxy_get_fname(context, seq, cfra, name)) {
return;
}
- /* rendering at 100% ? No real sense in proxy-ing, right? */
- if (preview_render_size == 100) {
- return;
- }
+ ibuf = seq_render_strip(context, seq, cfra);
- /* that's why it is called custom... */
- if (seq->flag & SEQ_USE_PROXY_CUSTOM_FILE) {
- return;
- }
-
- if (!seq_proxy_get_fname(scene, seq, cfra, name, preview_render_size)) {
- return;
- }
-
- se = give_tstripelem(seq, cfra);
- if (!se) {
- return;
- }
-
- if(se->ibuf) {
- IMB_freeImBuf(se->ibuf);
- se->ibuf = 0;
- }
-
- do_build_seq_ibuf(scene, seq, se, cfra, TRUE, preview_render_size,
- seqrectx, seqrecty);
-
- if (!se->ibuf) {
- return;
- }
-
- rectx= (preview_render_size*scene->r.xsch)/100;
- recty= (preview_render_size*scene->r.ysch)/100;
-
- ibuf = se->ibuf;
+ rectx = (proxy_render_size * context.scene->r.xsch) / 100;
+ recty = (proxy_render_size * context.scene->r.ysch) / 100;
if (ibuf->x != rectx || ibuf->y != recty) {
IMB_scalefastImBuf(ibuf, (short)rectx, (short)recty);
}
- /* quality is fixed, otherwise one has to generate separate
- directories for every quality...
-
- depth = 32 is intentionally left in, otherwise ALPHA channels
+ /* depth = 32 is intentionally left in, otherwise ALPHA channels
won't work... */
quality = seq->strip->proxy->quality;
ibuf->ftype= JPG | quality;
@@ -1292,69 +1338,80 @@ static void seq_proxy_build_frame(Scene *scene, Sequence * seq, int cfra, int pr
}
IMB_freeImBuf(ibuf);
- se->ibuf = 0;
}
-static void seq_proxy_rebuild(Scene *scene, Sequence * seq, int seqrectx,
- int seqrecty)
+void seq_proxy_rebuild(struct Main * bmain, Scene *scene, Sequence * seq,
+ short *stop, short *do_update, float *progress)
{
+ SeqRenderData context;
int cfra;
- float rsize = seq->strip->proxy->size;
+ int tc_flags;
+ int size_flags;
+ int quality;
- waitcursor(1);
-
- G.afbreek = 0;
-
- /* flag management tries to account for strobe and
- other "non-linearities", that might come in the future...
- better way would be to "touch" the files, so that _really_
- no one is rebuild twice.
- */
-
- for (cfra = seq->startdisp; cfra < seq->enddisp; cfra++) {
- TStripElem * tse = give_tstripelem(seq, cfra);
-
- tse->flag &= ~STRIPELEM_PREVIEW_DONE;
+ if (!seq->strip || !seq->strip->proxy) {
+ return;
}
-
-
- /* a _lot_ faster for movie files, if we read frames in
- sequential order */
- if (seq->flag & SEQ_REVERSE_FRAMES) {
- for (cfra = seq->enddisp-seq->endstill-1;
- cfra >= seq->startdisp + seq->startstill; cfra--) {
- TStripElem * tse = give_tstripelem(seq, cfra);
-
- if (!(tse->flag & STRIPELEM_PREVIEW_DONE)) {
-//XXX set_timecursor(cfra);
- seq_proxy_build_frame(scene, seq, cfra, rsize,
- seqrectx, seqrecty);
- tse->flag |= STRIPELEM_PREVIEW_DONE;
- }
- if (blender_test_break()) {
- break;
- }
- }
- } else {
- for (cfra = seq->startdisp + seq->startstill;
- cfra < seq->enddisp - seq->endstill; cfra++) {
- TStripElem * tse = give_tstripelem(seq, cfra);
-
- if (!(tse->flag & STRIPELEM_PREVIEW_DONE)) {
-//XXX set_timecursor(cfra);
- seq_proxy_build_frame(scene, seq, cfra, rsize,
- seqrectx, seqrecty);
- tse->flag |= STRIPELEM_PREVIEW_DONE;
- }
- if (blender_test_break()) {
- break;
- }
- }
+ if (!(seq->flag & SEQ_USE_PROXY)) {
+ return;
+ }
+
+ tc_flags = seq->strip->proxy->build_tc_flags;
+ size_flags = seq->strip->proxy->build_size_flags;
+ quality = seq->strip->proxy->quality;
+
+ if (seq->type == SEQ_MOVIE) {
+ seq_open_anim_file(seq);
+
+ if (seq->anim) {
+ IMB_anim_index_rebuild(
+ seq->anim, tc_flags, size_flags, quality,
+ stop, do_update, progress);
+ }
+ return;
+ }
+
+ if (!(seq->flag & SEQ_USE_PROXY)) {
+ return;
+ }
+
+ /* that's why it is called custom... */
+ if (seq->flag & SEQ_USE_PROXY_CUSTOM_FILE) {
+ return;
+ }
+
+ /* fail safe code */
+
+ context = seq_new_render_data(
+ bmain, scene,
+ (scene->r.size * (float) scene->r.xsch) / 100.0f + 0.5f,
+ (scene->r.size * (float) scene->r.ysch) / 100.0f + 0.5f,
+ 100);
+
+ for (cfra = seq->startdisp + seq->startstill;
+ cfra < seq->enddisp - seq->endstill; cfra++) {
+ if (size_flags & IMB_PROXY_25) {
+ seq_proxy_build_frame(context, seq, cfra, 25);
+ }
+ if (size_flags & IMB_PROXY_50) {
+ seq_proxy_build_frame(context, seq, cfra, 50);
+ }
+ if (size_flags & IMB_PROXY_75) {
+ seq_proxy_build_frame(context, seq, cfra, 75);
+ }
+ if (size_flags & IMB_PROXY_100) {
+ seq_proxy_build_frame(context, seq, cfra, 100);
+ }
+
+ *progress= (float)cfra/(seq->enddisp - seq->endstill
+ - seq->startdisp + seq->startstill);
+ *do_update= 1;
+
+ if(*stop || G.afbreek)
+ break;
}
- waitcursor(0);
}
-#endif
/* **********************************************************************
@@ -1571,6 +1628,8 @@ static ImBuf * input_preprocess(
{
float mul;
+ ibuf = IMB_makeSingleUser(ibuf);
+
if((seq->flag & SEQ_FILTERY) && seq->type != SEQ_MOVIE) {
IMB_filtery(ibuf);
}
@@ -2096,17 +2155,20 @@ static ImBuf * seq_render_strip(SeqRenderData context, Sequence * seq, float cfr
}
case SEQ_MOVIE:
{
- if(seq->anim==NULL) {
- BLI_join_dirfile(name, sizeof(name), seq->strip->dir, seq->strip->stripdata->name);
- BLI_path_abs(name, G.main->name);
-
- seq->anim = openanim(name, IB_rect |
- ((seq->flag & SEQ_FILTERY) ? IB_animdeinterlace : 0));
- }
+ seq_open_anim_file(seq);
if(seq->anim) {
- IMB_anim_set_preseek(seq->anim, seq->anim_preseek);
- ibuf = IMB_anim_absolute(seq->anim, nr + seq->anim_startofs);
+ IMB_anim_set_preseek(seq->anim,
+ seq->anim_preseek);
+
+ ibuf = IMB_anim_absolute(
+ seq->anim, nr + seq->anim_startofs,
+ seq->strip->proxy ?
+ seq->strip->proxy->tc
+ : IMB_TC_RECORD_RUN,
+ seq_rendersize_to_proxysize(
+ context.preview_render_size));
+
/* we don't need both (speed reasons)! */
if (ibuf && ibuf->rect_float && ibuf->rect)
imb_freerectImBuf(ibuf);
@@ -3584,7 +3646,7 @@ Sequence *sequencer_add_movie_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo
BLI_strncpy(path, seq_load->path, sizeof(path));
BLI_path_abs(path, G.main->name);
- an = openanim(path, IB_rect);
+ an = openanim(path, IB_rect, 0);
if(an==NULL)
return NULL;
@@ -3600,7 +3662,7 @@ Sequence *sequencer_add_movie_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo
/* basic defaults */
seq->strip= strip= MEM_callocN(sizeof(Strip), "strip");
- strip->len = seq->len = IMB_anim_get_duration( an );
+ strip->len = seq->len = IMB_anim_get_duration( an, IMB_TC_RECORD_RUN );
strip->us= 1;
/* we only need 1 element for MOVIE strips */
diff --git a/source/blender/blenlib/BLI_math_rotation.h b/source/blender/blenlib/BLI_math_rotation.h
index ee8c3d5e10c..ef20408a37e 100644
--- a/source/blender/blenlib/BLI_math_rotation.h
+++ b/source/blender/blenlib/BLI_math_rotation.h
@@ -107,9 +107,6 @@ void mat4_to_axis_angle(float axis[3], float *angle, float M[4][4]);
/* TODO: the following calls should probably be depreceated sometime */
/* conversion */
-void mat3_to_vec_rot(float vec[3], float *phi, float mat[3][3]);
-void mat4_to_vec_rot(float vec[3], float *phi, float mat[4][4]);
-
void vec_rot_to_quat(float quat[4], const float vec[3], const float phi);
void vec_rot_to_mat3(float mat[3][3], const float vec[3], const float phi);
void vec_rot_to_mat4(float mat[4][4], const float vec[3], const float phi);
diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h
index decfa22c3e6..c8b598a1e85 100644
--- a/source/blender/blenlib/BLI_math_vector.h
+++ b/source/blender/blenlib/BLI_math_vector.h
@@ -99,7 +99,7 @@ MINLINE float dot_v3v3(const float a[3], const float b[3]);
MINLINE float cross_v2v2(const float a[2], const float b[2]);
MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3]);
-MINLINE void star_m3_v3(float R[3][3],float a[3]);
+MINLINE void star_m3_v3(float rmat[3][3],float a[3]);
/*********************************** Length **********************************/
@@ -133,7 +133,7 @@ MINLINE int is_zero_v3(const float a[3]);
MINLINE int is_zero_v4(const float a[4]);
MINLINE int is_one_v3(const float a[3]);
-MINLINE int equals_v2v2(const float *v1, const float *v2);
+MINLINE int equals_v2v2(const float v1[2], const float v2[2]);
MINLINE int equals_v3v3(const float a[3], const float b[3]);
MINLINE int compare_v3v3(const float a[3], const float b[3], const float limit);
MINLINE int compare_len_v3v3(const float a[3], const float b[3], const float limit);
diff --git a/source/blender/blenlib/BLI_string.h b/source/blender/blenlib/BLI_string.h
index 408809661cf..4a0c2ab9482 100644
--- a/source/blender/blenlib/BLI_string.h
+++ b/source/blender/blenlib/BLI_string.h
@@ -122,6 +122,8 @@ __attribute__ ((format (printf, 1, 2)))
#endif
;
+size_t BLI_strescape(char *dst, const char *src, const size_t maxlen);
+
/**
* Compare two strings without regard to case.
*
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
index 28ebb254f2a..1a1f7be2471 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -105,9 +105,9 @@
#define FTOUSHORT(val) ((val >= 1.0f-0.5f/65535)? 65535: (val <= 0.0f)? 0: (unsigned short)(val*65535.0f + 0.5f))
#define F3TOCHAR3(v2,v1) (v1)[0]=FTOCHAR((v2[0])); (v1)[1]=FTOCHAR((v2[1])); (v1)[2]=FTOCHAR((v2[2]))
#define F3TOCHAR4(v2,v1) { (v1)[0]=FTOCHAR((v2[0])); (v1)[1]=FTOCHAR((v2[1])); (v1)[2]=FTOCHAR((v2[2])); \
- (v1)[3]=FTOCHAR((v2[3])); (v1)[3] = 255; }
+ (v1)[3] = 255; }
#define F4TOCHAR4(v2,v1) { (v1)[0]=FTOCHAR((v2[0])); (v1)[1]=FTOCHAR((v2[1])); (v1)[2]=FTOCHAR((v2[2])); \
- (v1)[3]=FTOCHAR((v2[3])); (v1)[3]=FTOCHAR((v2[3])); }
+ (v1)[3]=FTOCHAR((v2[3])); }
#define VECCOPY(v1,v2) {*(v1)= *(v2); *(v1+1)= *(v2+1); *(v1+2)= *(v2+2);}
diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c
index bfee350037a..03e3b7ab560 100644
--- a/source/blender/blenlib/intern/BLI_ghash.c
+++ b/source/blender/blenlib/intern/BLI_ghash.c
@@ -40,7 +40,7 @@
#include "BLO_sys_types.h" // for intptr_t support
/***/
-unsigned int hashsizes[]= {
+static unsigned int hashsizes[]= {
5, 11, 17, 37, 67, 131, 257, 521, 1031, 2053, 4099, 8209,
16411, 32771, 65537, 131101, 262147, 524309, 1048583, 2097169,
4194319, 8388617, 16777259, 33554467, 67108879, 134217757,
diff --git a/source/blender/blenlib/intern/callbacks.c b/source/blender/blenlib/intern/callbacks.c
index a033e01696d..d28f794440f 100644
--- a/source/blender/blenlib/intern/callbacks.c
+++ b/source/blender/blenlib/intern/callbacks.c
@@ -28,7 +28,7 @@
#include "MEM_guardedalloc.h"
-static ListBase callback_slots[BLI_CB_EVT_TOT]= {{0}};
+static ListBase callback_slots[BLI_CB_EVT_TOT]= {{NULL}};
void BLI_exec_cb(struct Main *main, struct ID *self, eCbEvent evt)
{
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index 2e0f4b483b1..3299752646b 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -69,8 +69,10 @@ int BLI_gzip(const char *from, const char *to) {
int readsize = 0;
int rval= 0, err;
gzFile gzfile;
-
- gzfile = gzopen(to, "wb");
+
+ /* level 1 is very close to 3 (the default) in terms of file size,
+ * but about twice as fast, best use for speedy saving - campbell */
+ gzfile = gzopen(to, "wb1");
if(gzfile == NULL)
return -1;
diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c
index e3e507d016a..6800b59c2c7 100644
--- a/source/blender/blenlib/intern/math_rotation.c
+++ b/source/blender/blenlib/intern/math_rotation.c
@@ -774,28 +774,6 @@ void mat4_to_axis_angle(float axis[3], float *angle,float mat[4][4])
/****************************** Vector/Rotation ******************************/
/* TODO: the following calls should probably be depreceated sometime */
-/* 3x3 matrix to axis angle */
-void mat3_to_vec_rot(float axis[3], float *angle,float mat[3][3])
-{
- float q[4];
-
- /* use quaternions as intermediate representation */
- // TODO: it would be nicer to go straight there...
- mat3_to_quat(q,mat);
- quat_to_axis_angle(axis, angle,q);
-}
-
-/* 4x4 matrix to axis angle */
-void mat4_to_vec_rot(float axis[3], float *angle,float mat[4][4])
-{
- float q[4];
-
- /* use quaternions as intermediate representation */
- // TODO: it would be nicer to go straight there...
- mat4_to_quat(q,mat);
- quat_to_axis_angle(axis, angle,q);
-}
-
/* axis angle to 3x3 matrix */
void vec_rot_to_mat3(float mat[][3], const float vec[3], const float phi)
{
diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c
index e2b7c770356..28708af7486 100644
--- a/source/blender/blenlib/intern/math_vector_inline.c
+++ b/source/blender/blenlib/intern/math_vector_inline.c
@@ -136,26 +136,26 @@ MINLINE void add_v3_v3(float *r, const float *a)
r[2] += a[2];
}
-MINLINE void add_v3_v3v3(float *r, const float *a, const float *b)
+MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
{
r[0]= a[0] + b[0];
r[1]= a[1] + b[1];
r[2]= a[2] + b[2];
}
-MINLINE void sub_v2_v2(float *r, const float *a)
+MINLINE void sub_v2_v2(float r[2], const float a[2])
{
r[0] -= a[0];
r[1] -= a[1];
}
-MINLINE void sub_v2_v2v2(float *r, const float *a, const float *b)
+MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
{
r[0]= a[0] - b[0];
r[1]= a[1] - b[1];
}
-MINLINE void sub_v3_v3(float *r, const float *a)
+MINLINE void sub_v3_v3(float r[3], const float a[3])
{
r[0] -= a[0];
r[1] -= a[1];
@@ -177,7 +177,7 @@ MINLINE void sub_v4_v4(float r[4], const float a[4])
r[3] -= a[3];
}
-MINLINE void sub_v4_v4v4(float r[3], const float a[3], const float b[3])
+MINLINE void sub_v4_v4v4(float r[4], const float a[4], const float b[4])
{
r[0]= a[0] - b[0];
r[1]= a[1] - b[1];
@@ -186,10 +186,10 @@ MINLINE void sub_v4_v4v4(float r[3], const float a[3], const float b[3])
}
-MINLINE void mul_v2_fl(float *v1, float f)
+MINLINE void mul_v2_fl(float r[2], float f)
{
- v1[0]*= f;
- v1[1]*= f;
+ r[0]*= f;
+ r[1]*= f;
}
MINLINE void mul_v2_v2fl(float r[2], const float a[2], float f)
@@ -281,11 +281,11 @@ MINLINE void madd_v4_v4fl(float r[4], const float a[4], float f)
r[3] += a[3]*f;
}
-MINLINE void mul_v3_v3v3(float *v, const float *v1, const float *v2)
+MINLINE void mul_v3_v3v3(float r[3], const float v1[3], const float v2[3])
{
- v[0] = v1[0] * v2[0];
- v[1] = v1[1] * v2[1];
- v[2] = v1[2] * v2[2];
+ r[0] = v1[0] * v2[0];
+ r[1] = v1[1] * v2[1];
+ r[2] = v1[2] * v2[2];
}
MINLINE void negate_v3(float r[3])
@@ -340,15 +340,15 @@ MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3])
r[2]= a[0]*b[1] - a[1]*b[0];
}
-MINLINE void star_m3_v3(float mat[][3], float *vec)
+MINLINE void star_m3_v3(float rmat[][3], float a[3])
{
- mat[0][0]= mat[1][1]= mat[2][2]= 0.0;
- mat[0][1]= -vec[2];
- mat[0][2]= vec[1];
- mat[1][0]= vec[2];
- mat[1][2]= -vec[0];
- mat[2][0]= -vec[1];
- mat[2][1]= vec[0];
+ rmat[0][0]= rmat[1][1]= rmat[2][2]= 0.0;
+ rmat[0][1]= -a[2];
+ rmat[0][2]= a[1];
+ rmat[1][0]= a[2];
+ rmat[1][2]= -a[0];
+ rmat[2][0]= -a[1];
+ rmat[2][1]= a[0];
}
/*********************************** Length **********************************/
@@ -465,27 +465,27 @@ MINLINE int is_zero_v4(const float v[4])
return (v[0] == 0 && v[1] == 0 && v[2] == 0 && v[3] == 0);
}
-MINLINE int is_one_v3(const float *v)
+MINLINE int is_one_v3(const float v[3])
{
return (v[0] == 1 && v[1] == 1 && v[2] == 1);
}
-MINLINE int equals_v2v2(const float *v1, const float *v2)
+MINLINE int equals_v2v2(const float v1[2], const float v2[2])
{
return ((v1[0]==v2[0]) && (v1[1]==v2[1]));
}
-MINLINE int equals_v3v3(const float *v1, const float *v2)
+MINLINE int equals_v3v3(const float v1[3], const float v2[3])
{
return ((v1[0]==v2[0]) && (v1[1]==v2[1]) && (v1[2]==v2[2]));
}
-MINLINE int equals_v4v4(const float *v1, const float *v2)
+MINLINE int equals_v4v4(const float v1[4], const float v2[4])
{
return ((v1[0]==v2[0]) && (v1[1]==v2[1]) && (v1[2]==v2[2]) && (v1[3]==v2[3]));
}
-MINLINE int compare_v3v3(const float *v1, const float *v2, const float limit)
+MINLINE int compare_v3v3(const float v1[3], const float v2[3], const float limit)
{
if(fabsf(v1[0]-v2[0])1.0) n=1.0;
+ if(n<0.0f) n=0.0f; else if(n>1.0f) n=1.0f;
return n;
}
/* as orgBlenderNoise(), returning signed noise */
static float orgBlenderNoiseS(float x, float y, float z)
{
- return (2.0*orgBlenderNoise(x, y, z)-1.0);
+ return (2.0f*orgBlenderNoise(x, y, z)-1.0f);
}
/* separated from orgBlenderNoise above, with scaling */
float BLI_hnoise(float noisesize, float x, float y, float z)
{
- if(noisesize==0.0) return 0.0;
- x= (1.0+x)/noisesize;
- y= (1.0+y)/noisesize;
- z= (1.0+z)/noisesize;
+ if(noisesize==0.0f) return 0.0f;
+ x= (1.0f+x)/noisesize;
+ y= (1.0f+y)/noisesize;
+ z= (1.0f+z)/noisesize;
return orgBlenderNoise(x, y, z);
}
@@ -357,7 +357,7 @@ float BLI_turbulence(float noisesize, float x, float y, float z, int nr)
s+= d*BLI_hnoise(noisesize*d, x, y, z);
div+= d;
- d*= 0.5;
+ d*= 0.5f;
nr--;
}
@@ -368,13 +368,13 @@ float BLI_turbulence1(float noisesize, float x, float y, float z, int nr)
{
float s, d= 0.5, div=1.0;
- s= fabs( (-1.0+2.0*BLI_hnoise(noisesize, x, y, z)));
+ s= fabsf( (-1.0f+2.0f*BLI_hnoise(noisesize, x, y, z)));
while(nr>0) {
- s+= fabs(d* (-1.0+2.0*BLI_hnoise(noisesize*d, x, y, z)));
+ s+= fabsf(d* (-1.0f+2.0f*BLI_hnoise(noisesize*d, x, y, z)));
div+= d;
- d*= 0.5;
+ d*= 0.5f;
nr--;
}
@@ -917,11 +917,11 @@ static float g[512+2][3]= {
#define DOT(a,b) (a[0] * b[0] + a[1] * b[1] + a[2] * b[2])
#define setup(i,b0,b1,r0,r1) \
- t = vec[i] + 10000.; \
+ t = vec[i] + 10000.0f; \
b0 = ((int)t) & 255; \
b1 = (b0+1) & 255; \
- r0 = t - (int)t; \
- r1 = r0 - 1.;
+ r0 = t - floorf(t); \
+ r1 = r0 - 1.0f;
static float noise3_perlin(float vec[3])
@@ -945,7 +945,7 @@ static float noise3_perlin(float vec[3])
#define at(rx,ry,rz) ( rx * q[0] + ry * q[1] + rz * q[2] )
-#define surve(t) ( t * t * (3. - 2. * t) )
+#define surve(t) ( t * t * (3.0f - 2.0f * t) )
/* lerp moved to improved perlin above */
@@ -982,7 +982,7 @@ static float noise3_perlin(float vec[3])
d = lerp(sy, a, b); /* interpolate in y at hi x */
- return 1.5 * lerp(sz, c, d); /* interpolate in z */
+ return 1.5f * lerp(sz, c, d); /* interpolate in z */
}
#if 0
@@ -996,7 +996,7 @@ static float turbulence_perlin(float *point, float lofreq, float hifreq)
t = 0;
for (freq = lofreq ; freq < hifreq ; freq *= 2.) {
- t += fabs(noise3_perlin(p)) / freq;
+ t += fabsf(noise3_perlin(p)) / freq;
p[0] *= 2.;
p[1] *= 2.;
p[2] *= 2.;
@@ -1024,7 +1024,7 @@ static float orgPerlinNoiseU(float x, float y, float z)
v[0] = x;
v[1] = y;
v[2] = z;
- return (0.5+0.5*noise3_perlin(v));
+ return (0.5f+0.5f*noise3_perlin(v));
}
/* *************** CALL AS: *************** */
@@ -1061,18 +1061,18 @@ float BLI_hnoisep(float noisesize, float x, float y, float z)
/* distance squared */
static float dist_Squared(float x, float y, float z, float e) { (void)e; return (x*x + y*y + z*z); }
/* real distance */
-static float dist_Real(float x, float y, float z, float e) { (void)e; return sqrt(x*x + y*y + z*z); }
+static float dist_Real(float x, float y, float z, float e) { (void)e; return sqrtf(x*x + y*y + z*z); }
/* manhattan/taxicab/cityblock distance */
-static float dist_Manhattan(float x, float y, float z, float e) { (void)e; return (fabs(x) + fabs(y) + fabs(z)); }
+static float dist_Manhattan(float x, float y, float z, float e) { (void)e; return (fabsf(x) + fabsf(y) + fabsf(z)); }
/* Chebychev */
static float dist_Chebychev(float x, float y, float z, float e)
{
float t;
(void)e;
- x = fabs(x);
- y = fabs(y);
- z = fabs(z);
+ x = fabsf(x);
+ y = fabsf(y);
+ z = fabsf(z);
t = (x>y)?x:y;
return ((z>t)?z:t);
}
@@ -1080,7 +1080,7 @@ static float dist_Chebychev(float x, float y, float z, float e)
/* minkovsky preset exponent 0.5 */
static float dist_MinkovskyH(float x, float y, float z, float e)
{
- float d = sqrt(fabs(x)) + sqrt(fabs(y)) + sqrt(fabs(z));
+ float d = sqrtf(fabsf(x)) + sqrtf(fabsf(y)) + sqrtf(fabsf(z));
(void)e;
return (d*d);
}
@@ -1092,13 +1092,13 @@ static float dist_Minkovsky4(float x, float y, float z, float e)
x *= x;
y *= y;
z *= z;
- return sqrt(sqrt(x*x + y*y + z*z));
+ return sqrtf(sqrtf(x*x + y*y + z*z));
}
/* Minkovsky, general case, slow, maybe too slow to be useful */
static float dist_Minkovsky(float x, float y, float z, float e)
{
- return pow(pow(fabs(x), e) + pow(fabs(y), e) + pow(fabs(z), e), 1.0/e);
+ return powf(powf(fabsf(x), e) + powf(fabsf(y), e) + powf(fabsf(z), e), 1.0f/e);
}
@@ -1224,35 +1224,35 @@ static float voronoi_F1S(float x, float y, float z)
{
float da[4], pa[12];
voronoi(x, y, z, da, pa, 1, 0);
- return (2.0*da[0]-1.0);
+ return (2.0f*da[0]-1.0f);
}
static float voronoi_F2S(float x, float y, float z)
{
float da[4], pa[12];
voronoi(x, y, z, da, pa, 1, 0);
- return (2.0*da[1]-1.0);
+ return (2.0f*da[1]-1.0f);
}
static float voronoi_F3S(float x, float y, float z)
{
float da[4], pa[12];
voronoi(x, y, z, da, pa, 1, 0);
- return (2.0*da[2]-1.0);
+ return (2.0f*da[2]-1.0f);
}
static float voronoi_F4S(float x, float y, float z)
{
float da[4], pa[12];
voronoi(x, y, z, da, pa, 1, 0);
- return (2.0*da[3]-1.0);
+ return (2.0f*da[3]-1.0f);
}
static float voronoi_F1F2S(float x, float y, float z)
{
float da[4], pa[12];
voronoi(x, y, z, da, pa, 1, 0);
- return (2.0*(da[1]-da[0])-1.0);
+ return (2.0f*(da[1]-da[0])-1.0f);
}
/* Crackle type pattern, just a scale/clamp of F2-F1 */
@@ -1260,7 +1260,7 @@ static float voronoi_CrS(float x, float y, float z)
{
float t = 10*voronoi_F1F2(x, y, z);
if (t>1.f) return 1.f;
- return (2.0*t-1.0);
+ return (2.0f*t-1.0f);
}
@@ -1280,13 +1280,13 @@ static float cellNoiseU(float x, float y, float z)
int zi = (int)(floor(z));
unsigned int n = xi + yi*1301 + zi*314159;
n ^= (n<<13);
- return ((float)(n*(n*n*15731 + 789221) + 1376312589) / 4294967296.0);
+ return ((float)(n*(n*n*15731 + 789221) + 1376312589) / 4294967296.0f);
}
/* idem, signed */
float cellNoise(float x, float y, float z)
{
- return (2.0*cellNoiseU(x, y, z)-1.0);
+ return (2.0f*cellNoiseU(x, y, z)-1.0f);
}
/* returns a vector/point/color in ca, using point hasharray directly */
@@ -1349,14 +1349,14 @@ float BLI_gNoise(float noisesize, float x, float y, float z, int hard, int noise
}
}
- if (noisesize!=0.0) {
- noisesize = 1.0/noisesize;
+ if (noisesize!=0.0f) {
+ noisesize = 1.0f/noisesize;
x *= noisesize;
y *= noisesize;
z *= noisesize;
}
- if (hard) return fabs(2.0*noisefunc(x, y, z)-1.0);
+ if (hard) return fabsf(2.0f*noisefunc(x, y, z)-1.0f);
return noisefunc(x, y, z);
}
@@ -1403,17 +1403,17 @@ float BLI_gTurbulence(float noisesize, float x, float y, float z, int oct, int h
z += 1;
}
- if (noisesize!=0.0) {
- noisesize = 1.0/noisesize;
+ if (noisesize!=0.0f) {
+ noisesize = 1.0f/noisesize;
x *= noisesize;
y *= noisesize;
z *= noisesize;
}
sum = 0;
- for (i=0;i<=oct;i++, amp*=0.5, fscale*=2) {
+ for (i=0;i<=oct;i++, amp*=0.5f, fscale*=2.0f) {
t = noisefunc(fscale*x, fscale*y, fscale*z);
- if (hard) t = fabs(2.0*t-1.0);
+ if (hard) t = fabsf(2.0f*t-1.0f);
sum += t * amp;
}
@@ -1439,7 +1439,7 @@ float BLI_gTurbulence(float noisesize, float x, float y, float z, int oct, int h
*/
float mg_fBm(float x, float y, float z, float H, float lacunarity, float octaves, int noisebasis)
{
- float rmd, value=0.0, pwr=1.0, pwHL=pow(lacunarity, -H);
+ float rmd, value=0.0, pwr=1.0, pwHL=powf(lacunarity, -H);
int i;
float (*noisefunc)(float, float, float);
@@ -1485,7 +1485,7 @@ float mg_fBm(float x, float y, float z, float H, float lacunarity, float octaves
z *= lacunarity;
}
- rmd = octaves - floor(octaves);
+ rmd = octaves - floorf(octaves);
if (rmd!=0.f) value += rmd * noisefunc(x, y, z) * pwr;
return value;
@@ -1508,9 +1508,9 @@ float mg_fBm(float x, float y, float z, float H, float lacunarity, float octaves
* I modified it to something that made sense to me, so it might be wrong... */
float mg_MultiFractal(float x, float y, float z, float H, float lacunarity, float octaves, int noisebasis)
{
- float rmd, value=1.0, pwr=1.0, pwHL=pow(lacunarity, -H);
+ float rmd, value=1.0, pwr=1.0, pwHL=powf(lacunarity, -H);
int i;
-
+
float (*noisefunc)(float, float, float);
switch (noisebasis) {
case 1:
@@ -1547,14 +1547,14 @@ float mg_MultiFractal(float x, float y, float z, float H, float lacunarity, floa
}
for (i=0; i<(int)octaves; i++) {
- value *= (pwr * noisefunc(x, y, z) + 1.0);
+ value *= (pwr * noisefunc(x, y, z) + 1.0f);
pwr *= pwHL;
x *= lacunarity;
y *= lacunarity;
z *= lacunarity;
}
- rmd = octaves - floor(octaves);
- if (rmd!=0.0) value *= (rmd * noisefunc(x, y, z) * pwr + 1.0);
+ rmd = octaves - floorf(octaves);
+ if (rmd!=0.0f) value *= (rmd * noisefunc(x, y, z) * pwr + 1.0f);
return value;
@@ -1574,7 +1574,7 @@ float mg_HeteroTerrain(float x, float y, float z, float H, float lacunarity, flo
{
float value, increment, rmd;
int i;
- float pwHL = pow(lacunarity, -H);
+ float pwHL = powf(lacunarity, -H);
float pwr = pwHL; /* starts with i=1 instead of 0 */
float (*noisefunc)(float, float, float);
@@ -1627,8 +1627,8 @@ float mg_HeteroTerrain(float x, float y, float z, float H, float lacunarity, flo
z *= lacunarity;
}
- rmd = octaves - floor(octaves);
- if (rmd!=0.0) {
+ rmd = octaves - floorf(octaves);
+ if (rmd!=0.0f) {
increment = (noisefunc(x, y, z) + offset) * pwr * value;
value += rmd * increment;
}
@@ -1647,7 +1647,7 @@ float mg_HybridMultiFractal(float x, float y, float z, float H, float lacunarity
{
float result, signal, weight, rmd;
int i;
- float pwHL = pow(lacunarity, -H);
+ float pwHL = powf(lacunarity, -H);
float pwr = pwHL; /* starts with i=1 instead of 0 */
float (*noisefunc)(float, float, float);
@@ -1691,8 +1691,8 @@ float mg_HybridMultiFractal(float x, float y, float z, float H, float lacunarity
y *= lacunarity;
z *= lacunarity;
- for (i=1; (weight>0.001) && (i<(int)octaves); i++) {
- if (weight>1.0) weight=1.0;
+ for (i=1; (weight>0.001f) && (i<(int)octaves); i++) {
+ if (weight>1.0f) weight=1.0f;
signal = (noisefunc(x, y, z) + offset) * pwr;
pwr *= pwHL;
result += weight * signal;
@@ -1702,7 +1702,7 @@ float mg_HybridMultiFractal(float x, float y, float z, float H, float lacunarity
z *= lacunarity;
}
- rmd = octaves - floor(octaves);
+ rmd = octaves - floorf(octaves);
if (rmd!=0.f) result += rmd * ((noisefunc(x, y, z) + offset) * pwr);
return result;
@@ -1722,7 +1722,7 @@ float mg_RidgedMultiFractal(float x, float y, float z, float H, float lacunarity
{
float result, signal, weight;
int i;
- float pwHL = pow(lacunarity, -H);
+ float pwHL = powf(lacunarity, -H);
float pwr = pwHL; /* starts with i=1 instead of 0 */
float (*noisefunc)(float, float, float);
@@ -1760,7 +1760,7 @@ float mg_RidgedMultiFractal(float x, float y, float z, float H, float lacunarity
}
}
- signal = offset - fabs(noisefunc(x, y, z));
+ signal = offset - fabsf(noisefunc(x, y, z));
signal *= signal;
result = signal;
@@ -1770,8 +1770,8 @@ float mg_RidgedMultiFractal(float x, float y, float z, float H, float lacunarity
y *= lacunarity;
z *= lacunarity;
weight = signal * gain;
- if (weight>1.0) weight=1.0; else if (weight<0.0) weight=0.0;
- signal = offset - fabs(noisefunc(x, y, z));
+ if (weight>1.0f) weight=1.0f; else if (weight<0.0f) weight=0.0f;
+ signal = offset - fabsf(noisefunc(x, y, z));
signal *= signal;
signal *= weight;
result += signal * pwr;
@@ -1859,9 +1859,9 @@ float mg_VLNoise(float x, float y, float z, float distortion, int nbas1, int nba
}
/* get a random vector and scale the randomization */
- rv[0] = noisefunc1(x+13.5, y+13.5, z+13.5) * distortion;
+ rv[0] = noisefunc1(x+13.5f, y+13.5f, z+13.5f) * distortion;
rv[1] = noisefunc1(x, y, z) * distortion;
- rv[2] = noisefunc1(x-13.5, y-13.5, z-13.5) * distortion;
+ rv[2] = noisefunc1(x-13.5f, y-13.5f, z-13.5f) * distortion;
return noisefunc2(x+rv[0], y+rv[1], z+rv[2]); /* distorted-domain noise */
}
diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c
index 8e0314ec17f..c4ed44f0cdb 100644
--- a/source/blender/blenlib/intern/string.c
+++ b/source/blender/blenlib/intern/string.c
@@ -117,6 +117,49 @@ char *BLI_sprintfN(const char *format, ...)
return n;
}
+
+/* match pythons string escaping, assume double quotes - (")
+ * TODO: should be used to create RNA animation paths.
+ * TODO: support more fancy string escaping. current code is primitive
+ * this basically is an ascii version of PyUnicode_EncodeUnicodeEscape()
+ * which is a useful reference. */
+size_t BLI_strescape(char *dst, const char *src, const size_t maxlen)
+{
+ size_t len= 0;
+ while(len < maxlen) {
+ switch(*src) {
+ case '\0':
+ break;
+ case '\\':
+ case '"':
+
+ /* less common but should also be support */
+ case '\t':
+ case '\n':
+ case '\r':
+ if(len + 1 < maxlen) {
+ *dst++ = '\\';
+ len++;
+ }
+ else {
+ /* not enough space to escape */
+ break;
+ }
+ /* intentionally pass through */
+ default:
+ *dst = *src;
+ }
+ dst++;
+ src++;
+ len++;
+ }
+
+ *dst= '\0';
+
+ return len;
+}
+
+
/* Makes a copy of the text within the "" that appear after some text 'blahblah'
* i.e. for string 'pose["apples"]' with prefix 'pose[', it should grab "apples"
*
diff --git a/source/blender/blenloader/CMakeLists.txt b/source/blender/blenloader/CMakeLists.txt
index be15b191c8a..4088481c844 100644
--- a/source/blender/blenloader/CMakeLists.txt
+++ b/source/blender/blenloader/CMakeLists.txt
@@ -55,7 +55,7 @@ set(SRC
)
if(WITH_BUILDINFO)
- add_definitions(-DNAN_BUILDINFO)
+ add_definitions(-DWITH_BUILDINFO)
endif()
blender_add_lib(bf_blenloader "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c
index 4ce5685ff18..31b3724e9f6 100644
--- a/source/blender/blenloader/intern/readblenentry.c
+++ b/source/blender/blenloader/intern/readblenentry.c
@@ -115,7 +115,7 @@ void BLO_blendhandle_print_sizes(BlendHandle *bh, void *fp)
buf[2]= buf[2]?buf[2]:' ';
buf[3]= buf[3]?buf[3]:' ';
- fprintf(fp, "['%.4s', '%s', %d, %ld ], \n", buf, name, bhead->nr, (long int)bhead->len+sizeof(BHead));
+ fprintf(fp, "['%.4s', '%s', %d, %ld ], \n", buf, name, bhead->nr, (long int)(bhead->len+sizeof(BHead)));
}
}
fprintf(fp, "]\n");
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 62209e88dc3..24ad41abf66 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -9989,12 +9989,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
if(ed) {
SEQP_BEGIN(ed, seq) {
if (seq->strip && seq->strip->proxy){
- if (sce->r.size != 100.0) {
- seq->strip->proxy->size
- = sce->r.size;
- } else {
- seq->strip->proxy->size = 25;
- }
seq->strip->proxy->quality =90;
}
}
@@ -10101,7 +10095,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
* to have them show in RNA viewer and accessible otherwise.
*/
for(ma= main->mat.first; ma; ma= ma->id.next) {
- if(ma->nodetree && strlen(ma->nodetree->id.name)==0)
+ if(ma->nodetree && ma->nodetree->id.name[0] == '\0')
strcpy(ma->nodetree->id.name, "NTShader Nodetree");
/* which_output 0 is now "not specified" */
@@ -10115,7 +10109,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
/* and composit trees */
for(sce= main->scene.first; sce; sce= sce->id.next) {
- if(sce->nodetree && strlen(sce->nodetree->id.name)==0)
+ if(sce->nodetree && sce->nodetree->id.name[0] == '\0')
strcpy(sce->nodetree->id.name, "NTCompositing Nodetree");
/* move to cameras */
@@ -10137,7 +10131,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
bNode *node;
if(tx->nodetree) {
- if(strlen(tx->nodetree->id.name)==0)
+ if(tx->nodetree->id.name[0] == '\0')
strcpy(tx->nodetree->id.name, "NTTexture Nodetree");
/* which_output 0 is now "not specified" */
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index bba5ff66658..4ee050b57f4 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -868,10 +868,12 @@ static void write_particlesettings(WriteData *wd, ListBase *idbase)
for(; dw; dw=dw->next) {
/* update indices */
dw->index = 0;
- go = part->dup_group->gobject.first;
- while(go && go->ob != dw->ob) {
- go=go->next;
- dw->index++;
+ if(part->dup_group) { /* can be NULL if lining fails or set to None */
+ go = part->dup_group->gobject.first;
+ while(go && go->ob != dw->ob) {
+ go=go->next;
+ dw->index++;
+ }
}
writestruct(wd, DATA, "ParticleDupliWeight", 1, dw);
}
@@ -2487,7 +2489,7 @@ static void write_global(WriteData *wd, int fileflags, Main *mainvar)
fg.subversion= BLENDER_SUBVERSION;
fg.minversion= BLENDER_MINVERSION;
fg.minsubversion= BLENDER_MINSUBVERSION;
-#ifdef NAN_BUILDINFO
+#ifdef WITH_BUILDINFO
{
extern char build_rev[];
fg.revision= atoi(build_rev);
diff --git a/source/blender/collada/CMakeLists.txt b/source/blender/collada/CMakeLists.txt
index e2a68d19682..3466c3ab5c0 100644
--- a/source/blender/collada/CMakeLists.txt
+++ b/source/blender/collada/CMakeLists.txt
@@ -39,27 +39,9 @@ set(INC
)
set(INC_SYS
-
+ ${OPENCOLLADA_INCLUDE_DIRS}
)
-if(APPLE)
- list(APPEND INC_SYS
- ${OPENCOLLADA_INCLUDE_DIR}/COLLADAStreamWriter
- ${OPENCOLLADA_INCLUDE_DIR}/COLLADABaseUtils
- ${OPENCOLLADA_INCLUDE_DIR}/COLLADAFramework
- ${OPENCOLLADA_INCLUDE_DIR}/COLLADASaxFrameworkLoader
- ${OPENCOLLADA_INCLUDE_DIR}/GeneratedSaxParser
- )
-else()
- list(APPEND INC_SYS
- ${OPENCOLLADA_INCLUDE_DIR}/COLLADAStreamWriter/include
- ${OPENCOLLADA_INCLUDE_DIR}/COLLADABaseUtils/include
- ${OPENCOLLADA_INCLUDE_DIR}/COLLADAFramework/include
- ${OPENCOLLADA_INCLUDE_DIR}/COLLADASaxFrameworkLoader/include
- ${OPENCOLLADA_INCLUDE_DIR}/GeneratedSaxParser/include
- )
-endif()
-
set(SRC
AnimationImporter.cpp
ArmatureExporter.cpp
@@ -107,7 +89,7 @@ set(SRC
)
if(WITH_BUILDINFO)
- add_definitions(-DNAN_BUILDINFO)
+ add_definitions(-DWITH_BUILDINFO)
endif()
if(CMAKE_COMPILER_IS_GNUCXX)
diff --git a/source/blender/collada/DocumentExporter.cpp b/source/blender/collada/DocumentExporter.cpp
index e6e0953680c..b26318f6114 100644
--- a/source/blender/collada/DocumentExporter.cpp
+++ b/source/blender/collada/DocumentExporter.cpp
@@ -52,7 +52,7 @@ extern "C"
#include "BLI_path_util.h"
#include "BLI_fileops.h"
#include "ED_keyframing.h"
-#ifdef NAN_BUILDINFO
+#ifdef WITH_BUILDINFO
extern char build_rev[];
#endif
}
@@ -1002,7 +1002,7 @@ void DocumentExporter::exportCurrentScene(Scene *sce, const char* filename, bool
else {
asset.getContributor().mAuthor = "Blender User";
}
-#ifdef NAN_BUILDINFO
+#ifdef WITH_BUILDINFO
char version_buf[128];
sprintf(version_buf, "Blender %d.%02d.%d r%s", BLENDER_VERSION/100, BLENDER_VERSION%100, BLENDER_SUBVERSION, build_rev);
asset.getContributor().mAuthoringTool = version_buf;
diff --git a/source/blender/collada/SConscript b/source/blender/collada/SConscript
index 3dd6160c445..17cca9e3706 100644
--- a/source/blender/collada/SConscript
+++ b/source/blender/collada/SConscript
@@ -38,6 +38,6 @@ else:
incs = '../blenlib ../blenkernel ../windowmanager ../makesdna ../blenloader ../makesrna ../editors/include ../../../intern/guardedalloc [OPENCOLLADA]/COLLADAStreamWriter/include [OPENCOLLADA]/COLLADABaseUtils/include [OPENCOLLADA]/COLLADAFramework/include [OPENCOLLADA]/COLLADASaxFrameworkLoader/include [OPENCOLLADA]/GeneratedSaxParser/include '.replace('[OPENCOLLADA]', env['BF_OPENCOLLADA_INC'])
if env['BF_BUILDINFO']:
- defs.append('NAN_BUILDINFO')
+ defs.append('WITH_BUILDINFO')
env.BlenderLib ('bf_collada', sources, Split(incs), defs, libtype='core', priority=200 )
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index b3338396598..f561bdc6183 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -339,7 +339,7 @@ void debug_markers_print_list(ListBase *markers)
printf("List of markers follows: -----\n");
for (marker = markers->first; marker; marker = marker->next) {
- printf("\t'%s' on %d at %p with %d\n", marker->name, marker->frame, (void *)marker, marker->flag);
+ printf("\t'%s' on %d at %p with %u\n", marker->name, marker->frame, (void *)marker, marker->flag);
}
printf("End of list ------------------\n");
diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c
index 954928fc486..718188d5800 100644
--- a/source/blender/editors/animation/fmodifier_ui.c
+++ b/source/blender/editors/animation/fmodifier_ui.c
@@ -162,7 +162,7 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s
if (i == 1)
strcpy(xval, "x");
else
- sprintf(xval, "x^%d", i);
+ sprintf(xval, "x^%u", i);
uiDefBut(block, LABEL, 1, xval, 0, 0, 50, 20, NULL, 0.0, 0.0, 0, 0, "Power of x");
}
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 628cdbf21e9..08f313bfadd 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -494,15 +494,32 @@ void ED_armature_apply_transform(Object *ob, float mat[4][4])
EditBone *ebone;
bArmature *arm= ob->data;
float scale = mat4_to_scale(mat); /* store the scale of the matrix here to use on envelopes */
-
+ float mat3[3][3];
+
+ copy_m3_m4(mat3, mat);
+ normalize_m3(mat3);
+
/* Put the armature into editmode */
ED_armature_to_edit(ob);
/* Do the rotations */
- for (ebone = arm->edbo->first; ebone; ebone=ebone->next){
+ for (ebone = arm->edbo->first; ebone; ebone=ebone->next) {
+ float delta[3], tmat[3][3];
+
+ /* find the current bone's roll matrix */
+ sub_v3_v3v3(delta, ebone->tail, ebone->head);
+ vec_roll_to_mat3(delta, ebone->roll, tmat);
+
+ /* transform the roll matrix */
+ mul_m3_m3m3(tmat, mat3, tmat);
+
+ /* transform the bone */
mul_m4_v3(mat, ebone->head);
mul_m4_v3(mat, ebone->tail);
-
+
+ /* apply the transfiormed roll back */
+ mat3_to_vec_roll(tmat, NULL, &ebone->roll);
+
ebone->rad_head *= scale;
ebone->rad_tail *= scale;
ebone->dist *= scale;
@@ -5402,12 +5419,14 @@ void ED_armature_bone_rename(bArmature *arm, char *oldnamep, char *newnamep)
ScrArea *sa;
/* add regions */
for(sa= screen->areabase.first; sa; sa= sa->next) {
- SpaceLink *sl= sa->spacedata.first;
- if(sl->spacetype == SPACE_VIEW3D) {
- View3D *v3d= (View3D *)sl;
- if(v3d->ob_centre && v3d->ob_centre->data == arm) {
- if (!strcmp(v3d->ob_centre_bone, oldname)) {
- BLI_strncpy(v3d->ob_centre_bone, newname, MAXBONENAME);
+ SpaceLink *sl;
+ for (sl= sa->spacedata.first; sl; sl= sl->next) {
+ if(sl->spacetype==SPACE_VIEW3D) {
+ View3D *v3d= (View3D *)sl;
+ if(v3d->ob_centre && v3d->ob_centre->data == arm) {
+ if (!strcmp(v3d->ob_centre_bone, oldname)) {
+ BLI_strncpy(v3d->ob_centre_bone, newname, MAXBONENAME);
+ }
}
}
}
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index dfe0a304748..f8682d3935b 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -288,7 +288,7 @@ unsigned int ED_viewedit_datamask(struct bScreen *screen);
int ED_view3d_camera_lock_check(struct View3D *v3d, struct RegionView3D *rv3d);
/* copy the camera to the view before starting a view transformation */
void ED_view3d_camera_lock_init(struct View3D *v3d, struct RegionView3D *rv3d);
-/* copy the view to the camera */
-void ED_view3d_camera_lock_sync(struct View3D *v3d, struct RegionView3D *rv3d);
+/* copy the view to the camera, return TRUE if */
+int ED_view3d_camera_lock_sync(struct View3D *v3d, struct RegionView3D *rv3d);
#endif /* ED_VIEW3D_H */
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index dd7d2ca765f..76ed9891b8e 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -530,14 +530,11 @@ static void ui_draw_but_CHARTAB(uiBut *but)
int charmax = G.charmax;
/* FO_BUILTIN_NAME font in use. There are TTF FO_BUILTIN_NAME and non-TTF FO_BUILTIN_NAME fonts */
- if(!strcmp(G.selfont->name, FO_BUILTIN_NAME))
- {
- if(G.ui_international == TRUE)
- {
+ if(!strcmp(G.selfont->name, FO_BUILTIN_NAME)) {
+ if(G.ui_international == TRUE) {
charmax = 0xff;
}
- else
- {
+ else {
charmax = 0xff;
}
}
@@ -562,16 +559,13 @@ static void ui_draw_but_CHARTAB(uiBut *but)
cs = G.charstart;
/* Set the font, in case it is not FO_BUILTIN_NAME font */
- if(G.selfont && strcmp(G.selfont->name, FO_BUILTIN_NAME))
- {
+ if(G.selfont && strcmp(G.selfont->name, FO_BUILTIN_NAME)) {
// Is the font file packed, if so then use the packed file
- if(G.selfont->packedfile)
- {
+ if(G.selfont->packedfile) {
pf = G.selfont->packedfile;
FTF_SetFont(pf->data, pf->size, 14.0);
}
- else
- {
+ else {
char tmpStr[256];
int err;
@@ -580,10 +574,8 @@ static void ui_draw_but_CHARTAB(uiBut *but)
err = FTF_SetFont((unsigned char *)tmpStr, 0, 14.0);
}
}
- else
- {
- if(G.ui_international == TRUE)
- {
+ else {
+ if(G.ui_international == TRUE) {
FTF_SetFont((unsigned char *) datatoc_bfont_ttf, datatoc_bfont_ttf_size, 14.0);
}
}
@@ -595,8 +587,7 @@ static void ui_draw_but_CHARTAB(uiBut *but)
glRectf((rect->xmin), (rect->ymin), (rect->xmax), (rect->ymax));
glColor3ub(0, 0, 0);
- for(y = 0; y < 6; y++)
- {
+ for(y = 0; y < 6; y++) {
// Do not draw more than the category allows
if(cs > charmax) break;
@@ -676,23 +667,19 @@ static void ui_draw_but_CHARTAB(uiBut *but)
glShadeModel(GL_FLAT);
/* Return Font Settings to original */
- if(U.fontsize && U.fontname[0])
- {
+ if(U.fontsize && U.fontname[0]) {
result = FTF_SetFont((unsigned char *)U.fontname, 0, U.fontsize);
}
- else if (U.fontsize)
- {
+ else if (U.fontsize) {
result = FTF_SetFont((unsigned char *) datatoc_bfont_ttf, datatoc_bfont_ttf_size, U.fontsize);
}
- if (result == 0)
- {
+ if (result == 0) {
result = FTF_SetFont((unsigned char *) datatoc_bfont_ttf, datatoc_bfont_ttf_size, 11);
}
/* resets the font size */
- if(G.ui_international == TRUE)
- {
+ if(G.ui_international == TRUE) {
// uiSetCurFont(but->block, UI_HELV);
}
}
@@ -1604,7 +1591,6 @@ void ui_dropshadow(rctf *rct, float radius, float aspect, int UNUSED(select))
#endif
{
a= i*aspect;
-
}
for(; i--; a-=aspect) {
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 3bd29f8de3e..d7eba8c0ac7 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -800,8 +800,7 @@ static void ui_add_smart_controller(bContext *C, uiBut *from, uiBut *to)
if(!act_iter) return;
/* (3) add a new controller */
- if (WM_operator_name_call(C, "LOGIC_OT_controller_add", WM_OP_EXEC_DEFAULT, NULL) & OPERATOR_FINISHED)
- {
+ if (WM_operator_name_call(C, "LOGIC_OT_controller_add", WM_OP_EXEC_DEFAULT, NULL) & OPERATOR_FINISHED) {
cont = (bController *)ob->controllers.last;
/* (4) link the sensor->controller->actuator */
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index 412c0233c35..c3a0f438fbe 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -1103,8 +1103,7 @@ int ui_id_icon_get(bContext *C, ID *id, int big)
int iconid= 0;
/* icon */
- switch(GS(id->name))
- {
+ switch(GS(id->name)) {
case ID_BR:
iconid= ui_id_brush_get_icon(C, id);
break;
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 3575a8527fc..ef88bb0bbb6 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -1361,7 +1361,7 @@ void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propna
static void ui_item_menutype_func(bContext *C, uiLayout *layout, void *arg_mt)
{
MenuType *mt= (MenuType*)arg_mt;
- Menu menu = {0};
+ Menu menu = {NULL};
menu.type= mt;
menu.layout= layout;
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index fcca3ec7aec..a6714fc0457 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -2396,6 +2396,7 @@ void uiTemplateOperatorSearch(uiLayout *layout)
#define B_STOPCAST 2
#define B_STOPANIM 3
#define B_STOPCOMPO 4
+#define B_STOPSEQ 5
static void do_running_jobs(bContext *C, void *UNUSED(arg), int event)
{
@@ -2412,6 +2413,9 @@ static void do_running_jobs(bContext *C, void *UNUSED(arg), int event)
case B_STOPCOMPO:
WM_jobs_stop(CTX_wm_manager(C), CTX_wm_area(C), NULL);
break;
+ case B_STOPSEQ:
+ WM_jobs_stop(CTX_wm_manager(C), CTX_wm_area(C), NULL);
+ break;
}
}
@@ -2433,8 +2437,11 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
if(WM_jobs_test(wm, sa))
owner = sa;
handle_event= B_STOPCOMPO;
- }
- else {
+ } else if (sa->spacetype==SPACE_SEQ) {
+ if(WM_jobs_test(wm, sa))
+ owner = sa;
+ handle_event = B_STOPSEQ;
+ } else {
Scene *scene;
/* another scene can be rendering too, for example via compositor */
for(scene= CTX_data_main(C)->scene.first; scene; scene= scene->id.next)
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 2ac9161ffa3..c96d7c1fd10 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -1280,7 +1280,7 @@ static int meshdeform_bind_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
if(mmd->bindcagecos) {
- if(mmd->bindcagecos) MEM_freeN(mmd->bindcagecos);
+ MEM_freeN(mmd->bindcagecos);
if(mmd->dyngrid) MEM_freeN(mmd->dyngrid);
if(mmd->dyninfluences) MEM_freeN(mmd->dyninfluences);
if(mmd->bindinfluences) MEM_freeN(mmd->bindinfluences);
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index b8cdc18e739..4b0c1cb1222 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -3988,7 +3988,7 @@ static void PTCacheUndo_clear(PTCacheEdit *edit)
{
PTCacheUndo *undo;
- if(edit==0) return;
+ if(edit==NULL) return;
undo= edit->undo.first;
while(undo) {
diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c
index 797ead3cd90..34f4a1e472b 100644
--- a/source/blender/editors/physics/physics_pointcache.c
+++ b/source/blender/editors/physics/physics_pointcache.c
@@ -172,7 +172,6 @@ void PTCACHE_OT_free_bake_all(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Free All Physics Bakes";
- ot->name= "Free all physics bakes";
ot->idname= "PTCACHE_OT_free_bake_all";
/* api callbacks */
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index 007ae96ae59..b937f9a4104 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -64,6 +64,7 @@
#include "DNA_brush_types.h"
#include "DNA_screen_types.h"
+#include "BKE_brush.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_global.h"
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 80a65d3224e..5e875e40f14 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -533,8 +533,7 @@ int screen_area_join(bContext *C, bScreen* scr, ScrArea *sa1, ScrArea *sa2)
dir = area_getorientation(sa1, sa2);
/*printf("dir is : %i \n", dir);*/
- if (dir < 0)
- {
+ if (dir < 0) {
if (sa1 ) sa1->flag &= ~AREA_FLAG_DRAWJOINFROM;
if (sa2 ) sa2->flag &= ~AREA_FLAG_DRAWJOINTO;
return 0;
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 1410331700f..ede17790318 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -1544,8 +1544,7 @@ static int area_max_regionsize(ScrArea *sa, ARegion *scalear, AZEdge edge)
/* subtractwidth of regions on opposite side
* prevents dragging regions into other opposite regions */
- for (ar=sa->regionbase.first; ar; ar=ar->next)
- {
+ for (ar=sa->regionbase.first; ar; ar=ar->next) {
if (ar == scalear)
continue;
@@ -1703,7 +1702,7 @@ static int region_scale_modal(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_RUNNING_MODAL;
}
-int region_scale_cancel(bContext *UNUSED(C), wmOperator *op)
+static int region_scale_cancel(bContext *UNUSED(C), wmOperator *op)
{
MEM_freeN(op->customdata);
op->customdata = NULL;
@@ -2021,12 +2020,12 @@ static void SCREEN_OT_screen_full_area(wmOperatorType *ot)
*/
typedef struct sAreaJoinData
- {
- ScrArea *sa1; /* first area to be considered */
- ScrArea *sa2; /* second area to be considered */
- ScrArea *scr; /* designed for removal */
-
- } sAreaJoinData;
+{
+ ScrArea *sa1; /* first area to be considered */
+ ScrArea *sa2; /* second area to be considered */
+ ScrArea *scr; /* designed for removal */
+
+} sAreaJoinData;
/* validate selection inside screen, set variables OK */
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 32004fd4525..d69c1d9c447 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -512,7 +512,7 @@ static float VecZDepthOrtho(float pt[2], float v1[3], float v2[3], float v3[3],
return (v1[2]*w[0]) + (v2[2]*w[1]) + (v3[2]*w[2]);
}
-static float VecZDepthPersp(float pt[2], float v1[3], float v2[3], float v3[3], float w[3])
+static float VecZDepthPersp(float pt[2], float v1[4], float v2[4], float v3[4], float w[3])
{
float wtot_inv, wtot;
float w_tmp[3];
@@ -1193,7 +1193,7 @@ static void screen_px_from_ortho(
* the perspective W coord for each vert */
static void screen_px_from_persp(
float uv[2],
- float v1co[3], float v2co[3], float v3co[3], /* screenspace coords */
+ float v1co[4], float v2co[4], float v3co[4], /* screenspace coords */
float uv1co[2], float uv2co[2], float uv3co[2],
float pixelScreenCo[4],
float w[3])
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index be985342ea8..2ee49f71a78 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -2979,7 +2979,7 @@ static void sculpt_update_brush_delta(Sculpt *sd, Object *ob, Brush *brush)
SCULPT_TOOL_GRAB, SCULPT_TOOL_NUDGE,
SCULPT_TOOL_CLAY_TUBES, SCULPT_TOOL_SNAKE_HOOK,
SCULPT_TOOL_THUMB)) {
- float grab_location[3], imat[4][4], delta[3];
+ float grab_location[3], imat[4][4], delta[3], loc[3];
if(cache->first_time) {
copy_v3_v3(cache->orig_grab_location,
@@ -2989,10 +2989,8 @@ static void sculpt_update_brush_delta(Sculpt *sd, Object *ob, Brush *brush)
add_v3_v3(cache->true_location, cache->grab_delta);
/* compute 3d coordinate at same z from original location + mouse */
- initgrabz(cache->vc->rv3d,
- cache->orig_grab_location[0],
- cache->orig_grab_location[1],
- cache->orig_grab_location[2]);
+ mul_v3_m4v3(loc, ob->obmat, cache->orig_grab_location);
+ initgrabz(cache->vc->rv3d, loc[0], loc[1], loc[2]);
ED_view3d_win_to_delta(cache->vc->ar, cache->mouse, grab_location);
@@ -3088,9 +3086,6 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob, st
else {
cache->initial_radius= brush_unprojected_radius(brush);
}
-
- if (ELEM(brush->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_SNAKE_HOOK))
- cache->initial_radius *= 2.0f;
}
if(brush_use_size_pressure(brush)) {
diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c
index 890a6cf545a..52c5100900d 100644
--- a/source/blender/editors/space_console/space_console.c
+++ b/source/blender/editors/space_console/space_console.c
@@ -165,8 +165,11 @@ static void id_drop_copy(wmDrag *drag, wmDropBox *drop)
{
char text[64];
ID *id= drag->poin;
+ char id_esc[(sizeof(id->name) - 2) * 2];
- snprintf(text, sizeof(text), "bpy.data.%s['%s']", BKE_idcode_to_name_plural(GS(id->name)), id->name+2);
+ BLI_strescape(id_esc, id->name+2, sizeof(id_esc));
+
+ snprintf(text, sizeof(text), "bpy.data.%s[\"%s\"]", BKE_idcode_to_name_plural(GS(id->name)), id_esc);
/* copy drag path to properties */
RNA_string_set(drop->ptr, "text", text);
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 4dd97c63d40..1b0893e50e0 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -621,25 +621,31 @@ void file_sfile_to_operator(wmOperator *op, SpaceFile *sfile, char *filepath)
}
/* some ops have multiple files to select */
+ /* this is called on operators check() so clear collections first since
+ * they may be already set. */
{
PointerRNA itemptr;
+ PropertyRNA *prop_files= RNA_struct_find_property(op->ptr, "files");
+ PropertyRNA *prop_dirs= RNA_struct_find_property(op->ptr, "dirs");
int i, numfiles = filelist_numfiles(sfile->files);
- if(RNA_struct_find_property(op->ptr, "files")) {
+ if(prop_files) {
+ RNA_property_collection_clear(op->ptr, prop_files);
for (i=0; ifiles, i, CHECK_FILES)) {
struct direntry *file= filelist_file(sfile->files, i);
- RNA_collection_add(op->ptr, "files", &itemptr);
+ RNA_property_collection_add(op->ptr, prop_files, &itemptr);
RNA_string_set(&itemptr, "name", file->relname);
}
}
}
-
- if(RNA_struct_find_property(op->ptr, "dirs")) {
+
+ if(prop_dirs) {
+ RNA_property_collection_clear(op->ptr, prop_dirs);
for (i=0; ifiles, i, CHECK_DIRS)) {
struct direntry *file= filelist_file(sfile->files, i);
- RNA_collection_add(op->ptr, "dirs", &itemptr);
+ RNA_property_collection_add(op->ptr, prop_dirs, &itemptr);
RNA_string_set(&itemptr, "name", file->relname);
}
}
@@ -651,25 +657,27 @@ void file_sfile_to_operator(wmOperator *op, SpaceFile *sfile, char *filepath)
void file_operator_to_sfile(SpaceFile *sfile, wmOperator *op)
{
- int change= FALSE;
- if(RNA_struct_find_property(op->ptr, "filename")) {
- RNA_string_get(op->ptr, "filename", sfile->params->file);
- change= TRUE;
- }
- if(RNA_struct_find_property(op->ptr, "directory")) {
- RNA_string_get(op->ptr, "directory", sfile->params->dir);
- change= TRUE;
- }
-
+ PropertyRNA *prop;
+
/* If neither of the above are set, split the filepath back */
- if(RNA_struct_find_property(op->ptr, "filepath")) {
- if(change==FALSE) {
- char filepath[FILE_MAX];
- RNA_string_get(op->ptr, "filepath", filepath);
- BLI_split_dirfile(filepath, sfile->params->dir, sfile->params->file);
+ if((prop= RNA_struct_find_property(op->ptr, "filepath"))) {
+ char filepath[FILE_MAX];
+ RNA_property_string_get(op->ptr, prop, filepath);
+ BLI_split_dirfile(filepath, sfile->params->dir, sfile->params->file);
+ }
+ else {
+ if((prop= RNA_struct_find_property(op->ptr, "filename"))) {
+ RNA_property_string_get(op->ptr, prop, sfile->params->file);
+ }
+ if((prop= RNA_struct_find_property(op->ptr, "directory"))) {
+ RNA_property_string_get(op->ptr, prop, sfile->params->dir);
}
}
+ /* we could check for relative_path property which is used when converting
+ * in the other direction but doesnt hurt to do this every time */
+ BLI_path_abs(sfile->params->dir, G.main->name);
+
/* XXX, files and dirs updates missing, not really so important though */
}
diff --git a/source/blender/editors/space_file/fsmenu.c b/source/blender/editors/space_file/fsmenu.c
index a6e84b0c41d..aa2ea124fe0 100644
--- a/source/blender/editors/space_file/fsmenu.c
+++ b/source/blender/editors/space_file/fsmenu.c
@@ -300,7 +300,7 @@ void fsmenu_read_system(struct FSMenu* fsmenu)
tmp= GetLogicalDrives();
- for (i=2; i < 26; i++) {
+ for (i=0; i < 26; i++) {
if ((tmp>>i) & 1) {
tmps[0]='A'+i;
tmps[1]=':';
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index 66e844e67a8..4011f038be8 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -113,7 +113,7 @@ static void image_info(Scene *scene, ImageUser *iuser, Image *ima, ImBuf *ibuf,
if(ima->source==IMA_SRC_MOVIE) {
ofs+= sprintf(str, "Movie");
if(ima->anim)
- ofs+= sprintf(str+ofs, "%d frs", IMB_anim_get_duration(ima->anim));
+ ofs+= sprintf(str+ofs, "%d frs", IMB_anim_get_duration(ima->anim, IMB_TC_RECORD_RUN));
}
else
ofs+= sprintf(str, "Image");
@@ -428,7 +428,7 @@ static void set_frames_cb(bContext *C, void *ima_v, void *iuser_v)
ImageUser *iuser= iuser_v;
if(ima->anim) {
- iuser->frames = IMB_anim_get_duration(ima->anim);
+ iuser->frames = IMB_anim_get_duration(ima->anim, IMB_TC_RECORD_RUN);
BKE_image_user_calc_frame(iuser, scene->r.cfra, 0);
}
}
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 6e0d1909963..d58b78ff6a7 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -938,9 +938,100 @@ void IMAGE_OT_replace(wmOperatorType *ot)
/******************** save image as operator ********************/
+typedef struct {
+ /* matching scene->r settings */
+ short planes, imtype, subimtype, quality;
+ char filepath[FILE_MAX]; /* keep absolute */
+} SaveImageOptions;
+
+static void save_image_options_defaults(SaveImageOptions *simopts)
+{
+ simopts->planes= R_PLANES24;
+ simopts->imtype= R_PNG;
+ simopts->subimtype= 0;
+ simopts->quality= 90;
+ simopts->filepath[0]= '\0';
+}
+
+static int save_image_options_init(SaveImageOptions *simopts, SpaceImage *sima, Scene *scene, const short guess_path)
+{
+ void *lock;
+ ImBuf *ibuf= ED_space_image_acquire_buffer(sima, &lock);
+
+ if(ibuf) {
+ Image *ima= sima->image;
+ RenderResult *rr= BKE_image_acquire_renderresult(scene, ima);
+
+ simopts->planes= ibuf->depth;
+
+ /* cant save multilayer sequence, ima->rr isn't valid for a specific frame */
+ if(rr && !(ima->source==IMA_SRC_SEQUENCE && ima->type==IMA_TYPE_MULTILAYER))
+ simopts->imtype= R_MULTILAYER;
+ else if(ima->type==IMA_TYPE_R_RESULT)
+ simopts->imtype= scene->r.imtype;
+ else if (ima->source == IMA_SRC_GENERATED)
+ simopts->imtype= R_PNG;
+ else
+ simopts->imtype= BKE_ftype_to_imtype(ibuf->ftype);
+
+ simopts->subimtype= scene->r.subimtype; /* XXX - this is lame, we need to make these available too! */
+ simopts->quality= ibuf->ftype & 0xff;
+
+ BLI_strncpy(simopts->filepath, ibuf->name, sizeof(simopts->filepath));
+
+ /* sanitize all settings */
+
+ /* unlikely but just incase */
+ if (ELEM3(simopts->planes, R_PLANESBW, R_PLANES24, R_PLANES32) == 0) {
+ simopts->planes= R_PLANES32;
+ }
+
+ /* some formats dont use quality so fallback to scenes quality */
+ if (simopts->quality == 0) {
+ simopts->quality= scene->r.quality;
+ }
+
+ /* check for empty path */
+ if(guess_path && simopts->filepath[0]==0) {
+ if ( (G.ima[0] == '/') && (G.ima[1] == '/') && (G.ima[2] == '\0') ) {
+ BLI_strncpy(simopts->filepath, "//untitled", FILE_MAX);
+ } else {
+ BLI_strncpy(simopts->filepath, G.ima, FILE_MAX);
+ }
+ BLI_path_abs(simopts->filepath, G.main->name);
+ }
+ /* cleanup */
+ BKE_image_release_renderresult(scene, ima);
+ }
+
+ ED_space_image_release_buffer(sima, lock);
+
+ return (ibuf != NULL);
+}
+
+static void save_image_options_from_op(SaveImageOptions *simopts, wmOperator *op)
+{
+ if (RNA_property_is_set(op->ptr, "color_mode")) simopts->planes= RNA_enum_get(op->ptr, "color_mode");
+ if (RNA_property_is_set(op->ptr, "file_format")) simopts->imtype= RNA_enum_get(op->ptr, "file_format");
+ // if (RNA_property_is_set(op->ptr, "subimtype")) simopts->subimtype= RNA_enum_get(op->ptr, "subimtype"); // XXX
+ if (RNA_property_is_set(op->ptr, "file_quality")) simopts->quality= RNA_int_get(op->ptr, "file_quality");
+
+ if (RNA_property_is_set(op->ptr, "filepath")) RNA_string_get(op->ptr, "filepath", simopts->filepath);
+}
+
+static void save_image_options_to_op(SaveImageOptions *simopts, wmOperator *op)
+{
+ RNA_enum_set(op->ptr, "color_mode", simopts->planes);
+ RNA_enum_set(op->ptr, "file_format", simopts->imtype);
+ // RNA_enum_set(op->ptr, "subimtype", simopts->subimtype);
+ RNA_int_set(op->ptr, "file_quality", simopts->quality);
+
+ RNA_string_set(op->ptr, "filepath", simopts->filepath);
+}
+
/* assumes name is FILE_MAX */
/* ima->name and ibuf->name should end up the same */
-static void save_image_doit(bContext *C, SpaceImage *sima, Scene *scene, wmOperator *op, char *path, int do_newpath)
+static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveImageOptions *simopts, int do_newpath)
{
Image *ima= ED_space_image(sima);
void *lock;
@@ -952,18 +1043,17 @@ static void save_image_doit(bContext *C, SpaceImage *sima, Scene *scene, wmOpera
const short save_copy= (RNA_struct_find_property(op->ptr, "copy") && RNA_boolean_get(op->ptr, "copy"));
short ok= FALSE;
- BLI_path_abs(path, bmain->name);
/* old global to ensure a 2nd save goes to same dir */
- BLI_strncpy(G.ima, path, sizeof(G.ima));
+ BLI_strncpy(G.ima, simopts->filepath, sizeof(G.ima));
WM_cursor_wait(1);
if(ima->type == IMA_TYPE_R_RESULT) {
/* enforce user setting for RGB or RGBA, but skip BW */
- if(scene->r.planes==32) {
+ if(simopts->planes==R_PLANES32) {
ibuf->depth= 32;
}
- else if(scene->r.planes==24) {
+ else if(simopts->planes==R_PLANES24) {
ibuf->depth= 24;
}
}
@@ -974,15 +1064,12 @@ static void save_image_doit(bContext *C, SpaceImage *sima, Scene *scene, wmOpera
ibuf->depth= BKE_alphatest_ibuf(ibuf) ? 32 : 24;
}
}
-
- if(scene->r.scemode & R_EXTENSION) {
- BKE_add_image_extension(path, sima->imtypenr);
- }
- if(sima->imtypenr==R_MULTILAYER) {
+ if(simopts->imtype==R_MULTILAYER) {
+ Scene *scene= CTX_data_scene(C);
RenderResult *rr= BKE_image_acquire_renderresult(scene, ima);
if(rr) {
- RE_WriteRenderResult(rr, path, scene->r.quality);
+ RE_WriteRenderResult(rr, simopts->filepath, simopts->quality);
ok= TRUE;
}
else {
@@ -990,23 +1077,23 @@ static void save_image_doit(bContext *C, SpaceImage *sima, Scene *scene, wmOpera
}
BKE_image_release_renderresult(scene, ima);
}
- else if (BKE_write_ibuf(ibuf, path, sima->imtypenr, scene->r.subimtype, scene->r.quality)) {
+ else if (BKE_write_ibuf(ibuf, simopts->filepath, simopts->imtype, simopts->subimtype, simopts->quality)) {
ok= TRUE;
}
if(ok) {
if(relative)
- BLI_path_rel(path, bmain->name); /* only after saving */
+ BLI_path_rel(simopts->filepath, bmain->name); /* only after saving */
if(ibuf->name[0]==0) {
- BLI_strncpy(ibuf->name, path, sizeof(ibuf->name));
- BLI_strncpy(ima->name, path, sizeof(ima->name));
+ BLI_strncpy(ibuf->name, simopts->filepath, sizeof(ibuf->name));
+ BLI_strncpy(ima->name, simopts->filepath, sizeof(ima->name));
}
if(!save_copy) {
if(do_newpath) {
- BLI_strncpy(ima->name, path, sizeof(ima->name));
- BLI_strncpy(ibuf->name, path, sizeof(ibuf->name));
+ BLI_strncpy(ima->name, simopts->filepath, sizeof(ima->name));
+ BLI_strncpy(ibuf->name, simopts->filepath, sizeof(ibuf->name));
}
ibuf->userflags &= ~IB_BITMAPDIRTY;
@@ -1034,7 +1121,7 @@ static void save_image_doit(bContext *C, SpaceImage *sima, Scene *scene, wmOpera
}
}
else {
- BKE_reportf(op->reports, RPT_ERROR, "Couldn't write image: %s", path);
+ BKE_reportf(op->reports, RPT_ERROR, "Couldn't write image: %s", simopts->filepath);
}
@@ -1049,17 +1136,14 @@ static void save_image_doit(bContext *C, SpaceImage *sima, Scene *scene, wmOpera
static int save_as_exec(bContext *C, wmOperator *op)
{
SpaceImage *sima= CTX_wm_space_image(C);
- Scene *scene= CTX_data_scene(C);
- Image *ima = ED_space_image(sima);
- char str[FILE_MAX];
+ SaveImageOptions simopts;
- if(!ima)
- return OPERATOR_CANCELLED;
+ /* just incase to initialize values,
+ * these should be set on invoke or by the caller. */
+ save_image_options_defaults(&simopts);
+ save_image_options_from_op(&simopts, op);
- sima->imtypenr= RNA_enum_get(op->ptr, "file_type");
- RNA_string_get(op->ptr, "filepath", str);
-
- save_image_doit(C, sima, scene, op, str, TRUE);
+ save_image_doit(C, sima, op, &simopts, TRUE);
return OPERATOR_FINISHED;
}
@@ -1069,7 +1153,7 @@ static int save_as_check(bContext *UNUSED(C), wmOperator *op)
{
char filepath[FILE_MAX];
RNA_string_get(op->ptr, "filepath", filepath);
- if(BKE_add_image_extension(filepath, RNA_enum_get(op->ptr, "file_type"))) {
+ if(BKE_add_image_extension(filepath, RNA_enum_get(op->ptr, "file_format"))) {
RNA_string_set(op->ptr, "filepath", filepath);
return TRUE;
}
@@ -1081,65 +1165,33 @@ static int save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
SpaceImage *sima= CTX_wm_space_image(C);
Image *ima = ED_space_image(sima);
Scene *scene= CTX_data_scene(C);
- ImBuf *ibuf;
- char filename[FILE_MAX];
-
- void *lock;
+ SaveImageOptions simopts;
if(!RNA_property_is_set(op->ptr, "relative_path"))
RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
if(RNA_property_is_set(op->ptr, "filepath"))
return save_as_exec(C, op);
-
- if(!ima)
+
+ if (save_image_options_init(&simopts, sima, scene, TRUE) == 0)
return OPERATOR_CANCELLED;
+ save_image_options_to_op(&simopts, op);
- /* always opens fileselect */
- ibuf= ED_space_image_acquire_buffer(sima, &lock);
-
- if(ibuf) {
- /* cant save multilayer sequence, ima->rr isn't valid for a specific frame */
- if(ima->rr && !(ima->source==IMA_SRC_SEQUENCE && ima->type==IMA_TYPE_MULTILAYER))
- sima->imtypenr= R_MULTILAYER;
- else if(ima->type==IMA_TYPE_R_RESULT)
- sima->imtypenr= scene->r.imtype;
- else if (ima->source == IMA_SRC_GENERATED)
- sima->imtypenr= R_PNG;
- else
- sima->imtypenr= BKE_ftype_to_imtype(ibuf->ftype);
-
- RNA_enum_set(op->ptr, "file_type", sima->imtypenr);
-
- if(ibuf->name[0]==0)
- if ( (G.ima[0] == '/') && (G.ima[1] == '/') && (G.ima[2] == '\0') ) {
- BLI_strncpy(filename, "//untitled", FILE_MAX);
- } else {
- BLI_strncpy(filename, G.ima, FILE_MAX);
- }
- else
- BLI_strncpy(filename, ibuf->name, FILE_MAX);
-
- /* enable save_copy by default for render results */
- if(ELEM(ima->type, IMA_TYPE_R_RESULT, IMA_TYPE_COMPOSITE) && !RNA_property_is_set(op->ptr, "copy")) {
- RNA_boolean_set(op->ptr, "copy", TRUE);
- }
-
- // XXX note: we can give default menu enums to operator for this
- image_filesel(C, op, filename);
-
- ED_space_image_release_buffer(sima, lock);
-
- return OPERATOR_RUNNING_MODAL;
+ /* enable save_copy by default for render results */
+ if(ELEM(ima->type, IMA_TYPE_R_RESULT, IMA_TYPE_COMPOSITE) && !RNA_property_is_set(op->ptr, "copy")) {
+ RNA_boolean_set(op->ptr, "copy", TRUE);
}
- ED_space_image_release_buffer(sima, lock);
+ // XXX note: we can give default menu enums to operator for this
+ image_filesel(C, op, simopts.filepath);
- return OPERATOR_CANCELLED;
+ return OPERATOR_RUNNING_MODAL;
}
void IMAGE_OT_save_as(wmOperatorType *ot)
{
+ PropertyRNA *prop;
+
/* identifiers */
ot->name= "Save As Image";
ot->idname= "IMAGE_OT_save_as";
@@ -1154,7 +1206,13 @@ void IMAGE_OT_save_as(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_enum(ot->srna, "file_type", image_file_type_items, R_PNG, "File Type", "File type to save image as.");
+
+ /* format options */
+ RNA_def_enum(ot->srna, "file_format", image_file_type_items, R_PNG, "File Type", "File type to save image as.");
+ RNA_def_enum(ot->srna, "color_mode", image_color_mode_items, R_PLANES24, "Channels", "Image channels to save");
+ prop= RNA_def_int(ot->srna, "file_quality", 90, 0, 100, "Quality", "", 0, 100);
+ RNA_def_property_subtype(prop, PROP_PERCENTAGE);
+
WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH);
RNA_def_boolean(ot->srna, "copy", 0, "Copy", "Create a new image file without modifying the current image in blender");
@@ -1164,45 +1222,19 @@ void IMAGE_OT_save_as(wmOperatorType *ot)
static int save_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
SpaceImage *sima= CTX_wm_space_image(C);
- Image *ima = ED_space_image(sima);
- void *lock;
- ImBuf *ibuf= ED_space_image_acquire_buffer(sima, &lock);
Scene *scene= CTX_data_scene(C);
- RenderResult *rr;
- char name[FILE_MAX];
+ SaveImageOptions simopts;
- if(!ima || !ibuf) {
- ED_space_image_release_buffer(sima, lock);
+ if (save_image_options_init(&simopts, sima, scene, FALSE) == 0)
return OPERATOR_CANCELLED;
- }
+ save_image_options_from_op(&simopts, op);
- /* if exists, saves over without fileselect */
-
- BLI_strncpy(name, ima->name, FILE_MAX);
- if(name[0]==0)
- BLI_strncpy(name, G.ima, FILE_MAX);
- else
- BLI_path_abs(name, bmain->name);
-
- if(BLI_exists(name) && BLI_is_writable(name)) {
- rr= BKE_image_acquire_renderresult(scene, ima);
-
- if(rr)
- sima->imtypenr= R_MULTILAYER;
- else
- sima->imtypenr= BKE_ftype_to_imtype(ibuf->ftype);
-
- BKE_image_release_renderresult(scene, ima);
- ED_space_image_release_buffer(sima, lock);
-
- save_image_doit(C, sima, scene, op, name, FALSE);
+ if (BLI_exists(simopts.filepath) && BLI_is_writable(simopts.filepath)) {
+ save_image_doit(C, sima, op, &simopts, FALSE);
}
else {
- ED_space_image_release_buffer(sima, lock);
-
- BKE_report(op->reports, RPT_ERROR, "Can not save image.");
+ BKE_reportf(op->reports, RPT_ERROR, "Can not save image, path '%s' is not writable.", simopts.filepath);
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 011f9a31c93..508cb82ee1b 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -3080,78 +3080,115 @@ void NODE_OT_delete(wmOperatorType *ot)
}
/* ****************** Delete with reconnect ******************* */
+static int is_connected_to_input_socket(bNode* node, bNodeLink* link) {
+ bNodeSocket *sock;
+ if (link->tonode == node) {
+ for(sock= node->inputs.first; sock; sock= sock->next) {
+ if (link->tosock == sock) {
+ return sock->type;
+ }
+ }
+ }
+ return -1;
+}
-/* note: in cmp_util.c is similar code, for node_compo_pass_on() */
-/* used for disabling node (similar code in node_draw.c for disable line) */
static void node_delete_reconnect(bNodeTree* tree, bNode* node)
{
- bNodeLink *link, *next;
+ bNodeLink *link, *next, *first = NULL;
bNodeSocket *valsocket= NULL, *colsocket= NULL, *vecsocket= NULL;
bNodeSocket *deliveringvalsocket= NULL, *deliveringcolsocket= NULL, *deliveringvecsocket= NULL;
bNode *deliveringvalnode= NULL, *deliveringcolnode= NULL, *deliveringvecnode= NULL;
bNodeSocket *sock;
+ int type;
+ int numberOfConnectedOutputSockets = 0;
+ int numberOfReconnections = 0;
+ int numberOfConnectedInputSockets = 0;
- /* test the inputs */
- for(sock= node->inputs.first; sock; sock= sock->next) {
- int type = sock->type;
- if(type==SOCK_VALUE && valsocket==NULL) valsocket = sock;
- if(type==SOCK_VECTOR && vecsocket==NULL) vecsocket = sock;
- if(type==SOCK_RGBA && colsocket==NULL) colsocket = sock;
- }
- // we now have the input sockets for the 'data types'
- // now find the output sockets (and nodes) in the tree that delivers data to these input sockets
+ /*
+ test the inputs, not really correct when a node has multiple input sockets of the same type
+ the first link evaluated will be used to determine the possible connection.
+ */
for(link= tree->links.first; link; link=link->next) {
- if (valsocket != NULL) {
- if (link->tosock == valsocket) {
- deliveringvalnode = link->fromnode;
- deliveringvalsocket = link->fromsock;
- }
- }
- if (vecsocket != NULL) {
- if (link->tosock == vecsocket) {
- deliveringvecnode = link->fromnode;
- deliveringvecsocket = link->fromsock;
- }
- }
- if (colsocket != NULL) {
- if (link->tosock == colsocket) {
+ if (link->tonode == node) { numberOfConnectedInputSockets++; }
+ type = is_connected_to_input_socket(node, link);
+ switch (type) {
+ case SOCK_RGBA:
+ if (colsocket == NULL) {
+ colsocket = link->tosock;
deliveringcolnode = link->fromnode;
deliveringcolsocket = link->fromsock;
}
+ break;
+ case SOCK_VECTOR:
+ if (vecsocket == NULL) {
+ vecsocket = link->tosock;
+ deliveringvecnode = link->fromnode;
+ deliveringvecsocket = link->fromsock;
+ }
+ break;
+ case SOCK_VALUE:
+ if (valsocket == NULL) {
+ valsocket = link->tosock;
+ deliveringvalnode = link->fromnode;
+ deliveringvalsocket = link->fromsock;
+ }
+ break;
+ default:
+ break;
}
}
+
// we now have the sockets+nodes that fill the inputsockets be aware for group nodes these can be NULL
// now make the links for all outputlinks of the node to be reconnected
for(link= tree->links.first; link; link=next) {
next= link->next;
if (link->fromnode == node) {
sock = link->fromsock;
+ numberOfConnectedOutputSockets ++;
+ if (!first) first = link;
switch(sock->type) {
case SOCK_VALUE:
if (deliveringvalsocket) {
link->fromnode = deliveringvalnode;
link->fromsock = deliveringvalsocket;
+ numberOfReconnections++;
}
break;
case SOCK_VECTOR:
if (deliveringvecsocket) {
link->fromnode = deliveringvecnode;
link->fromsock = deliveringvecsocket;
+ numberOfReconnections++;
}
break;
case SOCK_RGBA:
if (deliveringcolsocket) {
link->fromnode = deliveringcolnode;
link->fromsock = deliveringcolsocket;
+ numberOfReconnections++;
}
break;
}
}
}
+
+ /* when no connections have been made, and if only one delivering input socket type and one output socket we will connect those two */
+ if (numberOfConnectedOutputSockets == 1 && numberOfReconnections == 0 && numberOfConnectedInputSockets == 1) {
+ if (deliveringcolsocket) {
+ first->fromnode = deliveringcolnode;
+ first->fromsock = deliveringcolsocket;
+ } else if (deliveringvecsocket) {
+ first->fromnode = deliveringvecnode;
+ first->fromsock = deliveringvecsocket;
+ } else if (deliveringvalsocket) {
+ first->fromnode = deliveringvalnode;
+ first->fromsock = deliveringvalsocket;
+ }
+ }
+
if(node->id)
node->id->us--;
nodeFreeNode(tree, node);
-
}
static int node_delete_reconnect_exec(bContext *C, wmOperator *UNUSED(op))
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index 3560bfb9896..74e9e775087 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -231,7 +231,7 @@ void outliner_free_tree(ListBase *lb)
}
/* Find ith item from the treestore */
-TreeElement *outliner_find_tree_element(ListBase *lb, int store_index)
+static TreeElement *outliner_find_tree_element(ListBase *lb, int store_index)
{
TreeElement *te= lb->first, *tes;
while(te) {
diff --git a/source/blender/editors/space_sequencer/SConscript b/source/blender/editors/space_sequencer/SConscript
index 65bbf900556..3430c10b766 100644
--- a/source/blender/editors/space_sequencer/SConscript
+++ b/source/blender/editors/space_sequencer/SConscript
@@ -8,4 +8,7 @@ incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
incs += ' ../../makesrna ../../blenloader'
incs += ' #/intern/audaspace/intern'
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+ incs += ' ' + env['BF_PTHREADS_INC']
+
env.BlenderLib ( 'bf_editors_space_sequencer', sources, Split(incs), [], libtype=['core'], priority=[100] )
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index dc84289a8de..9a904b1a970 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -700,7 +700,7 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline
}
}
-static Sequence *special_seq_update= 0;
+static Sequence *special_seq_update= NULL;
static void UNUSED_FUNCTION(set_special_seq_update)(int val)
{
@@ -710,14 +710,14 @@ static void UNUSED_FUNCTION(set_special_seq_update)(int val)
if(val) {
// XXX special_seq_update= find_nearest_seq(&x);
}
- else special_seq_update= 0;
+ else special_seq_update= NULL;
}
void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq, int cfra, int frame_ofs)
{
struct Main *bmain= CTX_data_main(C);
- struct ImBuf *ibuf = 0;
- struct ImBuf *scope = 0;
+ struct ImBuf *ibuf= NULL;
+ struct ImBuf *scope= NULL;
struct View2D *v2d = &ar->v2d;
int rectx, recty;
float viewrectx, viewrecty;
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index e876da41bd9..18ff33fd8a9 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -47,6 +47,7 @@
#include "BLI_math.h"
#include "BLI_storage_types.h"
#include "BLI_utildefines.h"
+#include "BLI_threads.h"
#include "DNA_scene_types.h"
#include "DNA_userdef_types.h"
@@ -125,6 +126,111 @@ typedef struct TransSeq {
int len;
} TransSeq;
+/* ********************************************************************** */
+
+/* ***************** proxy job manager ********************** */
+
+typedef struct ProxyBuildJob {
+ Scene *scene;
+ struct Main * main;
+ ListBase queue;
+ ThreadMutex queue_lock;
+} ProxyJob;
+
+static void proxy_freejob(void *pjv)
+{
+ ProxyJob *pj= pjv;
+ Sequence * seq;
+
+ for (seq = pj->queue.first; seq; seq = seq->next) {
+ BLI_remlink(&pj->queue, seq);
+ seq_free_sequence_recurse(pj->scene, seq);
+ }
+
+ BLI_mutex_end(&pj->queue_lock);
+
+ MEM_freeN(pj);
+}
+
+/* only this runs inside thread */
+static void proxy_startjob(void *pjv, short *stop, short *do_update, float *progress)
+{
+ ProxyJob *pj = pjv;
+
+ while (!*stop) {
+ Sequence * seq;
+
+ BLI_mutex_lock(&pj->queue_lock);
+
+ if (!pj->queue.first) {
+ BLI_mutex_unlock(&pj->queue_lock);
+ break;
+ }
+
+ seq = pj->queue.first;
+
+ BLI_remlink(&pj->queue, seq);
+ BLI_mutex_unlock(&pj->queue_lock);
+
+ seq_proxy_rebuild(pj->main, pj->scene, seq,
+ stop, do_update, progress);
+ seq_free_sequence_recurse(pj->scene, seq);
+ }
+
+ if (*stop) {
+ fprintf(stderr,
+ "Canceling proxy rebuild on users request...\n");
+ }
+}
+
+static void proxy_endjob(void *UNUSED(customdata))
+{
+
+}
+
+void seq_proxy_build_job(const bContext *C, Sequence * seq)
+{
+ wmJob * steve;
+ ProxyJob *pj;
+ Scene *scene= CTX_data_scene(C);
+ ScrArea * sa= CTX_wm_area(C);
+
+ seq = seq_dupli_recursive(scene, scene, seq, 0);
+
+ steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C),
+ sa, "Building Proxies", WM_JOB_PROGRESS);
+
+ pj = WM_jobs_get_customdata(steve);
+
+ if (!pj) {
+ pj = MEM_callocN(sizeof(ProxyJob), "proxy rebuild job");
+
+ pj->scene= scene;
+ pj->main = CTX_data_main(C);
+
+ BLI_mutex_init(&pj->queue_lock);
+
+ WM_jobs_customdata(steve, pj, proxy_freejob);
+ WM_jobs_timer(steve, 0.1, NC_SCENE|ND_SEQUENCER,
+ NC_SCENE|ND_SEQUENCER);
+ WM_jobs_callbacks(steve, proxy_startjob, NULL, NULL,
+ proxy_endjob);
+ }
+
+ BLI_mutex_lock(&pj->queue_lock);
+ BLI_addtail(&pj->queue, seq);
+ BLI_mutex_unlock(&pj->queue_lock);
+
+ if (!WM_jobs_is_running(steve)) {
+ G.afbreek = 0;
+ WM_jobs_start(CTX_wm_manager(C), steve);
+ }
+
+ ED_area_tag_redraw(CTX_wm_area(C));
+}
+
+/* ********************************************************************** */
+
void seq_rectf(Sequence *seq, rctf *rectf)
{
if(seq->startstill) rectf->xmin= seq->start;
@@ -2690,6 +2796,37 @@ void SEQUENCER_OT_view_ghost_border(wmOperatorType *ot)
WM_operator_properties_gesture_border(ot, FALSE);
}
+/* rebuild_proxy operator */
+static int sequencer_rebuild_proxy_exec(bContext *C, wmOperator *UNUSED(op))
+{
+ Scene *scene = CTX_data_scene(C);
+ Editing *ed = seq_give_editing(scene, FALSE);
+ Sequence * seq;
+
+ SEQP_BEGIN(ed, seq) {
+ if ((seq->flag & SELECT)) {
+ seq_proxy_build_job(C, seq);
+ }
+ }
+ SEQ_END
+
+ return OPERATOR_FINISHED;
+}
+
+void SEQUENCER_OT_rebuild_proxy(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Rebuild Proxy and Timecode Indices";
+ ot->idname= "SEQUENCER_OT_rebuild_proxy";
+ ot->description="Rebuild all selected proxies and timecode indeces using the job system";
+
+ /* api callbacks */
+ ot->exec= sequencer_rebuild_proxy_exec;
+ ot->poll= ED_operator_sequencer_active;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER;
+}
/* change ops */
diff --git a/source/blender/editors/space_sequencer/sequencer_intern.h b/source/blender/editors/space_sequencer/sequencer_intern.h
index 7ab76f9b6d7..89e9a22c9a1 100644
--- a/source/blender/editors/space_sequencer/sequencer_intern.h
+++ b/source/blender/editors/space_sequencer/sequencer_intern.h
@@ -118,6 +118,8 @@ void SEQUENCER_OT_change_path(struct wmOperatorType *ot);
void SEQUENCER_OT_copy(struct wmOperatorType *ot);
void SEQUENCER_OT_paste(struct wmOperatorType *ot);
+void SEQUENCER_OT_rebuild_proxy(struct wmOperatorType *ot);
+
/* preview specific operators */
void SEQUENCER_OT_view_all_preview(struct wmOperatorType *ot);
diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c
index df33ce73b9c..5c13b57cca8 100644
--- a/source/blender/editors/space_sequencer/sequencer_ops.c
+++ b/source/blender/editors/space_sequencer/sequencer_ops.c
@@ -87,6 +87,7 @@ void sequencer_operatortypes(void)
WM_operatortype_append(SEQUENCER_OT_view_zoom_ratio);
WM_operatortype_append(SEQUENCER_OT_view_ghost_border);
+ WM_operatortype_append(SEQUENCER_OT_rebuild_proxy);
WM_operatortype_append(SEQUENCER_OT_change_effect_input);
WM_operatortype_append(SEQUENCER_OT_change_effect_type);
WM_operatortype_append(SEQUENCER_OT_change_path);
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index 0ac23765167..86b28f5e89e 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -846,7 +846,7 @@ static int sequencer_borderselect_exec(bContext *C, wmOperator *op)
for(seq= ed->seqbasep->first; seq; seq= seq->next) {
seq_rectf(seq, &rq);
- if(BLI_isect_rctf(&rq, &rectf, 0)) {
+ if(BLI_isect_rctf(&rq, &rectf, NULL)) {
if(selecting) seq->flag |= SELECT;
else seq->flag &= ~SEQ_ALLSEL;
recurs_sel_seq(seq);
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c
index 550f2c937fd..c7d4d78422e 100644
--- a/source/blender/editors/space_text/space_text.c
+++ b/source/blender/editors/space_text/space_text.c
@@ -274,7 +274,7 @@ static void text_keymap(struct wmKeyConfig *keyconf)
RNA_string_set(kmi->ptr, "data_path", "space_data.font_size");
RNA_boolean_set(kmi->ptr, "reverse", 1);
- WM_keymap_add_item(keymap, "TEXT_OT_new", NKEY, KM_PRESS, KM_ALT, 0);
+ WM_keymap_add_item(keymap, "TEXT_OT_new", NKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "TEXT_OT_open", OKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "TEXT_OT_reload", RKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "TEXT_OT_save", SKEY, KM_PRESS, KM_ALT, 0);
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 13eb24ed1f2..617bbf62e92 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -192,11 +192,12 @@ static int new_exec(bContext *C, wmOperator *UNUSED(op))
void TEXT_OT_new(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "New";
+ ot->name= "Create Text Block";
ot->idname= "TEXT_OT_new";
ot->description= "Create a new text data block";
/* api callbacks */
+ ot->invoke= WM_operator_confirm;
ot->exec= new_exec;
ot->poll= text_new_poll;
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index ad621257602..103a03eece2 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -316,11 +316,9 @@ static float cube[8][3] = {
static void drawsolidcube_size(float xsize, float ysize, float zsize)
{
static GLuint displist=0;
- float n[3];
+ float n[3]= {0.0f};
glScalef(xsize, ysize, zsize);
-
- n[0]=0; n[1]=0; n[2]=0;
if(displist==0) {
displist= glGenLists(1);
@@ -346,7 +344,6 @@ static void drawsolidcube_size(float xsize, float ysize, float zsize)
n[2]= 1.0;
glNormal3fv(n);
glVertex3fv(cube[1]); glVertex3fv(cube[5]); glVertex3fv(cube[6]); glVertex3fv(cube[2]);
- n[2]=0;
n[2]= -1.0;
glNormal3fv(n);
glVertex3fv(cube[7]); glVertex3fv(cube[4]); glVertex3fv(cube[0]); glVertex3fv(cube[3]);
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 62fe8492597..eb2c9d5e6ce 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -2893,7 +2893,18 @@ static int draw_mesh_object(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
Object *obedit= scene->obedit;
Mesh *me= ob->data;
EditMesh *em= me->edit_mesh;
- int do_alpha_pass= 0, drawlinked= 0, retval= 0, glsl, check_alpha;
+ int do_alpha_pass= 0, drawlinked= 0, retval= 0, glsl, check_alpha, i;
+
+ /* If we are drawing shadows and any of the materials don't cast a shadow,
+ * then don't draw the object */
+ if (v3d->flag2 & V3D_RENDER_SHADOW) {
+ for(i=0; itotcol; ++i) {
+ Material *ma= give_current_material(ob, i);
+ if (ma && !(ma->mode & MA_SHADBUF)) {
+ return 1;
+ }
+ }
+ }
if(obedit && ob!=obedit && ob->data==obedit->data) {
if(ob_get_key(ob) || ob_get_key(obedit));
@@ -6162,8 +6173,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
}
/* draw code for smoke */
- if((md = modifiers_findByType(ob, eModifierType_Smoke)))
- {
+ if((md = modifiers_findByType(ob, eModifierType_Smoke))) {
SmokeModifierData *smd = (SmokeModifierData *)md;
// draw collision objects
@@ -6555,7 +6565,6 @@ void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec
switch( ob->type) {
case OB_MESH:
- {
if(ob->mode & OB_MODE_EDIT) {
Mesh *me= ob->data;
EditMesh *em= me->edit_mesh;
@@ -6589,8 +6598,9 @@ void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec
EM_free_index_arrays();
}
- else bbs_mesh_solid(scene, ob);
- }
+ else {
+ bbs_mesh_solid(scene, ob);
+ }
break;
case OB_CURVE:
case OB_SURF:
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index f8837594ddb..80da75bc603 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -1141,12 +1141,10 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d)
glRectf(x1i, y1i, x2i, y2i);
#ifdef VIEW3D_CAMERA_BORDER_HACK
- {
- if(view3d_camera_border_hack_test == TRUE) {
- glColor4fv(view3d_camera_border_hack_col);
- glRectf(x1i+1, y1i+1, x2i-1, y2i-1);
- view3d_camera_border_hack_test= FALSE;
- }
+ if(view3d_camera_border_hack_test == TRUE) {
+ glColor4fv(view3d_camera_border_hack_col);
+ glRectf(x1i+1, y1i+1, x2i-1, y2i-1);
+ view3d_camera_border_hack_test= FALSE;
}
#endif
@@ -2155,7 +2153,7 @@ static void gpu_update_lamps_shadows(Scene *scene, View3D *v3d)
v3d->drawtype = OB_SOLID;
v3d->lay &= GPU_lamp_shadow_layer(shadow->lamp);
v3d->flag2 &= ~V3D_SOLID_TEX;
- v3d->flag2 |= V3D_RENDER_OVERRIDE;
+ v3d->flag2 |= V3D_RENDER_OVERRIDE | V3D_RENDER_SHADOW;
GPU_lamp_shadow_buffer_bind(shadow->lamp, viewmat, &winsize, winmat);
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 979a602b4f5..e9ed5dac3de 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -97,7 +97,8 @@ void ED_view3d_camera_lock_init(View3D *v3d, RegionView3D *rv3d)
}
}
-void ED_view3d_camera_lock_sync(View3D *v3d, RegionView3D *rv3d)
+/* return TRUE if the camera is moved */
+int ED_view3d_camera_lock_sync(View3D *v3d, RegionView3D *rv3d)
{
if(ED_view3d_camera_lock_check(v3d, rv3d)) {
Object *root_parent;
@@ -132,6 +133,11 @@ void ED_view3d_camera_lock_sync(View3D *v3d, RegionView3D *rv3d)
DAG_id_tag_update(&v3d->camera->id, OB_RECALC_OB);
WM_main_add_notifier(NC_OBJECT|ND_TRANSFORM, v3d->camera);
}
+
+ return TRUE;
+ }
+ else {
+ return FALSE;
}
}
@@ -372,12 +378,12 @@ static void calctrackballvec(rcti *rect, int mx, int my, float *vec)
y/= (float)((rect->ymax - rect->ymin)/2);
d = sqrt(x*x + y*y);
- if (d < radius * (float)M_SQRT1_2) /* Inside sphere */
- z = sqrt(radius*radius - d*d);
- else
- { /* On hyperbola */
- t = radius / (float)M_SQRT2;
- z = t*t / d;
+ if (d < radius * (float)M_SQRT1_2) { /* Inside sphere */
+ z= sqrt(radius*radius - d*d);
+ }
+ else { /* On hyperbola */
+ t= radius / (float)M_SQRT2;
+ z= t*t / d;
}
vec[0]= x;
@@ -944,17 +950,22 @@ void ndof_to_quat(struct wmNDOFMotionData* ndof, float q[4])
axis_angle_to_quat(q, axis, angle);
}
+/* -- "orbit" navigation (trackball/turntable)
+ * -- zooming
+ * -- panning in rotationally-locked views
+ */
static int ndof_orbit_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
-// -- "orbit" navigation (trackball/turntable)
-// -- zooming
-// -- panning in rotationally-locked views
{
- if (event->type != NDOF_MOTION)
+ if (event->type != NDOF_MOTION) {
return OPERATOR_CANCELLED;
+ }
else {
+ View3D *v3d= CTX_wm_view3d(C);
RegionView3D* rv3d = CTX_wm_region_view3d(C);
wmNDOFMotionData* ndof = (wmNDOFMotionData*) event->customdata;
+ ED_view3d_camera_lock_init(v3d, rv3d);
+
rv3d->rot_angle = 0.f; // off by default, until changed later this function
if (ndof->progress != P_FINISHING) {
@@ -1064,6 +1075,8 @@ static int ndof_orbit_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event
}
}
+ ED_view3d_camera_lock_sync(v3d, rv3d);
+
ED_region_tag_redraw(CTX_wm_region(C));
return OPERATOR_FINISHED;
@@ -1085,16 +1098,20 @@ void VIEW3D_OT_ndof_orbit(struct wmOperatorType *ot)
ot->flag = 0;
}
+/* -- "pan" navigation
+ * -- zoom or dolly?
+ */
static int ndof_pan_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
-// -- "pan" navigation
-// -- zoom or dolly?
{
- if (event->type != NDOF_MOTION)
+ if (event->type != NDOF_MOTION) {
return OPERATOR_CANCELLED;
+ }
else {
+ View3D *v3d= CTX_wm_view3d(C);
RegionView3D* rv3d = CTX_wm_region_view3d(C);
wmNDOFMotionData* ndof = (wmNDOFMotionData*) event->customdata;
+ ED_view3d_camera_lock_init(v3d, rv3d);
rv3d->rot_angle = 0.f; // we're panning here! so erase any leftover rotation from other operators
@@ -1141,6 +1158,8 @@ static int ndof_pan_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
sub_v3_v3(rv3d->ofs, pan_vec);
}
+ ED_view3d_camera_lock_sync(v3d, rv3d);
+
ED_region_tag_redraw(CTX_wm_region(C));
return OPERATOR_FINISHED;
@@ -1620,8 +1639,7 @@ static int viewzoom_invoke(bContext *C, wmOperator *op, wmEvent *event)
vod= op->customdata;
/* if one or the other zoom position aren't set, set from event */
- if (!RNA_property_is_set(op->ptr, "mx") || !RNA_property_is_set(op->ptr, "my"))
- {
+ if (!RNA_property_is_set(op->ptr, "mx") || !RNA_property_is_set(op->ptr, "my")) {
RNA_int_set(op->ptr, "mx", event->x);
RNA_int_set(op->ptr, "my", event->y);
}
@@ -1834,8 +1852,7 @@ static int viewdolly_invoke(bContext *C, wmOperator *op, wmEvent *event)
vod= op->customdata;
/* if one or the other zoom position aren't set, set from event */
- if (!RNA_property_is_set(op->ptr, "mx") || !RNA_property_is_set(op->ptr, "my"))
- {
+ if (!RNA_property_is_set(op->ptr, "mx") || !RNA_property_is_set(op->ptr, "my")) {
RNA_int_set(op->ptr, "mx", event->x);
RNA_int_set(op->ptr, "my", event->y);
}
diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c
index e47cb1db753..8416b37fd5e 100644
--- a/source/blender/editors/space_view3d/view3d_ops.c
+++ b/source/blender/editors/space_view3d/view3d_ops.c
@@ -263,9 +263,13 @@ void view3d_keymap(wmKeyConfig *keyconf)
/* selection*/
WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, 0, 0);
- RNA_boolean_set(WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", TRUE);
- RNA_boolean_set(WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0)->ptr, "center", TRUE);
- RNA_boolean_set(WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "enumerate", TRUE);
+ kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
+ RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ kmi= WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
+ RNA_boolean_set(kmi->ptr, "center", TRUE);
+ RNA_boolean_set(kmi->ptr, "object", TRUE); /* use Ctrl+Select for 2 purposes */
+ kmi= WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
+ RNA_boolean_set(kmi->ptr, "enumerate", TRUE);
/* selection key-combinations */
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 86112a42d99..65914ead899 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -1231,8 +1231,8 @@ static int mouse_select(bContext *C, const int mval[2], short extend, short obce
if(BASACT && BASACT->next) startbase= BASACT->next;
/* This block uses the control key to make the object selected by its center point rather than its contents */
- /* XXX later on, in editmode do not activate */
- if(vc.obedit==NULL && obcenter) {
+ /* in editmode do not activate */
+ if(obcenter) {
/* note; shift+alt goes to group-flush-selecting */
if(enumerate) {
@@ -1765,9 +1765,15 @@ static int view3d_borderselect_exec(bContext *C, wmOperator *op)
case OB_CURVE:
case OB_SURF:
ret= do_nurbs_box_select(&vc, &rect, select, extend);
+ if(ret & OPERATOR_FINISHED) {
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, vc.obedit->data);
+ }
break;
case OB_MBALL:
ret= do_meta_box_select(&vc, &rect, select, extend);
+ if(ret & OPERATOR_FINISHED) {
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, vc.obedit->data);
+ }
break;
case OB_ARMATURE:
ret= do_armature_box_select(&vc, &rect, select, extend);
@@ -1838,11 +1844,22 @@ static int view3d_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
short extend= RNA_boolean_get(op->ptr, "extend");
short center= RNA_boolean_get(op->ptr, "center");
short enumerate= RNA_boolean_get(op->ptr, "enumerate");
+ short object= RNA_boolean_get(op->ptr, "object");
int retval = 0;
view3d_operator_needs_opengl(C);
- if(obedit && center==FALSE) {
+ if(object) {
+ obedit= NULL;
+ obact= NULL;
+
+ /* ack, this is incorrect but to do this correctly we would need an
+ * alternative editmode/objectmode keymap, this copies the functionality
+ * from 2.4x where Ctrl+Select in editmode does object select only */
+ center= FALSE;
+ }
+
+ if(obedit && object==FALSE) {
if(obedit->type==OB_MESH)
retval = mouse_mesh(C, event->mval, extend);
else if(obedit->type==OB_ARMATURE)
@@ -1891,6 +1908,7 @@ void VIEW3D_OT_select(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first.");
RNA_def_boolean(ot->srna, "center", 0, "Center", "Use the object center when selecting, in editmode used to extend object selection.");
RNA_def_boolean(ot->srna, "enumerate", 0, "Enumerate", "List objects under the mouse (object mode only).");
+ RNA_def_boolean(ot->srna, "object", 0, "Object", "Use object selection (editmode only).");
}
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index ed0b2645c99..c48459108eb 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -840,8 +840,7 @@ void project_int_noclip(ARegion *ar, const float vec[3], int adr[2])
adr[0] = (int)floor(fx);
adr[1] = (int)floor(fy);
}
- else
- {
+ else {
adr[0] = ar->winx / 2;
adr[1] = ar->winy / 2;
}
@@ -904,8 +903,7 @@ void project_float_noclip(ARegion *ar, const float vec[3], float adr[2])
adr[0] = (float)(ar->winx/2.0f)+(ar->winx/2.0f)*vec4[0]/vec4[3];
adr[1] = (float)(ar->winy/2.0f)+(ar->winy/2.0f)*vec4[1]/vec4[3];
}
- else
- {
+ else {
adr[0] = ar->winx / 2.0f;
adr[1] = ar->winy / 2.0f;
}
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index 70659994c55..05159414975 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -833,7 +833,7 @@ static int select_edgeloop(Scene *scene, Image *ima, EditMesh *em, NearestHit *h
if(extend) {
tf= CustomData_em_get(&em->fdata, hit->efa->data, CD_MTFACE);
- if(uvedit_uv_selected(scene, hit->efa, tf, hit->edge) && uvedit_uv_selected(scene, hit->efa, tf, hit->edge))
+ if(uvedit_uv_selected(scene, hit->efa, tf, hit->edge))
select= 0;
else
select= 1;
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index 470b99de00b..77498835d57 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -82,7 +82,7 @@ typedef enum GPUDataSource {
} GPUDataSource;
static const char* GPU_DATATYPE_STR[17] = {"", "float", "vec2", "vec3", "vec4",
- 0, 0, 0, 0, "mat3", 0, 0, 0, 0, 0, 0, "mat4"};
+ NULL, NULL, NULL, NULL, "mat3", NULL, NULL, NULL, NULL, NULL, NULL, "mat4"};
struct GPUNode {
struct GPUNode *next, *prev;
@@ -291,7 +291,7 @@ static void gpu_parse_functions_string(GHash *hash, char *code)
}
}
- if(strlen(function->name) == 0 || function->totparam == 0) {
+ if(function->name[0] == '\0' || function->totparam == 0) {
fprintf(stderr, "GPU functions parse error.\n");
MEM_freeN(function);
break;
@@ -451,7 +451,7 @@ static int codegen_input_has_texture(GPUInput *input)
else if(input->ima)
return 1;
else
- return input->tex != 0;
+ return input->tex != NULL;
}
const char *GPU_builtin_name(GPUBuiltin builtin)
@@ -880,7 +880,7 @@ void GPU_pass_unbind(GPUPass *pass)
GPU_texture_unbind(input->tex);
if (input->ima)
- input->tex = 0;
+ input->tex = NULL;
}
GPU_shader_unbind(shader);
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 9878d83ff5a..7af5ef6ea14 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -308,7 +308,7 @@ void GPU_set_anisotropic(float value)
}
}
-float GPU_get_anisotropic()
+float GPU_get_anisotropic(void)
{
return GTS.anisotropic;
}
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index f6352a96878..c9f1b093b7a 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -484,7 +484,7 @@ GPUTexture *GPU_texture_create_3D(int w, int h, int depth, float *fpixels)
//if (fpixels)
// pixels = GPU_texture_convert_pixels(w*h*depth, fpixels);
- glTexImage3D(tex->target, 0, internalformat, tex->w, tex->h, tex->depth, 0, format, type, 0);
+ glTexImage3D(tex->target, 0, internalformat, tex->w, tex->h, tex->depth, 0, format, type, NULL);
GPU_print_error("3D glTexImage3D");
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index 274884000db..15b96b6d808 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -358,7 +358,7 @@ void GPU_material_enable_alpha(GPUMaterial *material)
material->alpha= 1;
}
-GPUBlendMode GPU_material_blend_mode(GPUMaterial *material, float obcol[3])
+GPUBlendMode GPU_material_blend_mode(GPUMaterial *material, float obcol[4])
{
if(material->alpha || (material->obcolalpha && obcol[3] < 1.0f))
return GPU_BLEND_ALPHA;
@@ -906,6 +906,7 @@ static void do_material_tex(GPUShadeInput *shi)
int init_done = 0, iBumpSpacePrev;
GPUNodeLink *vNorg, *vNacc, *fPrevMagnitude;
int iFirstTimeNMap=1;
+ int found_deriv_map = 0;
GPU_link(mat, "set_value", GPU_uniform(&one), &stencil);
@@ -1043,6 +1044,8 @@ static void do_material_tex(GPUShadeInput *shi)
if(!(mat->scene->gm.flag & GAME_GLSL_NO_EXTRA_TEX) && (mtex->mapto & MAP_NORM)) {
if(tex->type==TEX_IMAGE) {
+ found_deriv_map = tex->imaflag & TEX_DERIVATIVEMAP;
+
if(tex->imaflag & TEX_NORMALMAP) {
/* normalmap image */
GPU_link(mat, "mtex_normal", texco, GPU_image(tex->ima, &tex->iuser), &tnor );
@@ -1082,9 +1085,10 @@ static void do_material_tex(GPUShadeInput *shi)
GPU_link(mat, "mtex_blend_normal", tnorfac, shi->vn, newnor, &shi->vn);
}
- } else if( mtex->texflag & (MTEX_3TAP_BUMP|MTEX_5TAP_BUMP)) {
+ } else if( (mtex->texflag & (MTEX_3TAP_BUMP|MTEX_5TAP_BUMP)) || found_deriv_map) {
/* ntap bumpmap image */
int iBumpSpace;
+ float ima_x, ima_y;
float hScale = 0.1f; // compatibility adjustment factor for all bumpspace types
float hScaleTex = 13.0f; // factor for scaling texspace bumps
@@ -1142,9 +1146,24 @@ static void do_material_tex(GPUShadeInput *shi)
iBumpSpacePrev = iBumpSpace;
}
+
+ // resolve texture resolution
+ if( (mtex->texflag & MTEX_BUMP_TEXTURESPACE) || found_deriv_map ) {
+ ImBuf *ibuf= BKE_image_get_ibuf(tex->ima, &tex->iuser);
+ ima_x= 512.0f; ima_y= 512.f; // prevent calling textureSize, glsl 1.3 only
+ if(ibuf) {
+ ima_x= ibuf->x;
+ ima_y= ibuf->y;
+ }
+ }
- if( mtex->texflag & MTEX_3TAP_BUMP )
+ if(found_deriv_map) {
+ GPU_link( mat, "mtex_bump_deriv",
+ texco, GPU_image(tex->ima, &tex->iuser), GPU_uniform(&ima_x), GPU_uniform(&ima_y), tnorfac,
+ &dBs, &dBt );
+ }
+ else if( mtex->texflag & MTEX_3TAP_BUMP )
GPU_link( mat, "mtex_bump_tap3",
texco, GPU_image(tex->ima, &tex->iuser), tnorfac,
&dBs, &dBt );
@@ -1155,12 +1174,6 @@ static void do_material_tex(GPUShadeInput *shi)
if( mtex->texflag & MTEX_BUMP_TEXTURESPACE ) {
- float ima_x= 512.0f, ima_y= 512.f; // prevent calling textureSize, glsl 1.3 only
- ImBuf *ibuf= BKE_image_get_ibuf(tex->ima, &tex->iuser);
- if(ibuf) {
- ima_x= ibuf->x;
- ima_y= ibuf->y;
- }
GPU_link( mat, "mtex_bump_apply_texspace",
fDet, dBs, dBt, vR1, vR2,
diff --git a/source/blender/gpu/intern/gpu_shader_material.glsl b/source/blender/gpu/intern/gpu_shader_material.glsl
index feb0a84fa87..815b74a1bf4 100644
--- a/source/blender/gpu/intern/gpu_shader_material.glsl
+++ b/source/blender/gpu/intern/gpu_shader_material.glsl
@@ -1226,6 +1226,22 @@ void mtex_bump_tap5( vec3 texco, sampler2D ima, float hScale,
dBt = hScale * (Hu - Hd);
}
+void mtex_bump_deriv( vec3 texco, sampler2D ima, float ima_x, float ima_y, float hScale,
+ out float dBs, out float dBt )
+{
+ float s = 1.0; // negate this if flipped texture coordinate
+ vec2 TexDx = dFdx(texco.xy);
+ vec2 TexDy = dFdy(texco.xy);
+
+ // this variant using a derivative map is described here
+ // http://mmikkelsen3d.blogspot.com/2011/07/derivative-maps.html
+ vec2 dim = vec2(ima_x, ima_y);
+ vec2 dBduv = hScale*dim*(2.0*texture2D(ima, texco.xy).xy-1.0);
+
+ dBs = dBduv.x*TexDx.x + s*dBduv.y*TexDx.y;
+ dBt = dBduv.x*TexDy.x + s*dBduv.y*TexDy.y;
+}
+
void mtex_bump_apply( float fDet, float dBs, float dBt, vec3 vR1, vec3 vR2, vec3 vNacc_in,
out vec3 vNacc_out, out vec3 perturbed_norm )
{
diff --git a/source/blender/gpu/intern/gpu_shader_material.glsl.c b/source/blender/gpu/intern/gpu_shader_material.glsl.c
index b60f7f1555e..87a8ed65532 100644
--- a/source/blender/gpu/intern/gpu_shader_material.glsl.c
+++ b/source/blender/gpu/intern/gpu_shader_material.glsl.c
@@ -1,843 +1,861 @@
/* DataToC output of file */
-int datatoc_gpu_shader_material_glsl_size= 39207;
+int datatoc_gpu_shader_material_glsl_size= 39789;
char datatoc_gpu_shader_material_glsl[]= {
- 10,102,108,111, 97,116, 32,
-101,120,112, 95, 98,108,101,110,100,101,114, 40,102,108,111, 97,116, 32,102, 41, 10,123, 10, 9,114,101,116,117,114,110, 32,112,
-111,119, 40, 50, 46, 55, 49, 56, 50, 56, 49, 56, 50, 56, 52, 54, 44, 32,102, 41, 59, 10,125, 10, 10,118,111,105,100, 32,114,103,
- 98, 95,116,111, 95,104,115,118, 40,118,101, 99, 52, 32,114,103, 98, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,
-111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32, 99,109, 97,120, 44, 32, 99,109,105,110, 44, 32,104, 44, 32,115, 44, 32,118,
- 44, 32, 99,100,101,108,116, 97, 59, 10, 9,118,101, 99, 51, 32, 99, 59, 10, 10, 9, 99,109, 97,120, 32, 61, 32,109, 97,120, 40,
-114,103, 98, 91, 48, 93, 44, 32,109, 97,120, 40,114,103, 98, 91, 49, 93, 44, 32,114,103, 98, 91, 50, 93, 41, 41, 59, 10, 9, 99,
-109,105,110, 32, 61, 32,109,105,110, 40,114,103, 98, 91, 48, 93, 44, 32,109,105,110, 40,114,103, 98, 91, 49, 93, 44, 32,114,103,
- 98, 91, 50, 93, 41, 41, 59, 10, 9, 99,100,101,108,116, 97, 32, 61, 32, 99,109, 97,120, 45, 99,109,105,110, 59, 10, 10, 9,118,
- 32, 61, 32, 99,109, 97,120, 59, 10, 9,105,102, 32, 40, 99,109, 97,120, 33, 61, 48, 46, 48, 41, 10, 9, 9,115, 32, 61, 32, 99,
-100,101,108,116, 97, 47, 99,109, 97,120, 59, 10, 9,101,108,115,101, 32,123, 10, 9, 9,115, 32, 61, 32, 48, 46, 48, 59, 10, 9,
- 9,104, 32, 61, 32, 48, 46, 48, 59, 10, 9,125, 10, 10, 9,105,102, 32, 40,115, 32, 61, 61, 32, 48, 46, 48, 41, 32,123, 10, 9,
- 9,104, 32, 61, 32, 48, 46, 48, 59, 10, 9,125, 10, 9,101,108,115,101, 32,123, 10, 9, 9, 99, 32, 61, 32, 40,118,101, 99, 51,
- 40, 99,109, 97,120, 44, 32, 99,109, 97,120, 44, 32, 99,109, 97,120, 41, 32, 45, 32,114,103, 98, 46,120,121,122, 41, 47, 99,100,
-101,108,116, 97, 59, 10, 10, 9, 9,105,102, 32, 40,114,103, 98, 46,120, 61, 61, 99,109, 97,120, 41, 32,104, 32, 61, 32, 99, 91,
- 50, 93, 32, 45, 32, 99, 91, 49, 93, 59, 10, 9, 9,101,108,115,101, 32,105,102, 32, 40,114,103, 98, 46,121, 61, 61, 99,109, 97,
-120, 41, 32,104, 32, 61, 32, 50, 46, 48, 32, 43, 32, 99, 91, 48, 93, 32, 45, 32, 32, 99, 91, 50, 93, 59, 10, 9, 9,101,108,115,
-101, 32,104, 32, 61, 32, 52, 46, 48, 32, 43, 32, 99, 91, 49, 93, 32, 45, 32, 99, 91, 48, 93, 59, 10, 10, 9, 9,104, 32, 47, 61,
- 32, 54, 46, 48, 59, 10, 10, 9, 9,105,102, 32, 40,104, 60, 48, 46, 48, 41, 10, 9, 9, 9,104, 32, 43, 61, 32, 49, 46, 48, 59,
- 10, 9,125, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32,118,101, 99, 52, 40,104, 44, 32,115, 44, 32,118, 44, 32,114,103, 98,
- 46,119, 41, 59, 10,125, 10, 10,118,111,105,100, 32,104,115,118, 95,116,111, 95,114,103, 98, 40,118,101, 99, 52, 32,104,115,118,
- 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,105, 44, 32,102,
- 44, 32,112, 44, 32,113, 44, 32,116, 44, 32,104, 44, 32,115, 44, 32,118, 59, 10, 9,118,101, 99, 51, 32,114,103, 98, 59, 10, 10,
- 9,104, 32, 61, 32,104,115,118, 91, 48, 93, 59, 10, 9,115, 32, 61, 32,104,115,118, 91, 49, 93, 59, 10, 9,118, 32, 61, 32,104,
-115,118, 91, 50, 93, 59, 10, 10, 9,105,102, 40,115, 61, 61, 48, 46, 48, 41, 32,123, 10, 9, 9,114,103, 98, 32, 61, 32,118,101,
- 99, 51, 40,118, 44, 32,118, 44, 32,118, 41, 59, 10, 9,125, 10, 9,101,108,115,101, 32,123, 10, 9, 9,105,102, 40,104, 61, 61,
- 49, 46, 48, 41, 10, 9, 9, 9,104, 32, 61, 32, 48, 46, 48, 59, 10, 9, 9, 10, 9, 9,104, 32, 42, 61, 32, 54, 46, 48, 59, 10,
- 9, 9,105, 32, 61, 32,102,108,111,111,114, 40,104, 41, 59, 10, 9, 9,102, 32, 61, 32,104, 32, 45, 32,105, 59, 10, 9, 9,114,
-103, 98, 32, 61, 32,118,101, 99, 51, 40,102, 44, 32,102, 44, 32,102, 41, 59, 10, 9, 9,112, 32, 61, 32,118, 42, 40, 49, 46, 48,
- 45,115, 41, 59, 10, 9, 9,113, 32, 61, 32,118, 42, 40, 49, 46, 48, 45, 40,115, 42,102, 41, 41, 59, 10, 9, 9,116, 32, 61, 32,
-118, 42, 40, 49, 46, 48, 45, 40,115, 42, 40, 49, 46, 48, 45,102, 41, 41, 41, 59, 10, 9, 9, 10, 9, 9,105,102, 32, 40,105, 32,
- 61, 61, 32, 48, 46, 48, 41, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,118, 44, 32,116, 44, 32,112, 41, 59, 10, 9, 9,101,
-108,115,101, 32,105,102, 32, 40,105, 32, 61, 61, 32, 49, 46, 48, 41, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,113, 44, 32,
-118, 44, 32,112, 41, 59, 10, 9, 9,101,108,115,101, 32,105,102, 32, 40,105, 32, 61, 61, 32, 50, 46, 48, 41, 32,114,103, 98, 32,
- 61, 32,118,101, 99, 51, 40,112, 44, 32,118, 44, 32,116, 41, 59, 10, 9, 9,101,108,115,101, 32,105,102, 32, 40,105, 32, 61, 61,
- 32, 51, 46, 48, 41, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,112, 44, 32,113, 44, 32,118, 41, 59, 10, 9, 9,101,108,115,
-101, 32,105,102, 32, 40,105, 32, 61, 61, 32, 52, 46, 48, 41, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,116, 44, 32,112, 44,
- 32,118, 41, 59, 10, 9, 9,101,108,115,101, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,118, 44, 32,112, 44, 32,113, 41, 59,
- 10, 9,125, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32,118,101, 99, 52, 40,114,103, 98, 44, 32,104,115,118, 46,119, 41, 59,
- 10,125, 10, 10,102,108,111, 97,116, 32,115,114,103, 98, 95,116,111, 95,108,105,110,101, 97,114,114,103, 98, 40,102,108,111, 97,
-116, 32, 99, 41, 10,123, 10, 9,105,102, 40, 99, 32, 60, 32, 48, 46, 48, 52, 48, 52, 53, 41, 10, 9, 9,114,101,116,117,114,110,
- 32, 40, 99, 32, 60, 32, 48, 46, 48, 41, 63, 32, 48, 46, 48, 58, 32, 99, 32, 42, 32, 40, 49, 46, 48, 47, 49, 50, 46, 57, 50, 41,
- 59, 10, 9,101,108,115,101, 10, 9, 9,114,101,116,117,114,110, 32,112,111,119, 40, 40, 99, 32, 43, 32, 48, 46, 48, 53, 53, 41,
- 42, 40, 49, 46, 48, 47, 49, 46, 48, 53, 53, 41, 44, 32, 50, 46, 52, 41, 59, 10,125, 10, 10,102,108,111, 97,116, 32,108,105,110,
-101, 97,114,114,103, 98, 95,116,111, 95,115,114,103, 98, 40,102,108,111, 97,116, 32, 99, 41, 10,123, 10, 9,105,102, 40, 99, 32,
- 60, 32, 48, 46, 48, 48, 51, 49, 51, 48, 56, 41, 10, 9, 9,114,101,116,117,114,110, 32, 40, 99, 32, 60, 32, 48, 46, 48, 41, 63,
- 32, 48, 46, 48, 58, 32, 99, 32, 42, 32, 49, 50, 46, 57, 50, 59, 10, 9,101,108,115,101, 10, 9, 9,114,101,116,117,114,110, 32,
- 49, 46, 48, 53, 53, 32, 42, 32,112,111,119, 40, 99, 44, 32, 49, 46, 48, 47, 50, 46, 52, 41, 32, 45, 32, 48, 46, 48, 53, 53, 59,
- 10,125, 10, 10,118,111,105,100, 32,115,114,103, 98, 95,116,111, 95,108,105,110,101, 97,114,114,103, 98, 40,118,101, 99, 52, 32,
- 99,111,108, 95,102,114,111,109, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108, 95,116,111, 41, 10,123, 10, 9, 99,111,
-108, 95,116,111, 46,114, 32, 61, 32,115,114,103, 98, 95,116,111, 95,108,105,110,101, 97,114,114,103, 98, 40, 99,111,108, 95,102,
-114,111,109, 46,114, 41, 59, 10, 9, 99,111,108, 95,116,111, 46,103, 32, 61, 32,115,114,103, 98, 95,116,111, 95,108,105,110,101,
- 97,114,114,103, 98, 40, 99,111,108, 95,102,114,111,109, 46,103, 41, 59, 10, 9, 99,111,108, 95,116,111, 46, 98, 32, 61, 32,115,
-114,103, 98, 95,116,111, 95,108,105,110,101, 97,114,114,103, 98, 40, 99,111,108, 95,102,114,111,109, 46, 98, 41, 59, 10, 9, 99,
-111,108, 95,116,111, 46, 97, 32, 61, 32, 99,111,108, 95,102,114,111,109, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,108,105,
-110,101, 97,114,114,103, 98, 95,116,111, 95,115,114,103, 98, 40,118,101, 99, 52, 32, 99,111,108, 95,102,114,111,109, 44, 32,111,
-117,116, 32,118,101, 99, 52, 32, 99,111,108, 95,116,111, 41, 10,123, 10, 9, 99,111,108, 95,116,111, 46,114, 32, 61, 32,108,105,
-110,101, 97,114,114,103, 98, 95,116,111, 95,115,114,103, 98, 40, 99,111,108, 95,102,114,111,109, 46,114, 41, 59, 10, 9, 99,111,
-108, 95,116,111, 46,103, 32, 61, 32,108,105,110,101, 97,114,114,103, 98, 95,116,111, 95,115,114,103, 98, 40, 99,111,108, 95,102,
-114,111,109, 46,103, 41, 59, 10, 9, 99,111,108, 95,116,111, 46, 98, 32, 61, 32,108,105,110,101, 97,114,114,103, 98, 95,116,111,
- 95,115,114,103, 98, 40, 99,111,108, 95,102,114,111,109, 46, 98, 41, 59, 10, 9, 99,111,108, 95,116,111, 46, 97, 32, 61, 32, 99,
-111,108, 95,102,114,111,109, 46, 97, 59, 10,125, 10, 10, 35,100,101,102,105,110,101, 32, 77, 95, 80, 73, 32, 51, 46, 49, 52, 49,
- 53, 57, 50, 54, 53, 51, 53, 56, 57, 55, 57, 51, 50, 51, 56, 52, 54, 10, 10, 47, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 32,
- 83, 72, 65, 68, 69, 82, 32, 78, 79, 68, 69, 83, 32, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 47, 10, 10,118,
-111,105,100, 32,118, 99,111,108, 95, 97,116,116,114,105, 98,117,116,101, 40,118,101, 99, 52, 32, 97,116,116,118, 99,111,108, 44,
- 32,111,117,116, 32,118,101, 99, 52, 32,118, 99,111,108, 41, 10,123, 10, 9,118, 99,111,108, 32, 61, 32,118,101, 99, 52, 40, 97,
-116,116,118, 99,111,108, 46,120, 47, 50, 53, 53, 46, 48, 44, 32, 97,116,116,118, 99,111,108, 46,121, 47, 50, 53, 53, 46, 48, 44,
- 32, 97,116,116,118, 99,111,108, 46,122, 47, 50, 53, 53, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,
-117,118, 95, 97,116,116,114,105, 98,117,116,101, 40,118,101, 99, 50, 32, 97,116,116,117,118, 44, 32,111,117,116, 32,118,101, 99,
- 51, 32,117,118, 41, 10,123, 10, 9,117,118, 32, 61, 32,118,101, 99, 51, 40, 97,116,116,117,118, 42, 50, 46, 48, 32, 45, 32,118,
-101, 99, 50, 40, 49, 46, 48, 44, 32, 49, 46, 48, 41, 44, 32, 48, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,103,101,111,
-109, 40,118,101, 99, 51, 32, 99,111, 44, 32,118,101, 99, 51, 32,110,111,114, 44, 32,109, 97,116, 52, 32,118,105,101,119,105,110,
-118,109, 97,116, 44, 32,118,101, 99, 51, 32, 97,116,116,111,114, 99,111, 44, 32,118,101, 99, 50, 32, 97,116,116,117,118, 44, 32,
-118,101, 99, 52, 32, 97,116,116,118, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,103,108,111, 98, 97,108, 44, 32,111,
-117,116, 32,118,101, 99, 51, 32,108,111, 99, 97,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118,105,101,119, 44, 32,111,117,
-116, 32,118,101, 99, 51, 32,111,114, 99,111, 44, 32,111,117,116, 32,118,101, 99, 51, 32,117,118, 44, 32,111,117,116, 32,118,101,
- 99, 51, 32,110,111,114,109, 97,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,118, 99,111,108, 44, 32,111,117,116, 32,102,108,
-111, 97,116, 32,102,114,111,110,116, 98, 97, 99,107, 41, 10,123, 10, 9,108,111, 99, 97,108, 32, 61, 32, 99,111, 59, 10, 9,118,
-105,101,119, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,108,111, 99, 97,108, 41, 59, 10, 9,103,108,111, 98, 97,108, 32,
- 61, 32, 40,118,105,101,119,105,110,118,109, 97,116, 42,118,101, 99, 52, 40,108,111, 99, 97,108, 44, 32, 49, 46, 48, 41, 41, 46,
-120,121,122, 59, 10, 9,111,114, 99,111, 32, 61, 32, 97,116,116,111,114, 99,111, 59, 10, 9,117,118, 95, 97,116,116,114,105, 98,
-117,116,101, 40, 97,116,116,117,118, 44, 32,117,118, 41, 59, 10, 9,110,111,114,109, 97,108, 32, 61, 32, 45,110,111,114,109, 97,
-108,105,122,101, 40,110,111,114, 41, 59, 9, 47, 42, 32, 98,108,101,110,100,101,114, 32,114,101,110,100,101,114, 32,110,111,114,
-109, 97,108, 32,105,115, 32,110,101,103, 97,116,101,100, 32, 42, 47, 10, 9,118, 99,111,108, 95, 97,116,116,114,105, 98,117,116,
-101, 40, 97,116,116,118, 99,111,108, 44, 32,118, 99,111,108, 41, 59, 10, 9,102,114,111,110,116, 98, 97, 99,107, 32, 61, 32, 49,
- 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,112,112,105,110,103, 40,118,101, 99, 51, 32,118,101, 99, 44, 32,109, 97,
-116, 52, 32,109, 97,116, 44, 32,118,101, 99, 51, 32,109,105,110,118,101, 99, 44, 32,118,101, 99, 51, 32,109, 97,120,118,101, 99,
- 44, 32,102,108,111, 97,116, 32,100,111,109,105,110, 44, 32,102,108,111, 97,116, 32,100,111,109, 97,120, 44, 32,111,117,116, 32,
-118,101, 99, 51, 32,111,117,116,118,101, 99, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32, 40,109, 97,116, 32, 42, 32,
-118,101, 99, 52, 40,118,101, 99, 44, 32, 49, 46, 48, 41, 41, 46,120,121,122, 59, 10, 9,105,102, 40,100,111,109,105,110, 32, 61,
- 61, 32, 49, 46, 48, 41, 10, 9, 9,111,117,116,118,101, 99, 32, 61, 32,109, 97,120, 40,111,117,116,118,101, 99, 44, 32,109,105,
-110,118,101, 99, 41, 59, 10, 9,105,102, 40,100,111,109, 97,120, 32, 61, 61, 32, 49, 46, 48, 41, 10, 9, 9,111,117,116,118,101,
- 99, 32, 61, 32,109,105,110, 40,111,117,116,118,101, 99, 44, 32,109, 97,120,118,101, 99, 41, 59, 10,125, 10, 10,118,111,105,100,
- 32, 99, 97,109,101,114, 97, 40,118,101, 99, 51, 32, 99,111, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,105,101,
-119, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,100,101,112,116,104, 44, 32,111,117,116, 32,102,108,111, 97,116,
- 32,111,117,116,100,105,115,116, 41, 10,123, 10, 9,111,117,116,100,101,112,116,104, 32, 61, 32, 97, 98,115, 40, 99,111, 46,122,
- 41, 59, 10, 9,111,117,116,100,105,115,116, 32, 61, 32,108,101,110,103,116,104, 40, 99,111, 41, 59, 10, 9,111,117,116,118,105,
-101,119, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40, 99,111, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104,
- 95, 97,100,100, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116,
- 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118, 97,108, 49, 32,
- 43, 32,118, 97,108, 50, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,115,117, 98,116,114, 97, 99,116, 40,102,108,
-111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,
-111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118, 97,108, 49, 32, 45, 32,118, 97,108, 50, 59,
- 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,109,117,108,116,105,112,108,121, 40,102,108,111, 97,116, 32,118, 97,108,
- 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41,
- 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118, 97,108, 49, 32, 42, 32,118, 97,108, 50, 59, 10,125, 10, 10,118,111,105,
-100, 32,109, 97,116,104, 95,100,105,118,105,100,101, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,
-118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,105,102, 32, 40,118,
- 97,108, 50, 32, 61, 61, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,
-101, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32,118, 97,108, 49, 32, 47, 32,118, 97,108, 50, 59, 10,125, 10, 10,118,111,105,
-100, 32,109, 97,116,104, 95,115,105,110,101, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116,
- 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,115,105,110, 40,118, 97,108, 41, 59, 10,125,
- 10, 10,118,111,105,100, 32,109, 97,116,104, 95, 99,111,115,105,110,101, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,
-116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 99,111,115, 40,
-118, 97,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,116, 97,110,103,101,110,116, 40,102,108,111, 97,116,
- 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,
-108, 32, 61, 32,116, 97,110, 40,118, 97,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95, 97,115,105,110, 40,
-102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,
-105,102, 32, 40,118, 97,108, 32, 60, 61, 32, 49, 46, 48, 32, 38, 38, 32,118, 97,108, 32, 62, 61, 32, 45, 49, 46, 48, 41, 10, 9,
- 9,111,117,116,118, 97,108, 32, 61, 32, 97,115,105,110, 40,118, 97,108, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,
-118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95, 97, 99,111,115, 40,102,108,111,
- 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,105,102, 32,
- 40,118, 97,108, 32, 60, 61, 32, 49, 46, 48, 32, 38, 38, 32,118, 97,108, 32, 62, 61, 32, 45, 49, 46, 48, 41, 10, 9, 9,111,117,
-116,118, 97,108, 32, 61, 32, 97, 99,111,115, 40,118, 97,108, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,118, 97,108,
- 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95, 97,116, 97,110, 40,102,108,111, 97,116, 32,
-118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108,
- 32, 61, 32, 97,116, 97,110, 40,118, 97,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,112,111,119, 40,102,
+ 10,102,108,111, 97,116, 32,101,120,112, 95, 98,108,
+101,110,100,101,114, 40,102,108,111, 97,116, 32,102, 41, 10,123, 10, 9,114,101,116,117,114,110, 32,112,111,119, 40, 50, 46, 55,
+ 49, 56, 50, 56, 49, 56, 50, 56, 52, 54, 44, 32,102, 41, 59, 10,125, 10, 10,118,111,105,100, 32,114,103, 98, 95,116,111, 95,104,
+115,118, 40,118,101, 99, 52, 32,114,103, 98, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10,
+ 9,102,108,111, 97,116, 32, 99,109, 97,120, 44, 32, 99,109,105,110, 44, 32,104, 44, 32,115, 44, 32,118, 44, 32, 99,100,101,108,
+116, 97, 59, 10, 9,118,101, 99, 51, 32, 99, 59, 10, 10, 9, 99,109, 97,120, 32, 61, 32,109, 97,120, 40,114,103, 98, 91, 48, 93,
+ 44, 32,109, 97,120, 40,114,103, 98, 91, 49, 93, 44, 32,114,103, 98, 91, 50, 93, 41, 41, 59, 10, 9, 99,109,105,110, 32, 61, 32,
+109,105,110, 40,114,103, 98, 91, 48, 93, 44, 32,109,105,110, 40,114,103, 98, 91, 49, 93, 44, 32,114,103, 98, 91, 50, 93, 41, 41,
+ 59, 10, 9, 99,100,101,108,116, 97, 32, 61, 32, 99,109, 97,120, 45, 99,109,105,110, 59, 10, 10, 9,118, 32, 61, 32, 99,109, 97,
+120, 59, 10, 9,105,102, 32, 40, 99,109, 97,120, 33, 61, 48, 46, 48, 41, 10, 9, 9,115, 32, 61, 32, 99,100,101,108,116, 97, 47,
+ 99,109, 97,120, 59, 10, 9,101,108,115,101, 32,123, 10, 9, 9,115, 32, 61, 32, 48, 46, 48, 59, 10, 9, 9,104, 32, 61, 32, 48,
+ 46, 48, 59, 10, 9,125, 10, 10, 9,105,102, 32, 40,115, 32, 61, 61, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,104, 32, 61, 32, 48,
+ 46, 48, 59, 10, 9,125, 10, 9,101,108,115,101, 32,123, 10, 9, 9, 99, 32, 61, 32, 40,118,101, 99, 51, 40, 99,109, 97,120, 44,
+ 32, 99,109, 97,120, 44, 32, 99,109, 97,120, 41, 32, 45, 32,114,103, 98, 46,120,121,122, 41, 47, 99,100,101,108,116, 97, 59, 10,
+ 10, 9, 9,105,102, 32, 40,114,103, 98, 46,120, 61, 61, 99,109, 97,120, 41, 32,104, 32, 61, 32, 99, 91, 50, 93, 32, 45, 32, 99,
+ 91, 49, 93, 59, 10, 9, 9,101,108,115,101, 32,105,102, 32, 40,114,103, 98, 46,121, 61, 61, 99,109, 97,120, 41, 32,104, 32, 61,
+ 32, 50, 46, 48, 32, 43, 32, 99, 91, 48, 93, 32, 45, 32, 32, 99, 91, 50, 93, 59, 10, 9, 9,101,108,115,101, 32,104, 32, 61, 32,
+ 52, 46, 48, 32, 43, 32, 99, 91, 49, 93, 32, 45, 32, 99, 91, 48, 93, 59, 10, 10, 9, 9,104, 32, 47, 61, 32, 54, 46, 48, 59, 10,
+ 10, 9, 9,105,102, 32, 40,104, 60, 48, 46, 48, 41, 10, 9, 9, 9,104, 32, 43, 61, 32, 49, 46, 48, 59, 10, 9,125, 10, 10, 9,
+111,117,116, 99,111,108, 32, 61, 32,118,101, 99, 52, 40,104, 44, 32,115, 44, 32,118, 44, 32,114,103, 98, 46,119, 41, 59, 10,125,
+ 10, 10,118,111,105,100, 32,104,115,118, 95,116,111, 95,114,103, 98, 40,118,101, 99, 52, 32,104,115,118, 44, 32,111,117,116, 32,
+118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,105, 44, 32,102, 44, 32,112, 44, 32,113,
+ 44, 32,116, 44, 32,104, 44, 32,115, 44, 32,118, 59, 10, 9,118,101, 99, 51, 32,114,103, 98, 59, 10, 10, 9,104, 32, 61, 32,104,
+115,118, 91, 48, 93, 59, 10, 9,115, 32, 61, 32,104,115,118, 91, 49, 93, 59, 10, 9,118, 32, 61, 32,104,115,118, 91, 50, 93, 59,
+ 10, 10, 9,105,102, 40,115, 61, 61, 48, 46, 48, 41, 32,123, 10, 9, 9,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,118, 44, 32,
+118, 44, 32,118, 41, 59, 10, 9,125, 10, 9,101,108,115,101, 32,123, 10, 9, 9,105,102, 40,104, 61, 61, 49, 46, 48, 41, 10, 9,
+ 9, 9,104, 32, 61, 32, 48, 46, 48, 59, 10, 9, 9, 10, 9, 9,104, 32, 42, 61, 32, 54, 46, 48, 59, 10, 9, 9,105, 32, 61, 32,
+102,108,111,111,114, 40,104, 41, 59, 10, 9, 9,102, 32, 61, 32,104, 32, 45, 32,105, 59, 10, 9, 9,114,103, 98, 32, 61, 32,118,
+101, 99, 51, 40,102, 44, 32,102, 44, 32,102, 41, 59, 10, 9, 9,112, 32, 61, 32,118, 42, 40, 49, 46, 48, 45,115, 41, 59, 10, 9,
+ 9,113, 32, 61, 32,118, 42, 40, 49, 46, 48, 45, 40,115, 42,102, 41, 41, 59, 10, 9, 9,116, 32, 61, 32,118, 42, 40, 49, 46, 48,
+ 45, 40,115, 42, 40, 49, 46, 48, 45,102, 41, 41, 41, 59, 10, 9, 9, 10, 9, 9,105,102, 32, 40,105, 32, 61, 61, 32, 48, 46, 48,
+ 41, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,118, 44, 32,116, 44, 32,112, 41, 59, 10, 9, 9,101,108,115,101, 32,105,102,
+ 32, 40,105, 32, 61, 61, 32, 49, 46, 48, 41, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,113, 44, 32,118, 44, 32,112, 41, 59,
+ 10, 9, 9,101,108,115,101, 32,105,102, 32, 40,105, 32, 61, 61, 32, 50, 46, 48, 41, 32,114,103, 98, 32, 61, 32,118,101, 99, 51,
+ 40,112, 44, 32,118, 44, 32,116, 41, 59, 10, 9, 9,101,108,115,101, 32,105,102, 32, 40,105, 32, 61, 61, 32, 51, 46, 48, 41, 32,
+114,103, 98, 32, 61, 32,118,101, 99, 51, 40,112, 44, 32,113, 44, 32,118, 41, 59, 10, 9, 9,101,108,115,101, 32,105,102, 32, 40,
+105, 32, 61, 61, 32, 52, 46, 48, 41, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,116, 44, 32,112, 44, 32,118, 41, 59, 10, 9,
+ 9,101,108,115,101, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,118, 44, 32,112, 44, 32,113, 41, 59, 10, 9,125, 10, 10, 9,
+111,117,116, 99,111,108, 32, 61, 32,118,101, 99, 52, 40,114,103, 98, 44, 32,104,115,118, 46,119, 41, 59, 10,125, 10, 10,102,108,
+111, 97,116, 32,115,114,103, 98, 95,116,111, 95,108,105,110,101, 97,114,114,103, 98, 40,102,108,111, 97,116, 32, 99, 41, 10,123,
+ 10, 9,105,102, 40, 99, 32, 60, 32, 48, 46, 48, 52, 48, 52, 53, 41, 10, 9, 9,114,101,116,117,114,110, 32, 40, 99, 32, 60, 32,
+ 48, 46, 48, 41, 63, 32, 48, 46, 48, 58, 32, 99, 32, 42, 32, 40, 49, 46, 48, 47, 49, 50, 46, 57, 50, 41, 59, 10, 9,101,108,115,
+101, 10, 9, 9,114,101,116,117,114,110, 32,112,111,119, 40, 40, 99, 32, 43, 32, 48, 46, 48, 53, 53, 41, 42, 40, 49, 46, 48, 47,
+ 49, 46, 48, 53, 53, 41, 44, 32, 50, 46, 52, 41, 59, 10,125, 10, 10,102,108,111, 97,116, 32,108,105,110,101, 97,114,114,103, 98,
+ 95,116,111, 95,115,114,103, 98, 40,102,108,111, 97,116, 32, 99, 41, 10,123, 10, 9,105,102, 40, 99, 32, 60, 32, 48, 46, 48, 48,
+ 51, 49, 51, 48, 56, 41, 10, 9, 9,114,101,116,117,114,110, 32, 40, 99, 32, 60, 32, 48, 46, 48, 41, 63, 32, 48, 46, 48, 58, 32,
+ 99, 32, 42, 32, 49, 50, 46, 57, 50, 59, 10, 9,101,108,115,101, 10, 9, 9,114,101,116,117,114,110, 32, 49, 46, 48, 53, 53, 32,
+ 42, 32,112,111,119, 40, 99, 44, 32, 49, 46, 48, 47, 50, 46, 52, 41, 32, 45, 32, 48, 46, 48, 53, 53, 59, 10,125, 10, 10,118,111,
+105,100, 32,115,114,103, 98, 95,116,111, 95,108,105,110,101, 97,114,114,103, 98, 40,118,101, 99, 52, 32, 99,111,108, 95,102,114,
+111,109, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108, 95,116,111, 41, 10,123, 10, 9, 99,111,108, 95,116,111, 46,114,
+ 32, 61, 32,115,114,103, 98, 95,116,111, 95,108,105,110,101, 97,114,114,103, 98, 40, 99,111,108, 95,102,114,111,109, 46,114, 41,
+ 59, 10, 9, 99,111,108, 95,116,111, 46,103, 32, 61, 32,115,114,103, 98, 95,116,111, 95,108,105,110,101, 97,114,114,103, 98, 40,
+ 99,111,108, 95,102,114,111,109, 46,103, 41, 59, 10, 9, 99,111,108, 95,116,111, 46, 98, 32, 61, 32,115,114,103, 98, 95,116,111,
+ 95,108,105,110,101, 97,114,114,103, 98, 40, 99,111,108, 95,102,114,111,109, 46, 98, 41, 59, 10, 9, 99,111,108, 95,116,111, 46,
+ 97, 32, 61, 32, 99,111,108, 95,102,114,111,109, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,108,105,110,101, 97,114,114,103,
+ 98, 95,116,111, 95,115,114,103, 98, 40,118,101, 99, 52, 32, 99,111,108, 95,102,114,111,109, 44, 32,111,117,116, 32,118,101, 99,
+ 52, 32, 99,111,108, 95,116,111, 41, 10,123, 10, 9, 99,111,108, 95,116,111, 46,114, 32, 61, 32,108,105,110,101, 97,114,114,103,
+ 98, 95,116,111, 95,115,114,103, 98, 40, 99,111,108, 95,102,114,111,109, 46,114, 41, 59, 10, 9, 99,111,108, 95,116,111, 46,103,
+ 32, 61, 32,108,105,110,101, 97,114,114,103, 98, 95,116,111, 95,115,114,103, 98, 40, 99,111,108, 95,102,114,111,109, 46,103, 41,
+ 59, 10, 9, 99,111,108, 95,116,111, 46, 98, 32, 61, 32,108,105,110,101, 97,114,114,103, 98, 95,116,111, 95,115,114,103, 98, 40,
+ 99,111,108, 95,102,114,111,109, 46, 98, 41, 59, 10, 9, 99,111,108, 95,116,111, 46, 97, 32, 61, 32, 99,111,108, 95,102,114,111,
+109, 46, 97, 59, 10,125, 10, 10, 35,100,101,102,105,110,101, 32, 77, 95, 80, 73, 32, 51, 46, 49, 52, 49, 53, 57, 50, 54, 53, 51,
+ 53, 56, 57, 55, 57, 51, 50, 51, 56, 52, 54, 10, 10, 47, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 32, 83, 72, 65, 68, 69, 82,
+ 32, 78, 79, 68, 69, 83, 32, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 47, 10, 10,118,111,105,100, 32,118, 99,
+111,108, 95, 97,116,116,114,105, 98,117,116,101, 40,118,101, 99, 52, 32, 97,116,116,118, 99,111,108, 44, 32,111,117,116, 32,118,
+101, 99, 52, 32,118, 99,111,108, 41, 10,123, 10, 9,118, 99,111,108, 32, 61, 32,118,101, 99, 52, 40, 97,116,116,118, 99,111,108,
+ 46,120, 47, 50, 53, 53, 46, 48, 44, 32, 97,116,116,118, 99,111,108, 46,121, 47, 50, 53, 53, 46, 48, 44, 32, 97,116,116,118, 99,
+111,108, 46,122, 47, 50, 53, 53, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,117,118, 95, 97,116,116,
+114,105, 98,117,116,101, 40,118,101, 99, 50, 32, 97,116,116,117,118, 44, 32,111,117,116, 32,118,101, 99, 51, 32,117,118, 41, 10,
+123, 10, 9,117,118, 32, 61, 32,118,101, 99, 51, 40, 97,116,116,117,118, 42, 50, 46, 48, 32, 45, 32,118,101, 99, 50, 40, 49, 46,
+ 48, 44, 32, 49, 46, 48, 41, 44, 32, 48, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,103,101,111,109, 40,118,101, 99, 51,
+ 32, 99,111, 44, 32,118,101, 99, 51, 32,110,111,114, 44, 32,109, 97,116, 52, 32,118,105,101,119,105,110,118,109, 97,116, 44, 32,
+118,101, 99, 51, 32, 97,116,116,111,114, 99,111, 44, 32,118,101, 99, 50, 32, 97,116,116,117,118, 44, 32,118,101, 99, 52, 32, 97,
+116,116,118, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,103,108,111, 98, 97,108, 44, 32,111,117,116, 32,118,101, 99,
+ 51, 32,108,111, 99, 97,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118,105,101,119, 44, 32,111,117,116, 32,118,101, 99, 51,
+ 32,111,114, 99,111, 44, 32,111,117,116, 32,118,101, 99, 51, 32,117,118, 44, 32,111,117,116, 32,118,101, 99, 51, 32,110,111,114,
+109, 97,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,118, 99,111,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102,114,
+111,110,116, 98, 97, 99,107, 41, 10,123, 10, 9,108,111, 99, 97,108, 32, 61, 32, 99,111, 59, 10, 9,118,105,101,119, 32, 61, 32,
+110,111,114,109, 97,108,105,122,101, 40,108,111, 99, 97,108, 41, 59, 10, 9,103,108,111, 98, 97,108, 32, 61, 32, 40,118,105,101,
+119,105,110,118,109, 97,116, 42,118,101, 99, 52, 40,108,111, 99, 97,108, 44, 32, 49, 46, 48, 41, 41, 46,120,121,122, 59, 10, 9,
+111,114, 99,111, 32, 61, 32, 97,116,116,111,114, 99,111, 59, 10, 9,117,118, 95, 97,116,116,114,105, 98,117,116,101, 40, 97,116,
+116,117,118, 44, 32,117,118, 41, 59, 10, 9,110,111,114,109, 97,108, 32, 61, 32, 45,110,111,114,109, 97,108,105,122,101, 40,110,
+111,114, 41, 59, 9, 47, 42, 32, 98,108,101,110,100,101,114, 32,114,101,110,100,101,114, 32,110,111,114,109, 97,108, 32,105,115,
+ 32,110,101,103, 97,116,101,100, 32, 42, 47, 10, 9,118, 99,111,108, 95, 97,116,116,114,105, 98,117,116,101, 40, 97,116,116,118,
+ 99,111,108, 44, 32,118, 99,111,108, 41, 59, 10, 9,102,114,111,110,116, 98, 97, 99,107, 32, 61, 32, 49, 46, 48, 59, 10,125, 10,
+ 10,118,111,105,100, 32,109, 97,112,112,105,110,103, 40,118,101, 99, 51, 32,118,101, 99, 44, 32,109, 97,116, 52, 32,109, 97,116,
+ 44, 32,118,101, 99, 51, 32,109,105,110,118,101, 99, 44, 32,118,101, 99, 51, 32,109, 97,120,118,101, 99, 44, 32,102,108,111, 97,
+116, 32,100,111,109,105,110, 44, 32,102,108,111, 97,116, 32,100,111,109, 97,120, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,
+117,116,118,101, 99, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32, 40,109, 97,116, 32, 42, 32,118,101, 99, 52, 40,118,
+101, 99, 44, 32, 49, 46, 48, 41, 41, 46,120,121,122, 59, 10, 9,105,102, 40,100,111,109,105,110, 32, 61, 61, 32, 49, 46, 48, 41,
+ 10, 9, 9,111,117,116,118,101, 99, 32, 61, 32,109, 97,120, 40,111,117,116,118,101, 99, 44, 32,109,105,110,118,101, 99, 41, 59,
+ 10, 9,105,102, 40,100,111,109, 97,120, 32, 61, 61, 32, 49, 46, 48, 41, 10, 9, 9,111,117,116,118,101, 99, 32, 61, 32,109,105,
+110, 40,111,117,116,118,101, 99, 44, 32,109, 97,120,118,101, 99, 41, 59, 10,125, 10, 10,118,111,105,100, 32, 99, 97,109,101,114,
+ 97, 40,118,101, 99, 51, 32, 99,111, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,105,101,119, 44, 32,111,117,116,
+ 32,102,108,111, 97,116, 32,111,117,116,100,101,112,116,104, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,100,105,
+115,116, 41, 10,123, 10, 9,111,117,116,100,101,112,116,104, 32, 61, 32, 97, 98,115, 40, 99,111, 46,122, 41, 59, 10, 9,111,117,
+116,100,105,115,116, 32, 61, 32,108,101,110,103,116,104, 40, 99,111, 41, 59, 10, 9,111,117,116,118,105,101,119, 32, 61, 32,110,
+111,114,109, 97,108,105,122,101, 40, 99,111, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95, 97,100,100, 40,102,
108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116,
- 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,105,102, 32, 40,118, 97,108, 49, 32, 62, 61, 32, 48, 46, 48, 41, 10, 9, 9,111,
-117,116,118, 97,108, 32, 61, 32,112,111,119, 40,118, 97,108, 49, 44, 32,118, 97,108, 50, 41, 59, 10, 9,101,108,115,101, 10, 9,
- 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,108,111,103, 40,
-102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,
-116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,105,102, 40,118, 97,108, 49, 32, 62, 32, 48, 46, 48, 32, 32, 38, 38, 32,118,
- 97,108, 50, 32, 62, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116,118, 97,108, 61, 32,108,111,103, 50, 40,118, 97,108, 49, 41, 32,
- 47, 32,108,111,103, 50, 40,118, 97,108, 50, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,118, 97,108, 61, 32, 48, 46,
- 48, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,109, 97,120, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,
-102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10,
- 9,111,117,116,118, 97,108, 32, 61, 32,109, 97,120, 40,118, 97,108, 49, 44, 32,118, 97,108, 50, 41, 59, 10,125, 10, 10,118,111,
-105,100, 32,109, 97,116,104, 95,109,105,110, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,
-108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32,
- 61, 32,109,105,110, 40,118, 97,108, 49, 44, 32,118, 97,108, 50, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,
-114,111,117,110,100, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,
-108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 61, 32,102,108,111,111,114, 40,118, 97,108, 32, 43, 32, 48, 46, 53, 41, 59, 10,
-125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,108,101,115,115, 95,116,104, 97,110, 40,102,108,111, 97,116, 32,118, 97,108,
- 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41,
- 10,123, 10, 9,105,102, 40,118, 97,108, 49, 32, 60, 32,118, 97,108, 50, 41, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 49,
- 46, 48, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,
-100, 32,109, 97,116,104, 95,103,114,101, 97,116,101,114, 95,116,104, 97,110, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,
-102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10,
- 9,105,102, 40,118, 97,108, 49, 32, 62, 32,118, 97,108, 50, 41, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 49, 46, 48, 59,
- 10, 9,101,108,115,101, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,115,
-113,117,101,101,122,101, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,102,108,111, 97,116, 32,119,105,100,116,104, 44, 32,102,
-108,111, 97,116, 32, 99,101,110,116,101,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123,
- 10, 9,111,117,116,118, 97,108, 32, 61, 32, 49, 46, 48, 47, 40, 49, 46, 48, 32, 43, 32,112,111,119, 40, 50, 46, 55, 49, 56, 50,
- 56, 49, 56, 51, 44, 32, 45, 40, 40,118, 97,108, 45, 99,101,110,116,101,114, 41, 42,119,105,100,116,104, 41, 41, 41, 59, 10,125,
- 10, 10,118,111,105,100, 32,118,101, 99, 95,109, 97,116,104, 95, 97,100,100, 40,118,101, 99, 51, 32,118, 49, 44, 32,118,101, 99,
+ 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118, 97,108, 49, 32, 43, 32,118, 97,108, 50,
+ 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,115,117, 98,116,114, 97, 99,116, 40,102,108,111, 97,116, 32,118, 97,
+108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108,
+ 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118, 97,108, 49, 32, 45, 32,118, 97,108, 50, 59, 10,125, 10, 10,118,111,
+105,100, 32,109, 97,116,104, 95,109,117,108,116,105,112,108,121, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111,
+ 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,
+116,118, 97,108, 32, 61, 32,118, 97,108, 49, 32, 42, 32,118, 97,108, 50, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104,
+ 95,100,105,118,105,100,101, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,
+111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,105,102, 32, 40,118, 97,108, 50, 32, 61, 61,
+ 32, 48, 46, 48, 41, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,
+116,118, 97,108, 32, 61, 32,118, 97,108, 49, 32, 47, 32,118, 97,108, 50, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104,
+ 95,115,105,110,101, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,
+108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,115,105,110, 40,118, 97,108, 41, 59, 10,125, 10, 10,118,111,105,100,
+ 32,109, 97,116,104, 95, 99,111,115,105,110,101, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,
+116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 99,111,115, 40,118, 97,108, 41, 59, 10,
+125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,116, 97,110,103,101,110,116, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,
+111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,116, 97,
+110, 40,118, 97,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95, 97,115,105,110, 40,102,108,111, 97,116, 32,
+118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,105,102, 32, 40,118, 97,
+108, 32, 60, 61, 32, 49, 46, 48, 32, 38, 38, 32,118, 97,108, 32, 62, 61, 32, 45, 49, 46, 48, 41, 10, 9, 9,111,117,116,118, 97,
+108, 32, 61, 32, 97,115,105,110, 40,118, 97,108, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32,
+ 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95, 97, 99,111,115, 40,102,108,111, 97,116, 32,118, 97,108,
+ 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,105,102, 32, 40,118, 97,108, 32, 60,
+ 61, 32, 49, 46, 48, 32, 38, 38, 32,118, 97,108, 32, 62, 61, 32, 45, 49, 46, 48, 41, 10, 9, 9,111,117,116,118, 97,108, 32, 61,
+ 32, 97, 99,111,115, 40,118, 97,108, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48,
+ 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95, 97,116, 97,110, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,
+117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 97,116, 97,
+110, 40,118, 97,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,112,111,119, 40,102,108,111, 97,116, 32,118,
+ 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,
+108, 41, 10,123, 10, 9,105,102, 32, 40,118, 97,108, 49, 32, 62, 61, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116,118, 97,108, 32,
+ 61, 32,112,111,119, 40,118, 97,108, 49, 44, 32,118, 97,108, 50, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,118, 97,
+108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,108,111,103, 40,102,108,111, 97,116, 32,
+118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118,
+ 97,108, 41, 10,123, 10, 9,105,102, 40,118, 97,108, 49, 32, 62, 32, 48, 46, 48, 32, 32, 38, 38, 32,118, 97,108, 50, 32, 62, 32,
+ 48, 46, 48, 41, 10, 9, 9,111,117,116,118, 97,108, 61, 32,108,111,103, 50, 40,118, 97,108, 49, 41, 32, 47, 32,108,111,103, 50,
+ 40,118, 97,108, 50, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,118, 97,108, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,
+118,111,105,100, 32,109, 97,116,104, 95,109, 97,120, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,
+118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,
+108, 32, 61, 32,109, 97,120, 40,118, 97,108, 49, 44, 32,118, 97,108, 50, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,
+104, 95,109,105,110, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,
+116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,109,105,110, 40,
+118, 97,108, 49, 44, 32,118, 97,108, 50, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,114,111,117,110,100, 40,
+102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,
+111,117,116,118, 97,108, 61, 32,102,108,111,111,114, 40,118, 97,108, 32, 43, 32, 48, 46, 53, 41, 59, 10,125, 10, 10,118,111,105,
+100, 32,109, 97,116,104, 95,108,101,115,115, 95,116,104, 97,110, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111,
+ 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,105,102,
+ 40,118, 97,108, 49, 32, 60, 32,118, 97,108, 50, 41, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 49, 46, 48, 59, 10, 9,101,
+108,115,101, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104,
+ 95,103,114,101, 97,116,101,114, 95,116,104, 97,110, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,
+118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,105,102, 40,118, 97,
+108, 49, 32, 62, 32,118, 97,108, 50, 41, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 49, 46, 48, 59, 10, 9,101,108,115,101,
+ 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,115,113,117,101,101,122,101,
+ 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,102,108,111, 97,116, 32,119,105,100,116,104, 44, 32,102,108,111, 97,116, 32, 99,
+101,110,116,101,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118,
+ 97,108, 32, 61, 32, 49, 46, 48, 47, 40, 49, 46, 48, 32, 43, 32,112,111,119, 40, 50, 46, 55, 49, 56, 50, 56, 49, 56, 51, 44, 32,
+ 45, 40, 40,118, 97,108, 45, 99,101,110,116,101,114, 41, 42,119,105,100,116,104, 41, 41, 41, 59, 10,125, 10, 10,118,111,105,100,
+ 32,118,101, 99, 95,109, 97,116,104, 95, 97,100,100, 40,118,101, 99, 51, 32,118, 49, 44, 32,118,101, 99, 51, 32,118, 50, 44, 32,
+111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,
+108, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32,118, 49, 32, 43, 32,118, 50, 59, 10, 9,111,117,116,118, 97,108, 32,
+ 61, 32, 40, 97, 98,115, 40,111,117,116,118,101, 99, 91, 48, 93, 41, 32, 43, 32, 97, 98,115, 40,111,117,116,118,101, 99, 91, 49,
+ 93, 41, 32, 43, 32, 97, 98,115, 40,111,117,116,118,101, 99, 91, 50, 93, 41, 41, 47, 51, 46, 48, 59, 10,125, 10, 10,118,111,105,
+100, 32,118,101, 99, 95,109, 97,116,104, 95,115,117, 98, 40,118,101, 99, 51, 32,118, 49, 44, 32,118,101, 99, 51, 32,118, 50, 44,
+ 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118,
+ 97,108, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32,118, 49, 32, 45, 32,118, 50, 59, 10, 9,111,117,116,118, 97,108,
+ 32, 61, 32, 40, 97, 98,115, 40,111,117,116,118,101, 99, 91, 48, 93, 41, 32, 43, 32, 97, 98,115, 40,111,117,116,118,101, 99, 91,
+ 49, 93, 41, 32, 43, 32, 97, 98,115, 40,111,117,116,118,101, 99, 91, 50, 93, 41, 41, 47, 51, 46, 48, 59, 10,125, 10, 10,118,111,
+105,100, 32,118,101, 99, 95,109, 97,116,104, 95, 97,118,101,114, 97,103,101, 40,118,101, 99, 51, 32,118, 49, 44, 32,118,101, 99,
51, 32,118, 50, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116,
32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32,118, 49, 32, 43, 32,118, 50, 59, 10, 9,111,
-117,116,118, 97,108, 32, 61, 32, 40, 97, 98,115, 40,111,117,116,118,101, 99, 91, 48, 93, 41, 32, 43, 32, 97, 98,115, 40,111,117,
-116,118,101, 99, 91, 49, 93, 41, 32, 43, 32, 97, 98,115, 40,111,117,116,118,101, 99, 91, 50, 93, 41, 41, 47, 51, 46, 48, 59, 10,
-125, 10, 10,118,111,105,100, 32,118,101, 99, 95,109, 97,116,104, 95,115,117, 98, 40,118,101, 99, 51, 32,118, 49, 44, 32,118,101,
- 99, 51, 32,118, 50, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,
-116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32,118, 49, 32, 45, 32,118, 50, 59, 10, 9,
-111,117,116,118, 97,108, 32, 61, 32, 40, 97, 98,115, 40,111,117,116,118,101, 99, 91, 48, 93, 41, 32, 43, 32, 97, 98,115, 40,111,
-117,116,118,101, 99, 91, 49, 93, 41, 32, 43, 32, 97, 98,115, 40,111,117,116,118,101, 99, 91, 50, 93, 41, 41, 47, 51, 46, 48, 59,
- 10,125, 10, 10,118,111,105,100, 32,118,101, 99, 95,109, 97,116,104, 95, 97,118,101,114, 97,103,101, 40,118,101, 99, 51, 32,118,
- 49, 44, 32,118,101, 99, 51, 32,118, 50, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 44, 32,111,117,116,
- 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32,118, 49, 32, 43, 32,
-118, 50, 59, 10, 9,111,117,116,118, 97,108, 32, 61, 32,108,101,110,103,116,104, 40,111,117,116,118,101, 99, 41, 59, 10, 9,111,
-117,116,118,101, 99, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,111,117,116,118,101, 99, 41, 59, 10,125, 10, 10,118,111,
-105,100, 32,118,101, 99, 95,109, 97,116,104, 95,100,111,116, 40,118,101, 99, 51, 32,118, 49, 44, 32,118,101, 99, 51, 32,118, 50,
- 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,
-118, 97,108, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32,118,101, 99, 51, 40, 48, 44, 32, 48, 44, 32, 48, 41, 59, 10,
- 9,111,117,116,118, 97,108, 32, 61, 32,100,111,116, 40,118, 49, 44, 32,118, 50, 41, 59, 10,125, 10, 10,118,111,105,100, 32,118,
-101, 99, 95,109, 97,116,104, 95, 99,114,111,115,115, 40,118,101, 99, 51, 32,118, 49, 44, 32,118,101, 99, 51, 32,118, 50, 44, 32,
-111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,
-108, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32, 99,114,111,115,115, 40,118, 49, 44, 32,118, 50, 41, 59, 10, 9,111,
-117,116,118, 97,108, 32, 61, 32,108,101,110,103,116,104, 40,111,117,116,118,101, 99, 41, 59, 10,125, 10, 10,118,111,105,100, 32,
-118,101, 99, 95,109, 97,116,104, 95,110,111,114,109, 97,108,105,122,101, 40,118,101, 99, 51, 32,118, 44, 32,111,117,116, 32,118,
-101, 99, 51, 32,111,117,116,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10,
- 9,111,117,116,118, 97,108, 32, 61, 32,108,101,110,103,116,104, 40,118, 41, 59, 10, 9,111,117,116,118,101, 99, 32, 61, 32,110,
-111,114,109, 97,108,105,122,101, 40,118, 41, 59, 10,125, 10, 10,118,111,105,100, 32,118,101, 99, 95,109, 97,116,104, 95,110,101,
-103, 97,116,101, 40,118,101, 99, 51, 32,118, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118, 41, 10,123, 10, 9,111,
-117,116,118, 32, 61, 32, 45,118, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,114,109, 97,108, 40,118,101, 99, 51, 32,100,105,
-114, 44, 32,118,101, 99, 51, 32,110,111,114, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,110,111,114, 44, 32,111,117,
-116, 32,102,108,111, 97,116, 32,111,117,116,100,111,116, 41, 10,123, 10, 9,111,117,116,110,111,114, 32, 61, 32,100,105,114, 59,
- 10, 9,111,117,116,100,111,116, 32, 61, 32, 45,100,111,116, 40,100,105,114, 44, 32,110,111,114, 41, 59, 10,125, 10, 10,118,111,
-105,100, 32, 99,117,114,118,101,115, 95,118,101, 99, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 51, 32,118,101,
- 99, 44, 32,115, 97,109,112,108,101,114, 49, 68, 32, 99,117,114,118,101,109, 97,112, 44, 32,111,117,116, 32,118,101, 99, 51, 32,
-111,117,116,118,101, 99, 41, 10,123, 10, 9,111,117,116,118,101, 99, 46,120, 32, 61, 32,116,101,120,116,117,114,101, 49, 68, 40,
- 99,117,114,118,101,109, 97,112, 44, 32, 40,118,101, 99, 46,120, 32, 43, 32, 49, 46, 48, 41, 42, 48, 46, 53, 41, 46,120, 59, 10,
- 9,111,117,116,118,101, 99, 46,121, 32, 61, 32,116,101,120,116,117,114,101, 49, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,
- 40,118,101, 99, 46,121, 32, 43, 32, 49, 46, 48, 41, 42, 48, 46, 53, 41, 46,121, 59, 10, 9,111,117,116,118,101, 99, 46,122, 32,
- 61, 32,116,101,120,116,117,114,101, 49, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32, 40,118,101, 99, 46,122, 32, 43, 32, 49,
- 46, 48, 41, 42, 48, 46, 53, 41, 46,122, 59, 10, 10, 9,105,102, 32, 40,102, 97, 99, 32, 33, 61, 32, 49, 46, 48, 41, 10, 9, 9,
-111,117,116,118,101, 99, 32, 61, 32, 40,111,117,116,118,101, 99, 42,102, 97, 99, 41, 32, 43, 32, 40,118,101, 99, 42, 40, 49, 46,
- 48, 45,102, 97, 99, 41, 41, 59, 10, 10,125, 10, 10,118,111,105,100, 32, 99,117,114,118,101,115, 95,114,103, 98, 40,102,108,111,
- 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 44, 32,115, 97,109,112,108,101,114, 49, 68, 32, 99,117,114,118,
-101,109, 97,112, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108,
- 46,114, 32, 61, 32,116,101,120,116,117,114,101, 49, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,116,101,120,116,117,114,101,
- 49, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32, 99,111,108, 46,114, 41, 46, 97, 41, 46,114, 59, 10, 9,111,117,116, 99,111,
-108, 46,103, 32, 61, 32,116,101,120,116,117,114,101, 49, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,116,101,120,116,117,114,
-101, 49, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32, 99,111,108, 46,103, 41, 46, 97, 41, 46,103, 59, 10, 9,111,117,116, 99,
-111,108, 46, 98, 32, 61, 32,116,101,120,116,117,114,101, 49, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,116,101,120,116,117,
-114,101, 49, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32, 99,111,108, 46, 98, 41, 46, 97, 41, 46, 98, 59, 10, 10, 9,105,102,
- 32, 40,102, 97, 99, 32, 33, 61, 32, 49, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 32, 61, 32, 40,111,117,116, 99,111,108,
- 42,102, 97, 99, 41, 32, 43, 32, 40, 99,111,108, 42, 40, 49, 46, 48, 45,102, 97, 99, 41, 41, 59, 10, 10, 9,111,117,116, 99,111,
-108, 46, 97, 32, 61, 32, 99,111,108, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,118, 97,108,117,101, 40,102,
-108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,
-117,116,118, 97,108, 32, 61, 32,118, 97,108, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,114,103, 98, 40,118,101, 99,
- 51, 32, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,
-108, 32, 61, 32, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,114,103, 98, 97, 40,118,101, 99, 52, 32, 99,
-111,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 32, 61,
- 32, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,118, 97,108,117,101, 95,122,101,114,111, 40,111,117,116,
- 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10,
-125, 10, 10,118,111,105,100, 32,115,101,116, 95,118, 97,108,117,101, 95,111,110,101, 40,111,117,116, 32,102,108,111, 97,116, 32,
-111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 49, 46, 48, 59, 10,125, 10, 10,118,111,105,100,
- 32,115,101,116, 95,114,103, 98, 95,122,101,114,111, 40,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118, 97,108, 41, 10,123,
- 10, 9,111,117,116,118, 97,108, 32, 61, 32,118,101, 99, 51, 40, 48, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,
-116, 95,114,103, 98, 97, 95,122,101,114,111, 40,111,117,116, 32,118,101, 99, 52, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,
-111,117,116,118, 97,108, 32, 61, 32,118,101, 99, 52, 40, 48, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,
- 98,108,101,110,100, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52,
- 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61,
- 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,111,117,116, 99,111,108, 32, 61,
- 32,109,105,120, 40, 99,111,108, 49, 44, 32, 99,111,108, 50, 44, 32,102, 97, 99, 41, 59, 10, 9,111,117,116, 99,111,108, 46, 97,
- 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95, 97,100,100, 40,102,108,111, 97,116,
- 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,
-118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44,
- 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,111,117,116, 99,111,108, 32, 61, 32,109,105,120, 40, 99,111,108, 49, 44, 32,
- 99,111,108, 49, 32, 43, 32, 99,111,108, 50, 44, 32,102, 97, 99, 41, 59, 10, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,
-111,108, 49, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,109,117,108,116, 40,102,108,111, 97,116, 32,102, 97,
- 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99,
- 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46,
- 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,111,117,116, 99,111,108, 32, 61, 32,109,105,120, 40, 99,111,108, 49, 44, 32, 99,111,108,
- 49, 32, 42, 32, 99,111,108, 50, 44, 32,102, 97, 99, 41, 59, 10, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49,
- 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,115, 99,114,101,101,110, 40,102,108,111, 97,116, 32,102, 97, 99,
- 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52,
- 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48,
- 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 59,
- 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32,118,101, 99, 52, 40, 49, 46, 48, 41, 32, 45, 32, 40,118,101, 99, 52, 40,102, 97,
- 99,109, 41, 32, 43, 32,102, 97, 99, 42, 40,118,101, 99, 52, 40, 49, 46, 48, 41, 32, 45, 32, 99,111,108, 50, 41, 41, 42, 40,118,
-101, 99, 52, 40, 49, 46, 48, 41, 32, 45, 32, 99,111,108, 49, 41, 59, 10, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,
-108, 49, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,111,118,101,114,108, 97,121, 40,102,108,111, 97,116, 32,
-102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,
-101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32,
- 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102,
- 97, 99, 59, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 49, 59, 10, 10, 9,105,102, 40,111,117,116, 99,111,108,
- 46,114, 32, 60, 32, 48, 46, 53, 41, 10, 9, 9,111,117,116, 99,111,108, 46,114, 32, 42, 61, 32,102, 97, 99,109, 32, 43, 32, 50,
- 46, 48, 42,102, 97, 99, 42, 99,111,108, 50, 46,114, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116, 99,111,108, 46,114, 32,
- 61, 32, 49, 46, 48, 32, 45, 32, 40,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99, 42, 40, 49, 46, 48, 32, 45, 32, 99,
-111,108, 50, 46,114, 41, 41, 42, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46,114, 41, 59, 10, 10, 9,105,102, 40,111,
-117,116, 99,111,108, 46,103, 32, 60, 32, 48, 46, 53, 41, 10, 9, 9,111,117,116, 99,111,108, 46,103, 32, 42, 61, 32,102, 97, 99,
-109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99, 42, 99,111,108, 50, 46,103, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116, 99,
-111,108, 46,103, 32, 61, 32, 49, 46, 48, 32, 45, 32, 40,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99, 42, 40, 49, 46,
- 48, 32, 45, 32, 99,111,108, 50, 46,103, 41, 41, 42, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46,103, 41, 59, 10, 10,
- 9,105,102, 40,111,117,116, 99,111,108, 46, 98, 32, 60, 32, 48, 46, 53, 41, 10, 9, 9,111,117,116, 99,111,108, 46, 98, 32, 42,
- 61, 32,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99, 42, 99,111,108, 50, 46, 98, 59, 10, 9,101,108,115,101, 10, 9,
- 9,111,117,116, 99,111,108, 46, 98, 32, 61, 32, 49, 46, 48, 32, 45, 32, 40,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97,
- 99, 42, 40, 49, 46, 48, 32, 45, 32, 99,111,108, 50, 46, 98, 41, 41, 42, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46,
- 98, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,115,117, 98, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,
-101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,
-116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49,
- 46, 48, 41, 59, 10, 9,111,117,116, 99,111,108, 32, 61, 32,109,105,120, 40, 99,111,108, 49, 44, 32, 99,111,108, 49, 32, 45, 32,
- 99,111,108, 50, 44, 32,102, 97, 99, 41, 59, 10, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10,
-125, 10, 10,118,111,105,100, 32,109,105,120, 95,100,105,118, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32,
- 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108,
- 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59,
- 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 59, 10, 10, 9,111,117,116, 99,
-111,108, 32, 61, 32, 99,111,108, 49, 59, 10, 10, 9,105,102, 40, 99,111,108, 50, 46,114, 32, 33, 61, 32, 48, 46, 48, 41, 32,111,
-117,116, 99,111,108, 46,114, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 46,114, 32, 43, 32,102, 97, 99, 42,111,117,
-116, 99,111,108, 46,114, 47, 99,111,108, 50, 46,114, 59, 10, 9,105,102, 40, 99,111,108, 50, 46,103, 32, 33, 61, 32, 48, 46, 48,
- 41, 32,111,117,116, 99,111,108, 46,103, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 46,103, 32, 43, 32,102, 97, 99,
- 42,111,117,116, 99,111,108, 46,103, 47, 99,111,108, 50, 46,103, 59, 10, 9,105,102, 40, 99,111,108, 50, 46, 98, 32, 33, 61, 32,
- 48, 46, 48, 41, 32,111,117,116, 99,111,108, 46, 98, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 46, 98, 32, 43, 32,
-102, 97, 99, 42,111,117,116, 99,111,108, 46, 98, 47, 99,111,108, 50, 46, 98, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120,
- 95,100,105,102,102, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52,
- 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61,
- 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,111,117,116, 99,111,108, 32, 61,
- 32,109,105,120, 40, 99,111,108, 49, 44, 32, 97, 98,115, 40, 99,111,108, 49, 32, 45, 32, 99,111,108, 50, 41, 44, 32,102, 97, 99,
- 41, 59, 10, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,109,
-105,120, 95,100, 97,114,107, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101,
- 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99,
- 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,111,117,116, 99,111,108,
- 46,114,103, 98, 32, 61, 32,109,105,110, 40, 99,111,108, 49, 46,114,103, 98, 44, 32, 99,111,108, 50, 46,114,103, 98, 42,102, 97,
- 99, 41, 59, 10, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,
-109,105,120, 95,108,105,103,104,116, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,
-118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102,
- 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,111,117,116, 99,
-111,108, 46,114,103, 98, 32, 61, 32,109, 97,120, 40, 99,111,108, 49, 46,114,103, 98, 44, 32, 99,111,108, 50, 46,114,103, 98, 42,
-102, 97, 99, 41, 59, 10, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10,125, 10, 10,118,111,105,
-100, 32,109,105,120, 95,100,111,100,103,101, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49,
- 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10,
- 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,111,117,
-116, 99,111,108, 32, 61, 32, 99,111,108, 49, 59, 10, 10, 9,105,102, 40,111,117,116, 99,111,108, 46,114, 32, 33, 61, 32, 48, 46,
- 48, 41, 32,123, 10, 9, 9,102,108,111, 97,116, 32,116,109,112, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 42, 99,111,108,
- 50, 46,114, 59, 10, 9, 9,105,102, 40,116,109,112, 32, 60, 61, 32, 48, 46, 48, 41, 10, 9, 9, 9,111,117,116, 99,111,108, 46,
-114, 32, 61, 32, 49, 46, 48, 59, 10, 9, 9,101,108,115,101, 32,105,102, 40, 40,116,109,112, 32, 61, 32,111,117,116, 99,111,108,
- 46,114, 47,116,109,112, 41, 32, 62, 32, 49, 46, 48, 41, 10, 9, 9, 9,111,117,116, 99,111,108, 46,114, 32, 61, 32, 49, 46, 48,
- 59, 10, 9, 9,101,108,115,101, 10, 9, 9, 9,111,117,116, 99,111,108, 46,114, 32, 61, 32,116,109,112, 59, 10, 9,125, 10, 9,
-105,102, 40,111,117,116, 99,111,108, 46,103, 32, 33, 61, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,102,108,111, 97,116, 32,116,109,
-112, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 42, 99,111,108, 50, 46,103, 59, 10, 9, 9,105,102, 40,116,109,112, 32, 60,
- 61, 32, 48, 46, 48, 41, 10, 9, 9, 9,111,117,116, 99,111,108, 46,103, 32, 61, 32, 49, 46, 48, 59, 10, 9, 9,101,108,115,101,
- 32,105,102, 40, 40,116,109,112, 32, 61, 32,111,117,116, 99,111,108, 46,103, 47,116,109,112, 41, 32, 62, 32, 49, 46, 48, 41, 10,
- 9, 9, 9,111,117,116, 99,111,108, 46,103, 32, 61, 32, 49, 46, 48, 59, 10, 9, 9,101,108,115,101, 10, 9, 9, 9,111,117,116,
- 99,111,108, 46,103, 32, 61, 32,116,109,112, 59, 10, 9,125, 10, 9,105,102, 40,111,117,116, 99,111,108, 46, 98, 32, 33, 61, 32,
- 48, 46, 48, 41, 32,123, 10, 9, 9,102,108,111, 97,116, 32,116,109,112, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 42, 99,
-111,108, 50, 46, 98, 59, 10, 9, 9,105,102, 40,116,109,112, 32, 60, 61, 32, 48, 46, 48, 41, 10, 9, 9, 9,111,117,116, 99,111,
-108, 46, 98, 32, 61, 32, 49, 46, 48, 59, 10, 9, 9,101,108,115,101, 32,105,102, 40, 40,116,109,112, 32, 61, 32,111,117,116, 99,
-111,108, 46, 98, 47,116,109,112, 41, 32, 62, 32, 49, 46, 48, 41, 10, 9, 9, 9,111,117,116, 99,111,108, 46, 98, 32, 61, 32, 49,
- 46, 48, 59, 10, 9, 9,101,108,115,101, 10, 9, 9, 9,111,117,116, 99,111,108, 46, 98, 32, 61, 32,116,109,112, 59, 10, 9,125,
- 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95, 98,117,114,110, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99,
+117,116,118, 97,108, 32, 61, 32,108,101,110,103,116,104, 40,111,117,116,118,101, 99, 41, 59, 10, 9,111,117,116,118,101, 99, 32,
+ 61, 32,110,111,114,109, 97,108,105,122,101, 40,111,117,116,118,101, 99, 41, 59, 10,125, 10, 10,118,111,105,100, 32,118,101, 99,
+ 95,109, 97,116,104, 95,100,111,116, 40,118,101, 99, 51, 32,118, 49, 44, 32,118,101, 99, 51, 32,118, 50, 44, 32,111,117,116, 32,
+118,101, 99, 51, 32,111,117,116,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123,
+ 10, 9,111,117,116,118,101, 99, 32, 61, 32,118,101, 99, 51, 40, 48, 44, 32, 48, 44, 32, 48, 41, 59, 10, 9,111,117,116,118, 97,
+108, 32, 61, 32,100,111,116, 40,118, 49, 44, 32,118, 50, 41, 59, 10,125, 10, 10,118,111,105,100, 32,118,101, 99, 95,109, 97,116,
+104, 95, 99,114,111,115,115, 40,118,101, 99, 51, 32,118, 49, 44, 32,118,101, 99, 51, 32,118, 50, 44, 32,111,117,116, 32,118,101,
+ 99, 51, 32,111,117,116,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,
+111,117,116,118,101, 99, 32, 61, 32, 99,114,111,115,115, 40,118, 49, 44, 32,118, 50, 41, 59, 10, 9,111,117,116,118, 97,108, 32,
+ 61, 32,108,101,110,103,116,104, 40,111,117,116,118,101, 99, 41, 59, 10,125, 10, 10,118,111,105,100, 32,118,101, 99, 95,109, 97,
+116,104, 95,110,111,114,109, 97,108,105,122,101, 40,118,101, 99, 51, 32,118, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,
+116,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,
+108, 32, 61, 32,108,101,110,103,116,104, 40,118, 41, 59, 10, 9,111,117,116,118,101, 99, 32, 61, 32,110,111,114,109, 97,108,105,
+122,101, 40,118, 41, 59, 10,125, 10, 10,118,111,105,100, 32,118,101, 99, 95,109, 97,116,104, 95,110,101,103, 97,116,101, 40,118,
+101, 99, 51, 32,118, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118, 41, 10,123, 10, 9,111,117,116,118, 32, 61, 32,
+ 45,118, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,114,109, 97,108, 40,118,101, 99, 51, 32,100,105,114, 44, 32,118,101, 99,
+ 51, 32,110,111,114, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,110,111,114, 44, 32,111,117,116, 32,102,108,111, 97,
+116, 32,111,117,116,100,111,116, 41, 10,123, 10, 9,111,117,116,110,111,114, 32, 61, 32,100,105,114, 59, 10, 9,111,117,116,100,
+111,116, 32, 61, 32, 45,100,111,116, 40,100,105,114, 44, 32,110,111,114, 41, 59, 10,125, 10, 10,118,111,105,100, 32, 99,117,114,
+118,101,115, 95,118,101, 99, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 51, 32,118,101, 99, 44, 32,115, 97,109,
+112,108,101,114, 49, 68, 32, 99,117,114,118,101,109, 97,112, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99,
+ 41, 10,123, 10, 9,111,117,116,118,101, 99, 46,120, 32, 61, 32,116,101,120,116,117,114,101, 49, 68, 40, 99,117,114,118,101,109,
+ 97,112, 44, 32, 40,118,101, 99, 46,120, 32, 43, 32, 49, 46, 48, 41, 42, 48, 46, 53, 41, 46,120, 59, 10, 9,111,117,116,118,101,
+ 99, 46,121, 32, 61, 32,116,101,120,116,117,114,101, 49, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32, 40,118,101, 99, 46,121,
+ 32, 43, 32, 49, 46, 48, 41, 42, 48, 46, 53, 41, 46,121, 59, 10, 9,111,117,116,118,101, 99, 46,122, 32, 61, 32,116,101,120,116,
+117,114,101, 49, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32, 40,118,101, 99, 46,122, 32, 43, 32, 49, 46, 48, 41, 42, 48, 46,
+ 53, 41, 46,122, 59, 10, 10, 9,105,102, 32, 40,102, 97, 99, 32, 33, 61, 32, 49, 46, 48, 41, 10, 9, 9,111,117,116,118,101, 99,
+ 32, 61, 32, 40,111,117,116,118,101, 99, 42,102, 97, 99, 41, 32, 43, 32, 40,118,101, 99, 42, 40, 49, 46, 48, 45,102, 97, 99, 41,
+ 41, 59, 10, 10,125, 10, 10,118,111,105,100, 32, 99,117,114,118,101,115, 95,114,103, 98, 40,102,108,111, 97,116, 32,102, 97, 99,
+ 44, 32,118,101, 99, 52, 32, 99,111,108, 44, 32,115, 97,109,112,108,101,114, 49, 68, 32, 99,117,114,118,101,109, 97,112, 44, 32,
+111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 46,114, 32, 61, 32,116,
+101,120,116,117,114,101, 49, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,116,101,120,116,117,114,101, 49, 68, 40, 99,117,114,
+118,101,109, 97,112, 44, 32, 99,111,108, 46,114, 41, 46, 97, 41, 46,114, 59, 10, 9,111,117,116, 99,111,108, 46,103, 32, 61, 32,
+116,101,120,116,117,114,101, 49, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,116,101,120,116,117,114,101, 49, 68, 40, 99,117,
+114,118,101,109, 97,112, 44, 32, 99,111,108, 46,103, 41, 46, 97, 41, 46,103, 59, 10, 9,111,117,116, 99,111,108, 46, 98, 32, 61,
+ 32,116,101,120,116,117,114,101, 49, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,116,101,120,116,117,114,101, 49, 68, 40, 99,
+117,114,118,101,109, 97,112, 44, 32, 99,111,108, 46, 98, 41, 46, 97, 41, 46, 98, 59, 10, 10, 9,105,102, 32, 40,102, 97, 99, 32,
+ 33, 61, 32, 49, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 32, 61, 32, 40,111,117,116, 99,111,108, 42,102, 97, 99, 41, 32,
+ 43, 32, 40, 99,111,108, 42, 40, 49, 46, 48, 45,102, 97, 99, 41, 41, 59, 10, 10, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32,
+ 99,111,108, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,118, 97,108,117,101, 40,102,108,111, 97,116, 32,118,
+ 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32,
+ 61, 32,118, 97,108, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,114,103, 98, 40,118,101, 99, 51, 32, 99,111,108, 44,
+ 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,
+108, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,114,103, 98, 97, 40,118,101, 99, 52, 32, 99,111,108, 44, 32,111,117,
+116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 59, 10,
+125, 10, 10,118,111,105,100, 32,115,101,116, 95,118, 97,108,117,101, 95,122,101,114,111, 40,111,117,116, 32,102,108,111, 97,116,
+ 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,
+100, 32,115,101,116, 95,118, 97,108,117,101, 95,111,110,101, 40,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108,
+ 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 49, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,114,
+103, 98, 95,122,101,114,111, 40,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118,
+ 97,108, 32, 61, 32,118,101, 99, 51, 40, 48, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,114,103, 98, 97,
+ 95,122,101,114,111, 40,111,117,116, 32,118,101, 99, 52, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108,
+ 32, 61, 32,118,101, 99, 52, 40, 48, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95, 98,108,101,110,100, 40,
+102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44,
+ 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112,
+ 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,111,117,116, 99,111,108, 32, 61, 32,109,105,120, 40, 99,
+111,108, 49, 44, 32, 99,111,108, 50, 44, 32,102, 97, 99, 41, 59, 10, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108,
+ 49, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95, 97,100,100, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,
+118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,
+117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32,
+ 49, 46, 48, 41, 59, 10, 9,111,117,116, 99,111,108, 32, 61, 32,109,105,120, 40, 99,111,108, 49, 44, 32, 99,111,108, 49, 32, 43,
+ 32, 99,111,108, 50, 44, 32,102, 97, 99, 41, 59, 10, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59,
+ 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,109,117,108,116, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99,
52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,
111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48,
- 41, 59, 10, 9,102,108,111, 97,116, 32,116,109,112, 44, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 59,
- 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 49, 59, 10, 10, 9,116,109,112, 32, 61, 32,102, 97, 99,109, 32, 43,
- 32,102, 97, 99, 42, 99,111,108, 50, 46,114, 59, 10, 9,105,102, 40,116,109,112, 32, 60, 61, 32, 48, 46, 48, 41, 10, 9, 9,111,
-117,116, 99,111,108, 46,114, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 32,105,102, 40, 40,116,109,112, 32, 61, 32, 40,
- 49, 46, 48, 32, 45, 32, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46,114, 41, 47,116,109,112, 41, 41, 32, 60, 32, 48,
- 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 46,114, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 32,105,102, 40,116,
-109,112, 32, 62, 32, 49, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 46,114, 32, 61, 32, 49, 46, 48, 59, 10, 9,101,108,115,
-101, 10, 9, 9,111,117,116, 99,111,108, 46,114, 32, 61, 32,116,109,112, 59, 10, 10, 9,116,109,112, 32, 61, 32,102, 97, 99,109,
- 32, 43, 32,102, 97, 99, 42, 99,111,108, 50, 46,103, 59, 10, 9,105,102, 40,116,109,112, 32, 60, 61, 32, 48, 46, 48, 41, 10, 9,
- 9,111,117,116, 99,111,108, 46,103, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 32,105,102, 40, 40,116,109,112, 32, 61,
- 32, 40, 49, 46, 48, 32, 45, 32, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46,103, 41, 47,116,109,112, 41, 41, 32, 60,
- 32, 48, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 46,103, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 32,105,102,
- 40,116,109,112, 32, 62, 32, 49, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 46,103, 32, 61, 32, 49, 46, 48, 59, 10, 9,101,
-108,115,101, 10, 9, 9,111,117,116, 99,111,108, 46,103, 32, 61, 32,116,109,112, 59, 10, 10, 9,116,109,112, 32, 61, 32,102, 97,
- 99,109, 32, 43, 32,102, 97, 99, 42, 99,111,108, 50, 46, 98, 59, 10, 9,105,102, 40,116,109,112, 32, 60, 61, 32, 48, 46, 48, 41,
- 10, 9, 9,111,117,116, 99,111,108, 46, 98, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 32,105,102, 40, 40,116,109,112,
- 32, 61, 32, 40, 49, 46, 48, 32, 45, 32, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46, 98, 41, 47,116,109,112, 41, 41,
- 32, 60, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 46, 98, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 32,
-105,102, 40,116,109,112, 32, 62, 32, 49, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 46, 98, 32, 61, 32, 49, 46, 48, 59, 10,
- 9,101,108,115,101, 10, 9, 9,111,117,116, 99,111,108, 46, 98, 32, 61, 32,116,109,112, 59, 10,125, 10, 10,118,111,105,100, 32,
-109,105,120, 95,104,117,101, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101,
- 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99,
- 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,111, 97,116, 32,
-102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 59, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108,
- 49, 59, 10, 10, 9,118,101, 99, 52, 32,104,115,118, 44, 32,104,115,118, 50, 44, 32,116,109,112, 59, 10, 9,114,103, 98, 95,116,
-111, 95,104,115,118, 40, 99,111,108, 50, 44, 32,104,115,118, 50, 41, 59, 10, 10, 9,105,102, 40,104,115,118, 50, 46,121, 32, 33,
- 61, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,114,103, 98, 95,116,111, 95,104,115,118, 40,111,117,116, 99,111,108, 44, 32,104,115,
-118, 41, 59, 10, 9, 9,104,115,118, 46,120, 32, 61, 32,104,115,118, 50, 46,120, 59, 10, 9, 9,104,115,118, 95,116,111, 95,114,
-103, 98, 40,104,115,118, 44, 32,116,109,112, 41, 59, 32, 10, 10, 9, 9,111,117,116, 99,111,108, 32, 61, 32,109,105,120, 40,111,
-117,116, 99,111,108, 44, 32,116,109,112, 44, 32,102, 97, 99, 41, 59, 10, 9, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,
-111,108, 49, 46, 97, 59, 10, 9,125, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,115, 97,116, 40,102,108,111, 97,116, 32,
-102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,
-101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32,
- 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102,
- 97, 99, 59, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 49, 59, 10, 10, 9,118,101, 99, 52, 32,104,115,118, 44,
- 32,104,115,118, 50, 59, 10, 9,114,103, 98, 95,116,111, 95,104,115,118, 40,111,117,116, 99,111,108, 44, 32,104,115,118, 41, 59,
- 10, 10, 9,105,102, 40,104,115,118, 46,121, 32, 33, 61, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,114,103, 98, 95,116,111, 95,104,
-115,118, 40, 99,111,108, 50, 44, 32,104,115,118, 50, 41, 59, 10, 10, 9, 9,104,115,118, 46,121, 32, 61, 32,102, 97, 99,109, 42,
-104,115,118, 46,121, 32, 43, 32,102, 97, 99, 42,104,115,118, 50, 46,121, 59, 10, 9, 9,104,115,118, 95,116,111, 95,114,103, 98,
- 40,104,115,118, 44, 32,111,117,116, 99,111,108, 41, 59, 10, 9,125, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,118, 97,
-108, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108,
+ 41, 59, 10, 9,111,117,116, 99,111,108, 32, 61, 32,109,105,120, 40, 99,111,108, 49, 44, 32, 99,111,108, 49, 32, 42, 32, 99,111,
+108, 50, 44, 32,102, 97, 99, 41, 59, 10, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10,125, 10,
+ 10,118,111,105,100, 32,109,105,120, 95,115, 99,114,101,101,110, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52,
+ 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,
+108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41,
+ 59, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 59, 10, 10, 9,111,117,116,
+ 99,111,108, 32, 61, 32,118,101, 99, 52, 40, 49, 46, 48, 41, 32, 45, 32, 40,118,101, 99, 52, 40,102, 97, 99,109, 41, 32, 43, 32,
+102, 97, 99, 42, 40,118,101, 99, 52, 40, 49, 46, 48, 41, 32, 45, 32, 99,111,108, 50, 41, 41, 42, 40,118,101, 99, 52, 40, 49, 46,
+ 48, 41, 32, 45, 32, 99,111,108, 49, 41, 59, 10, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10,
+125, 10, 10,118,111,105,100, 32,109,105,120, 95,111,118,101,114,108, 97,121, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,
+101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,
+116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49,
+ 46, 48, 41, 59, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 59, 10, 10, 9,
+111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 49, 59, 10, 10, 9,105,102, 40,111,117,116, 99,111,108, 46,114, 32, 60, 32, 48,
+ 46, 53, 41, 10, 9, 9,111,117,116, 99,111,108, 46,114, 32, 42, 61, 32,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99,
+ 42, 99,111,108, 50, 46,114, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116, 99,111,108, 46,114, 32, 61, 32, 49, 46, 48, 32,
+ 45, 32, 40,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99, 42, 40, 49, 46, 48, 32, 45, 32, 99,111,108, 50, 46,114, 41,
+ 41, 42, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46,114, 41, 59, 10, 10, 9,105,102, 40,111,117,116, 99,111,108, 46,
+103, 32, 60, 32, 48, 46, 53, 41, 10, 9, 9,111,117,116, 99,111,108, 46,103, 32, 42, 61, 32,102, 97, 99,109, 32, 43, 32, 50, 46,
+ 48, 42,102, 97, 99, 42, 99,111,108, 50, 46,103, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116, 99,111,108, 46,103, 32, 61,
+ 32, 49, 46, 48, 32, 45, 32, 40,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99, 42, 40, 49, 46, 48, 32, 45, 32, 99,111,
+108, 50, 46,103, 41, 41, 42, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46,103, 41, 59, 10, 10, 9,105,102, 40,111,117,
+116, 99,111,108, 46, 98, 32, 60, 32, 48, 46, 53, 41, 10, 9, 9,111,117,116, 99,111,108, 46, 98, 32, 42, 61, 32,102, 97, 99,109,
+ 32, 43, 32, 50, 46, 48, 42,102, 97, 99, 42, 99,111,108, 50, 46, 98, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116, 99,111,
+108, 46, 98, 32, 61, 32, 49, 46, 48, 32, 45, 32, 40,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99, 42, 40, 49, 46, 48,
+ 32, 45, 32, 99,111,108, 50, 46, 98, 41, 41, 42, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46, 98, 41, 59, 10,125, 10,
+ 10,118,111,105,100, 32,109,105,120, 95,115,117, 98, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,
+108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,
+123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,
+111,117,116, 99,111,108, 32, 61, 32,109,105,120, 40, 99,111,108, 49, 44, 32, 99,111,108, 49, 32, 45, 32, 99,111,108, 50, 44, 32,
+102, 97, 99, 41, 59, 10, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10,125, 10, 10,118,111,105,
+100, 32,109,105,120, 95,100,105,118, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,
+118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102,
+ 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,111, 97,
+116, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 59, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,
+111,108, 49, 59, 10, 10, 9,105,102, 40, 99,111,108, 50, 46,114, 32, 33, 61, 32, 48, 46, 48, 41, 32,111,117,116, 99,111,108, 46,
+114, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 46,114, 32, 43, 32,102, 97, 99, 42,111,117,116, 99,111,108, 46,114,
+ 47, 99,111,108, 50, 46,114, 59, 10, 9,105,102, 40, 99,111,108, 50, 46,103, 32, 33, 61, 32, 48, 46, 48, 41, 32,111,117,116, 99,
+111,108, 46,103, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 46,103, 32, 43, 32,102, 97, 99, 42,111,117,116, 99,111,
+108, 46,103, 47, 99,111,108, 50, 46,103, 59, 10, 9,105,102, 40, 99,111,108, 50, 46, 98, 32, 33, 61, 32, 48, 46, 48, 41, 32,111,
+117,116, 99,111,108, 46, 98, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 46, 98, 32, 43, 32,102, 97, 99, 42,111,117,
+116, 99,111,108, 46, 98, 47, 99,111,108, 50, 46, 98, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,100,105,102,102, 40,
+102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44,
+ 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112,
+ 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,111,117,116, 99,111,108, 32, 61, 32,109,105,120, 40, 99,
+111,108, 49, 44, 32, 97, 98,115, 40, 99,111,108, 49, 32, 45, 32, 99,111,108, 50, 41, 44, 32,102, 97, 99, 41, 59, 10, 9,111,117,
+116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,100, 97,114,
+107, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108,
+ 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,
+109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,111,117,116, 99,111,108, 46,114,103, 98, 32, 61,
+ 32,109,105,110, 40, 99,111,108, 49, 46,114,103, 98, 44, 32, 99,111,108, 50, 46,114,103, 98, 42,102, 97, 99, 41, 59, 10, 9,111,
+117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,108,105,
+103,104,116, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,
+111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,
+108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,111,117,116, 99,111,108, 46,114,103, 98,
+ 32, 61, 32,109, 97,120, 40, 99,111,108, 49, 46,114,103, 98, 44, 32, 99,111,108, 50, 46,114,103, 98, 42,102, 97, 99, 41, 59, 10,
+ 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,
+100,111,100,103,101, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52,
+ 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61,
+ 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,111,117,116, 99,111,108, 32, 61,
+ 32, 99,111,108, 49, 59, 10, 10, 9,105,102, 40,111,117,116, 99,111,108, 46,114, 32, 33, 61, 32, 48, 46, 48, 41, 32,123, 10, 9,
+ 9,102,108,111, 97,116, 32,116,109,112, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 42, 99,111,108, 50, 46,114, 59, 10, 9,
+ 9,105,102, 40,116,109,112, 32, 60, 61, 32, 48, 46, 48, 41, 10, 9, 9, 9,111,117,116, 99,111,108, 46,114, 32, 61, 32, 49, 46,
+ 48, 59, 10, 9, 9,101,108,115,101, 32,105,102, 40, 40,116,109,112, 32, 61, 32,111,117,116, 99,111,108, 46,114, 47,116,109,112,
+ 41, 32, 62, 32, 49, 46, 48, 41, 10, 9, 9, 9,111,117,116, 99,111,108, 46,114, 32, 61, 32, 49, 46, 48, 59, 10, 9, 9,101,108,
+115,101, 10, 9, 9, 9,111,117,116, 99,111,108, 46,114, 32, 61, 32,116,109,112, 59, 10, 9,125, 10, 9,105,102, 40,111,117,116,
+ 99,111,108, 46,103, 32, 33, 61, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,102,108,111, 97,116, 32,116,109,112, 32, 61, 32, 49, 46,
+ 48, 32, 45, 32,102, 97, 99, 42, 99,111,108, 50, 46,103, 59, 10, 9, 9,105,102, 40,116,109,112, 32, 60, 61, 32, 48, 46, 48, 41,
+ 10, 9, 9, 9,111,117,116, 99,111,108, 46,103, 32, 61, 32, 49, 46, 48, 59, 10, 9, 9,101,108,115,101, 32,105,102, 40, 40,116,
+109,112, 32, 61, 32,111,117,116, 99,111,108, 46,103, 47,116,109,112, 41, 32, 62, 32, 49, 46, 48, 41, 10, 9, 9, 9,111,117,116,
+ 99,111,108, 46,103, 32, 61, 32, 49, 46, 48, 59, 10, 9, 9,101,108,115,101, 10, 9, 9, 9,111,117,116, 99,111,108, 46,103, 32,
+ 61, 32,116,109,112, 59, 10, 9,125, 10, 9,105,102, 40,111,117,116, 99,111,108, 46, 98, 32, 33, 61, 32, 48, 46, 48, 41, 32,123,
+ 10, 9, 9,102,108,111, 97,116, 32,116,109,112, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 42, 99,111,108, 50, 46, 98, 59,
+ 10, 9, 9,105,102, 40,116,109,112, 32, 60, 61, 32, 48, 46, 48, 41, 10, 9, 9, 9,111,117,116, 99,111,108, 46, 98, 32, 61, 32,
+ 49, 46, 48, 59, 10, 9, 9,101,108,115,101, 32,105,102, 40, 40,116,109,112, 32, 61, 32,111,117,116, 99,111,108, 46, 98, 47,116,
+109,112, 41, 32, 62, 32, 49, 46, 48, 41, 10, 9, 9, 9,111,117,116, 99,111,108, 46, 98, 32, 61, 32, 49, 46, 48, 59, 10, 9, 9,
+101,108,115,101, 10, 9, 9, 9,111,117,116, 99,111,108, 46, 98, 32, 61, 32,116,109,112, 59, 10, 9,125, 10,125, 10, 10,118,111,
+105,100, 32,109,105,120, 95, 98,117,114,110, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49,
+ 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10,
+ 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,
+111, 97,116, 32,116,109,112, 44, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 59, 10, 10, 9,111,117,116,
+ 99,111,108, 32, 61, 32, 99,111,108, 49, 59, 10, 10, 9,116,109,112, 32, 61, 32,102, 97, 99,109, 32, 43, 32,102, 97, 99, 42, 99,
+111,108, 50, 46,114, 59, 10, 9,105,102, 40,116,109,112, 32, 60, 61, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 46,
+114, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 32,105,102, 40, 40,116,109,112, 32, 61, 32, 40, 49, 46, 48, 32, 45, 32,
+ 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46,114, 41, 47,116,109,112, 41, 41, 32, 60, 32, 48, 46, 48, 41, 10, 9, 9,
+111,117,116, 99,111,108, 46,114, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 32,105,102, 40,116,109,112, 32, 62, 32, 49,
+ 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 46,114, 32, 61, 32, 49, 46, 48, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,
+116, 99,111,108, 46,114, 32, 61, 32,116,109,112, 59, 10, 10, 9,116,109,112, 32, 61, 32,102, 97, 99,109, 32, 43, 32,102, 97, 99,
+ 42, 99,111,108, 50, 46,103, 59, 10, 9,105,102, 40,116,109,112, 32, 60, 61, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,
+108, 46,103, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 32,105,102, 40, 40,116,109,112, 32, 61, 32, 40, 49, 46, 48, 32,
+ 45, 32, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46,103, 41, 47,116,109,112, 41, 41, 32, 60, 32, 48, 46, 48, 41, 10,
+ 9, 9,111,117,116, 99,111,108, 46,103, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 32,105,102, 40,116,109,112, 32, 62,
+ 32, 49, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 46,103, 32, 61, 32, 49, 46, 48, 59, 10, 9,101,108,115,101, 10, 9, 9,
+111,117,116, 99,111,108, 46,103, 32, 61, 32,116,109,112, 59, 10, 10, 9,116,109,112, 32, 61, 32,102, 97, 99,109, 32, 43, 32,102,
+ 97, 99, 42, 99,111,108, 50, 46, 98, 59, 10, 9,105,102, 40,116,109,112, 32, 60, 61, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116,
+ 99,111,108, 46, 98, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 32,105,102, 40, 40,116,109,112, 32, 61, 32, 40, 49, 46,
+ 48, 32, 45, 32, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46, 98, 41, 47,116,109,112, 41, 41, 32, 60, 32, 48, 46, 48,
+ 41, 10, 9, 9,111,117,116, 99,111,108, 46, 98, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 32,105,102, 40,116,109,112,
+ 32, 62, 32, 49, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 46, 98, 32, 61, 32, 49, 46, 48, 59, 10, 9,101,108,115,101, 10,
+ 9, 9,111,117,116, 99,111,108, 46, 98, 32, 61, 32,116,109,112, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,104,117,
+101, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108,
50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,
109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 32, 61,
- 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 59, 10, 10, 9,118,101, 99, 52, 32,104,115,118, 44, 32,104,115,118, 50, 59, 10, 9,114,
-103, 98, 95,116,111, 95,104,115,118, 40, 99,111,108, 49, 44, 32,104,115,118, 41, 59, 10, 9,114,103, 98, 95,116,111, 95,104,115,
-118, 40, 99,111,108, 50, 44, 32,104,115,118, 50, 41, 59, 10, 10, 9,104,115,118, 46,122, 32, 61, 32,102, 97, 99,109, 42,104,115,
-118, 46,122, 32, 43, 32,102, 97, 99, 42,104,115,118, 50, 46,122, 59, 10, 9,104,115,118, 95,116,111, 95,114,103, 98, 40,104,115,
-118, 44, 32,111,117,116, 99,111,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95, 99,111,108,111,114, 40,102,108,
-111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,
-117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102,
- 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48,
- 32, 45, 32,102, 97, 99, 59, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 49, 59, 10, 10, 9,118,101, 99, 52, 32,
-104,115,118, 44, 32,104,115,118, 50, 44, 32,116,109,112, 59, 10, 9,114,103, 98, 95,116,111, 95,104,115,118, 40, 99,111,108, 50,
- 44, 32,104,115,118, 50, 41, 59, 10, 10, 9,105,102, 40,104,115,118, 50, 46,121, 32, 33, 61, 32, 48, 46, 48, 41, 32,123, 10, 9,
- 9,114,103, 98, 95,116,111, 95,104,115,118, 40,111,117,116, 99,111,108, 44, 32,104,115,118, 41, 59, 10, 9, 9,104,115,118, 46,
-120, 32, 61, 32,104,115,118, 50, 46,120, 59, 10, 9, 9,104,115,118, 46,121, 32, 61, 32,104,115,118, 50, 46,121, 59, 10, 9, 9,
-104,115,118, 95,116,111, 95,114,103, 98, 40,104,115,118, 44, 32,116,109,112, 41, 59, 32, 10, 10, 9, 9,111,117,116, 99,111,108,
- 32, 61, 32,109,105,120, 40,111,117,116, 99,111,108, 44, 32,116,109,112, 44, 32,102, 97, 99, 41, 59, 10, 9, 9,111,117,116, 99,
-111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59, 10, 9,125, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,115,111,
-102,116, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,
-108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108,
- 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 32,
- 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 59, 10, 10, 9,118,101, 99, 52, 32,111,110,101, 61, 32,118,101, 99, 52, 40, 49, 46,
- 48, 41, 59, 10, 9,118,101, 99, 52, 32,115, 99,114, 61, 32,111,110,101, 32, 45, 32, 40,111,110,101, 32, 45, 32, 99,111,108, 50,
- 41, 42, 40,111,110,101, 32, 45, 32, 99,111,108, 49, 41, 59, 10, 9,111,117,116, 99,111,108, 32, 61, 32,102, 97, 99,109, 42, 99,
-111,108, 49, 32, 43, 32,102, 97, 99, 42, 40, 40,111,110,101, 32, 45, 32, 99,111,108, 49, 41, 42, 99,111,108, 50, 42, 99,111,108,
- 49, 32, 43, 32, 99,111,108, 49, 42,115, 99,114, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,108,105,110,101, 97,
-114, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108,
- 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,
-109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,
-108, 49, 59, 10, 10, 9,105,102, 40, 99,111,108, 50, 46,114, 32, 62, 32, 48, 46, 53, 41, 10, 9, 9,111,117,116, 99,111,108, 46,
-114, 61, 32, 99,111,108, 49, 46,114, 32, 43, 32,102, 97, 99, 42, 40, 50, 46, 48, 42, 40, 99,111,108, 50, 46,114, 32, 45, 32, 48,
- 46, 53, 41, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116, 99,111,108, 46,114, 61, 32, 99,111,108, 49, 46,114, 32, 43,
- 32,102, 97, 99, 42, 40, 50, 46, 48, 42, 40, 99,111,108, 50, 46,114, 41, 32, 45, 32, 49, 46, 48, 41, 59, 10, 10, 9,105,102, 40,
- 99,111,108, 50, 46,103, 32, 62, 32, 48, 46, 53, 41, 10, 9, 9,111,117,116, 99,111,108, 46,103, 61, 32, 99,111,108, 49, 46,103,
- 32, 43, 32,102, 97, 99, 42, 40, 50, 46, 48, 42, 40, 99,111,108, 50, 46,103, 32, 45, 32, 48, 46, 53, 41, 41, 59, 10, 9,101,108,
-115,101, 10, 9, 9,111,117,116, 99,111,108, 46,103, 61, 32, 99,111,108, 49, 46,103, 32, 43, 32,102, 97, 99, 42, 40, 50, 46, 48,
- 42, 40, 99,111,108, 50, 46,103, 41, 32, 45, 32, 49, 46, 48, 41, 59, 10, 10, 9,105,102, 40, 99,111,108, 50, 46, 98, 32, 62, 32,
- 48, 46, 53, 41, 10, 9, 9,111,117,116, 99,111,108, 46, 98, 61, 32, 99,111,108, 49, 46, 98, 32, 43, 32,102, 97, 99, 42, 40, 50,
- 46, 48, 42, 40, 99,111,108, 50, 46, 98, 32, 45, 32, 48, 46, 53, 41, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116, 99,
-111,108, 46, 98, 61, 32, 99,111,108, 49, 46, 98, 32, 43, 32,102, 97, 99, 42, 40, 50, 46, 48, 42, 40, 99,111,108, 50, 46, 98, 41,
- 32, 45, 32, 49, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,118, 97,108,116,111,114,103, 98, 40,102,108,111, 97,116, 32,
-102, 97, 99, 44, 32,115, 97,109,112,108,101,114, 49, 68, 32, 99,111,108,111,114,109, 97,112, 44, 32,111,117,116, 32,118,101, 99,
- 52, 32,111,117,116, 99,111,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116, 97,108,112,104, 97, 41, 10,123, 10,
- 9,111,117,116, 99,111,108, 32, 61, 32,116,101,120,116,117,114,101, 49, 68, 40, 99,111,108,111,114,109, 97,112, 44, 32,102, 97,
- 99, 41, 59, 10, 9,111,117,116, 97,108,112,104, 97, 32, 61, 32,111,117,116, 99,111,108, 46, 97, 59, 10,125, 10, 10,118,111,105,
-100, 32,114,103, 98,116,111, 98,119, 40,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,
-111,117,116,118, 97,108, 41, 32, 32, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 99,111,108,111,114, 46,114, 42, 48, 46,
- 51, 53, 32, 43, 32, 99,111,108,111,114, 46,103, 42, 48, 46, 52, 53, 32, 43, 32, 99,111,108,111,114, 46, 98, 42, 48, 46, 50, 59,
- 32, 47, 42, 32,107,101,101,112, 32,116,104,101,115,101, 32,102, 97, 99,116,111,114,115, 32,105,110, 32,115,121,110, 99, 32,119,
-105,116,104, 32,116,101,120,116,117,114,101, 46,104, 58, 82, 71, 66, 84, 79, 66, 87, 32, 42, 47, 10,125, 10, 10,118,111,105,100,
- 32,105,110,118,101,114,116, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 44, 32,111,117,116,
- 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 46,120,121,122, 32, 61, 32,109,105,
-120, 40, 99,111,108, 46,120,121,122, 44, 32,118,101, 99, 51, 40, 49, 46, 48, 44, 32, 49, 46, 48, 44, 32, 49, 46, 48, 41, 32, 45,
- 32, 99,111,108, 46,120,121,122, 44, 32,102, 97, 99, 41, 59, 10, 9,111,117,116, 99,111,108, 46,119, 32, 61, 32, 99,111,108, 46,
-119, 59, 10,125, 10, 10,118,111,105,100, 32,104,117,101, 95,115, 97,116, 40,102,108,111, 97,116, 32,104,117,101, 44, 32,102,108,
-111, 97,116, 32,115, 97,116, 44, 32,102,108,111, 97,116, 32,118, 97,108,117,101, 44, 32,102,108,111, 97,116, 32,102, 97, 99, 44,
- 32,118,101, 99, 52, 32, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,118,
-101, 99, 52, 32,104,115,118, 59, 10, 10, 9,114,103, 98, 95,116,111, 95,104,115,118, 40, 99,111,108, 44, 32,104,115,118, 41, 59,
- 10, 10, 9,104,115,118, 91, 48, 93, 32, 43, 61, 32, 40,104,117,101, 32, 45, 32, 48, 46, 53, 41, 59, 10, 9,105,102, 40,104,115,
-118, 91, 48, 93, 62, 49, 46, 48, 41, 32,104,115,118, 91, 48, 93, 45, 61, 49, 46, 48, 59, 32,101,108,115,101, 32,105,102, 40,104,
-115,118, 91, 48, 93, 60, 48, 46, 48, 41, 32,104,115,118, 91, 48, 93, 43, 61, 32, 49, 46, 48, 59, 10, 9,104,115,118, 91, 49, 93,
- 32, 42, 61, 32,115, 97,116, 59, 10, 9,105,102, 40,104,115,118, 91, 49, 93, 62, 49, 46, 48, 41, 32,104,115,118, 91, 49, 93, 61,
- 32, 49, 46, 48, 59, 32,101,108,115,101, 32,105,102, 40,104,115,118, 91, 49, 93, 60, 48, 46, 48, 41, 32,104,115,118, 91, 49, 93,
- 61, 32, 48, 46, 48, 59, 10, 9,104,115,118, 91, 50, 93, 32, 42, 61, 32,118, 97,108,117,101, 59, 10, 9,105,102, 40,104,115,118,
- 91, 50, 93, 62, 49, 46, 48, 41, 32,104,115,118, 91, 50, 93, 61, 32, 49, 46, 48, 59, 32,101,108,115,101, 32,105,102, 40,104,115,
-118, 91, 50, 93, 60, 48, 46, 48, 41, 32,104,115,118, 91, 50, 93, 61, 32, 48, 46, 48, 59, 10, 10, 9,104,115,118, 95,116,111, 95,
-114,103, 98, 40,104,115,118, 44, 32,111,117,116, 99,111,108, 41, 59, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32,109,105,120,
- 40, 99,111,108, 44, 32,111,117,116, 99,111,108, 44, 32,102, 97, 99, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,112, 97,
-114, 97,116,101, 95,114,103, 98, 40,118,101, 99, 52, 32, 99,111,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,114, 44, 32,
-111,117,116, 32,102,108,111, 97,116, 32,103, 44, 32,111,117,116, 32,102,108,111, 97,116, 32, 98, 41, 10,123, 10, 9,114, 32, 61,
- 32, 99,111,108, 46,114, 59, 10, 9,103, 32, 61, 32, 99,111,108, 46,103, 59, 10, 9, 98, 32, 61, 32, 99,111,108, 46, 98, 59, 10,
-125, 10, 10,118,111,105,100, 32, 99,111,109, 98,105,110,101, 95,114,103, 98, 40,102,108,111, 97,116, 32,114, 44, 32,102,108,111,
- 97,116, 32,103, 44, 32,102,108,111, 97,116, 32, 98, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108, 41, 10,123, 10, 9,
- 99,111,108, 32, 61, 32,118,101, 99, 52, 40,114, 44, 32,103, 44, 32, 98, 44, 32, 49, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,
-100, 32,111,117,116,112,117,116, 95,110,111,100,101, 40,118,101, 99, 52, 32,114,103, 98, 44, 32,102,108,111, 97,116, 32, 97,108,
-112,104, 97, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116,114,103, 98, 41, 10,123, 10, 9,111,117,116,114,103, 98, 32,
- 61, 32,118,101, 99, 52, 40,114,103, 98, 46,114,103, 98, 44, 32, 97,108,112,104, 97, 41, 59, 10,125, 10, 10, 47, 42, 42, 42, 42,
- 42, 42, 42, 42, 42, 42, 42, 32, 84, 69, 88, 84, 85, 82, 69, 83, 32, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
- 47, 10, 10,118,111,105,100, 32,116,101,120,116,117,114,101, 95,102,108,105,112, 95, 98,108,101,110,100, 40,118,101, 99, 51, 32,
-118,101, 99, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32,
- 61, 32,118,101, 99, 46,121,120,122, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120,116,117,114,101, 95, 98,108,101,110,100,
- 95,108,105,110, 40,118,101, 99, 51, 32,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41,
- 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 40, 49, 46, 48, 43,118,101, 99, 46,120, 41, 47, 50, 46, 48, 59, 10,125, 10,
- 10,118,111,105,100, 32,116,101,120,116,117,114,101, 95, 98,108,101,110,100, 95,113,117, 97,100, 40,118,101, 99, 51, 32,118,101,
- 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61,
- 32,109, 97,120, 40, 40, 49, 46, 48, 43,118,101, 99, 46,120, 41, 47, 50, 46, 48, 44, 32, 48, 46, 48, 41, 59, 10, 9,111,117,116,
-118, 97,108, 32, 42, 61, 32,111,117,116,118, 97,108, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120,116,117,114,101, 95,119,
-111,111,100, 95,115,105,110, 40,118,101, 99, 51, 32,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,118, 97,108,117,
-101, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,111,117,116, 32,118,101, 99, 51, 32,110,111,114,109,
- 97,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32, 97, 32, 61, 32,115,113,114,116, 40,118,101, 99, 46,120, 42,118,101, 99, 46,
-120, 32, 43, 32,118,101, 99, 46,121, 42,118,101, 99, 46,121, 32, 43, 32,118,101, 99, 46,122, 42,118,101, 99, 46,122, 41, 42, 50,
- 48, 46, 48, 59, 10, 9,102,108,111, 97,116, 32,119,105, 32, 61, 32, 48, 46, 53, 32, 43, 32, 48, 46, 53, 42,115,105,110, 40, 97,
- 41, 59, 10, 10, 9,118, 97,108,117,101, 32, 61, 32,119,105, 59, 10, 9, 99,111,108,111,114, 32, 61, 32,118,101, 99, 52, 40,119,
-105, 44, 32,119,105, 44, 32,119,105, 44, 32, 49, 46, 48, 41, 59, 10, 9,110,111,114,109, 97,108, 32, 61, 32,118,101, 99, 51, 40,
- 48, 46, 48, 44, 32, 48, 46, 48, 44, 32, 48, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120,116,117,114,101, 95,
-105,109, 97,103,101, 40,118,101, 99, 51, 32,118,101, 99, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32,105,109, 97, 44, 32,111,
-117,116, 32,102,108,111, 97,116, 32,118, 97,108,117,101, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,
-111,117,116, 32,118,101, 99, 51, 32,110,111,114,109, 97,108, 41, 10,123, 10, 9, 99,111,108,111,114, 32, 61, 32,116,101,120,116,
-117,114,101, 50, 68, 40,105,109, 97, 44, 32, 40,118,101, 99, 46,120,121, 32, 43, 32,118,101, 99, 50, 40, 49, 46, 48, 44, 32, 49,
- 46, 48, 41, 41, 42, 48, 46, 53, 41, 59, 10, 9,118, 97,108,117,101, 32, 61, 32, 49, 46, 48, 59, 10, 10, 9,110,111,114,109, 97,
-108, 46,120, 32, 61, 32, 50, 46, 48, 42, 40, 99,111,108,111,114, 46,114, 32, 45, 32, 48, 46, 53, 41, 59, 10, 9,110,111,114,109,
- 97,108, 46,121, 32, 61, 32, 50, 46, 48, 42, 40, 48, 46, 53, 32, 45, 32, 99,111,108,111,114, 46,103, 41, 59, 10, 9,110,111,114,
-109, 97,108, 46,122, 32, 61, 32, 50, 46, 48, 42, 40, 99,111,108,111,114, 46, 98, 32, 45, 32, 48, 46, 53, 41, 59, 10,125, 10, 10,
- 47, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 32, 77, 84, 69, 88, 32, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
- 42, 42, 42, 42, 42, 47, 10, 10,118,111,105,100, 32,116,101,120, 99,111, 95,111,114, 99,111, 40,118,101, 99, 51, 32, 97,116,116,
-111,114, 99,111, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,114, 99,111, 41, 10,123, 10, 9,111,114, 99,111, 32, 61, 32, 97,
-116,116,111,114, 99,111, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120, 99,111, 95,117,118, 40,118,101, 99, 50, 32, 97,116,
-116,117,118, 44, 32,111,117,116, 32,118,101, 99, 51, 32,117,118, 41, 10,123, 10, 9, 47, 42, 32,100,105,115, 97, 98,108,101,100,
- 32,102,111,114, 32,110,111,119, 44, 32,119,111,114,107,115, 32,116,111,103,101,116,104,101,114, 32,119,105,116,104, 32,108,101,
- 97,118,105,110,103, 32,111,117,116, 32,109,116,101,120, 95, 50,100, 95,109, 97,112,112,105,110,103, 10, 9, 32, 32, 32,117,118,
- 32, 61, 32,118,101, 99, 51, 40, 97,116,116,117,118, 42, 50, 46, 48, 32, 45, 32,118,101, 99, 50, 40, 49, 46, 48, 44, 32, 49, 46,
- 48, 41, 44, 32, 48, 46, 48, 41, 59, 32, 42, 47, 10, 9,117,118, 32, 61, 32,118,101, 99, 51, 40, 97,116,116,117,118, 44, 32, 48,
- 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120, 99,111, 95,110,111,114,109, 40,118,101, 99, 51, 32,110,111,114,
-109, 97,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,110,111,114,109, 97,108, 41, 10,123, 10, 9, 47, 42, 32, 99,
-111,114,114,101,115,112,111,110,100,115, 32,116,111, 32,115,104,105, 45, 62,111,114,110, 44, 32,119,104,105, 99,104, 32,105,115,
- 32,110,101,103, 97,116,101,100, 32,115,111, 32, 99, 97,110, 99,101,108,115, 10, 9, 32, 32, 32,111,117,116, 32, 98,108,101,110,
-100,101,114, 32,110,111,114,109, 97,108, 32,110,101,103, 97,116,105,111,110, 32, 42, 47, 10, 9,111,117,116,110,111,114,109, 97,
-108, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,110,111,114,109, 97,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,116,
-101,120, 99,111, 95,116, 97,110,103,101,110,116, 40,118,101, 99, 52, 32,116, 97,110,103,101,110,116, 44, 32,111,117,116, 32,118,
-101, 99, 51, 32,111,117,116,116, 97,110,103,101,110,116, 41, 10,123, 10, 9,111,117,116,116, 97,110,103,101,110,116, 32, 61, 32,
-110,111,114,109, 97,108,105,122,101, 40,116, 97,110,103,101,110,116, 46,120,121,122, 41, 59, 10,125, 10, 10,118,111,105,100, 32,
-116,101,120, 99,111, 95,103,108,111, 98, 97,108, 40,109, 97,116, 52, 32,118,105,101,119,105,110,118,109, 97,116, 44, 32,118,101,
- 99, 51, 32, 99,111, 44, 32,111,117,116, 32,118,101, 99, 51, 32,103,108,111, 98, 97,108, 41, 10,123, 10, 9,103,108,111, 98, 97,
-108, 32, 61, 32, 40,118,105,101,119,105,110,118,109, 97,116, 42,118,101, 99, 52, 40, 99,111, 44, 32, 49, 46, 48, 41, 41, 46,120,
-121,122, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120, 99,111, 95,111, 98,106,101, 99,116, 40,109, 97,116, 52, 32,118,105,
-101,119,105,110,118,109, 97,116, 44, 32,109, 97,116, 52, 32,111, 98,105,110,118,109, 97,116, 44, 32,118,101, 99, 51, 32, 99,111,
- 44, 32,111,117,116, 32,118,101, 99, 51, 32,111, 98,106,101, 99,116, 41, 10,123, 10, 9,111, 98,106,101, 99,116, 32, 61, 32, 40,
-111, 98,105,110,118,109, 97,116, 42, 40,118,105,101,119,105,110,118,109, 97,116, 42,118,101, 99, 52, 40, 99,111, 44, 32, 49, 46,
- 48, 41, 41, 41, 46,120,121,122, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120, 99,111, 95,114,101,102,108, 40,118,101, 99,
- 51, 32,118,110, 44, 32,118,101, 99, 51, 32,118,105,101,119, 44, 32,111,117,116, 32,118,101, 99, 51, 32,114,101,102, 41, 10,123,
- 10, 9,114,101,102, 32, 61, 32,118,105,101,119, 32, 45, 32, 50, 46, 48, 42,100,111,116, 40,118,110, 44, 32,118,105,101,119, 41,
- 42,118,110, 59, 10,125, 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,110,111,114,109, 40,118,101, 99, 51, 32,110,111,114,
-109, 97,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,110,111,114,109, 97,108, 41, 10,123, 10, 9, 47, 42, 32, 98,
-108,101,110,100,101,114, 32,114,101,110,100,101,114, 32,110,111,114,109, 97,108, 32,105,115, 32,110,101,103, 97,116,101,100, 32,
- 42, 47, 10, 9,111,117,116,110,111,114,109, 97,108, 32, 61, 32, 45,110,111,114,109, 97,108,105,122,101, 40,110,111,114,109, 97,
-108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95, 98,108,101,110,100, 40,118,101, 99, 51, 32,
-111,117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44,
- 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,
-102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 10, 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,
-109, 32, 61, 32, 49, 46, 48, 45,102, 97, 99,116, 59, 10, 10, 9,105,110, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120,
- 99,111,108, 32, 43, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,
-114,103, 98, 95,109,117,108, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108,
- 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101,
- 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 10, 9,102, 97, 99,116, 32,
- 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 45,102, 97, 99,103, 59, 10, 10, 9,105,110, 99,
-111,108, 32, 61, 32, 40,102, 97, 99,109, 32, 43, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 41, 42,111,117,116, 99,111,108,
- 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,115, 99,114,101,101,110, 40,118,101, 99, 51, 32,111,
-117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,
-102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,
-108,111, 97,116, 32,102, 97, 99,109, 59, 10, 10, 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,109,
- 32, 61, 32, 49, 46, 48, 45,102, 97, 99,103, 59, 10, 10, 9,105,110, 99,111,108, 32, 61, 32,118,101, 99, 51, 40, 49, 46, 48, 41,
- 32, 45, 32, 40,118,101, 99, 51, 40,102, 97, 99,109, 41, 32, 43, 32,102, 97, 99,116, 42, 40,118,101, 99, 51, 40, 49, 46, 48, 41,
- 32, 45, 32,116,101,120, 99,111,108, 41, 41, 42, 40,118,101, 99, 51, 40, 49, 46, 48, 41, 32, 45, 32,111,117,116, 99,111,108, 41,
- 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,111,118,101,114,108, 97,121, 40,118,101, 99, 51, 32,
-111,117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44,
- 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,
-102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 10, 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,
-109, 32, 61, 32, 49, 46, 48, 45,102, 97, 99,103, 59, 10, 10, 9,105,102, 40,111,117,116, 99,111,108, 46,114, 32, 60, 32, 48, 46,
- 53, 41, 10, 9, 9,105,110, 99,111,108, 46,114, 32, 61, 32,111,117,116, 99,111,108, 46,114, 42, 40,102, 97, 99,109, 32, 43, 32,
- 50, 46, 48, 42,102, 97, 99,116, 42,116,101,120, 99,111,108, 46,114, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,105,110, 99,111,
-108, 46,114, 32, 61, 32, 49, 46, 48, 32, 45, 32, 40,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99,116, 42, 40, 49, 46,
- 48, 32, 45, 32,116,101,120, 99,111,108, 46,114, 41, 41, 42, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46,114, 41, 59,
- 10, 10, 9,105,102, 40,111,117,116, 99,111,108, 46,103, 32, 60, 32, 48, 46, 53, 41, 10, 9, 9,105,110, 99,111,108, 46,103, 32,
- 61, 32,111,117,116, 99,111,108, 46,103, 42, 40,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99,116, 42,116,101,120, 99,
-111,108, 46,103, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,105,110, 99,111,108, 46,103, 32, 61, 32, 49, 46, 48, 32, 45, 32, 40,
-102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99,116, 42, 40, 49, 46, 48, 32, 45, 32,116,101,120, 99,111,108, 46,103, 41,
- 41, 42, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46,103, 41, 59, 10, 10, 9,105,102, 40,111,117,116, 99,111,108, 46,
- 98, 32, 60, 32, 48, 46, 53, 41, 10, 9, 9,105,110, 99,111,108, 46, 98, 32, 61, 32,111,117,116, 99,111,108, 46, 98, 42, 40,102,
- 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99,116, 42,116,101,120, 99,111,108, 46, 98, 41, 59, 10, 9,101,108,115,101, 10,
- 9, 9,105,110, 99,111,108, 46, 98, 32, 61, 32, 49, 46, 48, 32, 45, 32, 40,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97,
- 99,116, 42, 40, 49, 46, 48, 32, 45, 32,116,101,120, 99,111,108, 46, 98, 41, 41, 42, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,
-111,108, 46, 98, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,115,117, 98, 40,118,101, 99, 51,
- 32,111,117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116,
- 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10,
- 9,105,110, 99,111,108, 32, 61, 32, 45,102, 97, 99,116, 42,102, 97, 99,103, 42,116,101,120, 99,111,108, 32, 43, 32,111,117,116,
- 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95, 97,100,100, 40,118,101, 99, 51, 32,111,
-117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,
-102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,105,
-110, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,102, 97, 99,103, 42,116,101,120, 99,111,108, 32, 43, 32,111,117,116, 99,111,108,
- 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,100,105,118, 40,118,101, 99, 51, 32,111,117,116, 99,
-111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111,
- 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,
-116, 32,102, 97, 99,109, 59, 10, 10, 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,109, 32, 61, 32,
- 49, 46, 48, 45,102, 97, 99,116, 59, 10, 10, 9,105,102, 40,116,101,120, 99,111,108, 46,114, 32, 33, 61, 32, 48, 46, 48, 41, 32,
-105,110, 99,111,108, 46,114, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 46,114, 32, 43, 32,102, 97, 99,116, 42,111,
-117,116, 99,111,108, 46,114, 47,116,101,120, 99,111,108, 46,114, 59, 10, 9,105,102, 40,116,101,120, 99,111,108, 46,103, 32, 33,
- 61, 32, 48, 46, 48, 41, 32,105,110, 99,111,108, 46,103, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 46,103, 32, 43,
- 32,102, 97, 99,116, 42,111,117,116, 99,111,108, 46,103, 47,116,101,120, 99,111,108, 46,103, 59, 10, 9,105,102, 40,116,101,120,
- 99,111,108, 46, 98, 32, 33, 61, 32, 48, 46, 48, 41, 32,105,110, 99,111,108, 46, 98, 32, 61, 32,102, 97, 99,109, 42,111,117,116,
- 99,111,108, 46, 98, 32, 43, 32,102, 97, 99,116, 42,111,117,116, 99,111,108, 46, 98, 47,116,101,120, 99,111,108, 46, 98, 59, 10,
-125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,100,105,102,102, 40,118,101, 99, 51, 32,111,117,116, 99,111,
+ 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 59, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 49, 59, 10, 10, 9,118,
+101, 99, 52, 32,104,115,118, 44, 32,104,115,118, 50, 44, 32,116,109,112, 59, 10, 9,114,103, 98, 95,116,111, 95,104,115,118, 40,
+ 99,111,108, 50, 44, 32,104,115,118, 50, 41, 59, 10, 10, 9,105,102, 40,104,115,118, 50, 46,121, 32, 33, 61, 32, 48, 46, 48, 41,
+ 32,123, 10, 9, 9,114,103, 98, 95,116,111, 95,104,115,118, 40,111,117,116, 99,111,108, 44, 32,104,115,118, 41, 59, 10, 9, 9,
+104,115,118, 46,120, 32, 61, 32,104,115,118, 50, 46,120, 59, 10, 9, 9,104,115,118, 95,116,111, 95,114,103, 98, 40,104,115,118,
+ 44, 32,116,109,112, 41, 59, 32, 10, 10, 9, 9,111,117,116, 99,111,108, 32, 61, 32,109,105,120, 40,111,117,116, 99,111,108, 44,
+ 32,116,109,112, 44, 32,102, 97, 99, 41, 59, 10, 9, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 49, 46, 97, 59,
+ 10, 9,125, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,115, 97,116, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,
+101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,
+116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49,
+ 46, 48, 41, 59, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99, 59, 10, 10, 9,
+111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 49, 59, 10, 10, 9,118,101, 99, 52, 32,104,115,118, 44, 32,104,115,118, 50, 59,
+ 10, 9,114,103, 98, 95,116,111, 95,104,115,118, 40,111,117,116, 99,111,108, 44, 32,104,115,118, 41, 59, 10, 10, 9,105,102, 40,
+104,115,118, 46,121, 32, 33, 61, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,114,103, 98, 95,116,111, 95,104,115,118, 40, 99,111,108,
+ 50, 44, 32,104,115,118, 50, 41, 59, 10, 10, 9, 9,104,115,118, 46,121, 32, 61, 32,102, 97, 99,109, 42,104,115,118, 46,121, 32,
+ 43, 32,102, 97, 99, 42,104,115,118, 50, 46,121, 59, 10, 9, 9,104,115,118, 95,116,111, 95,114,103, 98, 40,104,115,118, 44, 32,
+111,117,116, 99,111,108, 41, 59, 10, 9,125, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,118, 97,108, 40,102,108,111, 97,
+116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116,
+ 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99,
+ 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45,
+ 32,102, 97, 99, 59, 10, 10, 9,118,101, 99, 52, 32,104,115,118, 44, 32,104,115,118, 50, 59, 10, 9,114,103, 98, 95,116,111, 95,
+104,115,118, 40, 99,111,108, 49, 44, 32,104,115,118, 41, 59, 10, 9,114,103, 98, 95,116,111, 95,104,115,118, 40, 99,111,108, 50,
+ 44, 32,104,115,118, 50, 41, 59, 10, 10, 9,104,115,118, 46,122, 32, 61, 32,102, 97, 99,109, 42,104,115,118, 46,122, 32, 43, 32,
+102, 97, 99, 42,104,115,118, 50, 46,122, 59, 10, 9,104,115,118, 95,116,111, 95,114,103, 98, 40,104,115,118, 44, 32,111,117,116,
+ 99,111,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95, 99,111,108,111,114, 40,102,108,111, 97,116, 32,102, 97,
+ 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99,
+ 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46,
+ 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99,
+ 59, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 49, 59, 10, 10, 9,118,101, 99, 52, 32,104,115,118, 44, 32,104,
+115,118, 50, 44, 32,116,109,112, 59, 10, 9,114,103, 98, 95,116,111, 95,104,115,118, 40, 99,111,108, 50, 44, 32,104,115,118, 50,
+ 41, 59, 10, 10, 9,105,102, 40,104,115,118, 50, 46,121, 32, 33, 61, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,114,103, 98, 95,116,
+111, 95,104,115,118, 40,111,117,116, 99,111,108, 44, 32,104,115,118, 41, 59, 10, 9, 9,104,115,118, 46,120, 32, 61, 32,104,115,
+118, 50, 46,120, 59, 10, 9, 9,104,115,118, 46,121, 32, 61, 32,104,115,118, 50, 46,121, 59, 10, 9, 9,104,115,118, 95,116,111,
+ 95,114,103, 98, 40,104,115,118, 44, 32,116,109,112, 41, 59, 32, 10, 10, 9, 9,111,117,116, 99,111,108, 32, 61, 32,109,105,120,
+ 40,111,117,116, 99,111,108, 44, 32,116,109,112, 44, 32,102, 97, 99, 41, 59, 10, 9, 9,111,117,116, 99,111,108, 46, 97, 32, 61,
+ 32, 99,111,108, 49, 46, 97, 59, 10, 9,125, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,115,111,102,116, 40,102,108,111,
+ 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,
+116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97,
+ 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32,
+ 45, 32,102, 97, 99, 59, 10, 10, 9,118,101, 99, 52, 32,111,110,101, 61, 32,118,101, 99, 52, 40, 49, 46, 48, 41, 59, 10, 9,118,
+101, 99, 52, 32,115, 99,114, 61, 32,111,110,101, 32, 45, 32, 40,111,110,101, 32, 45, 32, 99,111,108, 50, 41, 42, 40,111,110,101,
+ 32, 45, 32, 99,111,108, 49, 41, 59, 10, 9,111,117,116, 99,111,108, 32, 61, 32,102, 97, 99,109, 42, 99,111,108, 49, 32, 43, 32,
+102, 97, 99, 42, 40, 40,111,110,101, 32, 45, 32, 99,111,108, 49, 41, 42, 99,111,108, 50, 42, 99,111,108, 49, 32, 43, 32, 99,111,
+108, 49, 42,115, 99,114, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120, 95,108,105,110,101, 97,114, 40,102,108,111, 97,
+116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99, 52, 32, 99,111,108, 50, 44, 32,111,117,116,
+ 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99,
+ 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 49, 59, 10, 10, 9,
+105,102, 40, 99,111,108, 50, 46,114, 32, 62, 32, 48, 46, 53, 41, 10, 9, 9,111,117,116, 99,111,108, 46,114, 61, 32, 99,111,108,
+ 49, 46,114, 32, 43, 32,102, 97, 99, 42, 40, 50, 46, 48, 42, 40, 99,111,108, 50, 46,114, 32, 45, 32, 48, 46, 53, 41, 41, 59, 10,
+ 9,101,108,115,101, 10, 9, 9,111,117,116, 99,111,108, 46,114, 61, 32, 99,111,108, 49, 46,114, 32, 43, 32,102, 97, 99, 42, 40,
+ 50, 46, 48, 42, 40, 99,111,108, 50, 46,114, 41, 32, 45, 32, 49, 46, 48, 41, 59, 10, 10, 9,105,102, 40, 99,111,108, 50, 46,103,
+ 32, 62, 32, 48, 46, 53, 41, 10, 9, 9,111,117,116, 99,111,108, 46,103, 61, 32, 99,111,108, 49, 46,103, 32, 43, 32,102, 97, 99,
+ 42, 40, 50, 46, 48, 42, 40, 99,111,108, 50, 46,103, 32, 45, 32, 48, 46, 53, 41, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,111,
+117,116, 99,111,108, 46,103, 61, 32, 99,111,108, 49, 46,103, 32, 43, 32,102, 97, 99, 42, 40, 50, 46, 48, 42, 40, 99,111,108, 50,
+ 46,103, 41, 32, 45, 32, 49, 46, 48, 41, 59, 10, 10, 9,105,102, 40, 99,111,108, 50, 46, 98, 32, 62, 32, 48, 46, 53, 41, 10, 9,
+ 9,111,117,116, 99,111,108, 46, 98, 61, 32, 99,111,108, 49, 46, 98, 32, 43, 32,102, 97, 99, 42, 40, 50, 46, 48, 42, 40, 99,111,
+108, 50, 46, 98, 32, 45, 32, 48, 46, 53, 41, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116, 99,111,108, 46, 98, 61, 32,
+ 99,111,108, 49, 46, 98, 32, 43, 32,102, 97, 99, 42, 40, 50, 46, 48, 42, 40, 99,111,108, 50, 46, 98, 41, 32, 45, 32, 49, 46, 48,
+ 41, 59, 10,125, 10, 10,118,111,105,100, 32,118, 97,108,116,111,114,103, 98, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,115,
+ 97,109,112,108,101,114, 49, 68, 32, 99,111,108,111,114,109, 97,112, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,
+111,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116, 97,108,112,104, 97, 41, 10,123, 10, 9,111,117,116, 99,111,
+108, 32, 61, 32,116,101,120,116,117,114,101, 49, 68, 40, 99,111,108,111,114,109, 97,112, 44, 32,102, 97, 99, 41, 59, 10, 9,111,
+117,116, 97,108,112,104, 97, 32, 61, 32,111,117,116, 99,111,108, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,114,103, 98,116,
+111, 98,119, 40,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108,
+ 41, 32, 32, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 99,111,108,111,114, 46,114, 42, 48, 46, 51, 53, 32, 43, 32, 99,
+111,108,111,114, 46,103, 42, 48, 46, 52, 53, 32, 43, 32, 99,111,108,111,114, 46, 98, 42, 48, 46, 50, 59, 32, 47, 42, 32,107,101,
+101,112, 32,116,104,101,115,101, 32,102, 97, 99,116,111,114,115, 32,105,110, 32,115,121,110, 99, 32,119,105,116,104, 32,116,101,
+120,116,117,114,101, 46,104, 58, 82, 71, 66, 84, 79, 66, 87, 32, 42, 47, 10,125, 10, 10,118,111,105,100, 32,105,110,118,101,114,
+116, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,
+111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 46,120,121,122, 32, 61, 32,109,105,120, 40, 99,111,108, 46,
+120,121,122, 44, 32,118,101, 99, 51, 40, 49, 46, 48, 44, 32, 49, 46, 48, 44, 32, 49, 46, 48, 41, 32, 45, 32, 99,111,108, 46,120,
+121,122, 44, 32,102, 97, 99, 41, 59, 10, 9,111,117,116, 99,111,108, 46,119, 32, 61, 32, 99,111,108, 46,119, 59, 10,125, 10, 10,
+118,111,105,100, 32,104,117,101, 95,115, 97,116, 40,102,108,111, 97,116, 32,104,117,101, 44, 32,102,108,111, 97,116, 32,115, 97,
+116, 44, 32,102,108,111, 97,116, 32,118, 97,108,117,101, 44, 32,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32,
+ 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,118,101, 99, 52, 32,104,115,
+118, 59, 10, 10, 9,114,103, 98, 95,116,111, 95,104,115,118, 40, 99,111,108, 44, 32,104,115,118, 41, 59, 10, 10, 9,104,115,118,
+ 91, 48, 93, 32, 43, 61, 32, 40,104,117,101, 32, 45, 32, 48, 46, 53, 41, 59, 10, 9,105,102, 40,104,115,118, 91, 48, 93, 62, 49,
+ 46, 48, 41, 32,104,115,118, 91, 48, 93, 45, 61, 49, 46, 48, 59, 32,101,108,115,101, 32,105,102, 40,104,115,118, 91, 48, 93, 60,
+ 48, 46, 48, 41, 32,104,115,118, 91, 48, 93, 43, 61, 32, 49, 46, 48, 59, 10, 9,104,115,118, 91, 49, 93, 32, 42, 61, 32,115, 97,
+116, 59, 10, 9,105,102, 40,104,115,118, 91, 49, 93, 62, 49, 46, 48, 41, 32,104,115,118, 91, 49, 93, 61, 32, 49, 46, 48, 59, 32,
+101,108,115,101, 32,105,102, 40,104,115,118, 91, 49, 93, 60, 48, 46, 48, 41, 32,104,115,118, 91, 49, 93, 61, 32, 48, 46, 48, 59,
+ 10, 9,104,115,118, 91, 50, 93, 32, 42, 61, 32,118, 97,108,117,101, 59, 10, 9,105,102, 40,104,115,118, 91, 50, 93, 62, 49, 46,
+ 48, 41, 32,104,115,118, 91, 50, 93, 61, 32, 49, 46, 48, 59, 32,101,108,115,101, 32,105,102, 40,104,115,118, 91, 50, 93, 60, 48,
+ 46, 48, 41, 32,104,115,118, 91, 50, 93, 61, 32, 48, 46, 48, 59, 10, 10, 9,104,115,118, 95,116,111, 95,114,103, 98, 40,104,115,
+118, 44, 32,111,117,116, 99,111,108, 41, 59, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32,109,105,120, 40, 99,111,108, 44, 32,
+111,117,116, 99,111,108, 44, 32,102, 97, 99, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,112, 97,114, 97,116,101, 95,114,
+103, 98, 40,118,101, 99, 52, 32, 99,111,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,114, 44, 32,111,117,116, 32,102,108,
+111, 97,116, 32,103, 44, 32,111,117,116, 32,102,108,111, 97,116, 32, 98, 41, 10,123, 10, 9,114, 32, 61, 32, 99,111,108, 46,114,
+ 59, 10, 9,103, 32, 61, 32, 99,111,108, 46,103, 59, 10, 9, 98, 32, 61, 32, 99,111,108, 46, 98, 59, 10,125, 10, 10,118,111,105,
+100, 32, 99,111,109, 98,105,110,101, 95,114,103, 98, 40,102,108,111, 97,116, 32,114, 44, 32,102,108,111, 97,116, 32,103, 44, 32,
+102,108,111, 97,116, 32, 98, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108, 41, 10,123, 10, 9, 99,111,108, 32, 61, 32,
+118,101, 99, 52, 40,114, 44, 32,103, 44, 32, 98, 44, 32, 49, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,111,117,116,112,
+117,116, 95,110,111,100,101, 40,118,101, 99, 52, 32,114,103, 98, 44, 32,102,108,111, 97,116, 32, 97,108,112,104, 97, 44, 32,111,
+117,116, 32,118,101, 99, 52, 32,111,117,116,114,103, 98, 41, 10,123, 10, 9,111,117,116,114,103, 98, 32, 61, 32,118,101, 99, 52,
+ 40,114,103, 98, 46,114,103, 98, 44, 32, 97,108,112,104, 97, 41, 59, 10,125, 10, 10, 47, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 32, 84, 69, 88, 84, 85, 82, 69, 83, 32, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 47, 10, 10,118,111,105,
+100, 32,116,101,120,116,117,114,101, 95,102,108,105,112, 95, 98,108,101,110,100, 40,118,101, 99, 51, 32,118,101, 99, 44, 32,111,
+117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32,118,101, 99, 46,
+121,120,122, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120,116,117,114,101, 95, 98,108,101,110,100, 95,108,105,110, 40,118,
+101, 99, 51, 32,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,
+116,118, 97,108, 32, 61, 32, 40, 49, 46, 48, 43,118,101, 99, 46,120, 41, 47, 50, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,
+116,101,120,116,117,114,101, 95, 98,108,101,110,100, 95,113,117, 97,100, 40,118,101, 99, 51, 32,118,101, 99, 44, 32,111,117,116,
+ 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,109, 97,120, 40, 40,
+ 49, 46, 48, 43,118,101, 99, 46,120, 41, 47, 50, 46, 48, 44, 32, 48, 46, 48, 41, 59, 10, 9,111,117,116,118, 97,108, 32, 42, 61,
+ 32,111,117,116,118, 97,108, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120,116,117,114,101, 95,119,111,111,100, 95,115,105,
+110, 40,118,101, 99, 51, 32,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,118, 97,108,117,101, 44, 32,111,117,116,
+ 32,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,111,117,116, 32,118,101, 99, 51, 32,110,111,114,109, 97,108, 41, 10,123, 10,
+ 9,102,108,111, 97,116, 32, 97, 32, 61, 32,115,113,114,116, 40,118,101, 99, 46,120, 42,118,101, 99, 46,120, 32, 43, 32,118,101,
+ 99, 46,121, 42,118,101, 99, 46,121, 32, 43, 32,118,101, 99, 46,122, 42,118,101, 99, 46,122, 41, 42, 50, 48, 46, 48, 59, 10, 9,
+102,108,111, 97,116, 32,119,105, 32, 61, 32, 48, 46, 53, 32, 43, 32, 48, 46, 53, 42,115,105,110, 40, 97, 41, 59, 10, 10, 9,118,
+ 97,108,117,101, 32, 61, 32,119,105, 59, 10, 9, 99,111,108,111,114, 32, 61, 32,118,101, 99, 52, 40,119,105, 44, 32,119,105, 44,
+ 32,119,105, 44, 32, 49, 46, 48, 41, 59, 10, 9,110,111,114,109, 97,108, 32, 61, 32,118,101, 99, 51, 40, 48, 46, 48, 44, 32, 48,
+ 46, 48, 44, 32, 48, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120,116,117,114,101, 95,105,109, 97,103,101, 40,
+118,101, 99, 51, 32,118,101, 99, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32,105,109, 97, 44, 32,111,117,116, 32,102,108,111,
+ 97,116, 32,118, 97,108,117,101, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108,111,114, 44, 32,111,117,116, 32,118,101,
+ 99, 51, 32,110,111,114,109, 97,108, 41, 10,123, 10, 9, 99,111,108,111,114, 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 40,
+105,109, 97, 44, 32, 40,118,101, 99, 46,120,121, 32, 43, 32,118,101, 99, 50, 40, 49, 46, 48, 44, 32, 49, 46, 48, 41, 41, 42, 48,
+ 46, 53, 41, 59, 10, 9,118, 97,108,117,101, 32, 61, 32, 49, 46, 48, 59, 10, 10, 9,110,111,114,109, 97,108, 46,120, 32, 61, 32,
+ 50, 46, 48, 42, 40, 99,111,108,111,114, 46,114, 32, 45, 32, 48, 46, 53, 41, 59, 10, 9,110,111,114,109, 97,108, 46,121, 32, 61,
+ 32, 50, 46, 48, 42, 40, 48, 46, 53, 32, 45, 32, 99,111,108,111,114, 46,103, 41, 59, 10, 9,110,111,114,109, 97,108, 46,122, 32,
+ 61, 32, 50, 46, 48, 42, 40, 99,111,108,111,114, 46, 98, 32, 45, 32, 48, 46, 53, 41, 59, 10,125, 10, 10, 47, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 32, 77, 84, 69, 88, 32, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 47,
+ 10, 10,118,111,105,100, 32,116,101,120, 99,111, 95,111,114, 99,111, 40,118,101, 99, 51, 32, 97,116,116,111,114, 99,111, 44, 32,
+111,117,116, 32,118,101, 99, 51, 32,111,114, 99,111, 41, 10,123, 10, 9,111,114, 99,111, 32, 61, 32, 97,116,116,111,114, 99,111,
+ 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120, 99,111, 95,117,118, 40,118,101, 99, 50, 32, 97,116,116,117,118, 44, 32,111,
+117,116, 32,118,101, 99, 51, 32,117,118, 41, 10,123, 10, 9, 47, 42, 32,100,105,115, 97, 98,108,101,100, 32,102,111,114, 32,110,
+111,119, 44, 32,119,111,114,107,115, 32,116,111,103,101,116,104,101,114, 32,119,105,116,104, 32,108,101, 97,118,105,110,103, 32,
+111,117,116, 32,109,116,101,120, 95, 50,100, 95,109, 97,112,112,105,110,103, 10, 9, 32, 32, 32,117,118, 32, 61, 32,118,101, 99,
+ 51, 40, 97,116,116,117,118, 42, 50, 46, 48, 32, 45, 32,118,101, 99, 50, 40, 49, 46, 48, 44, 32, 49, 46, 48, 41, 44, 32, 48, 46,
+ 48, 41, 59, 32, 42, 47, 10, 9,117,118, 32, 61, 32,118,101, 99, 51, 40, 97,116,116,117,118, 44, 32, 48, 46, 48, 41, 59, 10,125,
+ 10, 10,118,111,105,100, 32,116,101,120, 99,111, 95,110,111,114,109, 40,118,101, 99, 51, 32,110,111,114,109, 97,108, 44, 32,111,
+117,116, 32,118,101, 99, 51, 32,111,117,116,110,111,114,109, 97,108, 41, 10,123, 10, 9, 47, 42, 32, 99,111,114,114,101,115,112,
+111,110,100,115, 32,116,111, 32,115,104,105, 45, 62,111,114,110, 44, 32,119,104,105, 99,104, 32,105,115, 32,110,101,103, 97,116,
+101,100, 32,115,111, 32, 99, 97,110, 99,101,108,115, 10, 9, 32, 32, 32,111,117,116, 32, 98,108,101,110,100,101,114, 32,110,111,
+114,109, 97,108, 32,110,101,103, 97,116,105,111,110, 32, 42, 47, 10, 9,111,117,116,110,111,114,109, 97,108, 32, 61, 32,110,111,
+114,109, 97,108,105,122,101, 40,110,111,114,109, 97,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120, 99,111, 95,116,
+ 97,110,103,101,110,116, 40,118,101, 99, 52, 32,116, 97,110,103,101,110,116, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,
+116,116, 97,110,103,101,110,116, 41, 10,123, 10, 9,111,117,116,116, 97,110,103,101,110,116, 32, 61, 32,110,111,114,109, 97,108,
+105,122,101, 40,116, 97,110,103,101,110,116, 46,120,121,122, 41, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120, 99,111, 95,
+103,108,111, 98, 97,108, 40,109, 97,116, 52, 32,118,105,101,119,105,110,118,109, 97,116, 44, 32,118,101, 99, 51, 32, 99,111, 44,
+ 32,111,117,116, 32,118,101, 99, 51, 32,103,108,111, 98, 97,108, 41, 10,123, 10, 9,103,108,111, 98, 97,108, 32, 61, 32, 40,118,
+105,101,119,105,110,118,109, 97,116, 42,118,101, 99, 52, 40, 99,111, 44, 32, 49, 46, 48, 41, 41, 46,120,121,122, 59, 10,125, 10,
+ 10,118,111,105,100, 32,116,101,120, 99,111, 95,111, 98,106,101, 99,116, 40,109, 97,116, 52, 32,118,105,101,119,105,110,118,109,
+ 97,116, 44, 32,109, 97,116, 52, 32,111, 98,105,110,118,109, 97,116, 44, 32,118,101, 99, 51, 32, 99,111, 44, 32,111,117,116, 32,
+118,101, 99, 51, 32,111, 98,106,101, 99,116, 41, 10,123, 10, 9,111, 98,106,101, 99,116, 32, 61, 32, 40,111, 98,105,110,118,109,
+ 97,116, 42, 40,118,105,101,119,105,110,118,109, 97,116, 42,118,101, 99, 52, 40, 99,111, 44, 32, 49, 46, 48, 41, 41, 41, 46,120,
+121,122, 59, 10,125, 10, 10,118,111,105,100, 32,116,101,120, 99,111, 95,114,101,102,108, 40,118,101, 99, 51, 32,118,110, 44, 32,
+118,101, 99, 51, 32,118,105,101,119, 44, 32,111,117,116, 32,118,101, 99, 51, 32,114,101,102, 41, 10,123, 10, 9,114,101,102, 32,
+ 61, 32,118,105,101,119, 32, 45, 32, 50, 46, 48, 42,100,111,116, 40,118,110, 44, 32,118,105,101,119, 41, 42,118,110, 59, 10,125,
+ 10, 10,118,111,105,100, 32,115,104, 97,100,101, 95,110,111,114,109, 40,118,101, 99, 51, 32,110,111,114,109, 97,108, 44, 32,111,
+117,116, 32,118,101, 99, 51, 32,111,117,116,110,111,114,109, 97,108, 41, 10,123, 10, 9, 47, 42, 32, 98,108,101,110,100,101,114,
+ 32,114,101,110,100,101,114, 32,110,111,114,109, 97,108, 32,105,115, 32,110,101,103, 97,116,101,100, 32, 42, 47, 10, 9,111,117,
+116,110,111,114,109, 97,108, 32, 61, 32, 45,110,111,114,109, 97,108,105,122,101, 40,110,111,114,109, 97,108, 41, 59, 10,125, 10,
+ 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95, 98,108,101,110,100, 40,118,101, 99, 51, 32,111,117,116, 99,111,108,
+ 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116,
+ 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,
+102, 97, 99,109, 59, 10, 10, 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,109, 32, 61, 32, 49, 46,
+ 48, 45,102, 97, 99,116, 59, 10, 10, 9,105,110, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 32, 43, 32,
+102, 97, 99,109, 42,111,117,116, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,109,117,
+108, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,
+116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,
+111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 10, 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,
+103, 59, 10, 9,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 45,102, 97, 99,103, 59, 10, 10, 9,105,110, 99,111,108, 32, 61, 32, 40,
+102, 97, 99,109, 32, 43, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 41, 42,111,117,116, 99,111,108, 59, 10,125, 10, 10,118,
+111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,115, 99,114,101,101,110, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44,
+ 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,
+102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102,
+ 97, 99,109, 59, 10, 10, 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,109, 32, 61, 32, 49, 46, 48,
+ 45,102, 97, 99,103, 59, 10, 10, 9,105,110, 99,111,108, 32, 61, 32,118,101, 99, 51, 40, 49, 46, 48, 41, 32, 45, 32, 40,118,101,
+ 99, 51, 40,102, 97, 99,109, 41, 32, 43, 32,102, 97, 99,116, 42, 40,118,101, 99, 51, 40, 49, 46, 48, 41, 32, 45, 32,116,101,120,
+ 99,111,108, 41, 41, 42, 40,118,101, 99, 51, 40, 49, 46, 48, 41, 32, 45, 32,111,117,116, 99,111,108, 41, 59, 10,125, 10, 10,118,
+111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,111,118,101,114,108, 97,121, 40,118,101, 99, 51, 32,111,117,116, 99,111,108,
+ 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116,
+ 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,
+102, 97, 99,109, 59, 10, 10, 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,109, 32, 61, 32, 49, 46,
+ 48, 45,102, 97, 99,103, 59, 10, 10, 9,105,102, 40,111,117,116, 99,111,108, 46,114, 32, 60, 32, 48, 46, 53, 41, 10, 9, 9,105,
+110, 99,111,108, 46,114, 32, 61, 32,111,117,116, 99,111,108, 46,114, 42, 40,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97,
+ 99,116, 42,116,101,120, 99,111,108, 46,114, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,105,110, 99,111,108, 46,114, 32, 61, 32,
+ 49, 46, 48, 32, 45, 32, 40,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99,116, 42, 40, 49, 46, 48, 32, 45, 32,116,101,
+120, 99,111,108, 46,114, 41, 41, 42, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46,114, 41, 59, 10, 10, 9,105,102, 40,
+111,117,116, 99,111,108, 46,103, 32, 60, 32, 48, 46, 53, 41, 10, 9, 9,105,110, 99,111,108, 46,103, 32, 61, 32,111,117,116, 99,
+111,108, 46,103, 42, 40,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99,116, 42,116,101,120, 99,111,108, 46,103, 41, 59,
+ 10, 9,101,108,115,101, 10, 9, 9,105,110, 99,111,108, 46,103, 32, 61, 32, 49, 46, 48, 32, 45, 32, 40,102, 97, 99,109, 32, 43,
+ 32, 50, 46, 48, 42,102, 97, 99,116, 42, 40, 49, 46, 48, 32, 45, 32,116,101,120, 99,111,108, 46,103, 41, 41, 42, 40, 49, 46, 48,
+ 32, 45, 32,111,117,116, 99,111,108, 46,103, 41, 59, 10, 10, 9,105,102, 40,111,117,116, 99,111,108, 46, 98, 32, 60, 32, 48, 46,
+ 53, 41, 10, 9, 9,105,110, 99,111,108, 46, 98, 32, 61, 32,111,117,116, 99,111,108, 46, 98, 42, 40,102, 97, 99,109, 32, 43, 32,
+ 50, 46, 48, 42,102, 97, 99,116, 42,116,101,120, 99,111,108, 46, 98, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,105,110, 99,111,
+108, 46, 98, 32, 61, 32, 49, 46, 48, 32, 45, 32, 40,102, 97, 99,109, 32, 43, 32, 50, 46, 48, 42,102, 97, 99,116, 42, 40, 49, 46,
+ 48, 32, 45, 32,116,101,120, 99,111,108, 46, 98, 41, 41, 42, 40, 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 46, 98, 41, 59,
+ 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,115,117, 98, 40,118,101, 99, 51, 32,111,117,116, 99,111,
108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,
-116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116,
- 32,102, 97, 99,109, 59, 10, 10, 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,109, 32, 61, 32, 49,
- 46, 48, 45,102, 97, 99,116, 59, 10, 10, 9,105,110, 99,111,108, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 32, 43,
- 32,102, 97, 99,116, 42, 97, 98,115, 40,116,101,120, 99,111,108, 32, 45, 32,111,117,116, 99,111,108, 41, 59, 10,125, 10, 10,118,
-111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,100, 97,114,107, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,
+116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,105,110, 99,111,108,
+ 32, 61, 32, 45,102, 97, 99,116, 42,102, 97, 99,103, 42,116,101,120, 99,111,108, 32, 43, 32,111,117,116, 99,111,108, 59, 10,125,
+ 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95, 97,100,100, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44,
+ 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,
+102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,105,110, 99,111,108, 32, 61,
+ 32,102, 97, 99,116, 42,102, 97, 99,103, 42,116,101,120, 99,111,108, 32, 43, 32,111,117,116, 99,111,108, 59, 10,125, 10, 10,118,
+111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,100,105,118, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,101,
+ 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,
+103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109,
+ 59, 10, 10, 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 45,102, 97,
+ 99,116, 59, 10, 10, 9,105,102, 40,116,101,120, 99,111,108, 46,114, 32, 33, 61, 32, 48, 46, 48, 41, 32,105,110, 99,111,108, 46,
+114, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 46,114, 32, 43, 32,102, 97, 99,116, 42,111,117,116, 99,111,108, 46,
+114, 47,116,101,120, 99,111,108, 46,114, 59, 10, 9,105,102, 40,116,101,120, 99,111,108, 46,103, 32, 33, 61, 32, 48, 46, 48, 41,
+ 32,105,110, 99,111,108, 46,103, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 46,103, 32, 43, 32,102, 97, 99,116, 42,
+111,117,116, 99,111,108, 46,103, 47,116,101,120, 99,111,108, 46,103, 59, 10, 9,105,102, 40,116,101,120, 99,111,108, 46, 98, 32,
+ 33, 61, 32, 48, 46, 48, 41, 32,105,110, 99,111,108, 46, 98, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 46, 98, 32,
+ 43, 32,102, 97, 99,116, 42,111,117,116, 99,111,108, 46, 98, 47,116,101,120, 99,111,108, 46, 98, 59, 10,125, 10, 10,118,111,105,
+100, 32,109,116,101,120, 95,114,103, 98, 95,100,105,102,102, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,101, 99,
+ 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103,
+ 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59,
+ 10, 10, 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 45,102, 97, 99,
+116, 59, 10, 10, 9,105,110, 99,111,108, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 32, 43, 32,102, 97, 99,116, 42,
+ 97, 98,115, 40,116,101,120, 99,111,108, 32, 45, 32,111,117,116, 99,111,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,
+101,120, 95,114,103, 98, 95,100, 97,114,107, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,
+120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,
+116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 44, 32, 99,111,108,
+ 59, 10, 10, 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 45,102, 97,
+ 99,116, 59, 10, 10, 9, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 46,114, 59, 10, 9,105,102, 40, 99,
+111,108, 32, 60, 32,111,117,116, 99,111,108, 46,114, 41, 32,105,110, 99,111,108, 46,114, 32, 61, 32, 99,111,108, 59, 32,101,108,
+115,101, 32,105,110, 99,111,108, 46,114, 32, 61, 32,111,117,116, 99,111,108, 46,114, 59, 10, 9, 99,111,108, 32, 61, 32,102, 97,
+ 99,116, 42,116,101,120, 99,111,108, 46,103, 59, 10, 9,105,102, 40, 99,111,108, 32, 60, 32,111,117,116, 99,111,108, 46,103, 41,
+ 32,105,110, 99,111,108, 46,103, 32, 61, 32, 99,111,108, 59, 32,101,108,115,101, 32,105,110, 99,111,108, 46,103, 32, 61, 32,111,
+117,116, 99,111,108, 46,103, 59, 10, 9, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 46, 98, 59, 10, 9,
+105,102, 40, 99,111,108, 32, 60, 32,111,117,116, 99,111,108, 46, 98, 41, 32,105,110, 99,111,108, 46, 98, 32, 61, 32, 99,111,108,
+ 59, 32,101,108,115,101, 32,105,110, 99,111,108, 46, 98, 32, 61, 32,111,117,116, 99,111,108, 46, 98, 59, 10,125, 10, 10,118,111,
+105,100, 32,109,116,101,120, 95,114,103, 98, 95,108,105,103,104,116, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,
101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97,
99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,
109, 44, 32, 99,111,108, 59, 10, 10, 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102, 97, 99,109, 32, 61, 32,
49, 46, 48, 45,102, 97, 99,116, 59, 10, 10, 9, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 46,114, 59,
- 10, 9,105,102, 40, 99,111,108, 32, 60, 32,111,117,116, 99,111,108, 46,114, 41, 32,105,110, 99,111,108, 46,114, 32, 61, 32, 99,
+ 10, 9,105,102, 40, 99,111,108, 32, 62, 32,111,117,116, 99,111,108, 46,114, 41, 32,105,110, 99,111,108, 46,114, 32, 61, 32, 99,
111,108, 59, 32,101,108,115,101, 32,105,110, 99,111,108, 46,114, 32, 61, 32,111,117,116, 99,111,108, 46,114, 59, 10, 9, 99,111,
-108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 46,103, 59, 10, 9,105,102, 40, 99,111,108, 32, 60, 32,111,117,116,
+108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 46,103, 59, 10, 9,105,102, 40, 99,111,108, 32, 62, 32,111,117,116,
99,111,108, 46,103, 41, 32,105,110, 99,111,108, 46,103, 32, 61, 32, 99,111,108, 59, 32,101,108,115,101, 32,105,110, 99,111,108,
46,103, 32, 61, 32,111,117,116, 99,111,108, 46,103, 59, 10, 9, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,
-108, 46, 98, 59, 10, 9,105,102, 40, 99,111,108, 32, 60, 32,111,117,116, 99,111,108, 46, 98, 41, 32,105,110, 99,111,108, 46, 98,
+108, 46, 98, 59, 10, 9,105,102, 40, 99,111,108, 32, 62, 32,111,117,116, 99,111,108, 46, 98, 41, 32,105,110, 99,111,108, 46, 98,
32, 61, 32, 99,111,108, 59, 32,101,108,115,101, 32,105,110, 99,111,108, 46, 98, 32, 61, 32,111,117,116, 99,111,108, 46, 98, 59,
- 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,108,105,103,104,116, 40,118,101, 99, 51, 32,111,117,116,
- 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,
-111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111,
- 97,116, 32,102, 97, 99,109, 44, 32, 99,111,108, 59, 10, 10, 9,102, 97, 99,116, 32, 42, 61, 32,102, 97, 99,103, 59, 10, 9,102,
- 97, 99,109, 32, 61, 32, 49, 46, 48, 45,102, 97, 99,116, 59, 10, 10, 9, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120,
- 99,111,108, 46,114, 59, 10, 9,105,102, 40, 99,111,108, 32, 62, 32,111,117,116, 99,111,108, 46,114, 41, 32,105,110, 99,111,108,
- 46,114, 32, 61, 32, 99,111,108, 59, 32,101,108,115,101, 32,105,110, 99,111,108, 46,114, 32, 61, 32,111,117,116, 99,111,108, 46,
-114, 59, 10, 9, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 46,103, 59, 10, 9,105,102, 40, 99,111,108,
- 32, 62, 32,111,117,116, 99,111,108, 46,103, 41, 32,105,110, 99,111,108, 46,103, 32, 61, 32, 99,111,108, 59, 32,101,108,115,101,
- 32,105,110, 99,111,108, 46,103, 32, 61, 32,111,117,116, 99,111,108, 46,103, 59, 10, 9, 99,111,108, 32, 61, 32,102, 97, 99,116,
- 42,116,101,120, 99,111,108, 46, 98, 59, 10, 9,105,102, 40, 99,111,108, 32, 62, 32,111,117,116, 99,111,108, 46, 98, 41, 32,105,
-110, 99,111,108, 46, 98, 32, 61, 32, 99,111,108, 59, 32,101,108,115,101, 32,105,110, 99,111,108, 46, 98, 32, 61, 32,111,117,116,
- 99,111,108, 46, 98, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,104,117,101, 40,118,101, 99, 51,
- 32,111,117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116,
- 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10,
- 9,118,101, 99, 52, 32, 99,111,108, 59, 10, 10, 9,109,105,120, 95,104,117,101, 40,102, 97, 99,116, 42,102, 97, 99,103, 44, 32,
-118,101, 99, 52, 40,111,117,116, 99,111,108, 44, 32, 49, 46, 48, 41, 44, 32,118,101, 99, 52, 40,116,101,120, 99,111,108, 44, 32,
- 49, 46, 48, 41, 44, 32, 99,111,108, 41, 59, 10, 9,105,110, 99,111,108, 46,114,103, 98, 32, 61, 32, 99,111,108, 46,114,103, 98,
- 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,115, 97,116, 40,118,101, 99, 51, 32,111,117,116, 99,
-111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111,
- 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,118,101, 99, 52,
- 32, 99,111,108, 59, 10, 10, 9,109,105,120, 95,115, 97,116, 40,102, 97, 99,116, 42,102, 97, 99,103, 44, 32,118,101, 99, 52, 40,
-111,117,116, 99,111,108, 44, 32, 49, 46, 48, 41, 44, 32,118,101, 99, 52, 40,116,101,120, 99,111,108, 44, 32, 49, 46, 48, 41, 44,
- 32, 99,111,108, 41, 59, 10, 9,105,110, 99,111,108, 46,114,103, 98, 32, 61, 32, 99,111,108, 46,114,103, 98, 59, 10,125, 10, 10,
-118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,118, 97,108, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,
-101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97,
- 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,118,101, 99, 52, 32, 99,111,108, 59,
- 10, 10, 9,109,105,120, 95,118, 97,108, 40,102, 97, 99,116, 42,102, 97, 99,103, 44, 32,118,101, 99, 52, 40,111,117,116, 99,111,
-108, 44, 32, 49, 46, 48, 41, 44, 32,118,101, 99, 52, 40,116,101,120, 99,111,108, 44, 32, 49, 46, 48, 41, 44, 32, 99,111,108, 41,
- 59, 10, 9,105,110, 99,111,108, 46,114,103, 98, 32, 61, 32, 99,111,108, 46,114,103, 98, 59, 10,125, 10, 10,118,111,105,100, 32,
-109,116,101,120, 95,114,103, 98, 95, 99,111,108,111,114, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,101, 99, 51,
- 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44,
- 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,118,101, 99, 52, 32, 99,111,108, 59, 10, 10, 9,
-109,105,120, 95, 99,111,108,111,114, 40,102, 97, 99,116, 42,102, 97, 99,103, 44, 32,118,101, 99, 52, 40,111,117,116, 99,111,108,
+ 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,104,117,101, 40,118,101, 99, 51, 32,111,117,116, 99,111,
+108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,
+116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,118,101, 99, 52, 32,
+ 99,111,108, 59, 10, 10, 9,109,105,120, 95,104,117,101, 40,102, 97, 99,116, 42,102, 97, 99,103, 44, 32,118,101, 99, 52, 40,111,
+117,116, 99,111,108, 44, 32, 49, 46, 48, 41, 44, 32,118,101, 99, 52, 40,116,101,120, 99,111,108, 44, 32, 49, 46, 48, 41, 44, 32,
+ 99,111,108, 41, 59, 10, 9,105,110, 99,111,108, 46,114,103, 98, 32, 61, 32, 99,111,108, 46,114,103, 98, 59, 10,125, 10, 10,118,
+111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,115, 97,116, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,101,
+ 99, 51, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,
+103, 44, 32,111,117,116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,118,101, 99, 52, 32, 99,111,108, 59, 10,
+ 10, 9,109,105,120, 95,115, 97,116, 40,102, 97, 99,116, 42,102, 97, 99,103, 44, 32,118,101, 99, 52, 40,111,117,116, 99,111,108,
44, 32, 49, 46, 48, 41, 44, 32,118,101, 99, 52, 40,116,101,120, 99,111,108, 44, 32, 49, 46, 48, 41, 44, 32, 99,111,108, 41, 59,
10, 9,105,110, 99,111,108, 46,114,103, 98, 32, 61, 32, 99,111,108, 46,114,103, 98, 59, 10,125, 10, 10,118,111,105,100, 32,109,
-116,101,120, 95,118, 97,108,117,101, 95,118, 97,114,115, 40,105,110,111,117,116, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44,
- 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 97, 99,109, 41, 10,123, 10, 9,
-102, 97, 99,116, 32, 42, 61, 32, 97, 98,115, 40,102, 97, 99,103, 41, 59, 10, 9,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 45,102,
- 97, 99,116, 59, 10, 10, 9,105,102, 40,102, 97, 99,103, 32, 60, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,102,108,111, 97,116, 32,
-116,109,112, 32, 61, 32,102, 97, 99,116, 59, 10, 9, 9,102, 97, 99,116, 32, 61, 32,102, 97, 99,109, 59, 10, 9, 9,102, 97, 99,
-109, 32, 61, 32,116,109,112, 59, 10, 9,125, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95, 98,
-108,101,110,100, 40,102,108,111, 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108, 44,
- 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111,
- 97,116, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,118,
- 97,108,117,101, 95,118, 97,114,115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,105,
-110, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 32, 43, 32,102, 97, 99,109, 42,111,117,116, 99,111,108,
- 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,109,117,108, 40,102,108,111, 97,116, 32,111,
-117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44,
- 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,110, 99,111,108, 41, 10,123, 10,
- 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,118, 97,108,117,101, 95,118, 97,114,115, 40,102, 97,
- 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,
-102, 97, 99,103, 59, 10, 9,105,110, 99,111,108, 32, 61, 32, 40,102, 97, 99,109, 32, 43, 32,102, 97, 99,116, 42,116,101,120, 99,
-111,108, 41, 42,111,117,116, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,115,
- 99,114,101,101,110, 40,102,108,111, 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108,
- 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,
-111, 97,116, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,
-118, 97,108,117,101, 95,118, 97,114,115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,
-102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99,103, 59, 10, 9,105,110, 99,111,108, 32, 61, 32, 49, 46, 48, 32,
- 45, 32, 40,102, 97, 99,109, 32, 43, 32,102, 97, 99,116, 42, 40, 49, 46, 48, 32, 45, 32,116,101,120, 99,111,108, 41, 41, 42, 40,
- 49, 46, 48, 32, 45, 32,111,117,116, 99,111,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,
-101, 95,115,117, 98, 40,102,108,111, 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108,
- 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,
-111, 97,116, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,
-118, 97,108,117,101, 95,118, 97,114,115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,
-102, 97, 99,116, 32, 61, 32, 45,102, 97, 99,116, 59, 10, 9,105,110, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,
-111,108, 32, 43, 32,111,117,116, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,
- 97,100,100, 40,102,108,111, 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108, 44, 32,
-102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,
-116, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,118, 97,
-108,117,101, 95,118, 97,114,115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,102, 97,
- 99,116, 32, 61, 32,102, 97, 99,116, 59, 10, 9,105,110, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 32,
- 43, 32,111,117,116, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,100,105,118,
- 40,102,108,111, 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108, 44, 32,102,108,111,
- 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,
-110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,118, 97,108,117,101,
- 95,118, 97,114,115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,105,102, 40,116,101,
-120, 99,111,108, 32, 33, 61, 32, 48, 46, 48, 41, 10, 9, 9,105,110, 99,111,108, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,
-111,108, 32, 43, 32,102, 97, 99,116, 42,111,117,116, 99,111,108, 47,116,101,120, 99,111,108, 59, 10, 9,101,108,115,101, 10, 9,
- 9,105,110, 99,111,108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101,
- 95,100,105,102,102, 40,102,108,111, 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108,
- 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,
-111, 97,116, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,
-118, 97,108,117,101, 95,118, 97,114,115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,
-105,110, 99,111,108, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 32, 43, 32,102, 97, 99,116, 42, 97, 98,115, 40,116,
-101,120, 99,111,108, 32, 45, 32,111,117,116, 99,111,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,
-108,117,101, 95,100, 97,114,107, 40,102,108,111, 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120,
- 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116,
- 32,102,108,111, 97,116, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,
-101,120, 95,118, 97,108,117,101, 95,118, 97,114,115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59,
- 10, 10, 9,102,108,111, 97,116, 32, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 59, 10, 9,105,102, 40,
- 99,111,108, 32, 60, 32,111,117,116, 99,111,108, 41, 32,105,110, 99,111,108, 32, 61, 32, 99,111,108, 59, 32,101,108,115,101, 32,
-105,110, 99,111,108, 32, 61, 32,111,117,116, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,
-117,101, 95,108,105,103,104,116, 40,102,108,111, 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120,
- 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116,
- 32,102,108,111, 97,116, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,
-101,120, 95,118, 97,108,117,101, 95,118, 97,114,115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59,
- 10, 10, 9,102,108,111, 97,116, 32, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 59, 10, 9,105,102, 40,
- 99,111,108, 32, 62, 32,111,117,116, 99,111,108, 41, 32,105,110, 99,111,108, 32, 61, 32, 99,111,108, 59, 32,101,108,115,101, 32,
-105,110, 99,111,108, 32, 61, 32,111,117,116, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,
-117,101, 95, 99,108, 97,109,112, 95,112,111,115,105,116,105,118,101, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,111,117,116,
- 32,102,108,111, 97,116, 32,111,117,116,102, 97, 99, 41, 10,123, 10, 9,111,117,116,102, 97, 99, 32, 61, 32,109, 97,120, 40,102,
- 97, 99, 44, 32, 48, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95, 99,108, 97,
-109,112, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,102, 97, 99, 41, 10,
-123, 10, 9,111,117,116,102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41,
- 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,104, 97,114, 95,100,105,118,105,100,101, 40,102,108,111, 97,116, 32,
-104, 97,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,104, 97,114, 41, 10,123, 10, 9,111,117,116,104, 97,114,
- 32, 61, 32,104, 97,114, 47, 49, 50, 56, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,104, 97,114, 95,109,
-117,108,116,105,112,108,121, 95, 99,108, 97,109,112, 40,102,108,111, 97,116, 32,104, 97,114, 44, 32,111,117,116, 32,102,108,111,
- 97,116, 32,111,117,116,104, 97,114, 41, 10,123, 10, 9,104, 97,114, 32, 42, 61, 32, 49, 50, 56, 46, 48, 59, 10, 10, 9,105,102,
- 40,104, 97,114, 32, 60, 32, 49, 46, 48, 41, 32,111,117,116,104, 97,114, 32, 61, 32, 49, 46, 48, 59, 10, 9,101,108,115,101, 32,
-105,102, 40,104, 97,114, 32, 62, 32, 53, 49, 49, 46, 48, 41, 32,111,117,116,104, 97,114, 32, 61, 32, 53, 49, 49, 46, 48, 59, 10,
- 9,101,108,115,101, 32,111,117,116,104, 97,114, 32, 61, 32,104, 97,114, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120,
- 95, 97,108,112,104, 97, 95,102,114,111,109, 95, 99,111,108, 40,118,101, 99, 52, 32, 99,111,108, 44, 32,111,117,116, 32,102,108,
-111, 97,116, 32, 97,108,112,104, 97, 41, 10,123, 10, 9, 97,108,112,104, 97, 32, 61, 32, 99,111,108, 46, 97, 59, 10,125, 10, 10,
-118,111,105,100, 32,109,116,101,120, 95, 97,108,112,104, 97, 95,116,111, 95, 99,111,108, 40,118,101, 99, 52, 32, 99,111,108, 44,
- 32,102,108,111, 97,116, 32, 97,108,112,104, 97, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123,
- 10, 9,111,117,116, 99,111,108, 32, 61, 32,118,101, 99, 52, 40, 99,111,108, 46,114,103, 98, 44, 32, 97,108,112,104, 97, 41, 59,
- 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98,116,111,105,110,116, 40,118,101, 99, 52, 32,114,103, 98, 44,
- 32,111,117,116, 32,102,108,111, 97,116, 32,105,110,116,101,110,115,105,116,121, 41, 10,123, 10, 9,105,110,116,101,110,115,105,
-116,121, 32, 61, 32,100,111,116, 40,118,101, 99, 51, 40, 48, 46, 51, 53, 44, 32, 48, 46, 52, 53, 44, 32, 48, 46, 50, 41, 44, 32,
-114,103, 98, 46,114,103, 98, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,105,110,118,
-101,114,116, 40,102,108,111, 97,116, 32,105,110,118, 97,108,117,101, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,
-118, 97,108,117,101, 41, 10,123, 10, 9,111,117,116,118, 97,108,117,101, 32, 61, 32, 49, 46, 48, 32, 45, 32,105,110,118, 97,108,
-117,101, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,105,110,118,101,114,116, 40,118,101, 99, 52,
- 32,105,110,114,103, 98, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116,114,103, 98, 41, 10,123, 10, 9,111,117,116,114,
-103, 98, 32, 61, 32,118,101, 99, 52, 40,118,101, 99, 51, 40, 49, 46, 48, 41, 32, 45, 32,105,110,114,103, 98, 46,114,103, 98, 44,
- 32,105,110,114,103, 98, 46, 97, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,115,116,
-101,110, 99,105,108, 40,102,108,111, 97,116, 32,115,116,101,110, 99,105,108, 44, 32,102,108,111, 97,116, 32,105,110,116,101,110,
-115,105,116,121, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,115,116,101,110, 99,105,108, 44, 32,111,117,116, 32,
-102,108,111, 97,116, 32,111,117,116,105,110,116,101,110,115,105,116,121, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,
-116, 32, 61, 32,105,110,116,101,110,115,105,116,121, 59, 10, 9,111,117,116,105,110,116,101,110,115,105,116,121, 32, 61, 32,105,
-110,116,101,110,115,105,116,121, 42,115,116,101,110, 99,105,108, 59, 10, 9,111,117,116,115,116,101,110, 99,105,108, 32, 61, 32,
-115,116,101,110, 99,105,108, 42,102, 97, 99,116, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,115,
-116,101,110, 99,105,108, 40,102,108,111, 97,116, 32,115,116,101,110, 99,105,108, 44, 32,118,101, 99, 52, 32,114,103, 98, 44, 32,
-111,117,116, 32,102,108,111, 97,116, 32,111,117,116,115,116,101,110, 99,105,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,
-117,116,114,103, 98, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,116, 32, 61, 32,114,103, 98, 46, 97, 59, 10, 9,111,
-117,116,114,103, 98, 32, 61, 32,118,101, 99, 52, 40,114,103, 98, 46,114,103, 98, 44, 32,114,103, 98, 46, 97, 42,115,116,101,110,
- 99,105,108, 41, 59, 10, 9,111,117,116,115,116,101,110, 99,105,108, 32, 61, 32,115,116,101,110, 99,105,108, 42,102, 97, 99,116,
- 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,109, 97,112,112,105,110,103, 95,111,102,115, 40,118,101, 99, 51, 32,
-116,101,120, 99,111, 44, 32,118,101, 99, 51, 32,111,102,115, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,116,101,120,
- 99,111, 41, 10,123, 10, 9,111,117,116,116,101,120, 99,111, 32, 61, 32,116,101,120, 99,111, 32, 43, 32,111,102,115, 59, 10,125,
- 10, 10,118,111,105,100, 32,109,116,101,120, 95,109, 97,112,112,105,110,103, 95,115,105,122,101, 40,118,101, 99, 51, 32,116,101,
-120, 99,111, 44, 32,118,101, 99, 51, 32,115,105,122,101, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,116,101,120, 99,
-111, 41, 10,123, 10, 9,111,117,116,116,101,120, 99,111, 32, 61, 32,115,105,122,101, 42,116,101,120, 99,111, 59, 10,125, 10, 10,
-118,111,105,100, 32,109,116,101,120, 95, 50,100, 95,109, 97,112,112,105,110,103, 40,118,101, 99, 51, 32,118,101, 99, 44, 32,111,
-117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32,118,101, 99, 51,
- 40,118,101, 99, 46,120,121, 42, 48, 46, 53, 32, 43, 32,118,101, 99, 50, 40, 48, 46, 53, 44, 32, 48, 46, 53, 41, 44, 32,118,101,
- 99, 46,122, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,105,109, 97,103,101, 40,118,101, 99, 51, 32,116,101,
-120, 99,111, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32,105,109, 97, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,118, 97,
-108,117,101, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108,111,114, 41, 10,123, 10, 9, 99,111,108,111,114, 32, 61, 32,
-116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32,116,101,120, 99,111, 46,120,121, 41, 59, 10, 9,118, 97,108,117,101,
- 32, 61, 32, 49, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,110,111,114,109, 97,108, 40,118,101, 99, 51,
- 32,116,101,120, 99,111, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32,105,109, 97, 44, 32,111,117,116, 32,118,101, 99, 51, 32,
-110,111,114,109, 97,108, 41, 10,123, 10, 9, 47, 47, 32, 84,104,101, 32,105,110,118,101,114,116, 32,111,102, 32,116,104,101, 32,
-114,101,100, 32, 99,104, 97,110,110,101,108, 32,105,115, 32,116,111, 32,109, 97,107,101, 10, 9, 47, 47, 32,116,104,101, 32,110,
-111,114,109, 97,108, 32,109, 97,112, 32, 99,111,109,112,108,105, 97,110,116, 32,119,105,116,104, 32,116,104,101, 32,111,117,116,
-115,105,100,101, 32,119,111,114,108,100, 46, 10, 9, 47, 47, 32, 73,116, 32,110,101,101,100,115, 32,116,111, 32, 98,101, 32,100,
-111,110,101, 32, 98,101, 99, 97,117,115,101, 32,105,110, 32, 66,108,101,110,100,101,114, 10, 9, 47, 47, 32,116,104,101, 32,110,
-111,114,109, 97,108, 32,117,115,101,100, 32,112,111,105,110,116,115, 32,105,110,119, 97,114,100, 46, 10, 9, 47, 47, 32, 83,104,
-111,117,108,100, 32,116,104,105,115, 32,101,118,101,114, 32, 99,104, 97,110,103,101, 32,116,104,105,115, 32,110,101,103, 97,116,
-101, 32,109,117,115,116, 32, 98,101, 32,114,101,109,111,118,101,100, 46, 10, 32, 32, 32, 32,118,101, 99, 52, 32, 99,111,108,111,
-114, 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32,116,101,120, 99,111, 46,120,121, 41, 59, 10, 9,110,
-111,114,109, 97,108, 32, 61, 32, 50, 46, 48, 42, 40,118,101, 99, 51, 40, 45, 99,111,108,111,114, 46,114, 44, 32, 99,111,108,111,
-114, 46,103, 44, 32, 99,111,108,111,114, 46, 98, 41, 32, 45, 32,118,101, 99, 51, 40, 45, 48, 46, 53, 44, 32, 48, 46, 53, 44, 32,
- 48, 46, 53, 41, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 98,117,109,112, 95,110,111,114,109, 97,108,115,
- 95,105,110,105,116, 40, 32,118,101, 99, 51, 32,118, 78, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118, 78,111,114,103, 44, 32,
-111,117,116, 32,118,101, 99, 51, 32,118, 78, 97, 99, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 80,114,101,118, 77,
- 97,103,110,105,116,117,100,101, 32, 41, 10,123, 10, 9,118, 78,111,114,103, 32, 61, 32,118, 78, 59, 10, 9,118, 78, 97, 99, 99,
- 32, 61, 32,118, 78, 59, 10, 9,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 32, 61, 32, 49, 46, 48, 59, 10,125, 10,
- 10, 47, 42, 42, 32,104,101,108,112,101,114, 32,109,101,116,104,111,100, 32,116,111, 32,101,120,116,114, 97, 99,116, 32,116,104,
-101, 32,117,112,112,101,114, 32,108,101,102,116, 32, 51,120, 51, 32,109, 97,116,114,105,120, 32,102,114,111,109, 32, 97, 32, 52,
-120, 52, 32,109, 97,116,114,105,120, 32, 42, 47, 10,109, 97,116, 51, 32,116,111, 95,109, 97,116, 51, 40,109, 97,116, 52, 32,109,
- 52, 41, 10,123, 10, 9,109, 97,116, 51, 32,109, 51, 59, 10, 9,109, 51, 91, 48, 93, 32, 61, 32,109, 52, 91, 48, 93, 46,120,121,
-122, 59, 10, 9,109, 51, 91, 49, 93, 32, 61, 32,109, 52, 91, 49, 93, 46,120,121,122, 59, 10, 9,109, 51, 91, 50, 93, 32, 61, 32,
-109, 52, 91, 50, 93, 46,120,121,122, 59, 10, 9,114,101,116,117,114,110, 32,109, 51, 59, 10,125, 10, 10,118,111,105,100, 32,109,
-116,101,120, 95, 98,117,109,112, 95,105,110,105,116, 95,111, 98,106,115,112, 97, 99,101, 40, 32,118,101, 99, 51, 32,115,117,114,
-102, 95,112,111,115, 44, 32,118,101, 99, 51, 32,115,117,114,102, 95,110,111,114,109, 44, 10, 9, 9, 9, 9, 9, 9, 9, 32, 32,
-109, 97,116, 52, 32,109, 86,105,101,119, 44, 32,109, 97,116, 52, 32,109, 86,105,101,119, 73,110,118, 44, 32,109, 97,116, 52, 32,
-109, 79, 98,106, 44, 32,109, 97,116, 52, 32,109, 79, 98,106, 73,110,118, 44, 32, 10, 9, 9, 9, 9, 9, 9, 9, 32, 32,102,108,
-111, 97,116, 32,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,105,110, 44, 32,118,101, 99, 51, 32,118, 78, 97, 99,
- 99, 95,105,110, 44, 10, 9, 9, 9, 9, 9, 9, 9, 32, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 80,114,101,118, 77, 97,
-103,110,105,116,117,100,101, 95,111,117,116, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118, 78, 97, 99, 99, 95,111,117,116, 44,
- 32, 10, 9, 9, 9, 9, 9, 9, 9, 32, 32,111,117,116, 32,118,101, 99, 51, 32,118, 82, 49, 44, 32,111,117,116, 32,118,101, 99,
- 51, 32,118, 82, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 68,101,116, 32, 41, 32, 10,123, 10, 9,109, 97,116, 51,
- 32,111, 98,106, 50,118,105,101,119, 32, 61, 32,116,111, 95,109, 97,116, 51, 40,109, 86,105,101,119, 32, 42, 32,109, 79, 98,106,
- 41, 59, 10, 9,109, 97,116, 51, 32,118,105,101,119, 50,111, 98,106, 32, 61, 32,116,111, 95,109, 97,116, 51, 40,109, 79, 98,106,
- 73,110,118, 32, 42, 32,109, 86,105,101,119, 73,110,118, 41, 59, 10, 9, 10, 9,118,101, 99, 51, 32,118, 83,105,103,109, 97, 83,
- 32, 61, 32,118,105,101,119, 50,111, 98,106, 32, 42, 32,100, 70,100,120, 40, 32,115,117,114,102, 95,112,111,115, 32, 41, 59, 10,
- 9,118,101, 99, 51, 32,118, 83,105,103,109, 97, 84, 32, 61, 32,118,105,101,119, 50,111, 98,106, 32, 42, 32,100, 70,100,121, 40,
- 32,115,117,114,102, 95,112,111,115, 32, 41, 59, 10, 9,118,101, 99, 51, 32,118, 78, 32, 61, 32,110,111,114,109, 97,108,105,122,
-101, 40, 32,115,117,114,102, 95,110,111,114,109, 32, 42, 32,111, 98,106, 50,118,105,101,119, 32, 41, 59, 10, 10, 9,118, 82, 49,
- 32, 61, 32, 99,114,111,115,115, 40, 32,118, 83,105,103,109, 97, 84, 44, 32,118, 78, 32, 41, 59, 10, 9,118, 82, 50, 32, 61, 32,
- 99,114,111,115,115, 40, 32,118, 78, 44, 32,118, 83,105,103,109, 97, 83, 32, 41, 32, 59, 10, 9,102, 68,101,116, 32, 61, 32,100,
-111,116, 32, 40, 32,118, 83,105,103,109, 97, 83, 44, 32,118, 82, 49, 32, 41, 59, 10, 9, 10, 9, 47, 42, 32,112,114,101,116,114,
- 97,110,115,102,111,114,109, 32,118, 78, 97, 99, 99, 32, 40,105,110, 32,109,116,101,120, 95, 98,117,109,112, 95, 97,112,112,108,
-121, 41, 32,117,115,105,110,103, 32,116,104,101, 32,105,110,118,101,114,115,101, 32,116,114, 97,110,115,112,111,115,101,100, 32,
- 42, 47, 10, 9,118, 82, 49, 32, 61, 32,118, 82, 49, 32, 42, 32,118,105,101,119, 50,111, 98,106, 59, 10, 9,118, 82, 50, 32, 61,
- 32,118, 82, 50, 32, 42, 32,118,105,101,119, 50,111, 98,106, 59, 10, 9,118, 78, 32, 61, 32,118, 78, 32, 42, 32,118,105,101,119,
- 50,111, 98,106, 59, 10, 9, 10, 9,102,108,111, 97,116, 32,102, 77, 97,103,110,105,116,117,100,101, 32, 61, 32, 97, 98,115, 40,
-102, 68,101,116, 41, 32, 42, 32,108,101,110,103,116,104, 40,118, 78, 41, 59, 10, 9,118, 78, 97, 99, 99, 95,111,117,116, 32, 61,
- 32,118, 78, 97, 99, 99, 95,105,110, 32, 42, 32, 40,102, 77, 97,103,110,105,116,117,100,101, 32, 47, 32,102, 80,114,101,118, 77,
- 97,103,110,105,116,117,100,101, 95,105,110, 41, 59, 10, 9,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,111,117,
-116, 32, 61, 32,102, 77, 97,103,110,105,116,117,100,101, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 98,117,109,
-112, 95,105,110,105,116, 95,116,101,120,116,117,114,101,115,112, 97, 99,101, 40, 32,118,101, 99, 51, 32,115,117,114,102, 95,112,
-111,115, 44, 32,118,101, 99, 51, 32,115,117,114,102, 95,110,111,114,109, 44, 32, 10, 9, 9, 9, 9, 9, 9, 9, 9, 32, 32,102,
-108,111, 97,116, 32,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,105,110, 44, 32,118,101, 99, 51, 32,118, 78, 97,
- 99, 99, 95,105,110, 44, 10, 9, 9, 9, 9, 9, 9, 9, 9, 32, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 80,114,101,118,
- 77, 97,103,110,105,116,117,100,101, 95,111,117,116, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118, 78, 97, 99, 99, 95,111,117,
-116, 44, 32, 10, 9, 9, 9, 9, 9, 9, 9, 9, 32, 32,111,117,116, 32,118,101, 99, 51, 32,118, 82, 49, 44, 32,111,117,116, 32,
-118,101, 99, 51, 32,118, 82, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 68,101,116, 32, 41, 32, 10,123, 10, 9,118,
-101, 99, 51, 32,118, 83,105,103,109, 97, 83, 32, 61, 32,100, 70,100,120, 40, 32,115,117,114,102, 95,112,111,115, 32, 41, 59, 10,
- 9,118,101, 99, 51, 32,118, 83,105,103,109, 97, 84, 32, 61, 32,100, 70,100,121, 40, 32,115,117,114,102, 95,112,111,115, 32, 41,
- 59, 10, 9,118,101, 99, 51, 32,118, 78, 32, 61, 32,115,117,114,102, 95,110,111,114,109, 59, 32, 47, 42, 32,110,111,114,109, 97,
-108,105,122,101,100, 32,105,110,116,101,114,112,111,108, 97,116,101,100, 32,118,101,114,116,101,120, 32,110,111,114,109, 97,108,
- 32, 42, 47, 10, 9, 10, 9,118, 82, 49, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40, 32, 99,114,111,115,115, 40, 32,118,
- 83,105,103,109, 97, 84, 44, 32,118, 78, 32, 41, 32, 41, 59, 10, 9,118, 82, 50, 32, 61, 32,110,111,114,109, 97,108,105,122,101,
- 40, 32, 99,114,111,115,115, 40, 32,118, 78, 44, 32,118, 83,105,103,109, 97, 83, 32, 41, 32, 41, 59, 10, 9,102, 68,101,116, 32,
- 61, 32,115,105,103,110, 40, 32,100,111,116, 40,118, 83,105,103,109, 97, 83, 44, 32,118, 82, 49, 41, 32, 41, 59, 10, 9, 10, 9,
-102,108,111, 97,116, 32,102, 77, 97,103,110,105,116,117,100,101, 32, 61, 32, 97, 98,115, 40,102, 68,101,116, 41, 59, 10, 9,118,
- 78, 97, 99, 99, 95,111,117,116, 32, 61, 32,118, 78, 97, 99, 99, 95,105,110, 32, 42, 32, 40,102, 77, 97,103,110,105,116,117,100,
-101, 32, 47, 32,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,105,110, 41, 59, 10, 9,102, 80,114,101,118, 77, 97,
-103,110,105,116,117,100,101, 95,111,117,116, 32, 61, 32,102, 77, 97,103,110,105,116,117,100,101, 59, 10,125, 10, 10,118,111,105,
-100, 32,109,116,101,120, 95, 98,117,109,112, 95,105,110,105,116, 95,118,105,101,119,115,112, 97, 99,101, 40, 32,118,101, 99, 51,
- 32,115,117,114,102, 95,112,111,115, 44, 32,118,101, 99, 51, 32,115,117,114,102, 95,110,111,114,109, 44, 32, 10, 9, 9, 9, 9,
- 9, 9, 9, 32, 32, 32,102,108,111, 97,116, 32,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,105,110, 44, 32,118,
-101, 99, 51, 32,118, 78, 97, 99, 99, 95,105,110, 44, 10, 9, 9, 9, 9, 9, 9, 9, 32, 32, 32,111,117,116, 32,102,108,111, 97,
-116, 32,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,111,117,116, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118,
- 78, 97, 99, 99, 95,111,117,116, 44, 32, 10, 9, 9, 9, 9, 9, 9, 9, 32, 32, 32,111,117,116, 32,118,101, 99, 51, 32,118, 82,
- 49, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118, 82, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 68,101,116, 32,
- 41, 32, 10,123, 10, 9,118,101, 99, 51, 32,118, 83,105,103,109, 97, 83, 32, 61, 32,100, 70,100,120, 40, 32,115,117,114,102, 95,
-112,111,115, 32, 41, 59, 10, 9,118,101, 99, 51, 32,118, 83,105,103,109, 97, 84, 32, 61, 32,100, 70,100,121, 40, 32,115,117,114,
-102, 95,112,111,115, 32, 41, 59, 10, 9,118,101, 99, 51, 32,118, 78, 32, 61, 32,115,117,114,102, 95,110,111,114,109, 59, 32, 47,
- 42, 32,110,111,114,109, 97,108,105,122,101,100, 32,105,110,116,101,114,112,111,108, 97,116,101,100, 32,118,101,114,116,101,120,
- 32,110,111,114,109, 97,108, 32, 42, 47, 10, 9, 10, 9,118, 82, 49, 32, 61, 32, 99,114,111,115,115, 40, 32,118, 83,105,103,109,
- 97, 84, 44, 32,118, 78, 32, 41, 59, 10, 9,118, 82, 50, 32, 61, 32, 99,114,111,115,115, 40, 32,118, 78, 44, 32,118, 83,105,103,
-109, 97, 83, 32, 41, 32, 59, 10, 9,102, 68,101,116, 32, 61, 32,100,111,116, 32, 40, 32,118, 83,105,103,109, 97, 83, 44, 32,118,
- 82, 49, 32, 41, 59, 10, 9, 10, 9,102,108,111, 97,116, 32,102, 77, 97,103,110,105,116,117,100,101, 32, 61, 32, 97, 98,115, 40,
-102, 68,101,116, 41, 59, 10, 9,118, 78, 97, 99, 99, 95,111,117,116, 32, 61, 32,118, 78, 97, 99, 99, 95,105,110, 32, 42, 32, 40,
-102, 77, 97,103,110,105,116,117,100,101, 32, 47, 32,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,105,110, 41, 59,
- 10, 9,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,111,117,116, 32, 61, 32,102, 77, 97,103,110,105,116,117,100,
-101, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 98,117,109,112, 95,116, 97,112, 51, 40, 32,118,101, 99, 51, 32,
-116,101,120, 99,111, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32,105,109, 97, 44, 32,102,108,111, 97,116, 32,104, 83, 99, 97,
-108,101, 44, 32, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,111,117,116, 32,102,108,
-111, 97,116, 32,100, 66,115, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,100, 66,116, 32, 41, 32, 10,123, 10, 9,118,101, 99,
- 50, 32, 83, 84,108,108, 32, 61, 32,116,101,120, 99,111, 46,120,121, 59, 10, 9,118,101, 99, 50, 32, 83, 84,108,114, 32, 61, 32,
-116,101,120, 99,111, 46,120,121, 32, 43, 32,100, 70,100,120, 40,116,101,120, 99,111, 46,120,121, 41, 32, 59, 10, 9,118,101, 99,
- 50, 32, 83, 84,117,108, 32, 61, 32,116,101,120, 99,111, 46,120,121, 32, 43, 32,100, 70,100,121, 40,116,101,120, 99,111, 46,120,
-121, 41, 32, 59, 10, 9, 10, 9,102,108,111, 97,116, 32, 72,108,108, 44, 72,108,114, 44, 72,117,108, 59, 10, 9,114,103, 98,116,
-111, 98,119, 40, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84,108,108, 41, 44, 32, 72,108,108, 32, 41,
- 59, 10, 9,114,103, 98,116,111, 98,119, 40, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84,108,114, 41,
- 44, 32, 72,108,114, 32, 41, 59, 10, 9,114,103, 98,116,111, 98,119, 40, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97,
- 44, 32, 83, 84,117,108, 41, 44, 32, 72,117,108, 32, 41, 59, 10, 9, 10, 9,100, 66,115, 32, 61, 32,104, 83, 99, 97,108,101, 32,
- 42, 32, 40, 72,108,114, 32, 45, 32, 72,108,108, 41, 59, 10, 9,100, 66,116, 32, 61, 32,104, 83, 99, 97,108,101, 32, 42, 32, 40,
- 72,117,108, 32, 45, 32, 72,108,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 98,117,109,112, 95,116, 97,
-112, 53, 40, 32,118,101, 99, 51, 32,116,101,120, 99,111, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32,105,109, 97, 44, 32,102,
-108,111, 97,116, 32,104, 83, 99, 97,108,101, 44, 32, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32,111,117,116, 32,102,108,111, 97,116, 32,100, 66,115, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,100, 66,116, 32,
- 41, 32, 10,123, 10, 9,118,101, 99, 50, 32, 84,101,120, 68,120, 32, 61, 32,100, 70,100,120, 40,116,101,120, 99,111, 46,120,121,
- 41, 59, 10, 9,118,101, 99, 50, 32, 84,101,120, 68,121, 32, 61, 32,100, 70,100,121, 40,116,101,120, 99,111, 46,120,121, 41, 59,
- 10, 10, 9,118,101, 99, 50, 32, 83, 84, 99, 32, 61, 32,116,101,120, 99,111, 46,120,121, 59, 10, 9,118,101, 99, 50, 32, 83, 84,
-108, 32, 61, 32,116,101,120, 99,111, 46,120,121, 32, 45, 32, 48, 46, 53, 32, 42, 32, 84,101,120, 68,120, 32, 59, 10, 9,118,101,
- 99, 50, 32, 83, 84,114, 32, 61, 32,116,101,120, 99,111, 46,120,121, 32, 43, 32, 48, 46, 53, 32, 42, 32, 84,101,120, 68,120, 32,
- 59, 10, 9,118,101, 99, 50, 32, 83, 84,100, 32, 61, 32,116,101,120, 99,111, 46,120,121, 32, 45, 32, 48, 46, 53, 32, 42, 32, 84,
-101,120, 68,121, 32, 59, 10, 9,118,101, 99, 50, 32, 83, 84,117, 32, 61, 32,116,101,120, 99,111, 46,120,121, 32, 43, 32, 48, 46,
- 53, 32, 42, 32, 84,101,120, 68,121, 32, 59, 10, 9, 10, 9,102,108,111, 97,116, 32, 72, 99, 44, 72,108, 44, 72,114, 44, 72,100,
- 44, 72,117, 59, 10, 9,114,103, 98,116,111, 98,119, 40, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84,
- 99, 41, 44, 32, 72, 99, 32, 41, 59, 10, 9,114,103, 98,116,111, 98,119, 40, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109,
- 97, 44, 32, 83, 84,108, 41, 44, 32, 72,108, 32, 41, 59, 10, 9,114,103, 98,116,111, 98,119, 40, 32,116,101,120,116,117,114,101,
- 50, 68, 40,105,109, 97, 44, 32, 83, 84,114, 41, 44, 32, 72,114, 32, 41, 59, 10, 9,114,103, 98,116,111, 98,119, 40, 32,116,101,
-120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84,100, 41, 44, 32, 72,100, 32, 41, 59, 10, 9,114,103, 98,116,111, 98,
-119, 40, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84,117, 41, 44, 32, 72,117, 32, 41, 59, 10, 9, 10,
- 9,100, 66,115, 32, 61, 32,104, 83, 99, 97,108,101, 32, 42, 32, 40, 72,114, 32, 45, 32, 72,108, 41, 59, 10, 9,100, 66,116, 32,
- 61, 32,104, 83, 99, 97,108,101, 32, 42, 32, 40, 72,117, 32, 45, 32, 72,100, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,
+116,101,120, 95,114,103, 98, 95,118, 97,108, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,
+120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,
+116, 32,118,101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,118,101, 99, 52, 32, 99,111,108, 59, 10, 10, 9,109,105,120,
+ 95,118, 97,108, 40,102, 97, 99,116, 42,102, 97, 99,103, 44, 32,118,101, 99, 52, 40,111,117,116, 99,111,108, 44, 32, 49, 46, 48,
+ 41, 44, 32,118,101, 99, 52, 40,116,101,120, 99,111,108, 44, 32, 49, 46, 48, 41, 44, 32, 99,111,108, 41, 59, 10, 9,105,110, 99,
+111,108, 46,114,103, 98, 32, 61, 32, 99,111,108, 46,114,103, 98, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,
+103, 98, 95, 99,111,108,111,114, 40,118,101, 99, 51, 32,111,117,116, 99,111,108, 44, 32,118,101, 99, 51, 32,116,101,120, 99,111,
+108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,118,
+101, 99, 51, 32,105,110, 99,111,108, 41, 10,123, 10, 9,118,101, 99, 52, 32, 99,111,108, 59, 10, 10, 9,109,105,120, 95, 99,111,
+108,111,114, 40,102, 97, 99,116, 42,102, 97, 99,103, 44, 32,118,101, 99, 52, 40,111,117,116, 99,111,108, 44, 32, 49, 46, 48, 41,
+ 44, 32,118,101, 99, 52, 40,116,101,120, 99,111,108, 44, 32, 49, 46, 48, 41, 44, 32, 99,111,108, 41, 59, 10, 9,105,110, 99,111,
+108, 46,114,103, 98, 32, 61, 32, 99,111,108, 46,114,103, 98, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,
+108,117,101, 95,118, 97,114,115, 40,105,110,111,117,116, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116,
+ 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 97, 99,109, 41, 10,123, 10, 9,102, 97, 99,116, 32, 42,
+ 61, 32, 97, 98,115, 40,102, 97, 99,103, 41, 59, 10, 9,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 45,102, 97, 99,116, 59, 10, 10,
+ 9,105,102, 40,102, 97, 99,103, 32, 60, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,102,108,111, 97,116, 32,116,109,112, 32, 61, 32,
+102, 97, 99,116, 59, 10, 9, 9,102, 97, 99,116, 32, 61, 32,102, 97, 99,109, 59, 10, 9, 9,102, 97, 99,109, 32, 61, 32,116,109,
+112, 59, 10, 9,125, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95, 98,108,101,110,100, 40,102,
+108,111, 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116,
+ 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,110, 99,
+111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,118, 97,108,117,101, 95,118,
+ 97,114,115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,105,110, 99,111,108, 32, 61,
+ 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 32, 43, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 59, 10,125, 10, 10,118,
+111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,109,117,108, 40,102,108,111, 97,116, 32,111,117,116, 99,111,108, 44,
+ 32,102,108,111, 97,116, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116,
+ 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116,
+ 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,118, 97,108,117,101, 95,118, 97,114,115, 40,102, 97, 99,116, 44, 32,102, 97,
+ 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,102, 97, 99,109, 32, 61, 32, 49, 46, 48, 32, 45, 32,102, 97, 99,103, 59, 10,
+ 9,105,110, 99,111,108, 32, 61, 32, 40,102, 97, 99,109, 32, 43, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 41, 42,111,117,
+116, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,115, 99,114,101,101,110, 40,
+102,108,111, 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,
+116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,110,
+ 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,118, 97,108,117,101, 95,
+118, 97,114,115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,102, 97, 99,109, 32, 61,
+ 32, 49, 46, 48, 32, 45, 32,102, 97, 99,103, 59, 10, 9,105,110, 99,111,108, 32, 61, 32, 49, 46, 48, 32, 45, 32, 40,102, 97, 99,
+109, 32, 43, 32,102, 97, 99,116, 42, 40, 49, 46, 48, 32, 45, 32,116,101,120, 99,111,108, 41, 41, 42, 40, 49, 46, 48, 32, 45, 32,
+111,117,116, 99,111,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,115,117, 98, 40,
+102,108,111, 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,
+116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,110,
+ 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,118, 97,108,117,101, 95,
+118, 97,114,115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,102, 97, 99,116, 32, 61,
+ 32, 45,102, 97, 99,116, 59, 10, 9,105,110, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 32, 43, 32,111,
+117,116, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95, 97,100,100, 40,102,108,
+111, 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,
+102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,110, 99,111,
+108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,118, 97,108,117,101, 95,118, 97,
+114,115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,102, 97, 99,116, 32, 61, 32,102,
+ 97, 99,116, 59, 10, 9,105,110, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 32, 43, 32,111,117,116, 99,
+111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,100,105,118, 40,102,108,111, 97,116,
+ 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,116, 32,102, 97, 99,
+116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,110, 99,111,108, 41, 10,
+123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,118, 97,108,117,101, 95,118, 97,114,115, 40,
+102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,105,102, 40,116,101,120, 99,111,108, 32, 33,
+ 61, 32, 48, 46, 48, 41, 10, 9, 9,105,110, 99,111,108, 32, 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 32, 43, 32,102,
+ 97, 99,116, 42,111,117,116, 99,111,108, 47,116,101,120, 99,111,108, 59, 10, 9,101,108,115,101, 10, 9, 9,105,110, 99,111,108,
+ 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,100,105,102,102, 40,
+102,108,111, 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108, 44, 32,102,108,111, 97,
+116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,105,110,
+ 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,118, 97,108,117,101, 95,
+118, 97,114,115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,105,110, 99,111,108, 32,
+ 61, 32,102, 97, 99,109, 42,111,117,116, 99,111,108, 32, 43, 32,102, 97, 99,116, 42, 97, 98,115, 40,116,101,120, 99,111,108, 32,
+ 45, 32,111,117,116, 99,111,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,100, 97,
+114,107, 40,102,108,111, 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108, 44, 32,102,
+108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,116,
+ 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,118, 97,108,
+117,101, 95,118, 97,114,115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,102,108,111,
+ 97,116, 32, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 59, 10, 9,105,102, 40, 99,111,108, 32, 60, 32,
+111,117,116, 99,111,108, 41, 32,105,110, 99,111,108, 32, 61, 32, 99,111,108, 59, 32,101,108,115,101, 32,105,110, 99,111,108, 32,
+ 61, 32,111,117,116, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,108,105,103,
+104,116, 40,102,108,111, 97,116, 32,111,117,116, 99,111,108, 44, 32,102,108,111, 97,116, 32,116,101,120, 99,111,108, 44, 32,102,
+108,111, 97,116, 32,102, 97, 99,116, 44, 32,102,108,111, 97,116, 32,102, 97, 99,103, 44, 32,111,117,116, 32,102,108,111, 97,116,
+ 32,105,110, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,109, 59, 10, 9,109,116,101,120, 95,118, 97,108,
+117,101, 95,118, 97,114,115, 40,102, 97, 99,116, 44, 32,102, 97, 99,103, 44, 32,102, 97, 99,109, 41, 59, 10, 10, 9,102,108,111,
+ 97,116, 32, 99,111,108, 32, 61, 32,102, 97, 99,116, 42,116,101,120, 99,111,108, 59, 10, 9,105,102, 40, 99,111,108, 32, 62, 32,
+111,117,116, 99,111,108, 41, 32,105,110, 99,111,108, 32, 61, 32, 99,111,108, 59, 32,101,108,115,101, 32,105,110, 99,111,108, 32,
+ 61, 32,111,117,116, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95, 99,108, 97,
+109,112, 95,112,111,115,105,116,105,118,101, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,111,117,116, 32,102,108,111, 97,116,
+ 32,111,117,116,102, 97, 99, 41, 10,123, 10, 9,111,117,116,102, 97, 99, 32, 61, 32,109, 97,120, 40,102, 97, 99, 44, 32, 48, 46,
+ 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95, 99,108, 97,109,112, 40,102,108,111,
+ 97,116, 32,102, 97, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,102, 97, 99, 41, 10,123, 10, 9,111,117,116,
+102, 97, 99, 32, 61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10,125, 10, 10,118,
+111,105,100, 32,109,116,101,120, 95,104, 97,114, 95,100,105,118,105,100,101, 40,102,108,111, 97,116, 32,104, 97,114, 44, 32,111,
+117,116, 32,102,108,111, 97,116, 32,111,117,116,104, 97,114, 41, 10,123, 10, 9,111,117,116,104, 97,114, 32, 61, 32,104, 97,114,
+ 47, 49, 50, 56, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,104, 97,114, 95,109,117,108,116,105,112,108,
+121, 95, 99,108, 97,109,112, 40,102,108,111, 97,116, 32,104, 97,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,
+104, 97,114, 41, 10,123, 10, 9,104, 97,114, 32, 42, 61, 32, 49, 50, 56, 46, 48, 59, 10, 10, 9,105,102, 40,104, 97,114, 32, 60,
+ 32, 49, 46, 48, 41, 32,111,117,116,104, 97,114, 32, 61, 32, 49, 46, 48, 59, 10, 9,101,108,115,101, 32,105,102, 40,104, 97,114,
+ 32, 62, 32, 53, 49, 49, 46, 48, 41, 32,111,117,116,104, 97,114, 32, 61, 32, 53, 49, 49, 46, 48, 59, 10, 9,101,108,115,101, 32,
+111,117,116,104, 97,114, 32, 61, 32,104, 97,114, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 97,108,112,104, 97,
+ 95,102,114,111,109, 95, 99,111,108, 40,118,101, 99, 52, 32, 99,111,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32, 97,108,
+112,104, 97, 41, 10,123, 10, 9, 97,108,112,104, 97, 32, 61, 32, 99,111,108, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,109,
+116,101,120, 95, 97,108,112,104, 97, 95,116,111, 95, 99,111,108, 40,118,101, 99, 52, 32, 99,111,108, 44, 32,102,108,111, 97,116,
+ 32, 97,108,112,104, 97, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,
+111,108, 32, 61, 32,118,101, 99, 52, 40, 99,111,108, 46,114,103, 98, 44, 32, 97,108,112,104, 97, 41, 59, 10,125, 10, 10,118,111,
+105,100, 32,109,116,101,120, 95,114,103, 98,116,111,105,110,116, 40,118,101, 99, 52, 32,114,103, 98, 44, 32,111,117,116, 32,102,
+108,111, 97,116, 32,105,110,116,101,110,115,105,116,121, 41, 10,123, 10, 9,105,110,116,101,110,115,105,116,121, 32, 61, 32,100,
+111,116, 40,118,101, 99, 51, 40, 48, 46, 51, 53, 44, 32, 48, 46, 52, 53, 44, 32, 48, 46, 50, 41, 44, 32,114,103, 98, 46,114,103,
+ 98, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,105,110,118,101,114,116, 40,102,108,
+111, 97,116, 32,105,110,118, 97,108,117,101, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108,117,101, 41,
+ 10,123, 10, 9,111,117,116,118, 97,108,117,101, 32, 61, 32, 49, 46, 48, 32, 45, 32,105,110,118, 97,108,117,101, 59, 10,125, 10,
+ 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,105,110,118,101,114,116, 40,118,101, 99, 52, 32,105,110,114,103, 98,
+ 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116,114,103, 98, 41, 10,123, 10, 9,111,117,116,114,103, 98, 32, 61, 32,118,
+101, 99, 52, 40,118,101, 99, 51, 40, 49, 46, 48, 41, 32, 45, 32,105,110,114,103, 98, 46,114,103, 98, 44, 32,105,110,114,103, 98,
+ 46, 97, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,118, 97,108,117,101, 95,115,116,101,110, 99,105,108, 40,
+102,108,111, 97,116, 32,115,116,101,110, 99,105,108, 44, 32,102,108,111, 97,116, 32,105,110,116,101,110,115,105,116,121, 44, 32,
+111,117,116, 32,102,108,111, 97,116, 32,111,117,116,115,116,101,110, 99,105,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,
+111,117,116,105,110,116,101,110,115,105,116,121, 41, 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,116, 32, 61, 32,105,110,
+116,101,110,115,105,116,121, 59, 10, 9,111,117,116,105,110,116,101,110,115,105,116,121, 32, 61, 32,105,110,116,101,110,115,105,
+116,121, 42,115,116,101,110, 99,105,108, 59, 10, 9,111,117,116,115,116,101,110, 99,105,108, 32, 61, 32,115,116,101,110, 99,105,
+108, 42,102, 97, 99,116, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,114,103, 98, 95,115,116,101,110, 99,105,108,
+ 40,102,108,111, 97,116, 32,115,116,101,110, 99,105,108, 44, 32,118,101, 99, 52, 32,114,103, 98, 44, 32,111,117,116, 32,102,108,
+111, 97,116, 32,111,117,116,115,116,101,110, 99,105,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116,114,103, 98, 41,
+ 10,123, 10, 9,102,108,111, 97,116, 32,102, 97, 99,116, 32, 61, 32,114,103, 98, 46, 97, 59, 10, 9,111,117,116,114,103, 98, 32,
+ 61, 32,118,101, 99, 52, 40,114,103, 98, 46,114,103, 98, 44, 32,114,103, 98, 46, 97, 42,115,116,101,110, 99,105,108, 41, 59, 10,
+ 9,111,117,116,115,116,101,110, 99,105,108, 32, 61, 32,115,116,101,110, 99,105,108, 42,102, 97, 99,116, 59, 10,125, 10, 10,118,
+111,105,100, 32,109,116,101,120, 95,109, 97,112,112,105,110,103, 95,111,102,115, 40,118,101, 99, 51, 32,116,101,120, 99,111, 44,
+ 32,118,101, 99, 51, 32,111,102,115, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,116,101,120, 99,111, 41, 10,123, 10,
+ 9,111,117,116,116,101,120, 99,111, 32, 61, 32,116,101,120, 99,111, 32, 43, 32,111,102,115, 59, 10,125, 10, 10,118,111,105,100,
+ 32,109,116,101,120, 95,109, 97,112,112,105,110,103, 95,115,105,122,101, 40,118,101, 99, 51, 32,116,101,120, 99,111, 44, 32,118,
+101, 99, 51, 32,115,105,122,101, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,116,101,120, 99,111, 41, 10,123, 10, 9,
+111,117,116,116,101,120, 99,111, 32, 61, 32,115,105,122,101, 42,116,101,120, 99,111, 59, 10,125, 10, 10,118,111,105,100, 32,109,
+116,101,120, 95, 50,100, 95,109, 97,112,112,105,110,103, 40,118,101, 99, 51, 32,118,101, 99, 44, 32,111,117,116, 32,118,101, 99,
+ 51, 32,111,117,116,118,101, 99, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32,118,101, 99, 51, 40,118,101, 99, 46,120,
+121, 42, 48, 46, 53, 32, 43, 32,118,101, 99, 50, 40, 48, 46, 53, 44, 32, 48, 46, 53, 41, 44, 32,118,101, 99, 46,122, 41, 59, 10,
+125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,105,109, 97,103,101, 40,118,101, 99, 51, 32,116,101,120, 99,111, 44, 32,115,
+ 97,109,112,108,101,114, 50, 68, 32,105,109, 97, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,118, 97,108,117,101, 44, 32,111,
+117,116, 32,118,101, 99, 52, 32, 99,111,108,111,114, 41, 10,123, 10, 9, 99,111,108,111,114, 32, 61, 32,116,101,120,116,117,114,
+101, 50, 68, 40,105,109, 97, 44, 32,116,101,120, 99,111, 46,120,121, 41, 59, 10, 9,118, 97,108,117,101, 32, 61, 32, 49, 46, 48,
+ 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95,110,111,114,109, 97,108, 40,118,101, 99, 51, 32,116,101,120, 99,111,
+ 44, 32,115, 97,109,112,108,101,114, 50, 68, 32,105,109, 97, 44, 32,111,117,116, 32,118,101, 99, 51, 32,110,111,114,109, 97,108,
+ 41, 10,123, 10, 9, 47, 47, 32, 84,104,101, 32,105,110,118,101,114,116, 32,111,102, 32,116,104,101, 32,114,101,100, 32, 99,104,
+ 97,110,110,101,108, 32,105,115, 32,116,111, 32,109, 97,107,101, 10, 9, 47, 47, 32,116,104,101, 32,110,111,114,109, 97,108, 32,
+109, 97,112, 32, 99,111,109,112,108,105, 97,110,116, 32,119,105,116,104, 32,116,104,101, 32,111,117,116,115,105,100,101, 32,119,
+111,114,108,100, 46, 10, 9, 47, 47, 32, 73,116, 32,110,101,101,100,115, 32,116,111, 32, 98,101, 32,100,111,110,101, 32, 98,101,
+ 99, 97,117,115,101, 32,105,110, 32, 66,108,101,110,100,101,114, 10, 9, 47, 47, 32,116,104,101, 32,110,111,114,109, 97,108, 32,
+117,115,101,100, 32,112,111,105,110,116,115, 32,105,110,119, 97,114,100, 46, 10, 9, 47, 47, 32, 83,104,111,117,108,100, 32,116,
+104,105,115, 32,101,118,101,114, 32, 99,104, 97,110,103,101, 32,116,104,105,115, 32,110,101,103, 97,116,101, 32,109,117,115,116,
+ 32, 98,101, 32,114,101,109,111,118,101,100, 46, 10, 32, 32, 32, 32,118,101, 99, 52, 32, 99,111,108,111,114, 32, 61, 32,116,101,
+120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32,116,101,120, 99,111, 46,120,121, 41, 59, 10, 9,110,111,114,109, 97,108, 32,
+ 61, 32, 50, 46, 48, 42, 40,118,101, 99, 51, 40, 45, 99,111,108,111,114, 46,114, 44, 32, 99,111,108,111,114, 46,103, 44, 32, 99,
+111,108,111,114, 46, 98, 41, 32, 45, 32,118,101, 99, 51, 40, 45, 48, 46, 53, 44, 32, 48, 46, 53, 44, 32, 48, 46, 53, 41, 41, 59,
+ 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 98,117,109,112, 95,110,111,114,109, 97,108,115, 95,105,110,105,116, 40,
+ 32,118,101, 99, 51, 32,118, 78, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118, 78,111,114,103, 44, 32,111,117,116, 32,118,101,
+ 99, 51, 32,118, 78, 97, 99, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 80,114,101,118, 77, 97,103,110,105,116,117,
+100,101, 32, 41, 10,123, 10, 9,118, 78,111,114,103, 32, 61, 32,118, 78, 59, 10, 9,118, 78, 97, 99, 99, 32, 61, 32,118, 78, 59,
+ 10, 9,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 32, 61, 32, 49, 46, 48, 59, 10,125, 10, 10, 47, 42, 42, 32,104,
+101,108,112,101,114, 32,109,101,116,104,111,100, 32,116,111, 32,101,120,116,114, 97, 99,116, 32,116,104,101, 32,117,112,112,101,
+114, 32,108,101,102,116, 32, 51,120, 51, 32,109, 97,116,114,105,120, 32,102,114,111,109, 32, 97, 32, 52,120, 52, 32,109, 97,116,
+114,105,120, 32, 42, 47, 10,109, 97,116, 51, 32,116,111, 95,109, 97,116, 51, 40,109, 97,116, 52, 32,109, 52, 41, 10,123, 10, 9,
+109, 97,116, 51, 32,109, 51, 59, 10, 9,109, 51, 91, 48, 93, 32, 61, 32,109, 52, 91, 48, 93, 46,120,121,122, 59, 10, 9,109, 51,
+ 91, 49, 93, 32, 61, 32,109, 52, 91, 49, 93, 46,120,121,122, 59, 10, 9,109, 51, 91, 50, 93, 32, 61, 32,109, 52, 91, 50, 93, 46,
+120,121,122, 59, 10, 9,114,101,116,117,114,110, 32,109, 51, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 98,117,
+109,112, 95,105,110,105,116, 95,111, 98,106,115,112, 97, 99,101, 40, 32,118,101, 99, 51, 32,115,117,114,102, 95,112,111,115, 44,
+ 32,118,101, 99, 51, 32,115,117,114,102, 95,110,111,114,109, 44, 10, 9, 9, 9, 9, 9, 9, 9, 32, 32,109, 97,116, 52, 32,109,
+ 86,105,101,119, 44, 32,109, 97,116, 52, 32,109, 86,105,101,119, 73,110,118, 44, 32,109, 97,116, 52, 32,109, 79, 98,106, 44, 32,
+109, 97,116, 52, 32,109, 79, 98,106, 73,110,118, 44, 32, 10, 9, 9, 9, 9, 9, 9, 9, 32, 32,102,108,111, 97,116, 32,102, 80,
+114,101,118, 77, 97,103,110,105,116,117,100,101, 95,105,110, 44, 32,118,101, 99, 51, 32,118, 78, 97, 99, 99, 95,105,110, 44, 10,
+ 9, 9, 9, 9, 9, 9, 9, 32, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,
+101, 95,111,117,116, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118, 78, 97, 99, 99, 95,111,117,116, 44, 32, 10, 9, 9, 9, 9,
+ 9, 9, 9, 32, 32,111,117,116, 32,118,101, 99, 51, 32,118, 82, 49, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118, 82, 50, 44,
+ 32,111,117,116, 32,102,108,111, 97,116, 32,102, 68,101,116, 32, 41, 32, 10,123, 10, 9,109, 97,116, 51, 32,111, 98,106, 50,118,
+105,101,119, 32, 61, 32,116,111, 95,109, 97,116, 51, 40,109, 86,105,101,119, 32, 42, 32,109, 79, 98,106, 41, 59, 10, 9,109, 97,
+116, 51, 32,118,105,101,119, 50,111, 98,106, 32, 61, 32,116,111, 95,109, 97,116, 51, 40,109, 79, 98,106, 73,110,118, 32, 42, 32,
+109, 86,105,101,119, 73,110,118, 41, 59, 10, 9, 10, 9,118,101, 99, 51, 32,118, 83,105,103,109, 97, 83, 32, 61, 32,118,105,101,
+119, 50,111, 98,106, 32, 42, 32,100, 70,100,120, 40, 32,115,117,114,102, 95,112,111,115, 32, 41, 59, 10, 9,118,101, 99, 51, 32,
+118, 83,105,103,109, 97, 84, 32, 61, 32,118,105,101,119, 50,111, 98,106, 32, 42, 32,100, 70,100,121, 40, 32,115,117,114,102, 95,
+112,111,115, 32, 41, 59, 10, 9,118,101, 99, 51, 32,118, 78, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40, 32,115,117,114,
+102, 95,110,111,114,109, 32, 42, 32,111, 98,106, 50,118,105,101,119, 32, 41, 59, 10, 10, 9,118, 82, 49, 32, 61, 32, 99,114,111,
+115,115, 40, 32,118, 83,105,103,109, 97, 84, 44, 32,118, 78, 32, 41, 59, 10, 9,118, 82, 50, 32, 61, 32, 99,114,111,115,115, 40,
+ 32,118, 78, 44, 32,118, 83,105,103,109, 97, 83, 32, 41, 32, 59, 10, 9,102, 68,101,116, 32, 61, 32,100,111,116, 32, 40, 32,118,
+ 83,105,103,109, 97, 83, 44, 32,118, 82, 49, 32, 41, 59, 10, 9, 10, 9, 47, 42, 32,112,114,101,116,114, 97,110,115,102,111,114,
+109, 32,118, 78, 97, 99, 99, 32, 40,105,110, 32,109,116,101,120, 95, 98,117,109,112, 95, 97,112,112,108,121, 41, 32,117,115,105,
+110,103, 32,116,104,101, 32,105,110,118,101,114,115,101, 32,116,114, 97,110,115,112,111,115,101,100, 32, 42, 47, 10, 9,118, 82,
+ 49, 32, 61, 32,118, 82, 49, 32, 42, 32,118,105,101,119, 50,111, 98,106, 59, 10, 9,118, 82, 50, 32, 61, 32,118, 82, 50, 32, 42,
+ 32,118,105,101,119, 50,111, 98,106, 59, 10, 9,118, 78, 32, 61, 32,118, 78, 32, 42, 32,118,105,101,119, 50,111, 98,106, 59, 10,
+ 9, 10, 9,102,108,111, 97,116, 32,102, 77, 97,103,110,105,116,117,100,101, 32, 61, 32, 97, 98,115, 40,102, 68,101,116, 41, 32,
+ 42, 32,108,101,110,103,116,104, 40,118, 78, 41, 59, 10, 9,118, 78, 97, 99, 99, 95,111,117,116, 32, 61, 32,118, 78, 97, 99, 99,
+ 95,105,110, 32, 42, 32, 40,102, 77, 97,103,110,105,116,117,100,101, 32, 47, 32,102, 80,114,101,118, 77, 97,103,110,105,116,117,
+100,101, 95,105,110, 41, 59, 10, 9,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,111,117,116, 32, 61, 32,102, 77,
+ 97,103,110,105,116,117,100,101, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 98,117,109,112, 95,105,110,105,116,
+ 95,116,101,120,116,117,114,101,115,112, 97, 99,101, 40, 32,118,101, 99, 51, 32,115,117,114,102, 95,112,111,115, 44, 32,118,101,
+ 99, 51, 32,115,117,114,102, 95,110,111,114,109, 44, 32, 10, 9, 9, 9, 9, 9, 9, 9, 9, 32, 32,102,108,111, 97,116, 32,102,
+ 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,105,110, 44, 32,118,101, 99, 51, 32,118, 78, 97, 99, 99, 95,105,110, 44,
+ 10, 9, 9, 9, 9, 9, 9, 9, 9, 32, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 80,114,101,118, 77, 97,103,110,105,116,
+117,100,101, 95,111,117,116, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118, 78, 97, 99, 99, 95,111,117,116, 44, 32, 10, 9, 9,
+ 9, 9, 9, 9, 9, 9, 32, 32,111,117,116, 32,118,101, 99, 51, 32,118, 82, 49, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118,
+ 82, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 68,101,116, 32, 41, 32, 10,123, 10, 9,118,101, 99, 51, 32,118, 83,
+105,103,109, 97, 83, 32, 61, 32,100, 70,100,120, 40, 32,115,117,114,102, 95,112,111,115, 32, 41, 59, 10, 9,118,101, 99, 51, 32,
+118, 83,105,103,109, 97, 84, 32, 61, 32,100, 70,100,121, 40, 32,115,117,114,102, 95,112,111,115, 32, 41, 59, 10, 9,118,101, 99,
+ 51, 32,118, 78, 32, 61, 32,115,117,114,102, 95,110,111,114,109, 59, 32, 47, 42, 32,110,111,114,109, 97,108,105,122,101,100, 32,
+105,110,116,101,114,112,111,108, 97,116,101,100, 32,118,101,114,116,101,120, 32,110,111,114,109, 97,108, 32, 42, 47, 10, 9, 10,
+ 9,118, 82, 49, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40, 32, 99,114,111,115,115, 40, 32,118, 83,105,103,109, 97, 84,
+ 44, 32,118, 78, 32, 41, 32, 41, 59, 10, 9,118, 82, 50, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40, 32, 99,114,111,115,
+115, 40, 32,118, 78, 44, 32,118, 83,105,103,109, 97, 83, 32, 41, 32, 41, 59, 10, 9,102, 68,101,116, 32, 61, 32,115,105,103,110,
+ 40, 32,100,111,116, 40,118, 83,105,103,109, 97, 83, 44, 32,118, 82, 49, 41, 32, 41, 59, 10, 9, 10, 9,102,108,111, 97,116, 32,
+102, 77, 97,103,110,105,116,117,100,101, 32, 61, 32, 97, 98,115, 40,102, 68,101,116, 41, 59, 10, 9,118, 78, 97, 99, 99, 95,111,
+117,116, 32, 61, 32,118, 78, 97, 99, 99, 95,105,110, 32, 42, 32, 40,102, 77, 97,103,110,105,116,117,100,101, 32, 47, 32,102, 80,
+114,101,118, 77, 97,103,110,105,116,117,100,101, 95,105,110, 41, 59, 10, 9,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,
+101, 95,111,117,116, 32, 61, 32,102, 77, 97,103,110,105,116,117,100,101, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120,
+ 95, 98,117,109,112, 95,105,110,105,116, 95,118,105,101,119,115,112, 97, 99,101, 40, 32,118,101, 99, 51, 32,115,117,114,102, 95,
+112,111,115, 44, 32,118,101, 99, 51, 32,115,117,114,102, 95,110,111,114,109, 44, 32, 10, 9, 9, 9, 9, 9, 9, 9, 32, 32, 32,
+102,108,111, 97,116, 32,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,105,110, 44, 32,118,101, 99, 51, 32,118, 78,
+ 97, 99, 99, 95,105,110, 44, 10, 9, 9, 9, 9, 9, 9, 9, 32, 32, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 80,114,101,
+118, 77, 97,103,110,105,116,117,100,101, 95,111,117,116, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118, 78, 97, 99, 99, 95,111,
+117,116, 44, 32, 10, 9, 9, 9, 9, 9, 9, 9, 32, 32, 32,111,117,116, 32,118,101, 99, 51, 32,118, 82, 49, 44, 32,111,117,116,
+ 32,118,101, 99, 51, 32,118, 82, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102, 68,101,116, 32, 41, 32, 10,123, 10, 9,
+118,101, 99, 51, 32,118, 83,105,103,109, 97, 83, 32, 61, 32,100, 70,100,120, 40, 32,115,117,114,102, 95,112,111,115, 32, 41, 59,
+ 10, 9,118,101, 99, 51, 32,118, 83,105,103,109, 97, 84, 32, 61, 32,100, 70,100,121, 40, 32,115,117,114,102, 95,112,111,115, 32,
+ 41, 59, 10, 9,118,101, 99, 51, 32,118, 78, 32, 61, 32,115,117,114,102, 95,110,111,114,109, 59, 32, 47, 42, 32,110,111,114,109,
+ 97,108,105,122,101,100, 32,105,110,116,101,114,112,111,108, 97,116,101,100, 32,118,101,114,116,101,120, 32,110,111,114,109, 97,
+108, 32, 42, 47, 10, 9, 10, 9,118, 82, 49, 32, 61, 32, 99,114,111,115,115, 40, 32,118, 83,105,103,109, 97, 84, 44, 32,118, 78,
+ 32, 41, 59, 10, 9,118, 82, 50, 32, 61, 32, 99,114,111,115,115, 40, 32,118, 78, 44, 32,118, 83,105,103,109, 97, 83, 32, 41, 32,
+ 59, 10, 9,102, 68,101,116, 32, 61, 32,100,111,116, 32, 40, 32,118, 83,105,103,109, 97, 83, 44, 32,118, 82, 49, 32, 41, 59, 10,
+ 9, 10, 9,102,108,111, 97,116, 32,102, 77, 97,103,110,105,116,117,100,101, 32, 61, 32, 97, 98,115, 40,102, 68,101,116, 41, 59,
+ 10, 9,118, 78, 97, 99, 99, 95,111,117,116, 32, 61, 32,118, 78, 97, 99, 99, 95,105,110, 32, 42, 32, 40,102, 77, 97,103,110,105,
+116,117,100,101, 32, 47, 32,102, 80,114,101,118, 77, 97,103,110,105,116,117,100,101, 95,105,110, 41, 59, 10, 9,102, 80,114,101,
+118, 77, 97,103,110,105,116,117,100,101, 95,111,117,116, 32, 61, 32,102, 77, 97,103,110,105,116,117,100,101, 59, 10,125, 10, 10,
+118,111,105,100, 32,109,116,101,120, 95, 98,117,109,112, 95,116, 97,112, 51, 40, 32,118,101, 99, 51, 32,116,101,120, 99,111, 44,
+ 32,115, 97,109,112,108,101,114, 50, 68, 32,105,109, 97, 44, 32,102,108,111, 97,116, 32,104, 83, 99, 97,108,101, 44, 32, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,111,117,116, 32,102,108,111, 97,116, 32,100, 66,
+115, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,100, 66,116, 32, 41, 32, 10,123, 10, 9,118,101, 99, 50, 32, 83, 84,108,108,
+ 32, 61, 32,116,101,120, 99,111, 46,120,121, 59, 10, 9,118,101, 99, 50, 32, 83, 84,108,114, 32, 61, 32,116,101,120, 99,111, 46,
+120,121, 32, 43, 32,100, 70,100,120, 40,116,101,120, 99,111, 46,120,121, 41, 32, 59, 10, 9,118,101, 99, 50, 32, 83, 84,117,108,
+ 32, 61, 32,116,101,120, 99,111, 46,120,121, 32, 43, 32,100, 70,100,121, 40,116,101,120, 99,111, 46,120,121, 41, 32, 59, 10, 9,
+ 10, 9,102,108,111, 97,116, 32, 72,108,108, 44, 72,108,114, 44, 72,117,108, 59, 10, 9,114,103, 98,116,111, 98,119, 40, 32,116,
+101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84,108,108, 41, 44, 32, 72,108,108, 32, 41, 59, 10, 9,114,103, 98,
+116,111, 98,119, 40, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84,108,114, 41, 44, 32, 72,108,114, 32,
+ 41, 59, 10, 9,114,103, 98,116,111, 98,119, 40, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84,117,108,
+ 41, 44, 32, 72,117,108, 32, 41, 59, 10, 9, 10, 9,100, 66,115, 32, 61, 32,104, 83, 99, 97,108,101, 32, 42, 32, 40, 72,108,114,
+ 32, 45, 32, 72,108,108, 41, 59, 10, 9,100, 66,116, 32, 61, 32,104, 83, 99, 97,108,101, 32, 42, 32, 40, 72,117,108, 32, 45, 32,
+ 72,108,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 98,117,109,112, 95,116, 97,112, 53, 40, 32,118,101,
+ 99, 51, 32,116,101,120, 99,111, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32,105,109, 97, 44, 32,102,108,111, 97,116, 32,104,
+ 83, 99, 97,108,101, 44, 32, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,111,117,116,
+ 32,102,108,111, 97,116, 32,100, 66,115, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,100, 66,116, 32, 41, 32, 10,123, 10, 9,
+118,101, 99, 50, 32, 84,101,120, 68,120, 32, 61, 32,100, 70,100,120, 40,116,101,120, 99,111, 46,120,121, 41, 59, 10, 9,118,101,
+ 99, 50, 32, 84,101,120, 68,121, 32, 61, 32,100, 70,100,121, 40,116,101,120, 99,111, 46,120,121, 41, 59, 10, 10, 9,118,101, 99,
+ 50, 32, 83, 84, 99, 32, 61, 32,116,101,120, 99,111, 46,120,121, 59, 10, 9,118,101, 99, 50, 32, 83, 84,108, 32, 61, 32,116,101,
+120, 99,111, 46,120,121, 32, 45, 32, 48, 46, 53, 32, 42, 32, 84,101,120, 68,120, 32, 59, 10, 9,118,101, 99, 50, 32, 83, 84,114,
+ 32, 61, 32,116,101,120, 99,111, 46,120,121, 32, 43, 32, 48, 46, 53, 32, 42, 32, 84,101,120, 68,120, 32, 59, 10, 9,118,101, 99,
+ 50, 32, 83, 84,100, 32, 61, 32,116,101,120, 99,111, 46,120,121, 32, 45, 32, 48, 46, 53, 32, 42, 32, 84,101,120, 68,121, 32, 59,
+ 10, 9,118,101, 99, 50, 32, 83, 84,117, 32, 61, 32,116,101,120, 99,111, 46,120,121, 32, 43, 32, 48, 46, 53, 32, 42, 32, 84,101,
+120, 68,121, 32, 59, 10, 9, 10, 9,102,108,111, 97,116, 32, 72, 99, 44, 72,108, 44, 72,114, 44, 72,100, 44, 72,117, 59, 10, 9,
+114,103, 98,116,111, 98,119, 40, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84, 99, 41, 44, 32, 72, 99,
+ 32, 41, 59, 10, 9,114,103, 98,116,111, 98,119, 40, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84,108,
+ 41, 44, 32, 72,108, 32, 41, 59, 10, 9,114,103, 98,116,111, 98,119, 40, 32,116,101,120,116,117,114,101, 50, 68, 40,105,109, 97,
+ 44, 32, 83, 84,114, 41, 44, 32, 72,114, 32, 41, 59, 10, 9,114,103, 98,116,111, 98,119, 40, 32,116,101,120,116,117,114,101, 50,
+ 68, 40,105,109, 97, 44, 32, 83, 84,100, 41, 44, 32, 72,100, 32, 41, 59, 10, 9,114,103, 98,116,111, 98,119, 40, 32,116,101,120,
+116,117,114,101, 50, 68, 40,105,109, 97, 44, 32, 83, 84,117, 41, 44, 32, 72,117, 32, 41, 59, 10, 9, 10, 9,100, 66,115, 32, 61,
+ 32,104, 83, 99, 97,108,101, 32, 42, 32, 40, 72,114, 32, 45, 32, 72,108, 41, 59, 10, 9,100, 66,116, 32, 61, 32,104, 83, 99, 97,
+108,101, 32, 42, 32, 40, 72,117, 32, 45, 32, 72,100, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,101,120, 95, 98,117,109,
+112, 95,100,101,114,105,118, 40, 32,118,101, 99, 51, 32,116,101,120, 99,111, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32,105,
+109, 97, 44, 32,102,108,111, 97,116, 32,105,109, 97, 95,120, 44, 32,102,108,111, 97,116, 32,105,109, 97, 95,121, 44, 32,102,108,
+111, 97,116, 32,104, 83, 99, 97,108,101, 44, 32, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32,111,117,116, 32,102,108,111, 97,116, 32,100, 66,115, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,100, 66,116, 32, 41,
+ 32, 10,123, 10, 9,102,108,111, 97,116, 32,115, 32, 61, 32, 49, 46, 48, 59, 9, 9, 47, 47, 32,110,101,103, 97,116,101, 32,116,
+104,105,115, 32,105,102, 32,102,108,105,112,112,101,100, 32,116,101,120,116,117,114,101, 32, 99,111,111,114,100,105,110, 97,116,
+101, 10, 9,118,101, 99, 50, 32, 84,101,120, 68,120, 32, 61, 32,100, 70,100,120, 40,116,101,120, 99,111, 46,120,121, 41, 59, 10,
+ 9,118,101, 99, 50, 32, 84,101,120, 68,121, 32, 61, 32,100, 70,100,121, 40,116,101,120, 99,111, 46,120,121, 41, 59, 10, 9, 10,
+ 9, 47, 47, 32,116,104,105,115, 32,118, 97,114,105, 97,110,116, 32,117,115,105,110,103, 32, 97, 32,100,101,114,105,118, 97,116,
+105,118,101, 32,109, 97,112, 32,105,115, 32,100,101,115, 99,114,105, 98,101,100, 32,104,101,114,101, 10, 9, 47, 47, 32,104,116,
+116,112, 58, 47, 47,109,109,105,107,107,101,108,115,101,110, 51,100, 46, 98,108,111,103,115,112,111,116, 46, 99,111,109, 47, 50,
+ 48, 49, 49, 47, 48, 55, 47,100,101,114,105,118, 97,116,105,118,101, 45,109, 97,112,115, 46,104,116,109,108, 10, 9,118,101, 99,
+ 50, 32,100,105,109, 32, 61, 32,118,101, 99, 50, 40,105,109, 97, 95,120, 44, 32,105,109, 97, 95,121, 41, 59, 10, 9,118,101, 99,
+ 50, 32,100, 66,100,117,118, 32, 61, 32,104, 83, 99, 97,108,101, 42,100,105,109, 42, 40, 50, 46, 48, 42,116,101,120,116,117,114,
+101, 50, 68, 40,105,109, 97, 44, 32,116,101,120, 99,111, 46,120,121, 41, 46,120,121, 45, 49, 46, 48, 41, 59, 10, 9, 10, 9,100,
+ 66,115, 32, 61, 32,100, 66,100,117,118, 46,120, 42, 84,101,120, 68,120, 46,120, 32, 43, 32,115, 42,100, 66,100,117,118, 46,121,
+ 42, 84,101,120, 68,120, 46,121, 59, 10, 9,100, 66,116, 32, 61, 32,100, 66,100,117,118, 46,120, 42, 84,101,120, 68,121, 46,120,
+ 32, 43, 32,115, 42,100, 66,100,117,118, 46,121, 42, 84,101,120, 68,121, 46,121, 59, 10,125, 10, 10,118,111,105,100, 32,109,116,
101,120, 95, 98,117,109,112, 95, 97,112,112,108,121, 40, 32,102,108,111, 97,116, 32,102, 68,101,116, 44, 32,102,108,111, 97,116,
32,100, 66,115, 44, 32,102,108,111, 97,116, 32,100, 66,116, 44, 32,118,101, 99, 51, 32,118, 82, 49, 44, 32,118,101, 99, 51, 32,
118, 82, 50, 44, 32,118,101, 99, 51, 32,118, 78, 97, 99, 99, 95,105,110, 44, 10, 9, 9, 9, 9, 9, 32, 32,111,117,116, 32,118,
diff --git a/source/blender/imbuf/CMakeLists.txt b/source/blender/imbuf/CMakeLists.txt
index 18b5eff5c73..ff13be20d4e 100644
--- a/source/blender/imbuf/CMakeLists.txt
+++ b/source/blender/imbuf/CMakeLists.txt
@@ -73,6 +73,7 @@ set(SRC
intern/tiff.c
intern/util.c
intern/writeimage.c
+ intern/indexer.c
IMB_imbuf.h
IMB_imbuf_types.h
diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h
index 36123592c54..1fbe8e01fd4 100644
--- a/source/blender/imbuf/IMB_imbuf.h
+++ b/source/blender/imbuf/IMB_imbuf.h
@@ -133,6 +133,7 @@ struct ImBuf *IMB_allocImBuf(unsigned int x, unsigned int y,
*/
void IMB_refImBuf(struct ImBuf *ibuf);
+struct ImBuf * IMB_makeSingleUser(struct ImBuf *ibuf);
/**
*
@@ -192,18 +193,71 @@ void IMB_rectcpy(struct ImBuf *drect, struct ImBuf *srect, int destx,
void IMB_rectblend(struct ImBuf *dbuf, struct ImBuf *sbuf, int destx,
int desty, int srcx, int srcy, int width, int height, IMB_BlendMode mode);
+/**
+ *
+ * @attention Defined in indexer.c
+ */
+
+typedef enum IMB_Timecode_Type {
+ IMB_TC_NONE = 0, /* don't use timecode files at all */
+ IMB_TC_RECORD_RUN = 1, /* use images in the order as they are recorded
+ (currently, this is the only one implemented
+ and is a sane default)
+ */
+ IMB_TC_FREE_RUN = 2, /* use global timestamp written by recording
+ device (prosumer camcorders e.g. can do
+ that) */
+ IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN = 4,
+ /* interpolate a global timestamp using the
+ record date and time written by recording
+ device (*every* consumer camcorder can do
+ that :) )*/
+ IMB_TC_MAX_SLOT = 3
+} IMB_Timecode_Type;
+
+typedef enum IMB_Proxy_Size {
+ IMB_PROXY_NONE = 0,
+ IMB_PROXY_25 = 1,
+ IMB_PROXY_50 = 2,
+ IMB_PROXY_75 = 4,
+ IMB_PROXY_100 = 8,
+ IMB_PROXY_MAX_SLOT = 4
+} IMB_Proxy_Size;
+
+/* defaults to BL_proxy within the directory of the animation */
+void IMB_anim_set_index_dir(struct anim * anim, const char * dir);
+
+int IMB_anim_index_get_frame_index(struct anim * anim, IMB_Timecode_Type tc,
+ int position);
+
+/* will rebuild all used indices and proxies at once */
+void IMB_anim_index_rebuild(struct anim * anim,
+ IMB_Timecode_Type build_tcs,
+ IMB_Proxy_Size build_preview_sizes,
+ int build_quality,
+ short *stop, short *do_update, float *progress);
+
/**
* Return the length (in frames) of the given @a anim.
*/
-int IMB_anim_get_duration(struct anim *anim);
+int IMB_anim_get_duration(struct anim *anim, IMB_Timecode_Type tc);
+
+
+/**
+ * Return the fps contained in movie files (function rval is FALSE,
+ * and frs_sec and frs_sec_base untouched if none available!)
+ */
+int IMB_anim_get_fps(struct anim * anim,
+ short * frs_sec, float * frs_sec_base);
/**
*
* @attention Defined in anim.c
*/
-struct anim *IMB_open_anim(const char *name, int ib_flags);
+struct anim *IMB_open_anim(const char *name, int ib_flags, int streamindex);
void IMB_close_anim(struct anim *anim);
+
/**
*
* @attention Defined in anim.c
@@ -218,7 +272,10 @@ int IMB_anim_get_preseek(struct anim *anim);
* @attention Defined in anim.c
*/
-struct ImBuf *IMB_anim_absolute(struct anim *anim, int position);
+struct ImBuf *IMB_anim_absolute(
+ struct anim *anim, int position,
+ IMB_Timecode_Type tc /* = 1 = IMB_TC_RECORD_RUN */,
+ IMB_Proxy_Size preview_size /* = 0 = IMB_PROXY_NONE */);
/**
*
@@ -227,12 +284,6 @@ struct ImBuf *IMB_anim_absolute(struct anim *anim, int position);
*/
struct ImBuf *IMB_anim_previewframe(struct anim *anim);
-/**
- *
- * @attention Defined in anim.c
- */
-void IMB_free_anim_ibuf(struct anim *anim);
-
/**
*
* @attention Defined in anim.c
diff --git a/source/blender/imbuf/intern/IMB_anim.h b/source/blender/imbuf/intern/IMB_anim.h
index fba0772dd93..8436846bf2e 100644
--- a/source/blender/imbuf/intern/IMB_anim.h
+++ b/source/blender/imbuf/intern/IMB_anim.h
@@ -127,19 +127,22 @@
#define MAXNUMSTREAMS 50
struct _AviMovie;
+struct anim_index;
struct anim {
int ib_flags;
int curtype;
int curposition; /* index 0 = 1e, 1 = 2e, enz. */
int duration;
+ short frs_sec;
+ float frs_sec_base;
int x, y;
/* voor op nummer */
char name[256];
/* voor sequence */
char first[256];
-
+
/* movie */
void *movie;
void *track;
@@ -148,9 +151,7 @@ struct anim {
size_t framesize;
int interlacing;
int preseek;
-
- /* data */
- struct ImBuf * ibuf1, * ibuf2;
+ int streamindex;
/* avi */
struct _AviMovie *avi;
@@ -179,11 +180,26 @@ struct anim {
AVFrame *pFrameDeinterlaced;
struct SwsContext *img_convert_ctx;
int videoStream;
+
+ struct ImBuf * last_frame;
+ int64_t last_pts;
+ int64_t next_pts;
+ int64_t next_undecoded_pts;
+ AVPacket next_packet;
#endif
#ifdef WITH_REDCODE
struct redcode_handle * redcodeCtx;
#endif
+
+ char index_dir[256];
+
+ int proxies_tried;
+ int indices_tried;
+
+ struct anim * proxy_anim[IMB_PROXY_MAX_SLOT];
+ struct anim_index * curr_idx[IMB_TC_MAX_SLOT];
+
};
#endif
diff --git a/source/blender/imbuf/intern/IMB_indexer.h b/source/blender/imbuf/intern/IMB_indexer.h
new file mode 100644
index 00000000000..ae3b48f76c7
--- /dev/null
+++ b/source/blender/imbuf/intern/IMB_indexer.h
@@ -0,0 +1,135 @@
+/**
+ * IMB_indexer.h
+ *
+ * $Id: IMB_indexer.h
+ *
+ * ***** 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.
+ *
+ *
+ * Contributor(s): Peter Schlaile
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+
+#ifndef IMB_INDEXER_H
+#define IMB_INDEXER_H
+
+#ifdef WIN32
+#include
+#endif
+
+#include
+#include
+#include "BKE_utildefines.h"
+#include "IMB_anim.h"
+
+/*
+ seperate animation index files to solve the following problems:
+
+ a) different timecodes within one file (like DTS/PTS, Timecode-Track,
+ "implicit" timecodes within DV-files and HDV-files etc.)
+ b) seeking difficulties within ffmpeg for files with timestamp holes
+ c) broken files that miss several frames / have varying framerates
+ d) use proxies accordingly
+
+ ... we need index files, that provide us with
+
+ the binary(!) position, where we have to seek into the file *and*
+ the continuous frame number (ignoring the holes) starting from the
+ beginning of the file, so that we know, which proxy frame to serve.
+
+ This index has to be only built once for a file and is written into
+ the BL_proxy directory structure for later reuse in different blender files.
+
+*/
+
+typedef struct anim_index_entry {
+ int frameno;
+ unsigned long long seek_pos;
+ unsigned long long seek_pos_dts;
+ unsigned long long pts;
+} anim_index_entry;
+
+struct anim_index {
+ char name[256];
+
+ int num_entries;
+ struct anim_index_entry * entries;
+};
+
+struct anim_index_builder;
+
+typedef struct anim_index_builder {
+ FILE * fp;
+ char name[FILE_MAXDIR + FILE_MAXFILE];
+ char temp_name[FILE_MAXDIR + FILE_MAXFILE];
+
+ void * private_data;
+
+ void (*delete_priv_data)(struct anim_index_builder * idx);
+ void (*proc_frame)(struct anim_index_builder * idx,
+ unsigned char * buffer,
+ int data_size,
+ struct anim_index_entry * entry);
+} anim_index_builder;
+
+anim_index_builder * IMB_index_builder_create(const char * name);
+void IMB_index_builder_add_entry(anim_index_builder * fp,
+ int frameno, unsigned long long seek_pos,
+ unsigned long long seek_pos_dts,
+ unsigned long long pts);
+
+void IMB_index_builder_proc_frame(anim_index_builder * fp,
+ unsigned char * buffer,
+ int data_size,
+ int frameno, unsigned long long seek_pos,
+ unsigned long long seek_pos_dts,
+ unsigned long long pts);
+
+void IMB_index_builder_finish(anim_index_builder * fp, int rollback);
+
+struct anim_index * IMB_indexer_open(const char * name);
+unsigned long long IMB_indexer_get_seek_pos(
+ struct anim_index * idx, int frameno_index);
+unsigned long long IMB_indexer_get_seek_pos_dts(
+ struct anim_index * idx, int frameno_index);
+
+int IMB_indexer_get_frame_index(struct anim_index * idx, int frameno);
+unsigned long long IMB_indexer_get_pts(struct anim_index * idx,
+ int frame_index);
+int IMB_indexer_get_duration(struct anim_index * idx);
+
+int IMB_indexer_can_scan(struct anim_index * idx,
+ int old_frame_index, int new_frame_index);
+
+void IMB_indexer_close(struct anim_index * idx);
+
+void IMB_free_indices(struct anim * anim);
+
+int IMB_anim_index_get_frame_index(
+ struct anim * anim, IMB_Timecode_Type tc, int position);
+
+struct anim * IMB_anim_open_proxy(
+ struct anim * anim, IMB_Proxy_Size preview_size);
+struct anim_index * IMB_anim_open_index(
+ struct anim * anim, IMB_Timecode_Type tc);
+
+int IMB_proxy_size_to_array_index(IMB_Proxy_Size pr_size);
+int IMB_timecode_to_array_index(IMB_Timecode_Type tc);
+
+#endif
diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c
index 59772771f3b..6ce6c9409d1 100644
--- a/source/blender/imbuf/intern/allocimbuf.c
+++ b/source/blender/imbuf/intern/allocimbuf.c
@@ -177,6 +177,19 @@ void IMB_refImBuf(ImBuf *ibuf)
ibuf->refcounter++;
}
+ImBuf * IMB_makeSingleUser(ImBuf *ibuf)
+{
+ ImBuf * rval;
+
+ if (!ibuf || ibuf->refcounter == 0) { return ibuf; }
+
+ rval = IMB_dupImBuf(ibuf);
+
+ IMB_freeImBuf(ibuf);
+
+ return rval;
+}
+
short addzbufImBuf(ImBuf *ibuf)
{
int size;
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
index 8b0104fcdca..7b172008bee 100644
--- a/source/blender/imbuf/intern/anim_movie.c
+++ b/source/blender/imbuf/intern/anim_movie.c
@@ -57,6 +57,7 @@
#include
#include
#include
+#include
#ifndef _WIN32
#include
#else
@@ -66,6 +67,7 @@
#include "BLI_blenlib.h" /* BLI_remlink BLI_filesize BLI_addtail
BLI_countlist BLI_stringdec */
#include "BLI_utildefines.h"
+#include "BLI_math_base.h"
#include "MEM_guardedalloc.h"
@@ -90,6 +92,7 @@
#include "IMB_allocimbuf.h"
#include "IMB_anim.h"
+#include "IMB_indexer.h"
#ifdef WITH_FFMPEG
#include
@@ -304,15 +307,6 @@ static void free_anim_avi (struct anim *anim) {
anim->duration = 0;
}
-void IMB_free_anim_ibuf(struct anim * anim) {
- if (anim == NULL) return;
-
- if (anim->ibuf1) IMB_freeImBuf(anim->ibuf1);
- if (anim->ibuf2) IMB_freeImBuf(anim->ibuf2);
-
- anim->ibuf1 = anim->ibuf2 = NULL;
-}
-
#ifdef WITH_FFMPEG
static void free_anim_ffmpeg(struct anim * anim);
#endif
@@ -326,7 +320,6 @@ void IMB_free_anim(struct anim * anim) {
return;
}
- IMB_free_anim_ibuf(anim);
free_anim_movie(anim);
free_anim_avi(anim);
@@ -339,6 +332,7 @@ void IMB_free_anim(struct anim * anim) {
#ifdef WITH_REDCODE
free_anim_redcode(anim);
#endif
+ IMB_free_indices(anim);
MEM_freeN(anim);
}
@@ -350,13 +344,14 @@ void IMB_close_anim(struct anim * anim) {
}
-struct anim * IMB_open_anim( const char * name, int ib_flags) {
+struct anim * IMB_open_anim( const char * name, int ib_flags, int streamindex) {
struct anim * anim;
anim = (struct anim*)MEM_callocN(sizeof(struct anim), "anim struct");
if (anim != NULL) {
BLI_strncpy(anim->name, name, sizeof(anim->name));
anim->ib_flags = ib_flags;
+ anim->streamindex = streamindex;
}
return(anim);
}
@@ -368,10 +363,13 @@ static int startavi (struct anim *anim) {
#if defined(_WIN32) && !defined(FREE_WINDOWS)
HRESULT hr;
int i, firstvideo = -1;
+ int streamcount;
BYTE abFormat[1024];
LONG l;
LPBITMAPINFOHEADER lpbi;
AVISTREAMINFO avis;
+
+ streamcount = anim->streamindex;
#endif
anim->avi = MEM_callocN (sizeof(AviMovie),"animavi");
@@ -396,6 +394,10 @@ static int startavi (struct anim *anim) {
AVIStreamInfo(anim->pavi[i], &avis, sizeof(avis));
if ((avis.fccType == streamtypeVIDEO) && (firstvideo == -1)) {
+ if (streamcount > 0) {
+ streamcount--;
+ continue;
+ }
anim->pgf = AVIStreamGetFrameOpen(anim->pavi[i], NULL);
if (anim->pgf) {
firstvideo = i;
@@ -496,14 +498,14 @@ static ImBuf * avi_fetchibuf (struct anim *anim, int position) {
for (y=0; y < anim->y; y++) {
memcpy (&(ibuf->rect)[((anim->y-y)-1)*anim->x], &tmp[y*anim->x],
- anim->x * 4);
+ anim->x * 4);
}
MEM_freeN (tmp);
}
-
+
ibuf->profile = IB_PROFILE_SRGB;
-
+
return ibuf;
}
@@ -517,6 +519,9 @@ static int startffmpeg(struct anim * anim) {
AVCodec *pCodec;
AVFormatContext *pFormatCtx;
AVCodecContext *pCodecCtx;
+ int frs_num;
+ double frs_den;
+ int streamcount;
#ifdef FFMPEG_SWSCALE_COLOR_SPACE_SUPPORT
/* The following for color space determination */
@@ -527,6 +532,8 @@ static int startffmpeg(struct anim * anim) {
if (anim == 0) return(-1);
+ streamcount = anim->streamindex;
+
do_init_ffmpeg();
if(av_open_input_file(&pFormatCtx, anim->name, NULL, 0, NULL)!=0) {
@@ -541,12 +548,17 @@ static int startffmpeg(struct anim * anim) {
av_dump_format(pFormatCtx, 0, anim->name, 0);
- /* Find the first video stream */
- videoStream=-1;
- for(i=0; inb_streams; i++)
- if(pFormatCtx->streams[i]->codec->codec_type
+ /* Find the video stream */
+ videoStream = -1;
+
+ for(i = 0; i < pFormatCtx->nb_streams; i++)
+ if (pFormatCtx->streams[i]->codec->codec_type
== AVMEDIA_TYPE_VIDEO) {
- videoStream=i;
+ if (streamcount > 0) {
+ streamcount--;
+ continue;
+ }
+ videoStream = i;
break;
}
@@ -557,16 +569,16 @@ static int startffmpeg(struct anim * anim) {
pCodecCtx = pFormatCtx->streams[videoStream]->codec;
- /* Find the decoder for the video stream */
- pCodec=avcodec_find_decoder(pCodecCtx->codec_id);
- if(pCodec==NULL) {
+ /* Find the decoder for the video stream */
+ pCodec = avcodec_find_decoder(pCodecCtx->codec_id);
+ if(pCodec == NULL) {
av_close_input_file(pFormatCtx);
return -1;
}
pCodecCtx->workaround_bugs = 1;
- if(avcodec_open(pCodecCtx, pCodec)<0) {
+ if(avcodec_open(pCodecCtx, pCodec) < 0) {
av_close_input_file(pFormatCtx);
return -1;
}
@@ -575,6 +587,19 @@ static int startffmpeg(struct anim * anim) {
* av_q2d(pFormatCtx->streams[videoStream]->r_frame_rate)
/ AV_TIME_BASE);
+ frs_num = pFormatCtx->streams[videoStream]->r_frame_rate.num;
+ frs_den = pFormatCtx->streams[videoStream]->r_frame_rate.den;
+
+ frs_den *= AV_TIME_BASE;
+
+ while (frs_num % 10 == 0 && frs_den >= 2.0 && frs_num > 10) {
+ frs_num /= 10;
+ frs_den /= 10;
+ }
+
+ anim->frs_sec = frs_num;
+ anim->frs_sec_base = frs_den;
+
anim->params = 0;
anim->x = pCodecCtx->width;
@@ -584,6 +609,11 @@ static int startffmpeg(struct anim * anim) {
anim->framesize = anim->x * anim->y * 4;
anim->curposition = -1;
+ anim->last_frame = 0;
+ anim->last_pts = -1;
+ anim->next_pts = -1;
+ anim->next_undecoded_pts = -1;
+ anim->next_packet.stream_index = -1;
anim->pFormatCtx = pFormatCtx;
anim->pCodecCtx = pCodecCtx;
@@ -666,10 +696,19 @@ static int startffmpeg(struct anim * anim) {
return (0);
}
-static void ffmpeg_postprocess(struct anim * anim, ImBuf * ibuf,
- int * filter_y)
+/* postprocess the image in anim->pFrame and do color conversion
+ and deinterlacing stuff.
+
+ Output is anim->last_frame
+*/
+
+static void ffmpeg_postprocess(struct anim * anim)
{
AVFrame * input = anim->pFrame;
+ ImBuf * ibuf = anim->last_frame;
+ int filter_y = 0;
+
+ ibuf->profile = IB_PROFILE_SRGB;
/* This means the data wasnt read properly,
this check stops crashing */
@@ -690,12 +729,16 @@ static void ffmpeg_postprocess(struct anim * anim, ImBuf * ibuf,
anim->pCodecCtx->width,
anim->pCodecCtx->height)
< 0) {
- *filter_y = 1;
+ filter_y = TRUE;
} else {
input = anim->pFrameDeinterlaced;
}
}
+ avpicture_fill((AVPicture*) anim->pFrameRGB,
+ (unsigned char*) ibuf->rect,
+ PIX_FMT_RGBA, anim->x, anim->y);
+
if (ENDIAN_ORDER == B_ENDIAN) {
int * dstStride = anim->pFrameRGB->linesize;
uint8_t** dst = anim->pFrameRGB->data;
@@ -774,150 +817,359 @@ static void ffmpeg_postprocess(struct anim * anim, ImBuf * ibuf,
}
}
}
+
+ if (filter_y) {
+ IMB_filtery(ibuf);
+ }
}
-static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position) {
- ImBuf * ibuf;
- int frameFinished;
- AVPacket packet;
- int64_t pts_to_search = 0;
- int pos_found = 1;
- int filter_y = 0;
- int seek_by_bytes= 0;
- int preseek_count = 0;
+/* decode one video frame and load the next packet into anim->packet,
+ so that we can obtain next_pts and next undecoded pts */
- if (anim == 0) return (0);
+static int ffmpeg_decode_video_frame(struct anim * anim)
+{
+ int frameFinished = 0;
+ int rval = 0;
- ibuf = IMB_allocImBuf(anim->x, anim->y, 32, IB_rect);
+ av_log(anim->pFormatCtx, AV_LOG_DEBUG, " DECODE VIDEO FRAME\n");
- avpicture_fill((AVPicture*) anim->pFrameRGB,
- (unsigned char*) ibuf->rect,
- PIX_FMT_RGBA, anim->x, anim->y);
+ anim->next_undecoded_pts = -1;
- if (position != anim->curposition + 1) {
- if (position > anim->curposition + 1
- && anim->preseek
- && position - (anim->curposition + 1) < anim->preseek) {
- while(av_read_frame(anim->pFormatCtx, &packet)>=0) {
- if (packet.stream_index == anim->videoStream) {
- avcodec_decode_video2(
- anim->pCodecCtx,
- anim->pFrame, &frameFinished,
- &packet);
+ if (anim->next_packet.stream_index == anim->videoStream) {
+ av_log(anim->pFormatCtx, AV_LOG_DEBUG,
+ " DECODE: cached next packet\n");
- if (frameFinished) {
- anim->curposition++;
- }
- }
- av_free_packet(&packet);
- if (position == anim->curposition+1) {
- break;
- }
+ avcodec_decode_video2(anim->pCodecCtx,
+ anim->pFrame, &frameFinished,
+ &anim->next_packet);
+
+ if (frameFinished) {
+ av_log(anim->pFormatCtx,
+ AV_LOG_DEBUG,
+ " FRAME DONE: "
+ "next_pts=%lld pkt_pts=%lld\n",
+ (anim->pFrame->pts == AV_NOPTS_VALUE) ?
+ -1 : anim->pFrame->pts,
+ (anim->pFrame->pkt_pts == AV_NOPTS_VALUE) ?
+ -1 : anim->pFrame->pkt_pts);
+ anim->next_pts =
+ av_get_pts_from_frame(anim->pFormatCtx,
+ anim->pFrame);
+ }
+
+ av_free_packet(&anim->next_packet);
+ anim->next_packet.stream_index = -1;
+ }
+
+ while((rval = av_read_frame(anim->pFormatCtx, &anim->next_packet)) >= 0) {
+ av_log(anim->pFormatCtx,
+ AV_LOG_DEBUG,
+ "%sREAD: strID=%d (VID: %d) dts=%lld pts=%lld "
+ "%s\n",
+ (anim->next_packet.stream_index == anim->videoStream)
+ ? "->" : " ",
+ anim->next_packet.stream_index,
+ anim->videoStream,
+ (anim->next_packet.dts == AV_NOPTS_VALUE) ? -1:
+ anim->next_packet.dts,
+ (anim->next_packet.pts == AV_NOPTS_VALUE) ? -1:
+ anim->next_packet.pts,
+ (anim->next_packet.flags & AV_PKT_FLAG_KEY) ?
+ " KEY" : "");
+ if (anim->next_packet.stream_index == anim->videoStream) {
+ if (frameFinished) {
+ av_log(anim->pFormatCtx,
+ AV_LOG_DEBUG,
+ " FRAME finished, we leave\n");
+ anim->next_undecoded_pts
+ = anim->next_packet.dts;
+ break;
}
+
+ avcodec_decode_video2(
+ anim->pCodecCtx,
+ anim->pFrame, &frameFinished,
+ &anim->next_packet);
+
+ if (frameFinished) {
+ anim->next_pts = av_get_pts_from_frame(
+ anim->pFormatCtx, anim->pFrame);
+
+ av_log(anim->pFormatCtx,
+ AV_LOG_DEBUG,
+ " FRAME DONE: next_pts=%lld "
+ "pkt_pts=%lld, guessed_pts=%lld\n",
+ (anim->pFrame->pts == AV_NOPTS_VALUE) ?
+ -1 : anim->pFrame->pts,
+ (anim->pFrame->pkt_pts
+ == AV_NOPTS_VALUE) ?
+ -1 : anim->pFrame->pkt_pts,
+ anim->next_pts);
+ }
+ }
+ av_free_packet(&anim->next_packet);
+ anim->next_packet.stream_index = -1;
+ }
+
+ if (rval < 0) {
+ av_log(anim->pFormatCtx,
+ AV_LOG_ERROR, " DECODE READ FAILED: av_read_frame() "
+ "returned error: %d\n", rval);
+ }
+ return (rval >= 0);
+}
+
+static void ffmpeg_decode_video_frame_scan(
+ struct anim * anim, int64_t pts_to_search)
+{
+ /* there seem to exist *very* silly GOP lengths out in the wild... */
+ int count = 1000;
+
+ av_log(anim->pFormatCtx,
+ AV_LOG_DEBUG,
+ "SCAN start: considering pts=%lld in search of %lld\n",
+ anim->next_pts, pts_to_search);
+
+ while (count > 0 && anim->next_pts < pts_to_search) {
+ av_log(anim->pFormatCtx,
+ AV_LOG_DEBUG,
+ " WHILE: pts=%lld in search of %lld\n",
+ anim->next_pts, pts_to_search);
+ if (!ffmpeg_decode_video_frame(anim)) {
+ break;
+ }
+ count--;
+ }
+ if (count == 0) {
+ av_log(anim->pFormatCtx,
+ AV_LOG_ERROR,
+ "SCAN failed: completely lost in stream, "
+ "bailing out at PTS=%lld, searching for PTS=%lld\n",
+ anim->next_pts, pts_to_search);
+ }
+ if (anim->next_pts == pts_to_search) {
+ av_log(anim->pFormatCtx,
+ AV_LOG_DEBUG, "SCAN HAPPY: we found our PTS!\n");
+ } else {
+ av_log(anim->pFormatCtx,
+ AV_LOG_ERROR, "SCAN UNHAPPY: PTS not matched!\n");
+ }
+}
+
+static int match_format(const char *name, AVFormatContext * pFormatCtx)
+{
+ const char *p;
+ int len, namelen;
+
+ const char *names = pFormatCtx->iformat->name;
+
+ if (!name || !names)
+ return 0;
+
+ namelen = strlen(name);
+ while ((p = strchr(names, ','))) {
+ len = MAX2(p - names, namelen);
+ if (!BLI_strncasecmp(name, names, len))
+ return 1;
+ names = p+1;
+ }
+ return !BLI_strcasecmp(name, names);
+}
+
+static int ffmpeg_seek_by_byte(AVFormatContext *pFormatCtx)
+{
+ static const char * byte_seek_list [] = { "dv", "mpegts", 0 };
+ const char ** p;
+
+ if (pFormatCtx->iformat->flags & AVFMT_TS_DISCONT) {
+ return TRUE;
+ }
+
+ p = byte_seek_list;
+
+ while (*p) {
+ if (match_format(*p++, pFormatCtx)) {
+ return TRUE;
}
}
-/* disable seek_by_bytes for now, since bitrates are guessed wrong!
- also: MPEG2TS-seeking was fixed in later versions of ffmpeg, so problem
- is somewhat fixed by now (until we add correct timecode management code...)
-*/
-#if 0
- seek_by_bytes = !!(anim->pFormatCtx->iformat->flags & AVFMT_TS_DISCONT);
-#else
- seek_by_bytes = FALSE;
-#endif
+ return FALSE;
+}
- if (position != anim->curposition + 1) {
- double frame_rate =
- av_q2d(anim->pFormatCtx->streams[anim->videoStream]
- ->r_frame_rate);
- double pts_time_base = av_q2d(anim->pFormatCtx->streams[anim->videoStream]->time_base);
+static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position,
+ IMB_Timecode_Type tc) {
+ int64_t pts_to_search = 0;
+ double frame_rate;
+ double pts_time_base;
+ long long st_time;
+ struct anim_index * tc_index = 0;
+ AVStream * v_st;
+ int new_frame_index;
+ int old_frame_index;
+
+ if (anim == 0) return (0);
+
+ av_log(anim->pFormatCtx, AV_LOG_DEBUG, "FETCH: pos=%d\n", position);
+
+ if (tc != IMB_TC_NONE) {
+ tc_index = IMB_anim_open_index(anim, tc);
+ }
+
+ v_st = anim->pFormatCtx->streams[anim->videoStream];
+
+ frame_rate = av_q2d(v_st->r_frame_rate);
+
+ st_time = anim->pFormatCtx->start_time;
+ pts_time_base = av_q2d(v_st->time_base);
+
+ if (tc_index) {
+ new_frame_index = IMB_indexer_get_frame_index(
+ tc_index, position);
+ old_frame_index = IMB_indexer_get_frame_index(
+ tc_index, anim->curposition);
+ pts_to_search = IMB_indexer_get_pts(
+ tc_index, new_frame_index);
+ } else {
+ pts_to_search = (long long)
+ floor(((double) position) / pts_time_base / frame_rate + 0.5);
+
+ if (st_time != AV_NOPTS_VALUE) {
+ pts_to_search += st_time / pts_time_base
+ / AV_TIME_BASE;
+ }
+ }
+
+ av_log(anim->pFormatCtx, AV_LOG_DEBUG,
+ "FETCH: looking for PTS=%lld "
+ "(pts_timebase=%g, frame_rate=%g, st_time=%lld)\n",
+ pts_to_search, pts_time_base, frame_rate, st_time);
+
+ if (anim->last_frame &&
+ anim->last_pts <= pts_to_search && anim->next_pts > pts_to_search){
+ av_log(anim->pFormatCtx, AV_LOG_DEBUG,
+ "FETCH: frame repeat: last: %lld next: %lld\n",
+ anim->last_pts, anim->next_pts);
+ IMB_refImBuf(anim->last_frame);
+ anim->curposition = position;
+ return anim->last_frame;
+ }
+
+ IMB_freeImBuf(anim->last_frame);
+
+ if (anim->next_pts <= pts_to_search &&
+ anim->next_undecoded_pts > pts_to_search) {
+ av_log(anim->pFormatCtx, AV_LOG_DEBUG,
+ "FETCH: no seek necessary: "
+ "next: %lld next undecoded: %lld\n",
+ anim->next_pts, anim->next_undecoded_pts);
+
+ /* we are already done :) */
+
+ } else if (position > anim->curposition + 1
+ && anim->preseek
+ && !tc_index
+ && position - (anim->curposition + 1) < anim->preseek) {
+
+ av_log(anim->pFormatCtx, AV_LOG_DEBUG,
+ "FETCH: within preseek interval (no index)\n");
+
+ ffmpeg_decode_video_frame_scan(anim, pts_to_search);
+ } else if (tc_index &&
+ IMB_indexer_can_scan(tc_index, old_frame_index,
+ new_frame_index)) {
+
+ av_log(anim->pFormatCtx, AV_LOG_DEBUG,
+ "FETCH: within preseek interval "
+ "(index tells us)\n");
+
+ ffmpeg_decode_video_frame_scan(anim, pts_to_search);
+ } else if (position != anim->curposition + 1) {
long long pos;
- long long st_time = anim->pFormatCtx->start_time;
int ret;
- if (seek_by_bytes) {
- pos = position - anim->preseek;
- if (pos < 0) {
- pos = 0;
- }
- preseek_count = position - pos;
+ if (tc_index) {
+ unsigned long long dts;
- pos *= anim->pFormatCtx->bit_rate / frame_rate;
- pos /= 8;
+ pos = IMB_indexer_get_seek_pos(
+ tc_index, new_frame_index);
+ dts = IMB_indexer_get_seek_pos_dts(
+ tc_index, new_frame_index);
+
+ av_log(anim->pFormatCtx, AV_LOG_DEBUG,
+ "TC INDEX seek pos = %lld\n", pos);
+ av_log(anim->pFormatCtx, AV_LOG_DEBUG,
+ "TC INDEX seek dts = %lld\n", dts);
+
+ if (ffmpeg_seek_by_byte(anim->pFormatCtx)) {
+ av_log(anim->pFormatCtx, AV_LOG_DEBUG,
+ "... using BYTE pos\n");
+
+ ret = av_seek_frame(anim->pFormatCtx,
+ -1,
+ pos, AVSEEK_FLAG_BYTE);
+ av_update_cur_dts(anim->pFormatCtx, v_st, dts);
+ } else {
+ av_log(anim->pFormatCtx, AV_LOG_DEBUG,
+ "... using DTS pos\n");
+ ret = av_seek_frame(anim->pFormatCtx,
+ anim->videoStream,
+ dts, AVSEEK_FLAG_BACKWARD);
+ }
} else {
pos = (long long) (position - anim->preseek)
* AV_TIME_BASE / frame_rate;
if (pos < 0) {
pos = 0;
}
-
+
if (st_time != AV_NOPTS_VALUE) {
pos += st_time;
}
+
+ ret = av_seek_frame(anim->pFormatCtx, -1,
+ pos, AVSEEK_FLAG_BACKWARD);
}
- ret = av_seek_frame(anim->pFormatCtx, -1,
- pos,
- AVSEEK_FLAG_BACKWARD | (
- seek_by_bytes
- ? AVSEEK_FLAG_ANY
- | AVSEEK_FLAG_BYTE : 0));
if (ret < 0) {
- fprintf(stderr, "error while seeking: %d\n", ret);
+ av_log(anim->pFormatCtx, AV_LOG_ERROR,
+ "FETCH: "
+ "error while seeking to DTS = %lld "
+ "(frameno = %d, PTS = %lld): errcode = %d\n",
+ pos, position, pts_to_search, ret);
}
- pts_to_search = (long long)
- (((double) position) / pts_time_base / frame_rate);
- if (st_time != AV_NOPTS_VALUE) {
- pts_to_search += st_time / pts_time_base/ AV_TIME_BASE;
- }
-
- pos_found = 0;
avcodec_flush_buffers(anim->pCodecCtx);
- }
- while(av_read_frame(anim->pFormatCtx, &packet)>=0) {
- if(packet.stream_index == anim->videoStream) {
- avcodec_decode_video2(anim->pCodecCtx,
- anim->pFrame, &frameFinished,
- &packet);
+ anim->next_pts = -1;
- if (seek_by_bytes && preseek_count > 0) {
- preseek_count--;
- }
-
- if (frameFinished && !pos_found) {
- if (seek_by_bytes) {
- if (!preseek_count) {
- pos_found = 1;
- anim->curposition = position;
- }
- } else {
- if (packet.dts >= pts_to_search) {
- pos_found = 1;
- anim->curposition = position;
- }
- }
- }
-
- if(frameFinished && pos_found == 1) {
- ffmpeg_postprocess(anim, ibuf, &filter_y);
- av_free_packet(&packet);
- break;
- }
+ if (anim->next_packet.stream_index == anim->videoStream) {
+ av_free_packet(&anim->next_packet);
+ anim->next_packet.stream_index = -1;
}
- av_free_packet(&packet);
+ /* memset(anim->pFrame,...) ?? */
+
+ if (ret >= 0) {
+ ffmpeg_decode_video_frame_scan(anim, pts_to_search);
+ }
+ } else if (position == 0 && anim->curposition == -1) {
+ /* first frame without seeking special case... */
+ ffmpeg_decode_video_frame(anim);
}
- if (filter_y && ibuf) {
- IMB_filtery(ibuf);
- }
+ anim->last_frame = IMB_allocImBuf(anim->x, anim->y, 32, IB_rect);
- ibuf->profile = IB_PROFILE_SRGB;
+ ffmpeg_postprocess(anim);
- return(ibuf);
+ anim->last_pts = anim->next_pts;
+
+ ffmpeg_decode_video_frame(anim);
+
+ anim->curposition = position;
+
+ IMB_refImBuf(anim->last_frame);
+
+ return anim->last_frame;
}
static void free_anim_ffmpeg(struct anim * anim) {
@@ -934,6 +1186,10 @@ static void free_anim_ffmpeg(struct anim * anim) {
}
av_free(anim->pFrameDeinterlaced);
sws_freeContext(anim->img_convert_ctx);
+ IMB_freeImBuf(anim->last_frame);
+ if (anim->next_packet.stream_index != -1) {
+ av_free_packet(&anim->next_packet);
+ }
}
anim->duration = 0;
}
@@ -1063,16 +1319,19 @@ struct ImBuf * IMB_anim_previewframe(struct anim * anim) {
struct ImBuf * ibuf = NULL;
int position = 0;
- ibuf = IMB_anim_absolute(anim, 0);
+ ibuf = IMB_anim_absolute(anim, 0, IMB_TC_NONE, IMB_PROXY_NONE);
if (ibuf) {
IMB_freeImBuf(ibuf);
position = anim->duration / 2;
- ibuf = IMB_anim_absolute(anim, position);
+ ibuf = IMB_anim_absolute(anim, position, IMB_TC_NONE,
+ IMB_PROXY_NONE);
}
return ibuf;
}
-struct ImBuf * IMB_anim_absolute(struct anim * anim, int position) {
+struct ImBuf * IMB_anim_absolute(struct anim * anim, int position,
+ IMB_Timecode_Type tc,
+ IMB_Proxy_Size preview_size) {
struct ImBuf * ibuf = NULL;
char head[256], tail[256];
unsigned short digits;
@@ -1095,6 +1354,18 @@ struct ImBuf * IMB_anim_absolute(struct anim * anim, int position) {
if (position < 0) return(NULL);
if (position >= anim->duration) return(NULL);
+ if (preview_size != IMB_PROXY_NONE) {
+ struct anim * proxy = IMB_anim_open_proxy(anim, preview_size);
+
+ if (proxy) {
+ position = IMB_anim_index_get_frame_index(
+ anim, tc, position);
+ return IMB_anim_absolute(
+ proxy, position,
+ IMB_TC_NONE, IMB_PROXY_NONE);
+ }
+ }
+
switch(anim->curtype) {
case ANIM_SEQUENCE:
pic = an_stringdec(anim->first, head, tail, &digits);
@@ -1127,7 +1398,7 @@ struct ImBuf * IMB_anim_absolute(struct anim * anim, int position) {
#endif
#ifdef WITH_FFMPEG
case ANIM_FFMPEG:
- ibuf = ffmpeg_fetchibuf(anim, position);
+ ibuf = ffmpeg_fetchibuf(anim, position, tc);
if (ibuf)
anim->curposition = position;
filter_y = 0; /* done internally */
@@ -1151,8 +1422,29 @@ struct ImBuf * IMB_anim_absolute(struct anim * anim, int position) {
/***/
-int IMB_anim_get_duration(struct anim *anim) {
- return anim->duration;
+int IMB_anim_get_duration(struct anim *anim, IMB_Timecode_Type tc) {
+ struct anim_index * idx;
+ if (tc == IMB_TC_NONE) {
+ return anim->duration;
+ }
+
+ idx = IMB_anim_open_index(anim, tc);
+ if (!idx) {
+ return anim->duration;
+ }
+
+ return IMB_indexer_get_duration(idx);
+}
+
+int IMB_anim_get_fps(struct anim * anim,
+ short * frs_sec, float * frs_sec_base)
+{
+ if (anim->frs_sec) {
+ *frs_sec = anim->frs_sec;
+ *frs_sec_base = anim->frs_sec_base;
+ return TRUE;
+ }
+ return FALSE;
}
void IMB_anim_set_preseek(struct anim * anim, int preseek)
diff --git a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
index 971658ff482..44e029bd7ce 100644
--- a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
+++ b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
@@ -1426,12 +1426,12 @@ void DirectDrawSurface::printInfo() const
if (header.flags & DDSD_LINEARSIZE) printf("\tDDSD_LINEARSIZE\n");
if (header.flags & DDSD_MIPMAPCOUNT) printf("\tDDSD_MIPMAPCOUNT\n");
- printf("Height: %d\n", header.height);
- printf("Width: %d\n", header.width);
- printf("Depth: %d\n", header.depth);
- if (header.flags & DDSD_PITCH) printf("Pitch: %d\n", header.pitch);
- else if (header.flags & DDSD_LINEARSIZE) printf("Linear size: %d\n", header.pitch);
- printf("Mipmap count: %d\n", header.mipmapcount);
+ printf("Height: %u\n", header.height);
+ printf("Width: %u\n", header.width);
+ printf("Depth: %u\n", header.depth);
+ if (header.flags & DDSD_PITCH) printf("Pitch: %u\n", header.pitch);
+ else if (header.flags & DDSD_LINEARSIZE) printf("Linear size: %u\n", header.pitch);
+ printf("Mipmap count: %u\n", header.mipmapcount);
printf("Pixel Format:\n");
printf("\tFlags: 0x%.8X\n", header.pf.flags);
@@ -1468,7 +1468,7 @@ void DirectDrawSurface::printInfo() const
}
else
{
- printf("\tBit count: %d\n", header.pf.bitcount);
+ printf("\tBit count: %u\n", header.pf.bitcount);
}
printf("\tRed mask: 0x%.8X\n", header.pf.rmask);
@@ -1522,7 +1522,7 @@ void DirectDrawSurface::printInfo() const
if (header.reserved[7] == FOURCC_UVER)
{
- printf("User Version: %d\n", header.reserved[8]);
+ printf("User Version: %u\n", header.reserved[8]);
}
}
diff --git a/source/blender/imbuf/intern/filter.c b/source/blender/imbuf/intern/filter.c
index 3f391b91c0f..2677913caed 100644
--- a/source/blender/imbuf/intern/filter.c
+++ b/source/blender/imbuf/intern/filter.c
@@ -1,4 +1,6 @@
/*
+ *
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -397,10 +399,10 @@ void IMB_filter_extend(struct ImBuf *ibuf, char *mask, int filter)
float acc[4]={0,0,0,0};
k = 0;
- /*if (check_pixel_assigned(srcbuf, srcmask, filter_make_index(x-1, y, width, height), depth, is_float) ||
+ if (check_pixel_assigned(srcbuf, srcmask, filter_make_index(x-1, y, width, height), depth, is_float) ||
check_pixel_assigned(srcbuf, srcmask, filter_make_index(x+1, y, width, height), depth, is_float) ||
check_pixel_assigned(srcbuf, srcmask, filter_make_index(x, y-1, width, height), depth, is_float) ||
- check_pixel_assigned(srcbuf, srcmask, filter_make_index(x, y+1, width, height), depth, is_float))*/ {
+ check_pixel_assigned(srcbuf, srcmask, filter_make_index(x, y+1, width, height), depth, is_float)) {
for(i= -n; i<=n; i++) {
for(j=-n; j<=n; j++) {
if(i != 0 || j != 0) {
diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c
new file mode 100644
index 00000000000..f624694b324
--- /dev/null
+++ b/source/blender/imbuf/intern/indexer.c
@@ -0,0 +1,1135 @@
+/*
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Peter Schlaile 2011
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+*/
+
+#include "IMB_indexer.h"
+#include "IMB_anim.h"
+#include "AVI_avi.h"
+#include "imbuf.h"
+#include "MEM_guardedalloc.h"
+#include "BLI_utildefines.h"
+#include "BLI_blenlib.h"
+#include "BLI_math_base.h"
+#include "BLI_string.h"
+#include "MEM_guardedalloc.h"
+#include "DNA_userdef_types.h"
+#include "BKE_global.h"
+#include
+
+#ifdef WITH_FFMPEG
+
+#include "ffmpeg_compat.h"
+
+#endif //WITH_FFMPEG
+
+
+static char magic[] = "BlenMIdx";
+static char temp_ext [] = "_part";
+
+static int proxy_sizes[] = { IMB_PROXY_25, IMB_PROXY_50, IMB_PROXY_75,
+ IMB_PROXY_100 };
+static float proxy_fac[] = { 0.25, 0.50, 0.75, 1.00 };
+static int tc_types[] = { IMB_TC_RECORD_RUN, IMB_TC_FREE_RUN,
+ IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN };
+
+#define INDEX_FILE_VERSION 1
+
+/* ----------------------------------------------------------------------
+ - special indexers
+ ----------------------------------------------------------------------
+ */
+
+extern void IMB_indexer_dv_new(anim_index_builder * idx);
+
+
+/* ----------------------------------------------------------------------
+ - time code index functions
+ ---------------------------------------------------------------------- */
+
+anim_index_builder * IMB_index_builder_create(const char * name)
+{
+
+ anim_index_builder * rv
+ = MEM_callocN( sizeof(struct anim_index_builder),
+ "index builder");
+
+ fprintf(stderr, "Starting work on index: %s\n", name);
+
+ BLI_strncpy(rv->name, name, sizeof(rv->name));
+ BLI_strncpy(rv->temp_name, name, sizeof(rv->temp_name));
+
+ strcat(rv->temp_name, temp_ext);
+
+ BLI_make_existing_file(rv->temp_name);
+
+ rv->fp = fopen(rv->temp_name, "w");
+
+ if (!rv->fp) {
+ fprintf(stderr, "Couldn't open index target: %s! "
+ "Index build broken!\n", rv->temp_name);
+ MEM_freeN(rv);
+ return NULL;
+ }
+
+ fprintf(rv->fp, "%s%c%.3d", magic, (ENDIAN_ORDER==B_ENDIAN)?'V':'v',
+ INDEX_FILE_VERSION);
+
+ return rv;
+}
+
+void IMB_index_builder_add_entry(anim_index_builder * fp,
+ int frameno,unsigned long long seek_pos,
+ unsigned long long seek_pos_dts,
+ unsigned long long pts)
+{
+ fwrite(&frameno, sizeof(int), 1, fp->fp);
+ fwrite(&seek_pos, sizeof(unsigned long long), 1, fp->fp);
+ fwrite(&seek_pos_dts, sizeof(unsigned long long), 1, fp->fp);
+ fwrite(&pts, sizeof(unsigned long long), 1, fp->fp);
+}
+
+void IMB_index_builder_proc_frame(anim_index_builder * fp,
+ unsigned char * buffer,
+ int data_size,
+ int frameno, unsigned long long seek_pos,
+ unsigned long long seek_pos_dts,
+ unsigned long long pts)
+{
+ if (fp->proc_frame) {
+ anim_index_entry e;
+ e.frameno = frameno;
+ e.seek_pos = seek_pos;
+ e.seek_pos_dts = seek_pos_dts;
+ e.pts = pts;
+
+ fp->proc_frame(fp, buffer, data_size, &e);
+ } else {
+ IMB_index_builder_add_entry(fp, frameno, seek_pos,
+ seek_pos_dts, pts);
+ }
+}
+
+void IMB_index_builder_finish(anim_index_builder * fp, int rollback)
+{
+ if (fp->delete_priv_data) {
+ fp->delete_priv_data(fp);
+ }
+
+ fclose(fp->fp);
+
+ if (rollback) {
+ unlink(fp->temp_name);
+ } else {
+ rename(fp->temp_name, fp->name);
+ }
+
+ MEM_freeN(fp);
+}
+
+struct anim_index * IMB_indexer_open(const char * name)
+{
+ char header[13];
+ struct anim_index * idx;
+ FILE * fp = fopen(name, "rb");
+ int i;
+
+ if (!fp) {
+ return 0;
+ }
+
+ if (fread(header, 12, 1, fp) != 1) {
+ fclose(fp);
+ return 0;
+ }
+
+ header[12] = 0;
+
+ if (memcmp(header, magic, 8) != 0) {
+ fclose(fp);
+ return 0;
+ }
+
+ if (atoi(header+9) != INDEX_FILE_VERSION) {
+ fclose(fp);
+ return 0;
+ }
+
+ idx = MEM_callocN( sizeof(struct anim_index), "anim_index");
+
+ BLI_strncpy(idx->name, name, sizeof(idx->name));
+
+ fseek(fp, 0, SEEK_END);
+
+ idx->num_entries = (ftell(fp) - 12)
+ / (sizeof(int) // framepos
+ + sizeof(unsigned long long) // seek_pos
+ + sizeof(unsigned long long) // seek_pos_dts
+ + sizeof(unsigned long long) // pts
+ );
+
+ fseek(fp, 12, SEEK_SET);
+
+ idx->entries = MEM_callocN( sizeof(struct anim_index_entry)
+ * idx->num_entries, "anim_index_entries");
+
+ for (i = 0; i < idx->num_entries; i++) {
+ fread(&idx->entries[i].frameno,
+ sizeof(int), 1, fp);
+ fread(&idx->entries[i].seek_pos,
+ sizeof(unsigned long long), 1, fp);
+ fread(&idx->entries[i].seek_pos_dts,
+ sizeof(unsigned long long), 1, fp);
+ fread(&idx->entries[i].pts,
+ sizeof(unsigned long long), 1, fp);
+ }
+
+ if (((ENDIAN_ORDER == B_ENDIAN) != (header[8] == 'V'))) {
+ for (i = 0; i < idx->num_entries; i++) {
+ SWITCH_INT(idx->entries[i].frameno);
+ SWITCH_INT64(idx->entries[i].seek_pos);
+ SWITCH_INT64(idx->entries[i].seek_pos_dts);
+ SWITCH_INT64(idx->entries[i].pts);
+ }
+ }
+
+ fclose(fp);
+
+ return idx;
+}
+
+unsigned long long IMB_indexer_get_seek_pos(
+ struct anim_index * idx, int frame_index)
+{
+ if (frame_index < 0) {
+ frame_index = 0;
+ }
+ if (frame_index >= idx->num_entries) {
+ frame_index = idx->num_entries - 1;
+ }
+ return idx->entries[frame_index].seek_pos;
+}
+
+unsigned long long IMB_indexer_get_seek_pos_dts(
+ struct anim_index * idx, int frame_index)
+{
+ if (frame_index < 0) {
+ frame_index = 0;
+ }
+ if (frame_index >= idx->num_entries) {
+ frame_index = idx->num_entries - 1;
+ }
+ return idx->entries[frame_index].seek_pos_dts;
+}
+
+int IMB_indexer_get_frame_index(struct anim_index * idx, int frameno)
+{
+ int len = idx->num_entries;
+ int half;
+ int middle;
+ int first = 0;
+
+ /* bsearch (lower bound) the right index */
+
+ while (len > 0) {
+ half = len >> 1;
+ middle = first;
+
+ middle += half;
+
+ if (idx->entries[middle].frameno < frameno) {
+ first = middle;
+ ++first;
+ len = len - half - 1;
+ } else {
+ len = half;
+ }
+ }
+
+ if (first == idx->num_entries) {
+ return idx->num_entries - 1;
+ } else {
+ return first;
+ }
+}
+
+unsigned long long IMB_indexer_get_pts(struct anim_index * idx,
+ int frame_index)
+{
+ if (frame_index < 0) {
+ frame_index = 0;
+ }
+ if (frame_index >= idx->num_entries) {
+ frame_index = idx->num_entries - 1;
+ }
+ return idx->entries[frame_index].pts;
+}
+
+int IMB_indexer_get_duration(struct anim_index * idx)
+{
+ if (idx->num_entries == 0) {
+ return 0;
+ }
+ return idx->entries[idx->num_entries-1].frameno + 1;
+}
+
+int IMB_indexer_can_scan(struct anim_index * idx,
+ int old_frame_index, int new_frame_index)
+{
+ /* makes only sense, if it is the same I-Frame and we are not
+ trying to run backwards in time... */
+ return (IMB_indexer_get_seek_pos(idx, old_frame_index)
+ == IMB_indexer_get_seek_pos(idx, new_frame_index) &&
+ old_frame_index < new_frame_index);
+}
+
+void IMB_indexer_close(struct anim_index * idx)
+{
+ MEM_freeN(idx->entries);
+ MEM_freeN(idx);
+}
+
+int IMB_proxy_size_to_array_index(IMB_Proxy_Size pr_size)
+{
+ switch (pr_size) {
+ case IMB_PROXY_NONE: /* if we got here, something is broken anyways,
+ so sane defaults... */
+ return 0;
+ case IMB_PROXY_25:
+ return 0;
+ case IMB_PROXY_50:
+ return 1;
+ case IMB_PROXY_75:
+ return 2;
+ case IMB_PROXY_100:
+ return 3;
+ default:
+ return 0;
+ };
+ return 0;
+}
+
+int IMB_timecode_to_array_index(IMB_Timecode_Type tc)
+{
+ switch (tc) {
+ case IMB_TC_NONE: /* if we got here, something is broken anyways,
+ so sane defaults... */
+ return 0;
+ case IMB_TC_RECORD_RUN:
+ return 0;
+ case IMB_TC_FREE_RUN:
+ return 1;
+ case IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN:
+ return 2;
+ default:
+ return 0;
+ };
+ return 0;
+}
+
+
+/* ----------------------------------------------------------------------
+ - rebuild helper functions
+ ---------------------------------------------------------------------- */
+
+static void get_index_dir(struct anim * anim, char * index_dir)
+{
+ if (!anim->index_dir[0]) {
+ char fname[FILE_MAXFILE];
+ BLI_strncpy(index_dir, anim->name, FILE_MAXDIR);
+ BLI_splitdirstring(index_dir, fname);
+ BLI_join_dirfile(index_dir, FILE_MAXDIR, index_dir, "BL_proxy");
+ BLI_join_dirfile(index_dir, FILE_MAXDIR, index_dir, fname);
+ } else {
+ BLI_strncpy(index_dir, anim->index_dir, FILE_MAXDIR);
+ }
+}
+
+static void get_proxy_filename(struct anim * anim, IMB_Proxy_Size preview_size,
+ char * fname, int temp)
+{
+ char index_dir[FILE_MAXDIR];
+ int i = IMB_proxy_size_to_array_index(preview_size);
+
+ char proxy_name[256];
+ char proxy_temp_name[256];
+ char stream_suffix[20];
+
+ stream_suffix[0] = 0;
+
+ if (anim->streamindex > 0) {
+ BLI_snprintf(stream_suffix, 20, "_st%d", anim->streamindex);
+ }
+
+ BLI_snprintf(proxy_name, 256, "proxy_%d%s.avi",
+ (int) (proxy_fac[i] * 100), stream_suffix);
+ BLI_snprintf(proxy_temp_name, 256, "proxy_%d%s_part.avi",
+ (int) (proxy_fac[i] * 100), stream_suffix);
+
+ get_index_dir(anim, index_dir);
+
+ BLI_join_dirfile(fname, FILE_MAXFILE + FILE_MAXDIR, index_dir,
+ temp ? proxy_temp_name : proxy_name);
+}
+
+static void get_tc_filename(struct anim * anim, IMB_Timecode_Type tc,
+ char * fname)
+{
+ char index_dir[FILE_MAXDIR];
+ int i = IMB_timecode_to_array_index(tc);
+ char * index_names[] = {
+ "record_run%s.blen_tc", "free_run%s.blen_tc",
+ "interp_free_run%s.blen_tc" };
+
+ char stream_suffix[20];
+ char index_name[256];
+
+ stream_suffix[0] = 0;
+
+ if (anim->streamindex > 0) {
+ BLI_snprintf(stream_suffix, 20, "_st%d", anim->streamindex);
+ }
+
+ BLI_snprintf(index_name, 256, index_names[i], stream_suffix);
+
+ get_index_dir(anim, index_dir);
+
+ BLI_join_dirfile(fname, FILE_MAXFILE + FILE_MAXDIR,
+ index_dir, index_name);
+}
+
+/* ----------------------------------------------------------------------
+ - ffmpeg rebuilder
+ ---------------------------------------------------------------------- */
+
+#ifdef WITH_FFMPEG
+
+struct proxy_output_ctx {
+ AVFormatContext* of;
+ AVStream* st;
+ AVCodecContext* c;
+ AVCodec* codec;
+ struct SwsContext * sws_ctx;
+ AVFrame* frame;
+ uint8_t* video_buffer;
+ int video_buffersize;
+ int cfra;
+ int proxy_size;
+ int orig_height;
+ struct anim * anim;
+};
+
+// work around stupid swscaler 16 bytes alignment bug...
+
+static int round_up(int x, int mod)
+{
+ return x + ((mod - (x % mod)) % mod);
+}
+
+static struct proxy_output_ctx * alloc_proxy_output_ffmpeg(
+ struct anim * anim,
+ AVStream * st, int proxy_size, int width, int height,
+ int quality)
+{
+ struct proxy_output_ctx * rv = MEM_callocN(
+ sizeof(struct proxy_output_ctx), "alloc_proxy_output");
+
+ char fname[FILE_MAXDIR+FILE_MAXFILE];
+
+ // JPEG requires this
+ width = round_up(width, 8);
+ height = round_up(height, 8);
+
+ rv->proxy_size = proxy_size;
+ rv->anim = anim;
+
+ get_proxy_filename(rv->anim, rv->proxy_size, fname, TRUE);
+ BLI_make_existing_file(fname);
+
+ rv->of = avformat_alloc_context();
+ rv->of->oformat = av_guess_format("avi", NULL, NULL);
+
+ BLI_snprintf(rv->of->filename, sizeof(rv->of->filename), "%s", fname);
+
+ fprintf(stderr, "Starting work on proxy: %s\n", rv->of->filename);
+
+ rv->st = av_new_stream(rv->of, 0);
+ rv->c = rv->st->codec;
+ rv->c->codec_type = AVMEDIA_TYPE_VIDEO;
+ rv->c->codec_id = CODEC_ID_MJPEG;
+ rv->c->width = width;
+ rv->c->height = height;
+
+ rv->of->oformat->video_codec = rv->c->codec_id;
+ rv->codec = avcodec_find_encoder(rv->c->codec_id);
+
+ if (!rv->codec) {
+ fprintf(stderr, "No ffmpeg MJPEG encoder available? "
+ "Proxy not built!\n");
+ av_free(rv->of);
+ return NULL;
+ }
+
+ if (rv->codec->pix_fmts) {
+ rv->c->pix_fmt = rv->codec->pix_fmts[0];
+ } else {
+ rv->c->pix_fmt = PIX_FMT_YUVJ420P;
+ }
+
+ rv->c->sample_aspect_ratio
+ = rv->st->sample_aspect_ratio
+ = st->codec->sample_aspect_ratio;
+
+ rv->c->time_base.den = 25;
+ rv->c->time_base.num = 1;
+ rv->st->time_base = rv->c->time_base;
+
+ if (rv->of->flags & AVFMT_GLOBALHEADER) {
+ rv->c->flags |= CODEC_FLAG_GLOBAL_HEADER;
+ }
+
+ if (av_set_parameters(rv->of, NULL) < 0) {
+ fprintf(stderr, "Couldn't set output parameters? "
+ "Proxy not built!\n");
+ av_free(rv->of);
+ return 0;
+ }
+
+ if (avio_open(&rv->of->pb, fname, AVIO_FLAG_WRITE) < 0) {
+ fprintf(stderr, "Couldn't open outputfile! "
+ "Proxy not built!\n");
+ av_free(rv->of);
+ return 0;
+ }
+
+ avcodec_open(rv->c, rv->codec);
+
+ rv->video_buffersize = 2000000;
+ rv->video_buffer = (uint8_t*)MEM_mallocN(
+ rv->video_buffersize, "FFMPEG video buffer");
+
+ rv->orig_height = st->codec->height;
+
+ if (st->codec->width != width || st->codec->height != height
+ || st->codec->pix_fmt != rv->c->pix_fmt) {
+ rv->frame = avcodec_alloc_frame();
+ avpicture_fill((AVPicture*) rv->frame,
+ MEM_mallocN(avpicture_get_size(
+ rv->c->pix_fmt,
+ round_up(width, 16), height),
+ "alloc proxy output frame"),
+ rv->c->pix_fmt, round_up(width, 16), height);
+
+ rv->sws_ctx = sws_getContext(
+ st->codec->width,
+ st->codec->height,
+ st->codec->pix_fmt,
+ width, height,
+ rv->c->pix_fmt,
+ SWS_FAST_BILINEAR | SWS_PRINT_INFO,
+ NULL, NULL, NULL);
+ }
+
+ av_write_header(rv->of);
+
+ return rv;
+}
+
+static int add_to_proxy_output_ffmpeg(
+ struct proxy_output_ctx * ctx, AVFrame * frame)
+{
+ int outsize = 0;
+
+ if (!ctx) {
+ return 0;
+ }
+
+ if (ctx->sws_ctx && frame &&
+ (frame->data[0] || frame->data[1] ||
+ frame->data[2] || frame->data[3])) {
+ sws_scale(ctx->sws_ctx, (const uint8_t * const*) frame->data,
+ frame->linesize, 0, ctx->orig_height,
+ ctx->frame->data, ctx->frame->linesize);
+ }
+
+ ctx->frame->pts = ctx->cfra++;
+
+ outsize = avcodec_encode_video(
+ ctx->c, ctx->video_buffer, ctx->video_buffersize,
+ ctx->sws_ctx ? (frame ? ctx->frame : 0) : frame);
+
+ if (outsize < 0) {
+ fprintf(stderr, "Error encoding proxy frame %d for '%s'\n",
+ ctx->cfra - 1, ctx->of->filename);
+ return 0;
+ }
+
+ if (outsize != 0) {
+ AVPacket packet;
+ av_init_packet(&packet);
+
+ if (ctx->c->coded_frame->pts != AV_NOPTS_VALUE) {
+ packet.pts = av_rescale_q(ctx->c->coded_frame->pts,
+ ctx->c->time_base,
+ ctx->st->time_base);
+ }
+ if (ctx->c->coded_frame->key_frame)
+ packet.flags |= AV_PKT_FLAG_KEY;
+
+ packet.stream_index = ctx->st->index;
+ packet.data = ctx->video_buffer;
+ packet.size = outsize;
+
+ if (av_interleaved_write_frame(ctx->of, &packet) != 0) {
+ fprintf(stderr, "Error writing proxy frame %d "
+ "into '%s'\n", ctx->cfra - 1,
+ ctx->of->filename);
+ return 0;
+ }
+
+ return 1;
+ } else {
+ return 0;
+ }
+}
+
+static void free_proxy_output_ffmpeg(struct proxy_output_ctx * ctx,
+ int rollback)
+{
+ int i;
+ char fname[FILE_MAXDIR+FILE_MAXFILE];
+ char fname_tmp[FILE_MAXDIR+FILE_MAXFILE];
+
+ if (!ctx) {
+ return;
+ }
+
+ if (!rollback) {
+ while (add_to_proxy_output_ffmpeg(ctx, NULL)) ;
+ }
+
+ avcodec_flush_buffers(ctx->c);
+
+ av_write_trailer(ctx->of);
+
+ avcodec_close(ctx->c);
+
+ for (i = 0; i < ctx->of->nb_streams; i++) {
+ if (&ctx->of->streams[i]) {
+ av_freep(&ctx->of->streams[i]);
+ }
+ }
+
+ if (ctx->of->oformat) {
+ if (!(ctx->of->oformat->flags & AVFMT_NOFILE)) {
+ avio_close(ctx->of->pb);
+ }
+ }
+ av_free(ctx->of);
+
+ MEM_freeN(ctx->video_buffer);
+
+ if (ctx->sws_ctx) {
+ sws_freeContext(ctx->sws_ctx);
+
+ MEM_freeN(ctx->frame->data[0]);
+ av_free(ctx->frame);
+ }
+
+ get_proxy_filename(ctx->anim, ctx->proxy_size,
+ fname_tmp, TRUE);
+
+ if (rollback) {
+ unlink(fname_tmp);
+ } else {
+ get_proxy_filename(ctx->anim, ctx->proxy_size,
+ fname, FALSE);
+ rename(fname_tmp, fname);
+ }
+
+ MEM_freeN(ctx);
+}
+
+
+static int index_rebuild_ffmpeg(struct anim * anim,
+ IMB_Timecode_Type tcs_in_use,
+ IMB_Proxy_Size proxy_sizes_in_use,
+ int quality,
+ short *stop, short *do_update,
+ float *progress)
+{
+ int i, videoStream;
+ unsigned long long seek_pos = 0;
+ unsigned long long last_seek_pos = 0;
+ unsigned long long seek_pos_dts = 0;
+ unsigned long long seek_pos_pts = 0;
+ unsigned long long last_seek_pos_dts = 0;
+ unsigned long long start_pts = 0;
+ double frame_rate;
+ double pts_time_base;
+ int frameno = 0;
+ int start_pts_set = FALSE;
+
+ AVFormatContext *iFormatCtx;
+ AVCodecContext *iCodecCtx;
+ AVCodec *iCodec;
+ AVStream *iStream;
+ AVFrame* in_frame = 0;
+ AVPacket next_packet;
+ int streamcount;
+
+ struct proxy_output_ctx * proxy_ctx[IMB_PROXY_MAX_SLOT];
+ anim_index_builder * indexer [IMB_TC_MAX_SLOT];
+
+ int num_proxy_sizes = IMB_PROXY_MAX_SLOT;
+ int num_indexers = IMB_TC_MAX_SLOT;
+ uint64_t stream_size;
+
+ memset(proxy_ctx, 0, sizeof(proxy_ctx));
+ memset(indexer, 0, sizeof(indexer));
+
+ if(av_open_input_file(&iFormatCtx, anim->name, NULL, 0, NULL) != 0) {
+ return 0;
+ }
+
+ if (av_find_stream_info(iFormatCtx) < 0) {
+ av_close_input_file(iFormatCtx);
+ return 0;
+ }
+
+ streamcount = anim->streamindex;
+
+ /* Find the video stream */
+ videoStream = -1;
+ for (i = 0; i < iFormatCtx->nb_streams; i++)
+ if(iFormatCtx->streams[i]->codec->codec_type
+ == AVMEDIA_TYPE_VIDEO) {
+ if (streamcount > 0) {
+ streamcount--;
+ continue;
+ }
+ videoStream = i;
+ break;
+ }
+
+ if (videoStream == -1) {
+ av_close_input_file(iFormatCtx);
+ return 0;
+ }
+
+ iStream = iFormatCtx->streams[videoStream];
+ iCodecCtx = iStream->codec;
+
+ iCodec = avcodec_find_decoder(iCodecCtx->codec_id);
+
+ if (iCodec == NULL) {
+ av_close_input_file(iFormatCtx);
+ return 0;
+ }
+
+ iCodecCtx->workaround_bugs = 1;
+
+ if (avcodec_open(iCodecCtx, iCodec) < 0) {
+ av_close_input_file(iFormatCtx);
+ return 0;
+ }
+
+ in_frame = avcodec_alloc_frame();
+
+ stream_size = avio_size(iFormatCtx->pb);
+
+ for (i = 0; i < num_proxy_sizes; i++) {
+ if (proxy_sizes_in_use & proxy_sizes[i]) {
+ proxy_ctx[i] = alloc_proxy_output_ffmpeg(
+ anim, iStream, proxy_sizes[i],
+ iCodecCtx->width * proxy_fac[i],
+ iCodecCtx->height * proxy_fac[i],
+ quality);
+ if (!proxy_ctx[i]) {
+ proxy_sizes_in_use &= ~proxy_sizes[i];
+ }
+ }
+ }
+
+ for (i = 0; i < num_indexers; i++) {
+ if (tcs_in_use & tc_types[i]) {
+ char fname[FILE_MAXDIR+FILE_MAXFILE];
+
+ get_tc_filename(anim, tc_types[i], fname);
+
+ indexer[i] = IMB_index_builder_create(fname);
+ if (!indexer[i]) {
+ tcs_in_use &= ~tc_types[i];
+ }
+ }
+ }
+
+ frame_rate = av_q2d(iStream->r_frame_rate);
+ pts_time_base = av_q2d(iStream->time_base);
+
+ while(av_read_frame(iFormatCtx, &next_packet) >= 0) {
+ int frame_finished = 0;
+ float next_progress = ((int)floor(((double) next_packet.pos) * 100 /
+ ((double) stream_size)+0.5)) / 100;
+
+ if (*progress != next_progress) {
+ *progress = next_progress;
+ *do_update = 1;
+ }
+
+ if (*stop) {
+ av_free_packet(&next_packet);
+ break;
+ }
+
+ if (next_packet.stream_index == videoStream) {
+ if (next_packet.flags & AV_PKT_FLAG_KEY) {
+ last_seek_pos = seek_pos;
+ last_seek_pos_dts = seek_pos_dts;
+ seek_pos = next_packet.pos;
+ seek_pos_dts = next_packet.dts;
+ seek_pos_pts = next_packet.pts;
+ }
+
+ avcodec_decode_video2(
+ iCodecCtx, in_frame, &frame_finished,
+ &next_packet);
+ }
+
+ if (frame_finished) {
+ unsigned long long s_pos = seek_pos;
+ unsigned long long s_dts = seek_pos_dts;
+ unsigned long long pts
+ = av_get_pts_from_frame(iFormatCtx, in_frame);
+
+ for (i = 0; i < num_proxy_sizes; i++) {
+ add_to_proxy_output_ffmpeg(
+ proxy_ctx[i], in_frame);
+ }
+
+ if (!start_pts_set) {
+ start_pts = pts;
+ start_pts_set = TRUE;
+ }
+
+ frameno = (pts - start_pts)
+ * pts_time_base * frame_rate;
+
+ /* decoding starts *always* on I-Frames,
+ so: P-Frames won't work, even if all the
+ information is in place, when we seek
+ to the I-Frame presented *after* the P-Frame,
+ but located before the P-Frame within
+ the stream */
+
+ if (pts < seek_pos_pts) {
+ s_pos = last_seek_pos;
+ s_dts = last_seek_pos_dts;
+ }
+
+ for (i = 0; i < num_indexers; i++) {
+ if (tcs_in_use & tc_types[i]) {
+ IMB_index_builder_proc_frame(
+ indexer[i],
+ next_packet.data,
+ next_packet.size,
+ frameno, s_pos, s_dts, pts);
+ }
+ }
+ }
+ av_free_packet(&next_packet);
+ }
+
+ for (i = 0; i < num_indexers; i++) {
+ if (tcs_in_use & tc_types[i]) {
+ IMB_index_builder_finish(indexer[i], *stop);
+ }
+ }
+
+ for (i = 0; i < num_proxy_sizes; i++) {
+ if (proxy_sizes_in_use & proxy_sizes[i]) {
+ free_proxy_output_ffmpeg(proxy_ctx[i], *stop);
+ }
+ }
+
+ av_free(in_frame);
+
+ return 1;
+}
+
+#endif
+
+/* ----------------------------------------------------------------------
+ - internal AVI (fallback) rebuilder
+ ---------------------------------------------------------------------- */
+
+static AviMovie * alloc_proxy_output_avi(
+ struct anim * anim, char * filename, int width, int height,
+ int quality)
+{
+ int x, y;
+ AviFormat format;
+ double framerate;
+ AviMovie * avi;
+ short frs_sec = 25; /* it doesn't really matter for proxies,
+ but sane defaults help anyways...*/
+ float frs_sec_base = 1.0;
+
+ IMB_anim_get_fps(anim, &frs_sec, &frs_sec_base);
+
+ x = width;
+ y = height;
+
+ framerate= (double) frs_sec / (double) frs_sec_base;
+
+ avi = MEM_mallocN (sizeof(AviMovie), "avimovie");
+
+ format = AVI_FORMAT_MJPEG;
+
+ if (AVI_open_compress (filename, avi, 1, format) != AVI_ERROR_NONE) {
+ MEM_freeN(avi);
+ return 0;
+ }
+
+ AVI_set_compress_option (avi, AVI_OPTION_TYPE_MAIN, 0, AVI_OPTION_WIDTH, &x);
+ AVI_set_compress_option (avi, AVI_OPTION_TYPE_MAIN, 0, AVI_OPTION_HEIGHT, &y);
+ AVI_set_compress_option (avi, AVI_OPTION_TYPE_MAIN, 0, AVI_OPTION_QUALITY, &quality);
+ AVI_set_compress_option (avi, AVI_OPTION_TYPE_MAIN, 0, AVI_OPTION_FRAMERATE, &framerate);
+
+ avi->interlace= 0;
+ avi->odd_fields= 0;
+
+ return avi;
+}
+
+static void index_rebuild_fallback(struct anim * anim,
+ IMB_Timecode_Type tcs_in_use,
+ IMB_Proxy_Size proxy_sizes_in_use,
+ int quality,
+ short *stop, short *do_update,
+ float *progress)
+{
+ int cnt = IMB_anim_get_duration(anim, IMB_TC_NONE);
+ int i, pos;
+ AviMovie * proxy_ctx[IMB_PROXY_MAX_SLOT];
+ char fname[FILE_MAXDIR+FILE_MAXFILE];
+ char fname_tmp[FILE_MAXDIR+FILE_MAXFILE];
+
+ memset(proxy_ctx, 0, sizeof(proxy_ctx));
+
+ /* since timecode indices only work with ffmpeg right now,
+ don't know a sensible fallback here...
+
+ so no proxies, no game to play...
+ */
+ if (proxy_sizes_in_use == IMB_PROXY_NONE) {
+ return;
+ }
+
+ for (i = 0; i < IMB_PROXY_MAX_SLOT; i++) {
+ if (proxy_sizes_in_use & proxy_sizes[i]) {
+ char fname[FILE_MAXDIR+FILE_MAXFILE];
+
+ get_proxy_filename(anim, proxy_sizes[i], fname, TRUE);
+ BLI_make_existing_file(fname);
+
+ proxy_ctx[i] = alloc_proxy_output_avi(
+ anim, fname,
+ anim->x * proxy_fac[i],
+ anim->y * proxy_fac[i],
+ quality);
+ }
+ }
+
+ for (pos = 0; pos < cnt; pos++) {
+ struct ImBuf * ibuf = IMB_anim_absolute(
+ anim, pos, IMB_TC_NONE, IMB_PROXY_NONE);
+ int next_progress = (int) ((double) pos / (double) cnt);
+
+ if (*progress != next_progress) {
+ *progress = next_progress;
+ *do_update = 1;
+ }
+
+ if (*stop) {
+ break;
+ }
+
+ IMB_flipy(ibuf);
+
+ for (i = 0; i < IMB_PROXY_MAX_SLOT; i++) {
+ if (proxy_sizes_in_use & proxy_sizes[i]) {
+ int x = anim->x * proxy_fac[i];
+ int y = anim->y * proxy_fac[i];
+
+ struct ImBuf * s_ibuf = IMB_scalefastImBuf(
+ ibuf, x, y);
+
+ IMB_convert_rgba_to_abgr(s_ibuf);
+
+ AVI_write_frame (proxy_ctx[i], pos,
+ AVI_FORMAT_RGB32,
+ s_ibuf->rect, x * y * 4);
+
+ /* note that libavi free's the buffer... */
+ s_ibuf->rect = 0;
+
+ IMB_freeImBuf(s_ibuf);
+ }
+ }
+ }
+
+ for (i = 0; i < IMB_PROXY_MAX_SLOT; i++) {
+ if (proxy_sizes_in_use & proxy_sizes[i]) {
+ AVI_close_compress (proxy_ctx[i]);
+ MEM_freeN (proxy_ctx[i]);
+
+ get_proxy_filename(anim, proxy_sizes[i],
+ fname_tmp, TRUE);
+ get_proxy_filename(anim, proxy_sizes[i],
+ fname, FALSE);
+
+ if (*stop) {
+ unlink(fname_tmp);
+ } else {
+ rename(fname_tmp, fname);
+ }
+ }
+ }
+}
+
+/* ----------------------------------------------------------------------
+ - public API
+ ---------------------------------------------------------------------- */
+
+void IMB_anim_index_rebuild(struct anim * anim, IMB_Timecode_Type tcs_in_use,
+ IMB_Proxy_Size proxy_sizes_in_use,
+ int quality,
+ short *stop, short *do_update, float *progress)
+{
+ switch (anim->curtype) {
+#ifdef WITH_FFMPEG
+ case ANIM_FFMPEG:
+ index_rebuild_ffmpeg(anim, tcs_in_use, proxy_sizes_in_use,
+ quality, stop, do_update, progress);
+ break;
+#endif
+ default:
+ index_rebuild_fallback(anim, tcs_in_use, proxy_sizes_in_use,
+ quality, stop, do_update, progress);
+ break;
+ }
+}
+
+void IMB_free_indices(struct anim * anim)
+{
+ int i;
+
+ for (i = 0; i < IMB_PROXY_MAX_SLOT; i++) {
+ if (anim->proxy_anim[i]) {
+ IMB_close_anim(anim->proxy_anim[i]);
+ anim->proxy_anim[i] = 0;
+ }
+ }
+
+ for (i = 0; i < IMB_TC_MAX_SLOT; i++) {
+ if (anim->curr_idx[i]) {
+ IMB_indexer_close(anim->curr_idx[i]);
+ anim->curr_idx[i] = 0;
+ }
+ }
+
+
+ anim->proxies_tried = 0;
+ anim->indices_tried = 0;
+}
+
+void IMB_anim_set_index_dir(struct anim * anim, const char * dir)
+{
+ if (strcmp(anim->index_dir, dir) == 0) {
+ return;
+ }
+ BLI_strncpy(anim->index_dir, dir, sizeof(anim->index_dir));
+
+ IMB_free_indices(anim);
+}
+
+struct anim * IMB_anim_open_proxy(
+ struct anim * anim, IMB_Proxy_Size preview_size)
+{
+ char fname[FILE_MAXDIR+FILE_MAXFILE];
+ int i = IMB_proxy_size_to_array_index(preview_size);
+
+ if (anim->proxy_anim[i]) {
+ return anim->proxy_anim[i];
+ }
+
+ if (anim->proxies_tried & preview_size) {
+ return NULL;
+ }
+
+ get_proxy_filename(anim, preview_size, fname, FALSE);
+
+ anim->proxy_anim[i] = IMB_open_anim(fname, 0, 0);
+
+ anim->proxies_tried |= preview_size;
+
+ return anim->proxy_anim[i];
+}
+
+struct anim_index * IMB_anim_open_index(
+ struct anim * anim, IMB_Timecode_Type tc)
+{
+ char fname[FILE_MAXDIR+FILE_MAXFILE];
+ int i = IMB_timecode_to_array_index(tc);
+
+ if (anim->curr_idx[i]) {
+ return anim->curr_idx[i];
+ }
+
+ if (anim->indices_tried & tc) {
+ return 0;
+ }
+
+ get_tc_filename(anim, tc, fname);
+
+ anim->curr_idx[i] = IMB_indexer_open(fname);
+
+ anim->indices_tried |= tc;
+
+ return anim->curr_idx[i];
+}
+
+int IMB_anim_index_get_frame_index(struct anim * anim, IMB_Timecode_Type tc,
+ int position)
+{
+ struct anim_index * idx = IMB_anim_open_index(anim, tc);
+
+ if (!idx) {
+ return position;
+ }
+
+ return IMB_indexer_get_frame_index(idx, position);
+}
+
diff --git a/source/blender/imbuf/intern/indexer_dv.c b/source/blender/imbuf/intern/indexer_dv.c
new file mode 100644
index 00000000000..0961af10f69
--- /dev/null
+++ b/source/blender/imbuf/intern/indexer_dv.c
@@ -0,0 +1,391 @@
+/*
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Peter Schlaile 2011
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+*/
+
+#include "IMB_indexer.h"
+#include "MEM_guardedalloc.h"
+#include
+
+typedef struct indexer_dv_bitstream {
+ unsigned char* buffer;
+ int bit_pos;
+} indexer_dv_bitstream;
+
+static indexer_dv_bitstream bitstream_new(unsigned char* buffer_)
+{
+ indexer_dv_bitstream rv;
+
+ rv.buffer = buffer_;
+ rv.bit_pos = 0;
+
+ return rv;
+}
+
+static unsigned long bitstream_get_bits(indexer_dv_bitstream * This, int num)
+{
+ int byte_pos = This->bit_pos >> 3;
+ unsigned long i =
+ This->buffer[byte_pos] | (This->buffer[byte_pos + 1] << 8) |
+ (This->buffer[byte_pos + 2] << 16) |
+ (This->buffer[byte_pos + 3] << 24);
+ int rval = (i >> (This->bit_pos & 0x7)) & ((1 << num) - 1);
+ This->bit_pos += num;
+ return rval;
+}
+
+static int parse_num(indexer_dv_bitstream * b, int numbits) {
+ return bitstream_get_bits(b, numbits);
+}
+
+static int parse_bcd(indexer_dv_bitstream * b, int n)
+{
+ char s[256];
+ char * p = s + (n+3)/4;
+
+ *p-- = 0;
+
+ while (n > 4) {
+ char a;
+ int v = bitstream_get_bits(b, 4);
+
+ n -= 4;
+ a = '0' + v;
+
+ if (a > '9') {
+ bitstream_get_bits(b, n);
+ return -1;
+ }
+
+ *p-- = a;
+ }
+ if (n) {
+ char a;
+ int v = bitstream_get_bits(b, n);
+ a = '0' + v;
+ if (a > '9') {
+ return -1;
+ }
+ *p-- = a;
+ }
+
+ return atol(s);
+}
+
+typedef struct indexer_dv_context
+{
+ int rec_curr_frame;
+ int rec_curr_second;
+ int rec_curr_minute;
+ int rec_curr_hour;
+
+ int rec_curr_day;
+ int rec_curr_month;
+ int rec_curr_year;
+
+ char got_record_date;
+ char got_record_time;
+
+ time_t ref_time_read;
+ time_t ref_time_read_new;
+ int curr_frame;
+
+ time_t gap_start;
+ int gap_frame;
+
+ int frameno_offset;
+
+ anim_index_entry backbuffer[31];
+ int fsize;
+
+ anim_index_builder * idx;
+} indexer_dv_context;
+
+static void parse_packet(indexer_dv_context * This, unsigned char * p)
+{
+ indexer_dv_bitstream b;
+ int type = p[0];
+
+ b = bitstream_new(p + 1);
+
+ switch (type) {
+ case 0x62: // Record date
+ parse_num(&b, 8);
+ This->rec_curr_day = parse_bcd(&b, 6);
+ parse_num(&b, 2);
+ This->rec_curr_month = parse_bcd(&b, 5);
+ parse_num(&b, 3);
+ This->rec_curr_year = parse_bcd(&b, 8);
+ if (This->rec_curr_year < 25) {
+ This->rec_curr_year += 2000;
+ } else {
+ This->rec_curr_year += 1900;
+ }
+ This->got_record_date = 1;
+ break;
+ case 0x63: // Record time
+ This->rec_curr_frame = parse_bcd(&b, 6);
+ parse_num(&b, 2);
+ This->rec_curr_second = parse_bcd(&b, 7);
+ parse_num(&b, 1);
+ This->rec_curr_minute = parse_bcd(&b, 7);
+ parse_num(&b, 1);
+ This->rec_curr_hour = parse_bcd(&b, 6);
+ This->got_record_time = 1;
+ break;
+ }
+}
+
+static void parse_header_block(indexer_dv_context * This, unsigned char* target)
+{
+ int i;
+ for (i = 3; i < 80; i += 5) {
+ if (target[i] != 0xff) {
+ parse_packet(This, target + i);
+ }
+ }
+}
+
+static void parse_subcode_blocks(
+ indexer_dv_context * This, unsigned char* target)
+{
+ int i,j;
+
+ for (j = 0; j < 2; j++) {
+ for (i = 3; i < 80; i += 5) {
+ if (target[i] != 0xff) {
+ parse_packet(This, target + i);
+ }
+ }
+ }
+}
+
+static void parse_vaux_blocks(
+ indexer_dv_context * This, unsigned char* target)
+{
+ int i,j;
+
+ for (j = 0; j < 3; j++) {
+ for (i = 3; i < 80; i += 5) {
+ if (target[i] != 0xff) {
+ parse_packet(This, target + i);
+ }
+ }
+ target += 80;
+ }
+}
+
+static void parse_audio_headers(
+ indexer_dv_context * This, unsigned char* target)
+{
+ int i;
+
+ for(i = 0; i < 9; i++) {
+ if (target[3] != 0xff) {
+ parse_packet(This, target + 3);
+ }
+ target += 16 * 80;
+ }
+}
+
+static void parse_frame(indexer_dv_context * This,
+ unsigned char * framebuffer, int isPAL)
+{
+ int numDIFseq = isPAL ? 12 : 10;
+ unsigned char* target = framebuffer;
+ int ds;
+
+ for (ds = 0; ds < numDIFseq; ds++) {
+ parse_header_block(This, target);
+ target += 1 * 80;
+ parse_subcode_blocks(This, target);
+ target += 2 * 80;
+ parse_vaux_blocks(This, target);
+ target += 3 * 80;
+ parse_audio_headers(This, target);
+ target += 144 * 80;
+ }
+}
+
+static void inc_frame(int * frame, time_t * t, int isPAL)
+{
+ if ((isPAL && *frame >= 25) || (!isPAL && *frame >= 30)) {
+ fprintf(stderr, "Ouchie: inc_frame: invalid_frameno: %d\n",
+ *frame);
+ }
+ (*frame)++;
+ if (isPAL && *frame >= 25) {
+ (*t)++;
+ *frame = 0;
+ } else if (!isPAL && *frame >= 30) {
+ (*t)++;
+ *frame = 0;
+ }
+}
+
+static void write_index(indexer_dv_context * This, anim_index_entry * entry)
+{
+ IMB_index_builder_add_entry(
+ This->idx, entry->frameno + This->frameno_offset,
+ entry->seek_pos, entry->seek_pos_dts, entry->pts);
+}
+
+static void fill_gap(indexer_dv_context * This, int isPAL)
+{
+ int i;
+
+ for (i = 0; i < This->fsize; i++) {
+ if (This->gap_start == This->ref_time_read &&
+ This->gap_frame == This->curr_frame) {
+ fprintf(stderr,
+ "indexer_dv::fill_gap: "
+ "can't seek backwards !\n");
+ break;
+ }
+ inc_frame(&This->gap_frame, &This->gap_start, isPAL);
+ }
+
+ while (This->gap_start != This->ref_time_read ||
+ This->gap_frame != This->curr_frame) {
+ inc_frame(&This->gap_frame, &This->gap_start, isPAL);
+ This->frameno_offset++;
+ }
+
+ for (i = 0; i < This->fsize; i++) {
+ write_index(This, This->backbuffer + i);
+ }
+ This->fsize = 0;
+}
+
+static void proc_frame(indexer_dv_context * This,
+ unsigned char* framebuffer, int isPAL)
+{
+ struct tm recDate;
+ time_t t;
+
+ if (!This->got_record_date || !This->got_record_time) {
+ return;
+ }
+
+ recDate.tm_sec = This->rec_curr_second;
+ recDate.tm_min = This->rec_curr_minute;
+ recDate.tm_hour = This->rec_curr_hour;
+ recDate.tm_mday = This->rec_curr_day;
+ recDate.tm_mon = This->rec_curr_month - 1;
+ recDate.tm_year = This->rec_curr_year - 1900;
+ recDate.tm_wday = -1;
+ recDate.tm_yday = -1;
+ recDate.tm_isdst = -1;
+
+ t = mktime(&recDate);
+ if (t == -1) {
+ return;
+ }
+
+ This->ref_time_read_new = t;
+
+ if (This->ref_time_read < 0) {
+ This->ref_time_read = This->ref_time_read_new;
+ This->curr_frame = 0;
+ } else {
+ if (This->ref_time_read_new - This->ref_time_read == 1) {
+ This->curr_frame = 0;
+ This->ref_time_read = This->ref_time_read_new;
+ if (This->gap_frame >= 0) {
+ fill_gap(This, isPAL);
+ This->gap_frame = -1;
+ }
+ } else if (This->ref_time_read_new == This->ref_time_read) {
+ // do nothing
+ } else {
+ This->gap_start = This->ref_time_read;
+ This->gap_frame = This->curr_frame;
+ This->ref_time_read = This->ref_time_read_new;
+ This->curr_frame = -1;
+ }
+ }
+}
+
+static void indexer_dv_proc_frame(anim_index_builder * idx,
+ unsigned char * buffer,
+ int data_size,
+ struct anim_index_entry * entry)
+{
+ int isPAL;
+
+ indexer_dv_context * This = (indexer_dv_context *) idx->private_data;
+
+ isPAL = (buffer[3] & 0x80);
+
+ This->got_record_date = FALSE;
+ This->got_record_time = FALSE;
+
+ parse_frame(This, buffer, isPAL);
+ proc_frame(This, buffer, isPAL);
+
+ if (This->curr_frame >= 0) {
+ write_index(This, entry);
+ inc_frame(&This->curr_frame, &This->ref_time_read, isPAL);
+ } else {
+ This->backbuffer[This->fsize++] = *entry;
+ if (This->fsize >= 31) {
+ int i;
+
+ fprintf(stderr, "indexer_dv::indexer_dv_proc_frame: "
+ "backbuffer overrun, emergency flush");
+
+ for (i = 0; i < This->fsize; i++) {
+ write_index(This, This->backbuffer+i);
+ }
+ This->fsize = 0;
+ }
+ }
+}
+
+static void indexer_dv_delete(anim_index_builder * idx)
+{
+ int i = 0;
+ indexer_dv_context * This = (indexer_dv_context *) idx->private_data;
+
+ for (i = 0; i < This->fsize; i++) {
+ write_index(This, This->backbuffer+i);
+ }
+
+ MEM_freeN(This);
+}
+
+void IMB_indexer_dv_new(anim_index_builder * idx)
+{
+ indexer_dv_context * rv = MEM_callocN(
+ sizeof(indexer_dv_context), "index_dv builder context");
+
+ rv->ref_time_read = -1;
+ rv->curr_frame = -1;
+ rv->gap_frame = -1;
+ rv->idx = idx;
+
+ idx->private_data = rv;
+ idx->proc_frame = indexer_dv_proc_frame;
+ idx->delete_priv_data = indexer_dv_delete;
+}
diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c
index 1d91f34f4fa..2ab7e55d1f8 100644
--- a/source/blender/imbuf/intern/thumbs.c
+++ b/source/blender/imbuf/intern/thumbs.c
@@ -317,9 +317,9 @@ ImBuf* IMB_thumb_create(const char* path, ThumbSize size, ThumbSource source, Im
}
} else if (THB_SOURCE_MOVIE == source) {
struct anim * anim = NULL;
- anim = IMB_open_anim(path, IB_rect | IB_metadata);
+ anim = IMB_open_anim(path, IB_rect | IB_metadata, 0);
if (anim != NULL) {
- img = IMB_anim_absolute(anim, 0);
+ img = IMB_anim_absolute(anim, 0, IMB_TC_NONE, IMB_PROXY_NONE);
if (img == NULL) {
printf("not an anim; %s\n", path);
} else {
diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c
index 36130aa0dbf..7beb853fe62 100644
--- a/source/blender/imbuf/intern/tiff.c
+++ b/source/blender/imbuf/intern/tiff.c
@@ -646,7 +646,7 @@ void imb_loadtiletiff(ImBuf *ibuf, unsigned char *mem, size_t size, int tx, int
}
}
else
- printf("imb_loadtiff: mipmap level %d has unexpected size %dx%d instead of %dx%d\n", ibuf->miplevel, width, height, ibuf->x, ibuf->y);
+ printf("imb_loadtiff: mipmap level %d has unexpected size %ux%u instead of %dx%d\n", ibuf->miplevel, width, height, ibuf->x, ibuf->y);
}
else
printf("imb_loadtiff: could not find mipmap level %d\n", ibuf->miplevel);
diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c
index 6db8dcc06cf..85d31f18a03 100644
--- a/source/blender/imbuf/intern/util.c
+++ b/source/blender/imbuf/intern/util.c
@@ -221,7 +221,7 @@ void silence_log_ffmpeg(int quiet)
}
else
{
- av_log_set_level(AV_LOG_INFO);
+ av_log_set_level(AV_LOG_DEBUG);
}
}
@@ -234,9 +234,10 @@ void do_init_ffmpeg(void)
av_register_all();
avdevice_register_all();
- if ((G.f & G_DEBUG) == 0)
- {
+ if ((G.f & G_DEBUG) == 0) {
silence_log_ffmpeg(1);
+ } else {
+ silence_log_ffmpeg(0);
}
}
}
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
index 3e7654bcf47..cd3afbf3553 100644
--- a/source/blender/makesdna/DNA_sequence_types.h
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -71,12 +71,19 @@ typedef struct StripColorBalance {
} StripColorBalance;
typedef struct StripProxy {
- char dir[160];
- char file[80];
- struct anim *anim;
- short size;
- short quality;
- int pad;
+ char dir[160]; // custom directory for index and proxy files
+ // (defaults to BL_proxy)
+
+ char file[80]; // custom file
+ struct anim *anim; // custom proxy anim file
+
+ short tc; // time code in use
+
+ short quality; // proxy build quality
+ short build_size_flags;// size flags (see below) of all proxies
+ // to build
+ short build_tc_flags; // time code flags (see below) of all tc indices
+ // to build
} StripProxy;
typedef struct Strip {
@@ -128,11 +135,12 @@ typedef struct Sequence {
int startstill, endstill;
int machine, depth; /*machine - the strip channel, depth - the depth in the sequence when dealing with metastrips */
int startdisp, enddisp; /*starting and ending points in the sequence*/
- float sat, pad;
+ float sat;
float mul, handsize;
/* is sfra needed anymore? - it looks like its only used in one place */
int sfra; /* starting frame according to the timeline of the scene. */
int anim_preseek;
+ int streamindex; /* streamindex for movie or sound files with several streams */
Strip *strip;
@@ -209,14 +217,9 @@ typedef struct GlowVars {
typedef struct TransformVars {
float ScalexIni;
float ScaleyIni;
- float ScalexFin; /* deprecated - old transform strip */
- float ScaleyFin; /* deprecated - old transform strip */
float xIni;
- float xFin; /* deprecated - old transform strip */
float yIni;
- float yFin; /* deprecated - old transform strip */
float rotIni;
- float rotFin; /* deprecated - old transform strip */
int percent;
int interpolation;
int uniform_scale; /* preserve aspect/ratio when scaling */
@@ -288,6 +291,19 @@ typedef struct SpeedControlVars {
#define SEQ_COLOR_BALANCE_INVERSE_GAMMA 2
#define SEQ_COLOR_BALANCE_INVERSE_LIFT 4
+/* !!! has to be same as IMB_imbuf.h IMB_PROXY_... and IMB_TC_... */
+
+#define SEQ_PROXY_IMAGE_SIZE_25 1
+#define SEQ_PROXY_IMAGE_SIZE_50 2
+#define SEQ_PROXY_IMAGE_SIZE_75 4
+#define SEQ_PROXY_IMAGE_SIZE_100 8
+
+#define SEQ_PROXY_TC_NONE 0
+#define SEQ_PROXY_TC_RECORD_RUN 1
+#define SEQ_PROXY_TC_FREE_RUN 2
+#define SEQ_PROXY_TC_INTERP_REC_DATE_FREE_RUN 4
+#define SEQ_PROXY_TC_ALL 7
+
/* seq->type WATCH IT: SEQ_EFFECT BIT is used to determine if this is an effect strip!!! */
#define SEQ_IMAGE 0
#define SEQ_META 1
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 7baa8f24df4..4bfaae6f0ba 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -267,7 +267,7 @@ typedef struct SpaceImage {
float centx, centy; /* storage for offset while render drawing */
short curtile; /* the currently active tile of the image when tile is enabled, is kept in sync with the active faces tile */
- short imtypenr;
+ short pad;
short lock;
short pin;
char dt_uv; /* UV draw type */
@@ -931,6 +931,7 @@ enum {
#define SEQ_PROXY_RENDER_SIZE_25 25
#define SEQ_PROXY_RENDER_SIZE_50 50
#define SEQ_PROXY_RENDER_SIZE_75 75
+#define SEQ_PROXY_RENDER_SIZE_100 99
#define SEQ_PROXY_RENDER_SIZE_FULL 100
diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h
index e81a9979c12..6e850a07d94 100644
--- a/source/blender/makesdna/DNA_texture_types.h
+++ b/source/blender/makesdna/DNA_texture_types.h
@@ -342,6 +342,7 @@ typedef struct TexMapping {
#define TEX_NORMALMAP 2048
#define TEX_GAUSS_MIP 4096
#define TEX_FILTER_MIN 8192
+#define TEX_DERIVATIVEMAP 16384
/* texfilter */
// TXF_BOX -> blender's old texture filtering method
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index 89b8bad2806..3c8d20a6f16 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -247,6 +247,7 @@ typedef struct View3D {
#define V3D_SOLID_TEX 8
#define V3D_DISPGP 16
#define V3D_LOCK_CAMERA 32
+#define V3D_RENDER_SHADOW 64 /* This is a runtime only flag that's used to tell draw_mesh_object() that we're doing a shadow pass instead of a regular draw */
/* View3D->around */
#define V3D_CENTER 0
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index 1f0ae28a00d..47ebf111eba 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -320,14 +320,20 @@ typedef struct wmOperator {
} wmOperator;
-/* operator type exec(), invoke() modal(), return values */
-#define OPERATOR_RUNNING_MODAL 1
-#define OPERATOR_CANCELLED 2
-#define OPERATOR_FINISHED 4
+
+/* operator type return flags: exec(), invoke() modal(), return values */
+#define OPERATOR_RUNNING_MODAL (1<<0)
+#define OPERATOR_CANCELLED (1<<1)
+#define OPERATOR_FINISHED (1<<2)
/* add this flag if the event should pass through */
-#define OPERATOR_PASS_THROUGH 8
+#define OPERATOR_PASS_THROUGH (1<<3)
/* in case operator got executed outside WM code... like via fileselect */
-#define OPERATOR_HANDLED 16
+#define OPERATOR_HANDLED (1<<4)
+
+#define OPERATOR_FLAGS_ALL ((1<<5)-1)
+
+/* sanity checks for debug mode only */
+#define OPERATOR_RETVAL_CHECK(ret) BLI_assert(ret != 0 && (ret & OPERATOR_FLAGS_ALL) == ret)
/* wmOperator flag */
#define OP_GRAB_POINTER 1
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index e40f2358794..67a9f98f35b 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -138,18 +138,18 @@ const char *includefiles[] = {
""
};
-int maxdata= 500000, maxnr= 50000;
-int nr_names=0;
-int nr_types=0;
-int nr_structs=0;
-char **names, *namedata; /* at address names[a] is string a */
-char **types, *typedata; /* at address types[a] is string a */
-short *typelens; /* at typelens[a] is de length of type a */
-short *alphalens; /* contains sizes as they are calculated on the DEC Alpha (64 bits) */
-short **structs, *structdata; /* at sp= structs[a] is the first address of a struct definition
- sp[0] is type number
- sp[1] is amount of elements
- sp[2] sp[3] is typenr, namenr (etc) */
+static int maxdata= 500000, maxnr= 50000;
+static int nr_names=0;
+static int nr_types=0;
+static int nr_structs=0;
+static char **names, *namedata; /* at address names[a] is string a */
+static char **types, *typedata; /* at address types[a] is string a */
+static short *typelens; /* at typelens[a] is de length of type a */
+static short *alphalens; /* contains sizes as they are calculated on the DEC Alpha (64 bits), infact any 64bit system */
+static short **structs, *structdata;/* at sp= structs[a] is the first address of a struct definition
+ sp[0] is type number
+ sp[1] is amount of elements
+ sp[2] sp[3] is typenr, namenr (etc) */
/**
* Variable to control debug output of makesdna.
* debugSDNA:
@@ -158,8 +158,8 @@ short **structs, *structdata; /* at sp= structs[a] is the first address of a str
* - 2 = full trace, tell which names and types were found
* - 4 = full trace, plus all gritty details
*/
-int debugSDNA = 0;
-int additional_slen_offset;
+static int debugSDNA = 0;
+static int additional_slen_offset;
/* ************************************************************************** */
/* Functions */
@@ -890,7 +890,7 @@ void printStructLenghts(void)
}
-int make_structDNA(char *baseDirectory, FILE *file)
+static int make_structDNA(char *baseDirectory, FILE *file)
{
int len, i;
short *sp;
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h
index e4ad58d5f03..c68a29f5604 100644
--- a/source/blender/makesrna/RNA_enum_types.h
+++ b/source/blender/makesrna/RNA_enum_types.h
@@ -54,6 +54,7 @@ extern EnumPropertyItem constraint_type_items[];
extern EnumPropertyItem boidrule_type_items[];
extern EnumPropertyItem image_type_items[];
+extern EnumPropertyItem image_color_mode_items[];
extern EnumPropertyItem beztriple_keyframe_type_items[];
extern EnumPropertyItem beztriple_handle_type_items[];
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 3af4e8308d6..47b3a105db2 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -66,7 +66,7 @@ static int file_older(const char *file1, const char *file2)
return (st1.st_mtime < st2.st_mtime);
}
-const char *makesrna_path= NULL;
+static const char *makesrna_path= NULL;
static int replace_if_different(char *tmpfile, const char *dep_files[])
{
@@ -569,7 +569,7 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
if(prop->flag & PROP_DYNAMIC)
fprintf(f, "void %s(PointerRNA *ptr, %s values[])\n", func, rna_type_type(prop));
else
- fprintf(f, "void %s(PointerRNA *ptr, %s values[%d])\n", func, rna_type_type(prop), prop->totarraylength);
+ fprintf(f, "void %s(PointerRNA *ptr, %s values[%u])\n", func, rna_type_type(prop), prop->totarraylength);
fprintf(f, "{\n");
if(manualfunc) {
@@ -587,7 +587,7 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
}
else {
fprintf(f, " int i;\n\n");
- fprintf(f, " for(i=0; i<%d; i++) {\n", prop->totarraylength);
+ fprintf(f, " for(i=0; i<%u; i++) {\n", prop->totarraylength);
}
if(dp->dnaarraylength == 1) {
@@ -783,7 +783,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
if(prop->flag & PROP_DYNAMIC)
fprintf(f, "void %s(PointerRNA *ptr, const %s values[])\n", func, rna_type_type(prop));
else
- fprintf(f, "void %s(PointerRNA *ptr, const %s values[%d])\n", func, rna_type_type(prop), prop->totarraylength);
+ fprintf(f, "void %s(PointerRNA *ptr, const %s values[%u])\n", func, rna_type_type(prop), prop->totarraylength);
fprintf(f, "{\n");
if(manualfunc) {
@@ -803,7 +803,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
else {
fprintf(f, " int i;\n\n");
rna_clamp_value_range(f, prop);
- fprintf(f, " for(i=0; i<%d; i++) {\n", prop->totarraylength);
+ fprintf(f, " for(i=0; i<%u; i++) {\n", prop->totarraylength);
}
if(dp->dnaarraylength == 1) {
@@ -1324,7 +1324,7 @@ static void rna_def_property_funcs_header(FILE *f, StructRNA *srna, PropertyDefR
//fprintf(f, "void %sset(PointerRNA *ptr, int value);\n", func);
}
else if(prop->arraydimension && prop->totarraylength) {
- fprintf(f, "void %sget(PointerRNA *ptr, int values[%d]);\n", func, prop->totarraylength);
+ fprintf(f, "void %sget(PointerRNA *ptr, int values[%u]);\n", func, prop->totarraylength);
//fprintf(f, "void %sset(PointerRNA *ptr, const int values[%d]);\n", func, prop->arraylength);
}
else {
@@ -1339,7 +1339,7 @@ static void rna_def_property_funcs_header(FILE *f, StructRNA *srna, PropertyDefR
//fprintf(f, "void %sset(PointerRNA *ptr, float value);\n", func);
}
else if(prop->arraydimension && prop->totarraylength) {
- fprintf(f, "void %sget(PointerRNA *ptr, float values[%d]);\n", func, prop->totarraylength);
+ fprintf(f, "void %sget(PointerRNA *ptr, float values[%u]);\n", func, prop->totarraylength);
//fprintf(f, "void %sset(PointerRNA *ptr, const float values[%d]);\n", func, prop->arraylength);
}
else {
@@ -1420,21 +1420,21 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property
if(!prop->arraydimension)
fprintf(f, "\tinline bool %s(void);", rna_safe_id(prop->identifier));
else
- fprintf(f, "\tinline Array %s(void);", prop->totarraylength, rna_safe_id(prop->identifier));
+ fprintf(f, "\tinline Array %s(void);", prop->totarraylength, rna_safe_id(prop->identifier));
break;
}
case PROP_INT: {
if(!prop->arraydimension)
fprintf(f, "\tinline int %s(void);", rna_safe_id(prop->identifier));
else
- fprintf(f, "\tinline Array %s(void);", prop->totarraylength, rna_safe_id(prop->identifier));
+ fprintf(f, "\tinline Array %s(void);", prop->totarraylength, rna_safe_id(prop->identifier));
break;
}
case PROP_FLOAT: {
if(!prop->arraydimension)
fprintf(f, "\tinline float %s(void);", rna_safe_id(prop->identifier));
else
- fprintf(f, "\tinline Array %s(void);", prop->totarraylength, rna_safe_id(prop->identifier));
+ fprintf(f, "\tinline Array %s(void);", prop->totarraylength, rna_safe_id(prop->identifier));
break;
}
case PROP_ENUM: {
@@ -1495,21 +1495,21 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe
if(!prop->arraydimension)
fprintf(f, "\tBOOLEAN_PROPERTY(%s, %s)", srna->identifier, rna_safe_id(prop->identifier));
else
- fprintf(f, "\tBOOLEAN_ARRAY_PROPERTY(%s, %d, %s)", srna->identifier, prop->totarraylength, rna_safe_id(prop->identifier));
+ fprintf(f, "\tBOOLEAN_ARRAY_PROPERTY(%s, %u, %s)", srna->identifier, prop->totarraylength, rna_safe_id(prop->identifier));
break;
}
case PROP_INT: {
if(!prop->arraydimension)
fprintf(f, "\tINT_PROPERTY(%s, %s)", srna->identifier, rna_safe_id(prop->identifier));
else
- fprintf(f, "\tINT_ARRAY_PROPERTY(%s, %d, %s)", srna->identifier, prop->totarraylength, rna_safe_id(prop->identifier));
+ fprintf(f, "\tINT_ARRAY_PROPERTY(%s, %u, %s)", srna->identifier, prop->totarraylength, rna_safe_id(prop->identifier));
break;
}
case PROP_FLOAT: {
if(!prop->arraydimension)
fprintf(f, "\tFLOAT_PROPERTY(%s, %s)", srna->identifier, rna_safe_id(prop->identifier));
else
- fprintf(f, "\tFLOAT_ARRAY_PROPERTY(%s, %d, %s)", srna->identifier, prop->totarraylength, rna_safe_id(prop->identifier));
+ fprintf(f, "\tFLOAT_ARRAY_PROPERTY(%s, %u, %s)", srna->identifier, prop->totarraylength, rna_safe_id(prop->identifier));
break;
}
case PROP_ENUM: {
@@ -2028,7 +2028,7 @@ static void rna_generate_static_parameter_prototypes(BlenderRNA *brna, StructRNA
fprintf(f, "int %s%s_len, ", pout ? "*" : "", dparm->prop->identifier);
if(!(flag & PROP_DYNAMIC) && dparm->prop->arraydimension)
- fprintf(f, "%s%s %s[%d]", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), dparm->prop->identifier, dparm->prop->totarraylength);
+ fprintf(f, "%s%s %s[%u]", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), dparm->prop->identifier, dparm->prop->totarraylength);
else
fprintf(f, "%s%s %s%s", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), ptrstr, dparm->prop->identifier);
@@ -2129,7 +2129,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
unsigned int i;
if(prop->arraydimension && prop->totarraylength) {
- fprintf(f, "static int rna_%s%s_%s_default[%d] = {\n\t", srna->identifier, strnest, prop->identifier, prop->totarraylength);
+ fprintf(f, "static int rna_%s%s_%s_default[%u] = {\n\t", srna->identifier, strnest, prop->identifier, prop->totarraylength);
for(i=0; itotarraylength; i++) {
if(bprop->defaultarray)
@@ -2149,7 +2149,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
unsigned int i;
if(prop->arraydimension && prop->totarraylength) {
- fprintf(f, "static int rna_%s%s_%s_default[%d] = {\n\t", srna->identifier, strnest, prop->identifier, prop->totarraylength);
+ fprintf(f, "static int rna_%s%s_%s_default[%u] = {\n\t", srna->identifier, strnest, prop->identifier, prop->totarraylength);
for(i=0; itotarraylength; i++) {
if(iprop->defaultarray)
@@ -2169,7 +2169,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
unsigned int i;
if(prop->arraydimension && prop->totarraylength) {
- fprintf(f, "static float rna_%s%s_%s_default[%d] = {\n\t", srna->identifier, strnest, prop->identifier, prop->totarraylength);
+ fprintf(f, "static float rna_%s%s_%s_default[%u] = {\n\t", srna->identifier, strnest, prop->identifier, prop->totarraylength);
for(i=0; itotarraylength; i++) {
if(fprop->defaultarray)
@@ -2200,7 +2200,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
rna_print_c_string(f, prop->name); fprintf(f, ",\n\t");
rna_print_c_string(f, prop->description); fprintf(f, ",\n\t");
fprintf(f, "%d,\n", prop->icon);
- fprintf(f, "\t%s, %s|%s, %s, %d, {%d, %d, %d}, %d,\n", RNA_property_typename(prop->type), rna_property_subtypename(prop->subtype), rna_property_subtype_unit(prop->subtype), rna_function_string(prop->getlength), prop->arraydimension, prop->arraylength[0], prop->arraylength[1], prop->arraylength[2], prop->totarraylength);
+ fprintf(f, "\t%s, %s|%s, %s, %u, {%u, %u, %u}, %u,\n", RNA_property_typename(prop->type), rna_property_subtypename(prop->subtype), rna_property_subtype_unit(prop->subtype), rna_function_string(prop->getlength), prop->arraydimension, prop->arraylength[0], prop->arraylength[1], prop->arraylength[2], prop->totarraylength);
fprintf(f, "\t%s%s, %d, %s, %s,\n", (prop->flag & PROP_CONTEXT_UPDATE)? "(UpdateFunc)": "", rna_function_string(prop->update), prop->noteflag, rna_function_string(prop->editable), rna_function_string(prop->itemeditable));
if(prop->flag & PROP_RAW_ACCESS) rna_set_raw_offset(f, srna, prop);
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 88447f6dd77..bc6e17a689d 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -2106,7 +2106,7 @@ char *RNA_property_string_get_alloc(PointerRNA *ptr, PropertyRNA *prop, char *fi
if(length+1 < fixedlen)
buf= fixedbuf;
else
- buf= MEM_callocN(sizeof(char)*(length+1), "RNA_string_get_alloc");
+ buf= MEM_mallocN(sizeof(char)*(length+1), "RNA_string_get_alloc");
RNA_property_string_get(ptr, prop, buf);
@@ -4271,11 +4271,18 @@ char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
break;
case PROP_STRING:
{
- /* string arrays dont exist */
+ char *buf_esc;
char *buf;
- buf = RNA_property_string_get_alloc(ptr, prop, NULL, -1);
- BLI_dynstr_appendf(dynstr, "\"%s\"", buf);
+ int length;
+
+ length= RNA_property_string_length(ptr, prop);
+ buf= MEM_mallocN(sizeof(char)*(length+1), "RNA_property_as_string");
+ buf_esc= MEM_mallocN(sizeof(char)*(length*2+1), "RNA_property_as_string esc");
+ RNA_property_string_get(ptr, prop, buf);
+ BLI_strescape(buf_esc, buf, length*2);
MEM_freeN(buf);
+ BLI_dynstr_appendf(dynstr, "\"%s\"", buf_esc);
+ MEM_freeN(buf_esc);
break;
}
case PROP_ENUM:
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 8e9c7e287d6..758ddc9ac6a 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -1049,7 +1049,7 @@ void RNA_def_property_array(PropertyRNA *prop, int length)
}
if(prop->arraydimension > 1) {
- fprintf(stderr, "RNA_def_property_array: \"%s.%s\", array dimensions has been set to %d but would be overwritten as 1.\n", srna->identifier, prop->identifier, prop->arraydimension);
+ fprintf(stderr, "RNA_def_property_array: \"%s.%s\", array dimensions has been set to %u but would be overwritten as 1.\n", srna->identifier, prop->identifier, prop->arraydimension);
DefRNA.error= 1;
return;
}
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index 8ac620c2fcf..ea0364084f9 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -38,6 +38,7 @@
#include "RNA_define.h"
#include "RNA_access.h"
#include "RNA_enum_types.h"
+#include "rna_internal.h"
#include "BKE_utildefines.h"
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 7fd6a9dacfe..56492a52da9 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -732,7 +732,7 @@ static StructRNA* def_node(BlenderRNA *brna, int node_id)
return srna;
}
-void alloc_node_type_items(EnumPropertyItem *items, int category)
+static void alloc_node_type_items(EnumPropertyItem *items, int category)
{
int i;
int count = 3;
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 61ebe216b53..39c08e0385a 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -43,7 +43,7 @@
#include "WM_api.h"
#include "WM_types.h"
-EnumPropertyItem effector_shape_items[] = {
+static EnumPropertyItem effector_shape_items[] = {
{PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""},
{PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""},
{PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Surface", ""},
@@ -51,20 +51,23 @@ EnumPropertyItem effector_shape_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem curve_shape_items[] = {
+#ifdef RNA_RUNTIME
+
+/* type spesific return values only used from functions */
+static EnumPropertyItem curve_shape_items[] = {
{PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""},
{PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""},
{PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Curve", ""},
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem empty_shape_items[] = {
+static EnumPropertyItem empty_shape_items[] = {
{PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""},
{PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""},
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem vortex_shape_items[] = {
+static EnumPropertyItem vortex_shape_items[] = {
{PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""},
{PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""},
{PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Surface falloff (New)", ""},
@@ -72,21 +75,19 @@ EnumPropertyItem vortex_shape_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem curve_vortex_shape_items[] = {
+static EnumPropertyItem curve_vortex_shape_items[] = {
{PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""},
{PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""},
{PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Curve (New)", ""},
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem empty_vortex_shape_items[] = {
+static EnumPropertyItem empty_vortex_shape_items[] = {
{PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""},
{PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""},
{0, NULL, 0, NULL, NULL}
};
-#ifdef RNA_RUNTIME
-
#include "MEM_guardedalloc.h"
#include "DNA_modifier_types.h"
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 30fce5716a9..ba91fc3536b 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -33,6 +33,7 @@
#include "limits.h"
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "rna_internal.h"
@@ -50,34 +51,34 @@
#include "WM_types.h"
#include "WM_api.h"
-EnumPropertyItem part_from_items[] = {
+static EnumPropertyItem part_from_items[] = {
{PART_FROM_VERT, "VERT", 0, "Verts", ""},
{PART_FROM_FACE, "FACE", 0, "Faces", ""},
{PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""},
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem part_reactor_from_items[] = {
+static EnumPropertyItem part_reactor_from_items[] = {
{PART_FROM_VERT, "VERT", 0, "Verts", ""},
{PART_FROM_FACE, "FACE", 0, "Faces", ""},
{PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""},
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem part_dist_items[] = {
+static EnumPropertyItem part_dist_items[] = {
{PART_DISTR_JIT, "JIT", 0, "Jittered", ""},
{PART_DISTR_RAND, "RAND", 0, "Random", ""},
{PART_DISTR_GRID, "GRID", 0, "Grid", ""},
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem part_hair_dist_items[] = {
+static EnumPropertyItem part_hair_dist_items[] = {
{PART_DISTR_JIT, "JIT", 0, "Jittered", ""},
{PART_DISTR_RAND, "RAND", 0, "Random", ""},
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem part_draw_as_items[] = {
+static EnumPropertyItem part_draw_as_items[] = {
{PART_DRAW_NOT, "NONE", 0, "None", ""},
{PART_DRAW_REND, "RENDER", 0, "Rendered", ""},
{PART_DRAW_DOT, "DOT", 0, "Point", ""},
@@ -87,14 +88,14 @@ EnumPropertyItem part_draw_as_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem part_hair_draw_as_items[] = {
+static EnumPropertyItem part_hair_draw_as_items[] = {
{PART_DRAW_NOT, "NONE", 0, "None", ""},
{PART_DRAW_REND, "RENDER", 0, "Rendered", ""},
{PART_DRAW_PATH, "PATH", 0, "Path", ""},
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem part_ren_as_items[] = {
+static EnumPropertyItem part_ren_as_items[] = {
{PART_DRAW_NOT, "NONE", 0, "None", ""},
{PART_DRAW_HALO, "HALO", 0, "Halo", ""},
{PART_DRAW_LINE, "LINE", 0, "Line", ""},
@@ -105,7 +106,7 @@ EnumPropertyItem part_ren_as_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem part_hair_ren_as_items[] = {
+static EnumPropertyItem part_hair_ren_as_items[] = {
{PART_DRAW_NOT, "NONE", 0, "None", ""},
{PART_DRAW_PATH, "PATH", 0, "Path", ""},
{PART_DRAW_OB, "OBJECT", 0, "Object", ""},
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 29cfc695911..552ff7b6365 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -155,6 +155,12 @@ EnumPropertyItem image_type_items[] = {
#endif
{0, NULL, 0, NULL, NULL}};
+EnumPropertyItem image_color_mode_items[] ={
+ {R_PLANESBW, "BW", 0, "BW", "Images get saved in 8 bits grayscale (only PNG, JPEG, TGA, TIF)"},
+ {R_PLANES24, "RGB", 0, "RGB", "Images are saved with RGB (color) data"},
+ {R_PLANES32, "RGBA", 0, "RGBA", "Images are saved with RGB and Alpha data (if supported)"},
+ {0, NULL, 0, NULL, NULL}};
+
#ifdef RNA_RUNTIME
#include "DNA_anim_types.h"
@@ -700,8 +706,8 @@ static void rna_RenderSettings_active_layer_set(PointerRNA *ptr, PointerRNA valu
{
RenderData *rd= (RenderData*)ptr->data;
SceneRenderLayer *srl= (SceneRenderLayer*)value.data;
-
- rd->actlay = BLI_findindex(&rd->layers, srl);
+ const int index= BLI_findindex(&rd->layers, srl);
+ if (index != -1) rd->actlay= index;
}
static void rna_RenderSettings_engine_set(PointerRNA *ptr, int value)
@@ -1973,7 +1979,7 @@ static void rna_def_render_layers(BlenderRNA *brna, PropertyRNA *cprop)
prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_UNSIGNED);
RNA_def_property_struct_type(prop, "SceneRenderLayer");
RNA_def_property_pointer_funcs(prop, "rna_RenderSettings_active_layer_get", "rna_RenderSettings_active_layer_set", NULL, NULL);
- RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Active Render Layer", "Active Render Layer");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
@@ -1999,13 +2005,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{R_ALPHAPREMUL, "PREMUL", 0, "Premultiplied", "Transparent RGB pixels are multiplied by the alpha channel"},
{R_ALPHAKEY, "STRAIGHT", 0, "Straight Alpha", "Transparent RGB and alpha pixels are unmodified"},
{0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem color_mode_items[] ={
- {R_PLANESBW, "BW", 0, "BW", "Images get saved in 8 bits grayscale (only PNG, JPEG, TGA, TIF)"},
- {R_PLANES24, "RGB", 0, "RGB", "Images are saved with RGB (color) data"},
- {R_PLANES32, "RGBA", 0, "RGBA", "Images are saved with RGB and Alpha data (if supported)"},
- {0, NULL, 0, NULL, NULL}};
-
+
static EnumPropertyItem display_mode_items[] ={
{R_OUTPUT_SCREEN, "SCREEN", 0, "Full Screen", "Images are rendered in full Screen"},
{R_OUTPUT_AREA, "AREA", 0, "Image Editor", "Images are rendered in Image Editor"},
@@ -2194,7 +2194,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "planes");
- RNA_def_property_enum_items(prop, color_mode_items);
+ RNA_def_property_enum_items(prop, image_color_mode_items);
RNA_def_property_ui_text(prop, "Color Mode", "Choose BW for saving greyscale images, RGB for saving red, green and blue channels, AND RGBA for saving red, green, blue + alpha channels");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index 476ac325848..b6e2117956d 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -245,6 +245,10 @@ static void rna_Sequence_use_proxy_set(PointerRNA *ptr, int value)
seq->flag |= SEQ_USE_PROXY;
if(seq->strip->proxy == NULL) {
seq->strip->proxy = MEM_callocN(sizeof(struct StripProxy), "StripProxy");
+ seq->strip->proxy->quality = 90;
+ seq->strip->proxy->build_tc_flags = SEQ_PROXY_TC_ALL;
+ seq->strip->proxy->build_size_flags
+ = SEQ_PROXY_IMAGE_SIZE_25;
}
} else {
seq->flag ^= SEQ_USE_PROXY;
@@ -587,6 +591,34 @@ static void rna_Sequence_filepath_update(Main *bmain, Scene *scene, PointerRNA *
rna_Sequence_update(bmain, scene, ptr);
}
+static int seqproxy_seq_cmp_cb(Sequence *seq, void *arg_pt)
+{
+ struct { Sequence *seq; void *seq_proxy; } *data= arg_pt;
+
+ if(seq->strip && seq->strip->proxy == data->seq_proxy) {
+ data->seq= seq;
+ return -1; /* done so bail out */
+ }
+ return 1;
+}
+
+static void rna_Sequence_tcindex_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ Editing *ed= seq_give_editing(scene, FALSE);
+ Sequence *seq;
+
+ struct { Sequence *seq; void *seq_proxy; } data;
+
+ data.seq= NULL;
+ data.seq_proxy = ptr->data;
+
+ seqbase_recursive_apply(&ed->seqbase, seqproxy_seq_cmp_cb, &data);
+ seq= data.seq;
+
+ reload_sequence_new_file(scene, seq, FALSE);
+ rna_Sequence_frame_change_update(scene, seq);
+}
+
/* do_versions? */
static float rna_Sequence_opacity_get(PointerRNA *ptr)
{
@@ -789,6 +821,19 @@ static void rna_def_strip_proxy(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
+
+ static const EnumPropertyItem seq_tc_items[]= {
+ {SEQ_PROXY_TC_NONE, "NONE", 0, "No TC in use", ""},
+ {SEQ_PROXY_TC_RECORD_RUN, "RECORD_RUN", 0, "Record Run",
+ "use images in the order as they are recorded"},
+ {SEQ_PROXY_TC_FREE_RUN, "FREE_RUN", 0, "Free Run",
+ "use global timestamp written by recording device"},
+ {SEQ_PROXY_TC_INTERP_REC_DATE_FREE_RUN, "FREE_RUN_REC_DATE",
+ 0, "Free Run (rec date)",
+ "interpolate a global timestamp using the "
+ "record date and time written by recording "
+ "device"},
+ {0, NULL, 0, NULL, NULL}};
srna = RNA_def_struct(brna, "SequenceProxy", NULL);
RNA_def_struct_ui_text(srna, "Sequence Proxy", "Proxy parameters for a sequence strip");
@@ -804,6 +849,46 @@ static void rna_def_strip_proxy(BlenderRNA *brna)
RNA_def_property_string_funcs(prop, "rna_Sequence_proxy_filepath_get", "rna_Sequence_proxy_filepath_length", "rna_Sequence_proxy_filepath_set");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+
+ prop= RNA_def_property(srna, "build_25", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_25);
+ RNA_def_property_ui_text(prop, "25%", "Build 25% proxy resolution");
+
+ prop= RNA_def_property(srna, "build_50", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_50);
+ RNA_def_property_ui_text(prop, "50%", "Build 50% proxy resolution");
+
+ prop= RNA_def_property(srna, "build_75", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_75);
+ RNA_def_property_ui_text(prop, "75%", "Build 75% proxy resolution");
+
+ prop= RNA_def_property(srna, "build_100", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_100);
+ RNA_def_property_ui_text(prop, "100%", "Build 100% proxy resolution");
+
+ prop= RNA_def_property(srna, "build_record_run", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "build_tc_flags", SEQ_PROXY_TC_RECORD_RUN);
+ RNA_def_property_ui_text(prop, "Rec Run", "Build record run time code index");
+
+ prop= RNA_def_property(srna, "build_free_run", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "build_tc_flags", SEQ_PROXY_TC_FREE_RUN);
+ RNA_def_property_ui_text(prop, "Free Run", "Build free run time code index");
+
+ prop= RNA_def_property(srna, "build_free_run_rec_date", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "build_tc_flags", SEQ_PROXY_TC_INTERP_REC_DATE_FREE_RUN);
+ RNA_def_property_ui_text(prop, "Free Run (Rec Date)", "Build free run time code index using Record Date/Time");
+
+ prop= RNA_def_property(srna, "quality", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_sdna(prop, NULL, "quality");
+ RNA_def_property_ui_text(prop, "Quality", "JPEG Quality of proxies to build");
+ RNA_def_property_ui_range(prop, 1, 100, 1, 0);
+
+ prop= RNA_def_property(srna, "timecode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "tc");
+ RNA_def_property_enum_items(prop, seq_tc_items);
+ RNA_def_property_ui_text(prop, "Timecode", "");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_tcindex_update");
+
}
static void rna_def_strip_color_balance(BlenderRNA *brna)
@@ -1208,7 +1293,7 @@ static void rna_def_proxy(StructRNA *srna)
prop= RNA_def_property(srna, "use_proxy", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_PROXY);
- RNA_def_property_ui_text(prop, "Use Proxy", "Use a preview proxy for this strip");
+ RNA_def_property_ui_text(prop, "Use Proxy / Timecode", "Use a preview proxy and/or timecode index for this strip");
RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_proxy_set");
prop= RNA_def_property(srna, "proxy", PROP_POINTER, PROP_NONE);
@@ -1330,6 +1415,12 @@ static void rna_def_movie(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "MPEG Preseek", "For MPEG movies, preseek this many frames");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ prop= RNA_def_property(srna, "streamindex", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "streamindex");
+ RNA_def_property_range(prop, 0, 20);
+ RNA_def_property_ui_text(prop, "Streamindex", "For files with several movie streams, use the stream with the given index");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update_reopen_files");
+
prop= RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "strip->stripdata", NULL);
RNA_def_property_struct_type(prop, "SequenceElement");
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 3e71a0e4811..0e1d6389608 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -1674,6 +1674,7 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
{SEQ_PROXY_RENDER_SIZE_25, "PROXY_25", 0, "Proxy size 25%", ""},
{SEQ_PROXY_RENDER_SIZE_50, "PROXY_50", 0, "Proxy size 50%", ""},
{SEQ_PROXY_RENDER_SIZE_75, "PROXY_75", 0, "Proxy size 75%", ""},
+ {SEQ_PROXY_RENDER_SIZE_100, "PROXY_100", 0, "Proxy size 100%", ""},
{SEQ_PROXY_RENDER_SIZE_FULL, "FULL", 0, "No proxy, full render", ""},
{0, NULL, 0, NULL, NULL}};
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index 9e3a31ddb2e..0ecc41d80d8 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -32,6 +32,7 @@
#include
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "rna_internal.h"
@@ -47,7 +48,7 @@
#include "BKE_node.h"
-EnumPropertyItem texture_filter_items[] = {
+static EnumPropertyItem texture_filter_items[] = {
{TXF_BOX, "BOX", 0, "Box", ""},
{TXF_EWA, "EWA", 0, "EWA", ""},
{TXF_FELINE, "FELINE", 0, "FELINE", ""},
@@ -1147,6 +1148,12 @@ static void rna_def_texture_image(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_NORMALMAP);
RNA_def_property_ui_text(prop, "Normal Map", "Uses image RGB values for normal mapping");
RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+ /* Derivative Map */
+ prop= RNA_def_property(srna, "use_derivative_map", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_DERIVATIVEMAP);
+ RNA_def_property_ui_text(prop, "Derivative Map", "Uses red and green as derivative values");
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
}
static void rna_def_texture_plugin(BlenderRNA *brna)
diff --git a/source/blender/python/intern/bpy_intern_string.c b/source/blender/python/intern/bpy_intern_string.c
index c6629007532..6fc861b2a0d 100644
--- a/source/blender/python/intern/bpy_intern_string.c
+++ b/source/blender/python/intern/bpy_intern_string.c
@@ -28,13 +28,14 @@
#include
+#include "bpy_intern_string.h"
+
PyObject *bpy_intern_str_register;
PyObject *bpy_intern_str_unregister;
PyObject *bpy_intern_str_bl_rna;
PyObject *bpy_intern_str_order;
PyObject *bpy_intern_str_attr;
PyObject *bpy_intern_str___slots__;
-PyObject *bpy_intern_str___bases__;
void bpy_intern_string_init(void)
{
diff --git a/source/blender/python/intern/bpy_operator.c b/source/blender/python/intern/bpy_operator.c
index 7310878f661..7327679cc7e 100644
--- a/source/blender/python/intern/bpy_operator.c
+++ b/source/blender/python/intern/bpy_operator.c
@@ -117,7 +117,6 @@ static PyObject *pyop_poll(PyObject *UNUSED(self), PyObject *args)
}
context_dict_back= CTX_py_dict_get(C);
-
CTX_py_dict_set(C, (void *)context_dict);
Py_XINCREF(context_dict); /* so we done loose it */
@@ -293,7 +292,7 @@ static PyObject *pyop_call(PyObject *UNUSED(self), PyObject *args)
* function corrects bpy.data (internal Main pointer) */
BPY_modules_update(C);
- /* needed for when WM_OT_read_factory_settings us called fro within a script */
+ /* needed for when WM_OT_read_factory_settings us called from within a script */
bpy_import_main_set(CTX_data_main(C));
/* return operator_ret as a bpy enum */
diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c
index a0ad1ff7850..5da142aeea7 100644
--- a/source/blender/python/intern/bpy_props.c
+++ b/source/blender/python/intern/bpy_props.c
@@ -117,7 +117,7 @@ static PyObject *pymeth_PointerProperty= NULL;
static PyObject *pymeth_CollectionProperty= NULL;
static PyObject *pymeth_RemoveProperty= NULL;
-PyObject *pyrna_struct_as_instance(PointerRNA *ptr)
+static PyObject *pyrna_struct_as_instance(PointerRNA *ptr)
{
PyObject *self= NULL;
/* first get self */
@@ -177,7 +177,7 @@ static PyObject *bpy_prop_deferred_return(PyObject *func, PyObject *kw)
}
/* callbacks */
-void bpy_prop_update_cb(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop)
+static void bpy_prop_update_cb(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop)
{
PyGILState_STATE gilstate;
PyObject **py_data= (PyObject **)RNA_property_py_data_get(prop);
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 1b8f986e71c..4abcbc684e2 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -814,34 +814,40 @@ static PyObject *pyrna_struct_str(BPy_StructRNA *self)
static PyObject *pyrna_struct_repr(BPy_StructRNA *self)
{
ID *id= self->ptr.id.data;
+ PyObject *tmp_str;
+ PyObject *ret;
+
if(id == NULL || !PYRNA_STRUCT_IS_VALID(self))
return pyrna_struct_str(self); /* fallback */
+ tmp_str= PyUnicode_FromString(id->name+2);
+
if(RNA_struct_is_ID(self->ptr.type)) {
- return PyUnicode_FromFormat("bpy.data.%s[\"%s\"]",
+ ret= PyUnicode_FromFormat("bpy.data.%s[%R]",
BKE_idcode_to_name_plural(GS(id->name)),
- id->name+2);
+ tmp_str);
}
else {
- PyObject *ret;
const char *path;
path= RNA_path_from_ID_to_struct(&self->ptr);
if(path) {
- ret= PyUnicode_FromFormat("bpy.data.%s[\"%s\"].%s",
+ ret= PyUnicode_FromFormat("bpy.data.%s[%R].%s",
BKE_idcode_to_name_plural(GS(id->name)),
- id->name+2,
+ tmp_str,
path);
MEM_freeN((void *)path);
}
else { /* cant find, print something sane */
- ret= PyUnicode_FromFormat("bpy.data.%s[\"%s\"]...%s",
+ ret= PyUnicode_FromFormat("bpy.data.%s[%R]...%s",
BKE_idcode_to_name_plural(GS(id->name)),
- id->name+2,
+ tmp_str,
RNA_struct_identifier(self->ptr.type));
}
-
- return ret;
}
+
+ Py_DECREF(tmp_str);
+
+ return ret;
}
static PyObject *pyrna_prop_str(BPy_PropertyRNA *self)
@@ -911,27 +917,35 @@ static PyObject *pyrna_prop_str(BPy_PropertyRNA *self)
static PyObject *pyrna_prop_repr(BPy_PropertyRNA *self)
{
- ID *id;
+ ID *id= self->ptr.id.data;
+ PyObject *tmp_str;
PyObject *ret;
const char *path;
PYRNA_PROP_CHECK_OBJ(self)
- if((id= self->ptr.id.data) == NULL)
+ if(id == NULL)
return pyrna_prop_str(self); /* fallback */
+ tmp_str= PyUnicode_FromString(id->name+2);
+
path= RNA_path_from_ID_to_property(&self->ptr, self->prop);
if(path) {
- ret= PyUnicode_FromFormat("bpy.data.%s[\"%s\"].%s", BKE_idcode_to_name_plural(GS(id->name)), id->name+2, path);
+ ret= PyUnicode_FromFormat("bpy.data.%s[%R].%s",
+ BKE_idcode_to_name_plural(GS(id->name)),
+ tmp_str,
+ path);
MEM_freeN((void *)path);
}
else { /* cant find, print something sane */
- ret= PyUnicode_FromFormat("bpy.data.%s[\"%s\"]...%s",
+ ret= PyUnicode_FromFormat("bpy.data.%s[%R]...%s",
BKE_idcode_to_name_plural(GS(id->name)),
- id->name+2,
+ tmp_str,
RNA_property_identifier(self->prop));
}
+ Py_DECREF(tmp_str);
+
return ret;
}
@@ -1103,6 +1117,7 @@ static int pyrna_string_to_enum(PyObject *item, PointerRNA *ptr, PropertyRNA *pr
return 1;
}
+/* 'value' _must_ be a set type, error check before calling */
int pyrna_set_to_enum_bitfield(EnumPropertyItem *items, PyObject *value, int *r_value, const char *error_prefix)
{
/* set of enum items, concatenate all values with OR */
@@ -1124,8 +1139,10 @@ int pyrna_set_to_enum_bitfield(EnumPropertyItem *items, PyObject *value, int *r_
error_prefix, Py_TYPE(key)->tp_name);
return -1;
}
- if(pyrna_enum_value_from_id(items, param, &ret, error_prefix) < 0)
+
+ if(pyrna_enum_value_from_id(items, param, &ret, error_prefix) < 0) {
return -1;
+ }
flag |= ret;
}
@@ -1142,6 +1159,14 @@ static int pyrna_prop_to_enum_bitfield(PointerRNA *ptr, PropertyRNA *prop, PyObj
*r_value= 0;
+ if (!PyAnySet_Check(value)) {
+ PyErr_Format(PyExc_TypeError,
+ "%.200s, %.200s.%.200s expected a set, not a %.200s",
+ error_prefix, RNA_struct_identifier(ptr->type),
+ RNA_property_identifier(prop), Py_TYPE(value)->tp_name);
+ return -1;
+ }
+
RNA_property_enum_items(BPy_GetContext(), ptr, prop, &item, NULL, &free);
if(item) {
@@ -1515,33 +1540,18 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb
{
int val= 0;
- if (PyUnicode_Check(value)) {
- if (!pyrna_string_to_enum(value, ptr, prop, &val, error_prefix))
- return -1;
- }
- else if (PyAnySet_Check(value)) {
- if(RNA_property_flag(prop) & PROP_ENUM_FLAG) {
- /* set of enum items, concatenate all values with OR */
- if(pyrna_prop_to_enum_bitfield(ptr, prop, value, &val, error_prefix) < 0)
- return -1;
- }
- else {
- PyErr_Format(PyExc_TypeError,
- "%.200s, %.200s.%.200s is not a bitflag enum type",
- error_prefix, RNA_struct_identifier(ptr->type),
- RNA_property_identifier(prop));
+ /* type checkins is done by each function */
+ if(RNA_property_flag(prop) & PROP_ENUM_FLAG) {
+ /* set of enum items, concatenate all values with OR */
+ if(pyrna_prop_to_enum_bitfield(ptr, prop, value, &val, error_prefix) < 0) {
return -1;
}
}
else {
- const char *enum_str= pyrna_enum_as_string(ptr, prop);
- PyErr_Format(PyExc_TypeError,
- "%.200s %.200s.%.200s expected a string enum or a set of strings in (%.2000s), not %.200s",
- error_prefix, RNA_struct_identifier(ptr->type),
- RNA_property_identifier(prop), enum_str,
- Py_TYPE(value)->tp_name);
- MEM_freeN((void *)enum_str);
- return -1;
+ /* simple enum string */
+ if (!pyrna_string_to_enum(value, ptr, prop, &val, error_prefix) < 0) {
+ return -1;
+ }
}
if(data) *((int*)data)= val;
@@ -4306,7 +4316,6 @@ static PyObject *small_dict_get_item_string(PyObject *dict, const char *key_look
Py_ssize_t pos = 0;
PyObject *value = NULL;
- /* case not, search for it in the script's global dictionary */
while (PyDict_Next(dict, &pos, &key, &value)) {
if(PyUnicode_Check(key)) {
if(strcmp(key_lookup, _PyUnicode_AsString(key))==0) {
@@ -6408,7 +6417,21 @@ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, Param
err= -1;
}
else if(ret_len==1) {
- err= pyrna_py_to_prop(&funcptr, pret_single, retdata_single, ret, "calling class function:");
+ err= pyrna_py_to_prop(&funcptr, pret_single, retdata_single, ret, "");
+
+ /* when calling operator funcs only gives Function.result with
+ * no line number since the func has finished calling on error,
+ * re-raise the exception with more info since it would be slow to
+ * create prefix on every call (when there are no errors) */
+ if(err == -1 && PyErr_Occurred()) {
+ PyObject *error_type, *error_value, *error_traceback;
+ PyErr_Fetch(&error_type, &error_value, &error_traceback);
+
+ PyErr_Format(error_type,
+ "class %.200s, function %.200s: incompatible return value%S",
+ RNA_struct_identifier(ptr->type), RNA_function_identifier(func),
+ error_value);
+ }
}
else if (ret_len > 1) {
@@ -6568,9 +6591,9 @@ void pyrna_free_types(void)
PyDoc_STRVAR(pyrna_register_class_doc,
".. method:: register_class(cls)\n"
"\n"
-" Register a subclass of a blender type in (:class:`Panel`,\n"
-" :class:`Menu`, :class:`Header`, :class:`Operator`,\n"
-" :class:`KeyingSetInfo`, :class:`RenderEngine`).\n"
+" Register a subclass of a blender type in (:class:`bpy.types.Panel`,\n"
+" :class:`bpy.types.Menu`, :class:`bpy.types.Header`, :class:`bpy.types.Operator`,\n"
+" :class:`bpy.types.KeyingSetInfo`, :class:`bpy.types.RenderEngine`).\n"
"\n"
" If the class has a *register* class method it will be called\n"
" before registration.\n"
diff --git a/source/blender/python/intern/bpy_traceback.c b/source/blender/python/intern/bpy_traceback.c
index 17f082b79dc..747a876d6df 100644
--- a/source/blender/python/intern/bpy_traceback.c
+++ b/source/blender/python/intern/bpy_traceback.c
@@ -30,9 +30,9 @@
#include "bpy_traceback.h"
-static const char *traceback_filepath(PyTracebackObject *tb)
+static const char *traceback_filepath(PyTracebackObject *tb, PyObject **coerce)
{
- return _PyUnicode_AsString(tb->tb_frame->f_code->co_filename);
+ return PyBytes_AS_STRING((*coerce= PyUnicode_EncodeFSDefault(tb->tb_frame->f_code->co_filename)));
}
/* copied from pythonrun.c, 3.2.0 */
@@ -146,7 +146,12 @@ void python_script_error_jump(const char *filepath, int *lineno, int *offset)
PyErr_Print();
for(tb= (PyTracebackObject *)PySys_GetObject("last_traceback"); tb && (PyObject *)tb != Py_None; tb= tb->tb_next) {
- if(strcmp(traceback_filepath(tb), filepath) != 0) {
+ PyObject *coerce;
+ const char *tb_filepath= traceback_filepath(tb, &coerce);
+ const int match= strcmp(tb_filepath, filepath) != 0;
+ Py_DECREF(coerce);
+
+ if(match) {
*lineno= tb->tb_lineno;
break;
}
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index 7033ec27fc0..2f79560efd6 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -1345,8 +1345,11 @@ static void particle_billboard(Render *re, ObjectRen *obr, Material *ma, Particl
VlakRen *vlr;
MTFace *mtf;
float xvec[3], yvec[3], zvec[3], bb_center[3];
+ /* Number of tiles */
int totsplit = bb->uv_split * bb->uv_split;
- float uvx = 0.0f, uvy = 0.0f, uvdx = 1.0f, uvdy = 1.0f, time = 0.0f;
+ int tile, x, y;
+ /* Tile offsets */
+ float uvx = 0.0f, uvy = 0.0f, uvdx = 1.0f, uvdy = 1.0f, time = 0.0f;
vlr= RE_findOrAddVlak(obr, obr->totvlak++);
vlr->v1= RE_findOrAddVert(obr, obr->totvert++);
@@ -1420,11 +1423,14 @@ static void particle_billboard(Render *re, ObjectRen *obr, Material *ma, Particl
else if(bb->split_offset==PART_BB_OFF_RANDOM)
time = (float)fmod(time + bb->random, 1.0f);
- uvx = uvdx * floor((float)(bb->uv_split * bb->uv_split) * (float)fmod((double)time, (double)uvdx));
- uvy = uvdy * floor((1.0f - time) * (float)bb->uv_split);
-
- if(fmod(time, 1.0f / bb->uv_split) == 0.0f)
- uvy -= uvdy;
+ /* Find the coordinates in tile space (integer), then convert to UV
+ * space (float). Note that Y is flipped. */
+ tile = (int)((time + FLT_EPSILON10) * totsplit);
+ x = tile % bb->uv_split;
+ y = tile / bb->uv_split;
+ y = (bb->uv_split - 1) - y;
+ uvx = uvdx * x;
+ uvy = uvdy * y;
}
/* normal UVs */
diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c
index 8211c9c0f72..28406732b9d 100644
--- a/source/blender/render/intern/source/pointdensity.c
+++ b/source/blender/render/intern/source/pointdensity.c
@@ -104,7 +104,7 @@ static void pointdensity_cache_psys(Render *re, PointDensity *pd, Object *ob, Pa
{
DerivedMesh* dm;
ParticleKey state;
- ParticleSimulationData sim= {0};
+ ParticleSimulationData sim= {NULL};
ParticleData *pa=NULL;
float cfra = BKE_curframe(re->scene);
int i, childexists;
diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c
index 88f1f2f5e71..138eca2dd9b 100644
--- a/source/blender/render/intern/source/render_texture.c
+++ b/source/blender/render/intern/source/render_texture.c
@@ -1804,7 +1804,7 @@ static int compatible_bump_compute(CompatibleBump *compat_bump, ShadeInput *shi,
const float adx[3] = {fabsf(dx[0]), fabsf(dx[1]), fabsf(dx[2])};
const float ady[3] = {fabsf(dy[0]), fabsf(dy[1]), fabsf(dy[2])};
du = MAX3(adx[0], adx[1], adx[2]);
- dv = MAX3(ady[1], ady[1], ady[2]);
+ dv = MAX3(ady[0], ady[1], ady[2]);
}
}
@@ -1920,11 +1920,13 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T
const int fromrgb = ((tex->type == TEX_IMAGE) || ((tex->flag & TEX_COLORBAND)!=0));
float Hscale = Tnor*mtex->norfac;
+ int dimx=512, dimy=512;
// 2 channels for 2D texture and 3 for 3D textures.
const int nr_channels = (mtex->texco == TEXCO_UV)? 2 : 3;
int c, rgbnor, iBumpSpace;
float dHdx, dHdy;
+ int found_deriv_map = (tex->type==TEX_IMAGE) && (tex->imaflag & TEX_DERIVATIVEMAP);
// disable internal bump eval in sampler, save pointer
float *nvec = texres->nor;
@@ -1944,8 +1946,31 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T
ntap_bump->init_done = 1;
}
+
+ // resolve image dimensions
+ if(found_deriv_map || (mtex->texflag&MTEX_BUMP_TEXTURESPACE)!=0) {
+ ImBuf* ibuf = BKE_image_get_ibuf(tex->ima, &tex->iuser);
+ if (ibuf) {
+ dimx = ibuf->x;
+ dimy = ibuf->y;
+ }
+ }
- if(!(mtex->texflag & MTEX_5TAP_BUMP)) {
+ if(found_deriv_map) {
+ float dBdu, dBdv;
+ float s = 1; // negate this if flipped texture coordinate
+ texco_mapping(shi, tex, mtex, co, dx, dy, texvec, dxt, dyt);
+ rgbnor = multitex_mtex(shi, mtex, texvec, dxt, dyt, texres);
+
+ // this variant using a derivative map is described here
+ // http://mmikkelsen3d.blogspot.com/2011/07/derivative-maps.html
+ dBdu = Hscale*dimx*(2*texres->tr-1);
+ dBdv = Hscale*dimy*(2*texres->tg-1);
+
+ dHdx = dBdu*dxt[0] + s * dBdv*dxt[1];
+ dHdy = dBdu*dyt[0] + s * dBdv*dyt[1];
+ }
+ else if(!(mtex->texflag & MTEX_5TAP_BUMP)) {
// compute height derivatives with respect to output image pixel coordinates x and y
float STll[3], STlr[3], STul[3];
float Hll, Hlr, Hul;
@@ -2099,15 +2124,8 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T
if( mtex->texflag & MTEX_BUMP_TEXTURESPACE ) {
if(tex->ima) {
- float vec[2];
- int dimx=512, dimy=512;
- ImBuf* ibuf = BKE_image_get_ibuf(tex->ima, &tex->iuser);
- if (ibuf) {
- dimx = ibuf->x;
- dimy = ibuf->y;
- }
-
// crazy hack solution that gives results similar to normal mapping - part 2
+ float vec[2];
vec[0] = dimx*dxt[0];
vec[1] = dimy*dxt[1];
@@ -2141,7 +2159,7 @@ void do_material_tex(ShadeInput *shi)
float texvec[3], dxt[3], dyt[3], tempvec[3], norvec[3], warpvec[3]={0.0f, 0.0f, 0.0f}, Tnor=1.0;
int tex_nr, rgbnor= 0, warpdone=0;
int use_compat_bump = 0, use_ntap_bump = 0;
- int found_nmapping = 0;
+ int found_nmapping = 0, found_deriv_map = 0;
int iFirstTimeNMap=1;
compatible_bump_init(&compat_bump);
@@ -2161,8 +2179,9 @@ void do_material_tex(ShadeInput *shi)
tex= mtex->tex;
if(tex==0) continue;
+ found_deriv_map = (tex->type==TEX_IMAGE) && (tex->imaflag & TEX_DERIVATIVEMAP);
use_compat_bump= (mtex->texflag & MTEX_COMPAT_BUMP);
- use_ntap_bump= (mtex->texflag & (MTEX_3TAP_BUMP|MTEX_5TAP_BUMP));
+ use_ntap_bump= ((mtex->texflag & (MTEX_3TAP_BUMP|MTEX_5TAP_BUMP))!=0 || found_deriv_map!=0) ? 1 : 0;
/* XXX texture node trees don't work for this yet */
if(tex->nodetree && tex->use_nodes) {
@@ -2354,7 +2373,6 @@ void do_material_tex(ShadeInput *shi)
f1= shi->vn[0];
f2= shi->vn[1];
texres.nor[0]= f1*co_nor+f2*si;
- texres.nor[1]= f2*co_nor-f1*si;
f1= shi->vn[1];
f2= shi->vn[2];
texres.nor[1]= f1*co_nor+f2*si;
diff --git a/source/blender/windowmanager/CMakeLists.txt b/source/blender/windowmanager/CMakeLists.txt
index dc83e29b497..7c34c086b2e 100644
--- a/source/blender/windowmanager/CMakeLists.txt
+++ b/source/blender/windowmanager/CMakeLists.txt
@@ -130,7 +130,7 @@ if(APPLE)
endif()
if(WITH_BUILDINFO)
- add_definitions(-DNAN_BUILDINFO)
+ add_definitions(-DWITH_BUILDINFO)
endif()
blender_add_lib_nolist(bf_windowmanager "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/windowmanager/SConscript b/source/blender/windowmanager/SConscript
index e548d99e9a5..80c526f8649 100644
--- a/source/blender/windowmanager/SConscript
+++ b/source/blender/windowmanager/SConscript
@@ -37,6 +37,6 @@ if env['OURPLATFORM'] != 'darwin' or env['WITH_GHOST_COCOA']:
sources.remove('intern' + os.sep + 'wm_apple.c')
if env['BF_BUILDINFO']:
- defs.append('NAN_BUILDINFO')
+ defs.append('WITH_BUILDINFO')
env.BlenderLib ( 'bf_windowmanager', sources, Split(incs), defines=defs, libtype=['core'], priority=[5] )
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index e1b8cefca4b..5bdf1ec2787 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -300,6 +300,8 @@ int WM_jobs_test(struct wmWindowManager *wm, void *owner);
float WM_jobs_progress(struct wmWindowManager *wm, void *owner);
char *WM_jobs_name(struct wmWindowManager *wm, void *owner);
+int WM_jobs_is_running(struct wmJob *);
+void* WM_jobs_get_customdata(struct wmJob *);
void WM_jobs_customdata(struct wmJob *, void *customdata, void (*free)(void *));
void WM_jobs_timer(struct wmJob *, double timestep, unsigned int note, unsigned int endnote);
void WM_jobs_callbacks(struct wmJob *,
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 413ff181f11..27586525253 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -531,6 +531,7 @@ static int wm_operator_exec(bContext *C, wmOperator *op, int repeat)
wm->op_undo_depth++;
retval= op->type->exec(C, op);
+ OPERATOR_RETVAL_CHECK(retval);
if(op->type->flag & OPTYPE_UNDO && CTX_wm_manager(C) == wm)
wm->op_undo_depth--;
@@ -690,6 +691,7 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P
wm->op_undo_depth++;
retval= op->type->invoke(C, op, event);
+ OPERATOR_RETVAL_CHECK(retval);
if(op->type->flag & OPTYPE_UNDO && CTX_wm_manager(C) == wm)
wm->op_undo_depth--;
@@ -699,6 +701,7 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P
wm->op_undo_depth++;
retval= op->type->exec(C, op);
+ OPERATOR_RETVAL_CHECK(retval);
if(op->type->flag & OPTYPE_UNDO && CTX_wm_manager(C) == wm)
wm->op_undo_depth--;
@@ -917,6 +920,7 @@ int WM_operator_call_py(bContext *C, wmOperatorType *ot, int context, PointerRNA
wm->op_undo_depth++;
retval= op->type->exec(C, op);
+ OPERATOR_RETVAL_CHECK(retval);
if(op->type->flag & OPTYPE_UNDO && CTX_wm_manager(C) == wm)
wm->op_undo_depth--;
@@ -1203,6 +1207,7 @@ static int wm_handler_operator_call(bContext *C, ListBase *handlers, wmEventHand
wm->op_undo_depth++;
retval= ot->modal(C, op, event);
+ OPERATOR_RETVAL_CHECK(retval);
if(ot->flag & OPTYPE_UNDO && CTX_wm_manager(C) == wm)
wm->op_undo_depth--;
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index cf91e219593..850de9029c9 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -116,7 +116,7 @@ static void wm_free_reports(bContext *C)
BKE_reports_clear(CTX_wm_reports(C));
}
-int wm_start_with_console = 0;
+int wm_start_with_console = 0; /* used in creator.c */
/* only called once, for startup */
void WM_init(bContext *C, int argc, const char **argv)
diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c
index 4ab4eebdfe1..f4e0b4ef06c 100644
--- a/source/blender/windowmanager/intern/wm_jobs.c
+++ b/source/blender/windowmanager/intern/wm_jobs.c
@@ -202,6 +202,20 @@ char *WM_jobs_name(wmWindowManager *wm, void *owner)
return NULL;
}
+int WM_jobs_is_running(wmJob *steve)
+{
+ return steve->running;
+}
+
+void* WM_jobs_get_customdata(wmJob * steve)
+{
+ if (!steve->customdata) {
+ return steve->run_customdata;
+ } else {
+ return steve->customdata;
+ }
+}
+
void WM_jobs_customdata(wmJob *steve, void *customdata, void (*free)(void *))
{
/* pending job? just free */
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c
index 6887aa4c717..0e94ad72d35 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -225,7 +225,7 @@ static wmKeyConfig *wm_keyconfig_list_find(ListBase *lb, char *idname)
return NULL;
}
-wmKeyConfig *WM_keyconfig_active(wmWindowManager *wm)
+static wmKeyConfig *WM_keyconfig_active(wmWindowManager *wm)
{
wmKeyConfig *keyconf;
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index fdf89cfd2be..a4efa8fff84 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -213,6 +213,7 @@ static int wm_macro_exec(bContext *C, wmOperator *op)
if(opm->type->exec) {
retval= opm->type->exec(C, opm);
+ OPERATOR_RETVAL_CHECK(retval);
if (retval & OPERATOR_FINISHED) {
MacroData *md = op->customdata;
@@ -237,6 +238,8 @@ static int wm_macro_invoke_internal(bContext *C, wmOperator *op, wmEvent *event,
else if(opm->type->exec)
retval= opm->type->exec(C, opm);
+ OPERATOR_RETVAL_CHECK(retval);
+
BLI_movelisttolist(&op->reports->list, &opm->reports->list);
if (retval & OPERATOR_FINISHED) {
@@ -265,6 +268,7 @@ static int wm_macro_modal(bContext *C, wmOperator *op, wmEvent *event)
printf("macro error, calling NULL modal()\n");
else {
retval = opm->type->modal(C, opm, event);
+ OPERATOR_RETVAL_CHECK(retval);
/* if this one is done but it's not the last operator in the macro */
if ((retval & OPERATOR_FINISHED) && opm->next) {
@@ -655,7 +659,9 @@ int WM_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
printf("WM_menu_invoke: %s \"%s\" is not an enum property\n", op->type->idname, RNA_property_identifier(prop));
}
else if (RNA_property_is_set(op->ptr, RNA_property_identifier(prop))) {
- return op->type->exec(C, op);
+ const int retval= op->type->exec(C, op);
+ OPERATOR_RETVAL_CHECK(retval);
+ return retval;
}
else {
pup= uiPupMenuBegin(C, op->type->name, ICON_NONE);
@@ -1202,7 +1208,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
MenuType *mt= WM_menutype_find("USERPREF_MT_splash", TRUE);
char url[96];
-#ifdef NAN_BUILDINFO
+#ifdef WITH_BUILDINFO
int ver_width, rev_width;
char *version_str = NULL;
char *revision_str = NULL;
@@ -1219,7 +1225,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
BLF_size(style->widgetlabel.uifont_id, style->widgetlabel.points, U.dpi);
ver_width = (int)BLF_width(style->widgetlabel.uifont_id, version_str) + 5;
rev_width = (int)BLF_width(style->widgetlabel.uifont_id, revision_str) + 5;
-#endif //NAN_BUILDINFO
+#endif //WITH_BUILDINFO
block= uiBeginBlock(C, ar, "_popup", UI_EMBOSS);
uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN);
@@ -1228,10 +1234,10 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
uiButSetFunc(but, wm_block_splash_close, block, NULL);
uiBlockSetFunc(block, wm_block_splash_refreshmenu, block, NULL);
-#ifdef NAN_BUILDINFO
+#ifdef WITH_BUILDINFO
uiDefBut(block, LABEL, 0, version_str, 494-ver_width, 282-24, ver_width, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
uiDefBut(block, LABEL, 0, revision_str, 494-rev_width, 282-36, rev_width, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
-#endif //NAN_BUILDINFO
+#endif //WITH_BUILDINFO
layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 10, 2, 480, 110, style);
@@ -2345,7 +2351,6 @@ static void gesture_circle_apply(bContext *C, wmOperator *op)
if(op->type->exec)
op->type->exec(C, op);
-
#ifdef GESTURE_MEMORY
circle_select_size= rect->xmax;
#endif
@@ -2566,7 +2571,6 @@ static void gesture_lasso_apply(bContext *C, wmOperator *op)
if(op->type->exec)
op->type->exec(C, op);
-
}
int WM_gesture_lasso_modal(bContext *C, wmOperator *op, wmEvent *event)
diff --git a/source/blenderplayer/bad_level_call_stubs/CMakeLists.txt b/source/blenderplayer/bad_level_call_stubs/CMakeLists.txt
index f852d061cf7..0610cf2fdbe 100644
--- a/source/blenderplayer/bad_level_call_stubs/CMakeLists.txt
+++ b/source/blenderplayer/bad_level_call_stubs/CMakeLists.txt
@@ -49,7 +49,12 @@ if(WITH_BUILDINFO)
list(APPEND SRC
../../creator/buildinfo.c
)
- add_definitions(-DBUILD_DATE)
+ add_definitions(-DBUILD_DATE="\"\""
+ -DBUILD_TIME="\"\""
+ -DBUILD_REV="\"\""
+ -DBUILD_PLATFORM="\"\""
+ -DBUILD_TYPE="\"\""
+ )
endif()
if(WITH_GAMEENGINE)
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 43fec85b5bf..315cd5312cf 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -25,9 +25,6 @@
#
# ***** END GPL LICENSE BLOCK *****
-# So BUILDINFO and BLENDERPATH strings are automatically quoted
-cmake_policy(SET CMP0005 NEW)
-
setup_libdirs()
blender_include_dirs(
@@ -136,6 +133,7 @@ if(WIN32 AND NOT UNIX)
endif()
if(WITH_BUILDINFO)
+ add_definitions(-DWITH_BUILDINFO)
# --------------------------------------------------------------------------
# These defines could all be moved into the header below
string(REPLACE " " "\ " BUILDINFO_CFLAGS "${CMAKE_C_FLAGS}")
@@ -547,11 +545,11 @@ elseif(WIN32)
if(WITH_CODEC_FFMPEG)
install(
FILES
- ${LIBDIR}/ffmpeg/lib/avcodec-52.dll
- ${LIBDIR}/ffmpeg/lib/avformat-52.dll
- ${LIBDIR}/ffmpeg/lib/avdevice-52.dll
- ${LIBDIR}/ffmpeg/lib/avutil-50.dll
- ${LIBDIR}/ffmpeg/lib/swscale-0.dll
+ ${LIBDIR}/ffmpeg/lib/avcodec-53.dll
+ ${LIBDIR}/ffmpeg/lib/avformat-53.dll
+ ${LIBDIR}/ffmpeg/lib/avdevice-53.dll
+ ${LIBDIR}/ffmpeg/lib/avutil-51.dll
+ ${LIBDIR}/ffmpeg/lib/swscale-2.dll
DESTINATION ${TARGETDIR}
)
diff --git a/source/creator/buildinfo.c b/source/creator/buildinfo.c
index 48a4352b11b..3853d6ca693 100644
--- a/source/creator/buildinfo.c
+++ b/source/creator/buildinfo.c
@@ -33,28 +33,24 @@
#ifdef WITH_BUILDINFO_HEADER
-#include "buildinfo.h"
+# include "buildinfo.h"
#endif
#ifdef BUILD_DATE
-/* copied from BLI_utildefines.h */
-#define STRINGIFY_ARG(x) #x
-#define STRINGIFY(x) STRINGIFY_ARG(x)
-
/* currently only these are defined in the header */
-char build_date[]= STRINGIFY(BUILD_DATE);
-char build_time[]= STRINGIFY(BUILD_TIME);
-char build_rev[]= STRINGIFY(BUILD_REV);
+char build_date[]= BUILD_DATE;
+char build_time[]= BUILD_TIME;
+char build_rev[]= BUILD_REV;
-char build_platform[]= STRINGIFY(BUILD_PLATFORM);
-char build_type[]= STRINGIFY(BUILD_TYPE);
+char build_platform[]= BUILD_PLATFORM;
+char build_type[]= BUILD_TYPE;
#ifdef BUILD_CFLAGS
-char build_cflags[]= STRINGIFY(BUILD_CFLAGS);
-char build_cxxflags[]= STRINGIFY(BUILD_CXXFLAGS);
-char build_linkflags[]= STRINGIFY(BUILD_LINKFLAGS);
-char build_system[]= STRINGIFY(BUILD_SYSTEM);
+char build_cflags[]= BUILD_CFLAGS;
+char build_cxxflags[]= BUILD_CXXFLAGS;
+char build_linkflags[]= BUILD_LINKFLAGS;
+char build_system[]= BUILD_SYSTEM;
#else
char build_cflags[]= "unmaintained buildsystem alert!";
char build_cxxflags[]= "unmaintained buildsystem alert!";
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 36209dbda78..9b2cfb08382 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -182,20 +182,6 @@ static void blender_esc(int sig)
}
#endif
-/* buildinfo can have quotes */
-#ifdef BUILD_DATE
-static void strip_quotes(char *str)
-{
- if(str[0] == '"') {
- int len= strlen(str) - 1;
- memmove(str, str+1, len);
- if(str[len-1] == '"') {
- str[len-1]= '\0';
- }
- }
-}
-#endif
-
static int print_version(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
{
printf (BLEND_VERSION_STRING_FMT);
@@ -369,9 +355,9 @@ static int debug_mode(int UNUSED(argc), const char **UNUSED(argv), void *data)
printf(BLEND_VERSION_STRING_FMT);
MEM_set_memory_debug();
-#ifdef NAN_BUILDINFO
+#ifdef WITH_BUILDINFO
printf("Build: %s %s %s %s\n", build_date, build_time, build_platform, build_type);
-#endif // NAN_BUILDINFO
+#endif // WITH_BUILDINFO
BLI_argsPrint(data);
return 0;
@@ -1181,18 +1167,6 @@ int main(int argc, const char **argv)
// need this.
BLI_where_am_i(bprogname, sizeof(bprogname), argv[0]);
-
-#ifdef BUILD_DATE
- strip_quotes(build_date);
- strip_quotes(build_time);
- strip_quotes(build_rev);
- strip_quotes(build_platform);
- strip_quotes(build_type);
- strip_quotes(build_cflags);
- strip_quotes(build_cxxflags);
- strip_quotes(build_linkflags);
- strip_quotes(build_system);
-#endif
BLI_threadapi_init();
diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
index a3ea85b605c..f00dd279361 100644
--- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
+++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
@@ -233,7 +233,6 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
ketsjiengine->SetCanvas(canvas);
ketsjiengine->SetRenderTools(rendertools);
ketsjiengine->SetRasterizer(rasterizer);
- ketsjiengine->SetNetworkDevice(networkdevice);
ketsjiengine->SetUseFixedTime(usefixed);
ketsjiengine->SetTimingDisplay(frameRate, profile, properties);
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index 7b9c5d4b4d6..35c319e263b 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -350,6 +350,8 @@ bool ConvertMaterial(
// use lighting?
material->ras_mode |= ( mat->mode & MA_SHLESS )?0:USE_LIGHT;
+ // cast shadows?
+ material->ras_mode |= ( mat->mode & MA_SHADBUF )?CAST_SHADOW:0;
MTex *mttmp = 0;
numchan = getNumTexChannels(mat);
int valid_index = 0;
diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
index b04a0d24e78..dd21e7ef263 100644
--- a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
+++ b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
@@ -1083,7 +1083,7 @@ bool KX_BlenderSceneConverter::LinkBlendFile(BlendHandle *bpy_openlib, const cha
* most are temp and NewRemoveObject frees m_map_gameobject_to_blender */
bool KX_BlenderSceneConverter::FreeBlendFile(struct Main *maggie)
{
- int maggie_index;
+ int maggie_index= -1;
int i=0;
if(maggie==NULL)
@@ -1101,6 +1101,10 @@ bool KX_BlenderSceneConverter::FreeBlendFile(struct Main *maggie)
i++;
}
+ /* should never happen but just to be safe */
+ if(maggie_index == -1)
+ return false;
+
m_DynamicMaggie.erase(m_DynamicMaggie.begin() + maggie_index);
tag_main(maggie, 1);
diff --git a/source/gameengine/GameLogic/SCA_RandomActuator.cpp b/source/gameengine/GameLogic/SCA_RandomActuator.cpp
index 3a6b00198e1..d76f3f775a5 100644
--- a/source/gameengine/GameLogic/SCA_RandomActuator.cpp
+++ b/source/gameengine/GameLogic/SCA_RandomActuator.cpp
@@ -152,7 +152,7 @@ bool SCA_RandomActuator::Update()
/* If x_1, x_2, ... is a sequence of random numbers with uniform */
/* distribution between zero and one, k is the first integer for */
/* which the product x_1*x_2*...*x_k < exp(-\lamba). */
- float a = 0.0, b = 0.0;
+ float a, b;
int res = 0;
/* The - sign is important here! The number to test for, a, must be */
/* between 0 and 1. */
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
index f2b322084ed..a4824e0004d 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
@@ -616,7 +616,6 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode)
m_ketsjiengine->SetCanvas(m_canvas);
m_ketsjiengine->SetRenderTools(m_rendertools);
m_ketsjiengine->SetRasterizer(m_rasterizer);
- m_ketsjiengine->SetNetworkDevice(m_networkdevice);
m_ketsjiengine->SetTimingDisplay(frameRate, false, false);
#ifdef WITH_PYTHON
diff --git a/source/gameengine/Ketsji/BL_Material.h b/source/gameengine/Ketsji/BL_Material.h
index ef25c9218a3..c0440e66501 100644
--- a/source/gameengine/Ketsji/BL_Material.h
+++ b/source/gameengine/Ketsji/BL_Material.h
@@ -157,7 +157,8 @@ enum BL_ras_mode
ALPHA=8,
// TRIANGLE=16,
USE_LIGHT=32,
- WIRE=64
+ WIRE=64,
+ CAST_SHADOW=128
};
// -------------------------------------
diff --git a/source/gameengine/Ketsji/BL_Shader.cpp b/source/gameengine/Ketsji/BL_Shader.cpp
index 621cabfe0cf..aea33246a3f 100644
--- a/source/gameengine/Ketsji/BL_Shader.cpp
+++ b/source/gameengine/Ketsji/BL_Shader.cpp
@@ -690,7 +690,7 @@ void BL_Shader::SetUniform(int uniform, const MT_Matrix3x3& vec, bool transpose)
float value[9];
value[0] = (float)vec[0][0]; value[1] = (float)vec[1][0]; value[2] = (float)vec[2][0];
value[3] = (float)vec[0][1]; value[4] = (float)vec[1][1]; value[5] = (float)vec[2][1];
- value[6] = (float)vec[0][2]; value[7] = (float)vec[1][2]; value[7] = (float)vec[2][2];
+ value[6] = (float)vec[0][2]; value[7] = (float)vec[1][2]; value[8] = (float)vec[2][2];
glUniformMatrix3fvARB(uniform, 1, transpose?GL_TRUE:GL_FALSE, value);
}
}
diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
index 9ff32ba57c5..4226896aec0 100644
--- a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
+++ b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
@@ -85,6 +85,7 @@ void KX_BlenderMaterial::Initialize(
m_flag |= (mMaterial->IdMode>=ONETEX)? RAS_MULTITEX: 0;
m_flag |= ((mMaterial->ras_mode & USE_LIGHT)!=0)? RAS_MULTILIGHT: 0;
m_flag |= (mMaterial->glslmat)? RAS_BLENDERGLSL: 0;
+ m_flag |= ((mMaterial->ras_mode & CAST_SHADOW)!=0)? RAS_CASTSHADOW: 0;
// figure max
int enabled = mMaterial->num_enabled;
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index 7ca8e7e3b52..74652877e48 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -1839,7 +1839,7 @@ PyObject* KX_GameObject::pyattr_get_lin_vel_min(void *self_v, const KX_PYATTRIBU
{
KX_GameObject* self= static_cast(self_v);
KX_IPhysicsController *spc = self->GetPhysicsController();
- return PyFloat_FromDouble(spc ? spc->GetLinVelocityMax() : 0.0f);
+ return PyFloat_FromDouble(spc ? spc->GetLinVelocityMin() : 0.0f);
}
int KX_GameObject::pyattr_set_lin_vel_min(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
index 0aa36b4cd5f..f41e0c16457 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
@@ -862,6 +862,8 @@ void KX_KetsjiEngine::Render()
{
if((*it)->GetViewport())
{
+ // Change the active camera so Python scripts can figure out what viewport they're in
+ scene->SetActiveCamera(*it);
if (scene->IsClearingZBuffer())
m_rasterizer->ClearDepthBuffer();
@@ -873,6 +875,10 @@ void KX_KetsjiEngine::Render()
it++;
}
+
+ // Now change the camera back
+ scene->SetActiveCamera(cam);
+
PostRenderScene(scene);
}
@@ -1315,6 +1321,10 @@ void KX_KetsjiEngine::RenderFrame(KX_Scene* scene, KX_Camera* cam)
if (scene->GetPhysicsEnvironment())
scene->GetPhysicsEnvironment()->debugDrawWorld();
+
+#ifdef WITH_PYTHON
+ scene->RunDrawingCallbacks(scene->GetPostDrawCB());
+#endif
}
void KX_KetsjiEngine::RenderFonts(KX_Scene* scene)
@@ -1336,9 +1346,6 @@ void KX_KetsjiEngine::PostRenderScene(KX_Scene* scene)
{
m_rendertools->MotionBlur(m_rasterizer);
scene->Render2DFilters(m_canvas);
-#ifdef WITH_PYTHON
- scene->RunDrawingCallbacks(scene->GetPostDrawCB());
-#endif
m_rasterizer->FlushDebugLines();
}
diff --git a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp
index 47f1dcb412a..5a1b52489b4 100644
--- a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp
+++ b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp
@@ -246,6 +246,11 @@ bool RAS_IPolyMaterial::UsesLighting(RAS_IRasterizer *rasty) const
return dolights;
}
+bool RAS_IPolyMaterial::CastsShadows() const
+{
+ return (m_flag & RAS_CASTSHADOW) != 0;
+}
+
bool RAS_IPolyMaterial::UsesObjectColor() const
{
return !(m_flag & RAS_BLENDERGLSL);
diff --git a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h
index b0e7daf81d7..2a5c6a179b6 100644
--- a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h
+++ b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h
@@ -62,7 +62,8 @@ enum MaterialProps
RAS_AUTOGEN =128,
RAS_NORMAL =256,
RAS_DEFMULTI =512,
- RAS_BLENDERGLSL =1024
+ RAS_BLENDERGLSL =1024,
+ RAS_CASTSHADOW =2048
};
/**
@@ -169,6 +170,7 @@ public:
virtual void GetMaterialRGBAColor(unsigned char *rgba) const;
virtual bool UsesLighting(RAS_IRasterizer *rasty) const;
virtual bool UsesObjectColor() const;
+ virtual bool CastsShadows() const;
virtual void Replace_IScene(SCA_IScene *val) {}; /* overridden by KX_BlenderMaterial */
diff --git a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
index 7647f7d3f27..85284096bb9 100644
--- a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
+++ b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
@@ -586,6 +586,9 @@ bool RAS_MaterialBucket::ActivateMaterial(const MT_Transform& cameratrans, RAS_I
RAS_IRenderTools *rendertools)
{
bool uselights;
+
+ if(rasty->GetDrawingMode() == RAS_IRasterizer::KX_SHADOW && !m_material->CastsShadows())
+ return false;
if(!rasty->SetMaterial(*m_material))
return false;
diff --git a/source/gameengine/VideoTexture/Exception.cpp b/source/gameengine/VideoTexture/Exception.cpp
index 8c8258585a5..fc316f1c3f0 100644
--- a/source/gameengine/VideoTexture/Exception.cpp
+++ b/source/gameengine/VideoTexture/Exception.cpp
@@ -105,7 +105,7 @@ Exception::Exception (ExceptionID & expID, RESULT rslt, const char * fil, int li
: m_expID (&expID), m_hRslt (rslt)
{
// set file and line
- if (strlen(fil) > 0 || lin > 0)
+ if (fil[0] != '\0' || lin > 0)
setFileLine (fil, lin);
}