diff --git a/CMakeLists.txt b/CMakeLists.txt index cf083b87bc7..6b8453139d8 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 @@ -499,6 +520,9 @@ if(UNIX AND NOT APPLE) # GNU Compiler if(CMAKE_COMPILER_IS_GNUCC) set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing") + # CLang is the same as GCC for now. + elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing") # Intel C++ Compiler elseif(CMAKE_C_COMPILER_ID MATCHES "Intel") # think these next two are broken @@ -691,11 +715,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() @@ -822,7 +846,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() diff --git a/GNUmakefile b/GNUmakefile index b6741d7e5f0..8446541cfae 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -35,17 +35,33 @@ OS_NCASE:=$(shell uname -s | tr '[A-Z]' '[a-z]') # Source and Build DIR's BLENDER_DIR:=$(shell pwd -P) BUILD_DIR:=$(shell dirname $(BLENDER_DIR))/build/$(OS_NCASE) +BUILD_TYPE:=Release +BUILD_CMAKE_ARGS:="" +# ----------------------------------------------------------------------------- +# additional targets for the build configuration + # support 'make debug' ifneq "$(findstring debug, $(MAKECMDGOALS))" "" BUILD_DIR:=$(BUILD_DIR)_debug BUILD_TYPE:=Debug -else - BUILD_TYPE:=Release +endif +ifneq "$(findstring lite, $(MAKECMDGOALS))" "" + BUILD_DIR:=$(BUILD_DIR)_lite + BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C$(BLENDER_DIR)/build_files/cmake/config/blender_lite.cmake +endif +ifneq "$(findstring headless, $(MAKECMDGOALS))" "" + BUILD_DIR:=$(BUILD_DIR)_bpy + BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C$(BLENDER_DIR)/build_files/cmake/config/blender_headless.cmake +endif +ifneq "$(findstring bpy, $(MAKECMDGOALS))" "" + BUILD_DIR:=$(BUILD_DIR)_bpy + BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake endif +# ----------------------------------------------------------------------------- # Get the number of cores for threaded build NPROCS:=1 ifeq ($(OS), Linux) @@ -61,14 +77,14 @@ ifeq ($(OS), NetBSD) NPROCS:=$(shell sysctl -a | grep "hw.ncpu " | cut -d" " -f3 ) endif - +# ----------------------------------------------------------------------------- # Build Blender all: @echo @echo Configuring Blender ... if test ! -f $(BUILD_DIR)/CMakeCache.txt ; then \ - cmake -H$(BLENDER_DIR) -B$(BUILD_DIR) -DCMAKE_BUILD_TYPE:STRING=$(BUILD_TYPE) ; \ + cmake $(BUILD_CMAKE_ARGS) -H$(BLENDER_DIR) -B$(BUILD_DIR) -DCMAKE_BUILD_TYPE:STRING=$(BUILD_TYPE); \ fi @echo @@ -80,9 +96,40 @@ all: @echo debug: all - # pass +lite: all +headless: all +bpy: all -# package types +# ----------------------------------------------------------------------------- +# Helo for build targets +help: + @echo "" + @echo "Convenience targets provided for building blender, (multiple at once can be used)" + @echo " * debug - build a debug binary" + @echo " * lite - disable non essential features for a smaller binary and faster build" + @echo " * headless - build without an interface (renderfarm or server automation)" + @echo " * bpy - build as a python module which can be loaded from python directly" + @echo "" + @echo "Project Files for IDE's" + @echo " * project_qtcreator - QtCreator Project Files" + @echo " * project_netbeans - NetBeans Project Files" + @echo " * project_eclipse - Eclipse CDT4 Project Files" + @echo "" + @echo "Package Targets" + @echo " * package_debian - build a debian package" + @echo " * package_pacman - build an arch linux pacmanpackage" + @echo " * package_archive - build an archive package" + @echo "" + @echo "Testing Targets (not assosiated with building blender)" + @echo " * test - run ctest, currently tests import/export, operator execution and that python modules load" + @echo " * test_cmake - runs our own cmake file checker which detects errors in the cmake file list definitions" + @echo " * test_pep8 - checks all python script are pep8 which are tagged to use the stricter formatting" + @echo " * test_deprecated - checks for deprecation tags in our code which may need to be removed" + @echo "" + +# ----------------------------------------------------------------------------- +# Packages +# package_debian: cd build_files/package_spec ; DEB_BUILD_OPTIONS="parallel=$(NPROCS)" sh ./build_debian.sh @@ -93,7 +140,10 @@ package_archive: make -C $(BUILD_DIR) -s package_archive @echo archive in "$(BUILD_DIR)/release" -# forward build targets + +# ----------------------------------------------------------------------------- +# Tests +# test: cd $(BUILD_DIR) ; ctest . --output-on-failure @@ -111,6 +161,21 @@ test_cmake: test_deprecated: python3 source/tests/check_deprecated.py + +# ----------------------------------------------------------------------------- +# Project Files +# + +project_qtcreator: + python3 build_files/cmake/cmake_qtcreator_project.py $(BUILD_DIR) + +project_netbeans: + python3 build_files/cmake/cmake_netbeans_project.py $(BUILD_DIR) + +project_eclipse: + cmake -G"Eclipse CDT4 - Unix Makefiles" -H$(BLENDER_DIR) -B$(BUILD_DIR) + + clean: $(MAKE) -C $(BUILD_DIR) clean diff --git a/SConstruct b/SConstruct index 81c12c7c318..7f11397a286 100644 --- a/SConstruct +++ b/SConstruct @@ -166,6 +166,13 @@ if sys.platform=='win32': env.SConscriptChdir(0) +# Remove major kernel version from linux platform. +# After Linus switched kernel to new version model this major version +# shouldn't take much sense for building rules. + +if re.match('linux[0-9]+', platform): + platform = 'linux' + crossbuild = B.arguments.get('BF_CROSS', None) if crossbuild and platform not in ('win32-vc', 'win64-vc'): platform = 'linuxcross' @@ -262,7 +269,7 @@ 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'): @@ -551,7 +558,7 @@ if env['OURPLATFORM']!='darwin': scriptinstall.append(env.Install(dir=dir,source=source)) #-- icons -if env['OURPLATFORM']=='linux2': +if env['OURPLATFORM']=='linux': iconlist = [] icontargetlist = [] @@ -630,7 +637,7 @@ textinstall = env.Install(dir=env['BF_INSTALLDIR'], source=textlist) if env['OURPLATFORM']=='darwin': allinstall = [blenderinstall, plugininstall, textinstall] -elif env['OURPLATFORM']=='linux2': +elif env['OURPLATFORM']=='linux': allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall, iconinstall] else: allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall] 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/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_headless.cmake b/build_files/cmake/config/blender_headless.cmake new file mode 100644 index 00000000000..bd69eed30dd --- /dev/null +++ b/build_files/cmake/config/blender_headless.cmake @@ -0,0 +1,24 @@ +# headless configuration, useful in for servers or renderfarms +# builds without a windowing system (X11/Windows/Cocoa). +# +# Example usage: +# cmake -C../blender/build_files/cmake/config/blender_headless.cmake ../blender +# + +set(WITH_HEADLESS ON CACHE FORCE BOOL) +set(WITH_GAMEENGINE OFF CACHE FORCE BOOL) + +# disable audio, its possible some devs may want this but for now disable +# so the python module doesnt hold the audio device and loads quickly. +set(WITH_AUDASPACE OFF CACHE FORCE BOOL) +set(WITH_SAMPLERATE OFF CACHE FORCE BOOL) +set(WITH_FFTW3 OFF CACHE FORCE BOOL) +set(WITH_JACK OFF CACHE FORCE BOOL) +set(WITH_SDL OFF CACHE FORCE BOOL) +set(WITH_OPENAL OFF CACHE FORCE BOOL) +set(WITH_CODEC_FFMPEG OFF CACHE FORCE BOOL) +set(WITH_CODEC_SNDFILE OFF CACHE FORCE BOOL) + +# other features which are not especially useful as a python module +set(WITH_X11_XINPUT OFF CACHE FORCE BOOL) +set(WITH_INPUT_NDOF OFF CACHE FORCE BOOL) diff --git a/build_files/cmake/config/blender_lite.cmake b/build_files/cmake/config/blender_lite.cmake new file mode 100644 index 00000000000..d2b791baede --- /dev/null +++ b/build_files/cmake/config/blender_lite.cmake @@ -0,0 +1,43 @@ +# turn everything OFF CACHE FORCE BOOL) except for python which defaults to ON +# and is needed for the UI +# +# Example usage: +# cmake -C../blender/build_files/cmake/config/blender_lite.cmake ../blender +# + +set(WITH_INSTALL_PORTABLE ON CACHE FORCE BOOL) + +set(WITH_BUILDINFO OFF CACHE FORCE BOOL) +set(WITH_BUILTIN_GLEW OFF CACHE FORCE BOOL) +set(WITH_BULLET OFF CACHE FORCE BOOL) +set(WITH_CODEC_FFMPEG OFF CACHE FORCE BOOL) +set(WITH_CODEC_SNDFILE OFF CACHE FORCE BOOL) +set(WITH_FFTW3 OFF CACHE FORCE BOOL) +set(WITH_GAMEENGINE OFF CACHE FORCE BOOL) +set(WITH_IK_ITASC OFF CACHE FORCE BOOL) +set(WITH_IMAGE_CINEON OFF CACHE FORCE BOOL) +set(WITH_IMAGE_DDS OFF CACHE FORCE BOOL) +set(WITH_IMAGE_FRAMESERVER OFF CACHE FORCE BOOL) +set(WITH_IMAGE_HDR OFF CACHE FORCE BOOL) +set(WITH_IMAGE_OPENEXR OFF CACHE FORCE BOOL) +set(WITH_IMAGE_OPENJPEG OFF CACHE FORCE BOOL) +set(WITH_IMAGE_REDCODE OFF CACHE FORCE BOOL) +set(WITH_IMAGE_TIFF OFF CACHE FORCE BOOL) +set(WITH_INPUT_NDOF OFF CACHE FORCE BOOL) +set(WITH_INTERNATIONAL OFF CACHE FORCE BOOL) +set(WITH_JACK OFF CACHE FORCE BOOL) +set(WITH_LZMA OFF CACHE FORCE BOOL) +set(WITH_LZO OFF CACHE FORCE BOOL) +set(WITH_MOD_BOOLEAN OFF CACHE FORCE BOOL) +set(WITH_MOD_DECIMATE OFF CACHE FORCE BOOL) +set(WITH_MOD_FLUID OFF CACHE FORCE BOOL) +set(WITH_MOD_SMOKE OFF CACHE FORCE BOOL) +set(WITH_AUDASPACE OFF CACHE FORCE BOOL) +set(WITH_OPENAL OFF CACHE FORCE BOOL) +set(WITH_OPENCOLLADA OFF CACHE FORCE BOOL) +set(WITH_OPENMP OFF CACHE FORCE BOOL) +set(WITH_PYTHON_INSTALL OFF CACHE FORCE BOOL) +set(WITH_RAYOPTIMIZATION OFF CACHE FORCE BOOL) +set(WITH_SAMPLERATE OFF CACHE FORCE BOOL) +set(WITH_SDL OFF CACHE FORCE BOOL) +set(WITH_X11_XINPUT OFF CACHE FORCE BOOL) diff --git a/build_files/cmake/config/bpy_module.cmake b/build_files/cmake/config/bpy_module.cmake new file mode 100644 index 00000000000..5392705f0dc --- /dev/null +++ b/build_files/cmake/config/bpy_module.cmake @@ -0,0 +1,34 @@ +# defaults for building blender as a python module 'bpy' +# +# Example usage: +# cmake -C../blender/build_files/cmake/config/bpy_module.cmake ../blender +# + +set(WITH_PYTHON_MODULE ON CACHE FORCE BOOL) + +# install into the systems python dir +set(WITH_INSTALL_PORTABLE OFF CACHE FORCE BOOL) + +# no point int copying python into python +set(WITH_PYTHON_INSTALL OFF CACHE FORCE BOOL) + +# dont build the game engine +set(WITH_GAMEENGINE OFF CACHE FORCE BOOL) + +# disable audio, its possible some devs may want this but for now disable +# so the python module doesnt hold the audio device and loads quickly. +set(WITH_AUDASPACE OFF CACHE FORCE BOOL) +set(WITH_SAMPLERATE OFF CACHE FORCE BOOL) +set(WITH_FFTW3 OFF CACHE FORCE BOOL) +set(WITH_JACK OFF CACHE FORCE BOOL) +set(WITH_SDL OFF CACHE FORCE BOOL) +set(WITH_OPENAL OFF CACHE FORCE BOOL) +set(WITH_CODEC_FFMPEG OFF CACHE FORCE BOOL) +set(WITH_CODEC_SNDFILE OFF CACHE FORCE BOOL) + +# other features which are not especially useful as a python module +set(WITH_X11_XINPUT OFF CACHE FORCE BOOL) +set(WITH_INPUT_NDOF OFF CACHE FORCE BOOL) +set(WITH_OPENCOLLADA OFF CACHE FORCE BOOL) +set(WITH_INTERNATIONAL OFF CACHE FORCE BOOL) +set(WITH_BULLET OFF CACHE FORCE BOOL) 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/scons/config/linux2-config.py b/build_files/scons/config/linux-config.py similarity index 98% rename from build_files/scons/config/linux2-config.py rename to build_files/scons/config/linux-config.py index d8e227cfb21..c6613ec0ac1 100644 --- a/build_files/scons/config/linux2-config.py +++ b/build_files/scons/config/linux-config.py @@ -1,4 +1,4 @@ -LCGDIR = '../lib/linux2' +LCGDIR = '../lib/linux' LIBDIR = "${LCGDIR}" BF_PYTHON_ABI_FLAGS = 'm' # Most common for linux distros @@ -241,8 +241,8 @@ BF_PROFILE_LINKFLAGS = ['-pg'] BF_DEBUG = False BF_DEBUG_CCFLAGS = ['-g', '-D_DEBUG'] -BF_BUILDDIR = '../build/linux2' -BF_INSTALLDIR='../install/linux2' +BF_BUILDDIR = '../build/linux' +BF_INSTALLDIR='../install/linux' #Link against pthread PLATFORM_LINKFLAGS = ['-pthread'] 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 3416545850d..edbe26f5bea 100644 --- a/build_files/scons/tools/Blender.py +++ b/build_files/scons/tools/Blender.py @@ -206,7 +206,7 @@ def setup_staticlibs(lenv): if lenv['WITH_BF_STATICJEMALLOC']: statlibs += Split(lenv['BF_JEMALLOC_LIB_STATIC']) - if lenv['OURPLATFORM']=='linux2': + if lenv['OURPLATFORM']=='linux': if lenv['WITH_BF_3DMOUSE']: libincs += Split(lenv['BF_3DMOUSE_LIBPATH']) if lenv['WITH_BF_STATIC3DMOUSE']: @@ -277,7 +277,7 @@ def setup_syslibs(lenv): if not lenv['WITH_BF_STATICJEMALLOC']: syslibs += Split(lenv['BF_JEMALLOC_LIB']) - if lenv['OURPLATFORM']=='linux2': + if lenv['OURPLATFORM']=='linux': if lenv['WITH_BF_3DMOUSE']: if not lenv['WITH_BF_STATIC3DMOUSE']: syslibs += Split(lenv['BF_3DMOUSE_LIB']) @@ -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']) @@ -775,7 +775,7 @@ class BlenderEnvironment(SConsEnvironment): if lenv['OURPLATFORM'] in ('win32-vc', 'cygwin', 'win64-vc'): if lenv['BF_DEBUG']: lenv.Prepend(LINKFLAGS = ['/DEBUG','/PDB:'+progname+'.pdb','/NODEFAULTLIB:libcmt']) - if lenv['OURPLATFORM']=='linux2': + if lenv['OURPLATFORM']=='linux': if lenv['WITH_BF_PYTHON']: lenv.Append(LINKFLAGS = lenv['BF_PYTHON_LINKFLAGS']) if lenv['OURPLATFORM']=='sunos5': diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py index 25e0582c536..d222c0bcc18 100644 --- a/build_files/scons/tools/btools.py +++ b/build_files/scons/tools/btools.py @@ -568,7 +568,7 @@ def buildslave(target=None, source=None, env=None): extension = '.tar.bz2' platform = env['OURPLATFORM'].split('-')[0] - if platform == 'linux2': + if platform == 'linux': import platform bitness = platform.architecture()[0] diff --git a/doc/build_systems/scons-dev.txt b/doc/build_systems/scons-dev.txt index d13ea7c036f..ca1b3924804 100644 --- a/doc/build_systems/scons-dev.txt +++ b/doc/build_systems/scons-dev.txt @@ -27,7 +27,7 @@ $Id$ filenames have the form (platform)-config.py, where platform one of: * darwin - * linux2 + * linux * win32-mingw * win32-vc diff --git a/doc/build_systems/scons.txt b/doc/build_systems/scons.txt index b4d9a905885..9d018bcc790 100644 --- a/doc/build_systems/scons.txt +++ b/doc/build_systems/scons.txt @@ -76,7 +76,7 @@ $Id$ $BLENDERHOME/config. Your platform specific defaults are in (platform)-config.py, where platform is one of: - - linux2, for machines running Linux + - linux, for machines running Linux - win32-vc, for Windows machines, compiling with a Microsoft compiler - win32-mingw, for Windows machines, compiling with the MingW compiler - darwin, for OS X machines 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/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index 0a694ef1bc4..9566ef43845 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -74,10 +74,10 @@ else: "bpy.props", "bpy.utils", "bpy.context", - "bpy.types", # supports filtering + #"bpy.types", # supports filtering "bpy.ops", # supports filtering "bpy_extras", - # "bge", + "bge", "aud", "bgl", "blf", @@ -86,7 +86,7 @@ else: "Freestyle", ) - 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 @@ -752,6 +752,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 diff --git a/extern/bullet2/src/SConscript b/extern/bullet2/src/SConscript index 5cb9185d6a1..fa00ad7bc2e 100644 --- a/extern/bullet2/src/SConscript +++ b/extern/bullet2/src/SConscript @@ -11,10 +11,10 @@ if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): defs += ' WIN32 NDEBUG _WINDOWS' #cflags += ['/MT', '/W3', '/GX', '/O2', '/Op'] cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6', '/O3', '/EHcs'] -elif env['OURPLATFORM']=='win32-mingw': +elif env['OURPLATFORM'] in ('win32-mingw', 'linuxcross'): defs += ' NDEBUG' cflags += ['-O2'] -elif sys.platform=='linux2' or sys.platform=='linux-i386' or sys.platform=='freebsd4' or sys.platform=='freebsd5': +elif env['OURPLATFORM'] in ('linux', 'freebsd4', 'freebsd5'): defs += ' NDEBUG' cflags += ['-O2'] elif sys.platform=='darwin': diff --git a/intern/ghost/SConscript b/intern/ghost/SConscript index 234fc0a172e..82f65c1c8ae 100644 --- a/intern/ghost/SConscript +++ b/intern/ghost/SConscript @@ -26,7 +26,7 @@ if env['WITH_GHOST_SDL']: pass incs += ' ' + env['BF_SDL_INC'] defs += ['WITH_GHOST_SDL'] -elif window_system in ('linux2', 'openbsd3', 'sunos5', 'freebsd7', 'freebsd8', 'freebsd9', 'irix6', 'aix4', 'aix5'): +elif window_system in ('linux', 'openbsd3', 'sunos5', 'freebsd7', 'freebsd8', 'freebsd9', 'irix6', 'aix4', 'aix5'): for f in pf: try: sources.remove('intern' + os.sep + f + 'Win32.cpp') @@ -81,7 +81,7 @@ else: if env['WITH_BF_3DMOUSE']: defs.append('WITH_INPUT_NDOF') - if env['OURPLATFORM']=='linux2': + if env['OURPLATFORM']=='linux': incs += ' ' + env['BF_3DMOUSE_INC'] else: sources.remove('intern' + os.sep + 'GHOST_NDOFManager.cpp') diff --git a/intern/ghost/intern/GHOST_NDOFManagerCocoa.h b/intern/ghost/intern/GHOST_NDOFManagerCocoa.h index e9897f30104..5e85808b5a6 100644 --- a/intern/ghost/intern/GHOST_NDOFManagerCocoa.h +++ b/intern/ghost/intern/GHOST_NDOFManagerCocoa.h @@ -43,6 +43,7 @@ public: // whether multi-axis functionality is available (via the OS or driver) // does not imply that a device is plugged in or being used bool available(); + bool oldDRV(); private: unsigned short m_clientID; diff --git a/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm b/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm index 409ed953134..f665f5f6b39 100644 --- a/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm +++ b/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm @@ -143,7 +143,7 @@ GHOST_NDOFManagerCocoa::GHOST_NDOFManagerCocoa(GHOST_System& sys) // printf("ndof: client id = %d\n", m_clientID); - if (SetConnexionClientButtonMask != NULL) { + if (oldDRV()) { has_old_driver = false; SetConnexionClientButtonMask(m_clientID, kConnexionMaskAllButtons); } @@ -176,5 +176,14 @@ extern "C" { return InstallConnexionHandlers != NULL; // this means that the driver is installed and dynamically linked to blender } + + bool GHOST_NDOFManagerCocoa::oldDRV() + { + extern OSErr SetConnexionClientButtonMask() __attribute__((weak_import)); + // Make the linker happy for the framework check (see link below for more info) + // http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html + return SetConnexionClientButtonMask != NULL; + // this means that the driver has this symbol + } } #endif // WITH_INPUT_NDOF diff --git a/intern/ghost/intern/GHOST_SystemSDL.cpp b/intern/ghost/intern/GHOST_SystemSDL.cpp index aebb94d5cdf..f2cc45731fa 100644 --- a/intern/ghost/intern/GHOST_SystemSDL.cpp +++ b/intern/ghost/intern/GHOST_SystemSDL.cpp @@ -385,8 +385,26 @@ GHOST_SystemSDL::processEvent(SDL_Event *sdl_event) GHOST_TKey gkey= convertSDLKey(sdl_sub_evt.keysym.scancode); /* note, the sdl_sub_evt.keysym.sym is truncated, for unicode support ghost has to be modified */ + /* printf("%d\n", sym); */ if(sym > 127) { - sym= 0; + switch(sym) { + case SDLK_KP_DIVIDE: sym= '/'; break; + case SDLK_KP_MULTIPLY: sym= '*'; break; + case SDLK_KP_MINUS: sym= '-'; break; + case SDLK_KP_PLUS: sym= '+'; break; + case SDLK_KP_1: sym= '1'; break; + case SDLK_KP_2: sym= '2'; break; + case SDLK_KP_3: sym= '3'; break; + case SDLK_KP_4: sym= '4'; break; + case SDLK_KP_5: sym= '5'; break; + case SDLK_KP_6: sym= '6'; break; + case SDLK_KP_7: sym= '7'; break; + case SDLK_KP_8: sym= '8'; break; + case SDLK_KP_9: sym= '9'; break; + case SDLK_KP_0: sym= '0'; break; + case SDLK_KP_PERIOD: sym= '.'; break; + default: sym= 0; break; + } } else { if(sdl_sub_evt.keysym.mod & (KMOD_LSHIFT|KMOD_RSHIFT)) { diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 1ba51376ff9..0c8c0adf041 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -612,7 +612,6 @@ GHOST_TSuccess GHOST_WindowWin32::setState(GHOST_TWindowState state) wp.showCmd = SW_SHOWMINIMIZED; break; case GHOST_kWindowStateMaximized: - ShowWindow(m_hWnd, SW_HIDE); wp.showCmd = SW_SHOWMAXIMIZED; SetWindowLongPtr(m_hWnd, GWL_STYLE, WS_OVERLAPPEDWINDOW); break; @@ -629,12 +628,12 @@ GHOST_TSuccess GHOST_WindowWin32::setState(GHOST_TWindowState state) break; case GHOST_kWindowStateNormal: default: - ShowWindow(m_hWnd, SW_HIDE); wp.showCmd = SW_SHOWNORMAL; SetWindowLongPtr(m_hWnd, GWL_STYLE, WS_OVERLAPPEDWINDOW); break; } - return ::SetWindowPlacement(m_hWnd, &wp) == TRUE ? GHOST_kSuccess : GHOST_kFailure; + SetWindowPos(m_hWnd, 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED); /*Clears window cache for SetWindowLongPtr */ + return ::SetWindowPlacement(m_hWnd, &wp) == TRUE ? GHOST_kSuccess : GHOST_kFailure; } diff --git a/release/scripts/modules/bpy_extras/io_utils.py b/release/scripts/modules/bpy_extras/io_utils.py index bb4e95c051f..6271c1f77b5 100644 --- a/release/scripts/modules/bpy_extras/io_utils.py +++ b/release/scripts/modules/bpy_extras/io_utils.py @@ -439,7 +439,7 @@ def path_reference_copy(copy_set, report=print): shutil.copy(file_src, file_dst) -def unique_name(key, name, name_dict, name_max=-1, clean_func=None): +def unique_name(key, name, name_dict, name_max=-1, clean_func=None, sep="."): """ Helper function for storing unique names which may have special characters stripped and restricted to a maximum length. @@ -456,6 +456,9 @@ def unique_name(key, name, name_dict, name_max=-1, clean_func=None): :type name_dict: dict :arg clean_func: Function to call on *name* before creating a unique value. :type clean_func: function + :arg sep: Separator to use when between the name and a number when a + duplicate name is found. + :type sep: string """ name_new = name_dict.get(key) if name_new is None: @@ -466,14 +469,15 @@ def unique_name(key, name, name_dict, name_max=-1, clean_func=None): if name_max == -1: while name_new in name_dict_values: - name_new = "%s.%03d" % (name_new_orig, count) + name_new = "%s%s%03d" % (name_new_orig, sep, count) count += 1 else: name_new = name_new[:name_max] while name_new in name_dict_values: count_str = "%03d" % count - name_new = "%.*s.%s" % (name_max - (len(count_str) + 1), + name_new = "%.*s%s%s" % (name_max - (len(count_str) + 1), name_new_orig, + sep, count_str, ) count += 1 diff --git a/release/scripts/modules/bpy_extras/mesh_utils.py b/release/scripts/modules/bpy_extras/mesh_utils.py index c965169ff04..4b5e3eeb066 100644 --- a/release/scripts/modules/bpy_extras/mesh_utils.py +++ b/release/scripts/modules/bpy_extras/mesh_utils.py @@ -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: diff --git a/release/scripts/startup/bl_operators/add_mesh_torus.py b/release/scripts/startup/bl_operators/add_mesh_torus.py index 1c4518c4feb..056b3478c2b 100644 --- a/release/scripts/startup/bl_operators/add_mesh_torus.py +++ b/release/scripts/startup/bl_operators/add_mesh_torus.py @@ -88,36 +88,62 @@ class AddTorus(Operator): bl_label = "Add Torus" bl_options = {'REGISTER', 'UNDO'} - major_radius = FloatProperty(name="Major Radius", + major_radius = FloatProperty( + name="Major Radius", description=("Radius from the origin to the " "center of the cross sections"), - default=1.0, min=0.01, max=100.0) - minor_radius = FloatProperty(name="Minor Radius", + min=0.01, max=100.0, + default=1.0, + ) + minor_radius = FloatProperty( + name="Minor Radius", description="Radius of the torus' cross section", - default=0.25, min=0.01, max=100.0) - major_segments = IntProperty(name="Major Segments", + min=0.01, max=100.0, + default=0.25, + ) + major_segments = IntProperty( + name="Major Segments", description="Number of segments for the main ring of the torus", - default=48, min=3, max=256) - minor_segments = IntProperty(name="Minor Segments", + min=3, max=256, + default=48, + ) + minor_segments = IntProperty( + name="Minor Segments", description="Number of segments for the minor ring of the torus", - default=12, min=3, max=256) - use_abso = BoolProperty(name="Use Int+Ext Controls", + min=3, max=256, + default=12, + ) + use_abso = BoolProperty( + name="Use Int+Ext Controls", description="Use the Int / Ext controls for torus dimensions", - default=False) - abso_major_rad = FloatProperty(name="Exterior Radius", + default=False, + ) + abso_major_rad = FloatProperty( + name="Exterior Radius", description="Total Exterior Radius of the torus", - default=1.0, min=0.01, max=100.0) - abso_minor_rad = FloatProperty(name="Inside Radius", + min=0.01, max=100.0, + default=1.0, + ) + abso_minor_rad = FloatProperty( + name="Inside Radius", description="Total Interior Radius of the torus", - default=0.5, min=0.01, max=100.0) + min=0.01, max=100.0, + default=0.5, + ) # generic transform props - view_align = BoolProperty(name="Align to View", - default=False) - location = FloatVectorProperty(name="Location", - subtype='TRANSLATION') - rotation = FloatVectorProperty(name="Rotation", - subtype='EULER') + view_align = BoolProperty( + name="Align to View", + default=False, + ) + location = FloatVectorProperty( + name="Location", + subtype='TRANSLATION', + ) + rotation = FloatVectorProperty( + name="Rotation", + subtype='EULER', + ) def execute(self, context): diff --git a/release/scripts/startup/bl_operators/mesh.py b/release/scripts/startup/bl_operators/mesh.py index 4114381f3dc..5f6583754e9 100644 --- a/release/scripts/startup/bl_operators/mesh.py +++ b/release/scripts/startup/bl_operators/mesh.py @@ -74,11 +74,11 @@ class MeshMirrorUV(Operator): bl_label = "Copy Mirrored UV coords" bl_options = {'REGISTER', 'UNDO'} - direction = EnumProperty(items=( - ('POSITIVE', "Positive", ""), - ('NEGATIVE', "Negative", "")), - name="Axis Direction", - description="") + direction = EnumProperty( + name="Axis Direction", + items=(('POSITIVE', "Positive", ""), + ('NEGATIVE', "Negative", "")), + ) @classmethod def poll(cls, context): 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/object.py b/release/scripts/startup/bl_operators/object.py index 79f57990f37..d26ec53e4e3 100644 --- a/release/scripts/startup/bl_operators/object.py +++ b/release/scripts/startup/bl_operators/object.py @@ -195,8 +195,12 @@ class SubdivisionSet(Operator): bl_label = "Subdivision Set" bl_options = {'REGISTER', 'UNDO'} - level = IntProperty(name="Level", - default=1, min=-100, max=100, soft_min=-6, soft_max=6) + level = IntProperty( + name="Level", + min=-100, max=100, + soft_min=-6, soft_max=6, + default=1, + ) relative = BoolProperty( name="Relative", diff --git a/release/scripts/startup/bl_operators/object_align.py b/release/scripts/startup/bl_operators/object_align.py index d4a3d826f2f..50e9bfb5b98 100644 --- a/release/scripts/startup/bl_operators/object_align.py +++ b/release/scripts/startup/bl_operators/object_align.py @@ -351,33 +351,34 @@ class AlignObjects(Operator): description=("Enables high quality calculation of the " "bounding box for perfect results on complex " "shape meshes with rotation/scale (Slow)"), - default=True) - - align_mode = EnumProperty(items=( - ('OPT_1', "Negative Sides", ""), - ('OPT_2', "Centers", ""), - ('OPT_3', "Positive Sides", "")), - name="Align Mode:", - description="", - default='OPT_2') - - relative_to = EnumProperty(items=( - ('OPT_1', "Scene Origin", ""), - ('OPT_2', "3D Cursor", ""), - ('OPT_3', "Selection", ""), - ('OPT_4', "Active", "")), - name="Relative To:", - description="", - default='OPT_4') - - align_axis = EnumProperty(items=( - ('X', "X", ""), - ('Y', "Y", ""), - ('Z', "Z", ""), - ), - name="Align", - description="Align to axis", - options={'ENUM_FLAG'}) + default=True, + ) + align_mode = EnumProperty( + name="Align Mode:", + items=(('OPT_1', "Negative Sides", ""), + ('OPT_2', "Centers", ""), + ('OPT_3', "Positive Sides", ""), + ), + default='OPT_2', + ) + relative_to = EnumProperty( + name="Relative To:", + items=(('OPT_1', "Scene Origin", ""), + ('OPT_2', "3D Cursor", ""), + ('OPT_3', "Selection", ""), + ('OPT_4', "Active", ""), + ), + default='OPT_4', + ) + align_axis = EnumProperty( + name="Align", + description="Align to axis", + items=(('X', "X", ""), + ('Y', "Y", ""), + ('Z', "Z", ""), + ), + options={'ENUM_FLAG'}, + ) @classmethod def poll(cls, context): diff --git a/release/scripts/startup/bl_operators/object_quick_effects.py b/release/scripts/startup/bl_operators/object_quick_effects.py index cd206da3a8e..48b547980d4 100644 --- a/release/scripts/startup/bl_operators/object_quick_effects.py +++ b/release/scripts/startup/bl_operators/object_quick_effects.py @@ -51,19 +51,25 @@ class QuickFur(Operator): bl_label = "Quick Fur" bl_options = {'REGISTER', 'UNDO'} - density = EnumProperty(items=( - ('LIGHT', "Light", ""), - ('MEDIUM', "Medium", ""), - ('HEAVY', "Heavy", "")), - name="Fur Density", - description="", - default='MEDIUM') - - view_percentage = IntProperty(name="View %", - default=10, min=1, max=100, soft_min=1, soft_max=100) - - length = FloatProperty(name="Length", - default=0.1, min=0.001, max=100, soft_min=0.01, soft_max=10) + density = EnumProperty( + name="Fur Density", + items=(('LIGHT', "Light", ""), + ('MEDIUM', "Medium", ""), + ('HEAVY', "Heavy", "")), + default='MEDIUM', + ) + view_percentage = IntProperty( + name="View %", + min=1, max=100, + soft_min=1, soft_max=100, + default=10, + ) + length = FloatProperty( + name="Length", + min=0.001, max=100, + soft_min=0.01, soft_max=10, + default=0.1, + ) def execute(self, context): fake_context = bpy.context.copy() @@ -110,31 +116,50 @@ class QuickExplode(Operator): bl_label = "Quick Explode" bl_options = {'REGISTER', 'UNDO'} - style = EnumProperty(items=( - ('EXPLODE', "Explode", ""), - ('BLEND', "Blend", "")), - name="Explode Style", - description="", - default='EXPLODE') + style = EnumProperty( + name="Explode Style", + items=(('EXPLODE', "Explode", ""), + ('BLEND', "Blend", "")), + default='EXPLODE', + ) + amount = IntProperty( + name="Amount of pieces", + min=2, max=10000, + soft_min=2, soft_max=10000, + default=100, + ) + frame_duration = IntProperty( + name="Duration", + min=1, max=300000, + soft_min=1, soft_max=10000, + default=50, + ) - amount = IntProperty(name="Amount of pieces", - default=100, min=2, max=10000, soft_min=2, soft_max=10000) + frame_start = IntProperty( + name="Start Frame", + min=1, max=300000, + soft_min=1, soft_max=10000, + default=1, + ) + frame_end = IntProperty( + name="End Frame", + min=1, max=300000, + soft_min=1, soft_max=10000, + default=10, + ) - frame_duration = IntProperty(name="Duration", - default=50, min=1, max=300000, soft_min=1, soft_max=10000) + velocity = FloatProperty( + name="Outwards Velocity", + min=0, max=300000, + soft_min=0, soft_max=10, + default=1, + ) - frame_start = IntProperty(name="Start Frame", - default=1, min=1, max=300000, soft_min=1, soft_max=10000) - - frame_end = IntProperty(name="End Frame", - default=10, min=1, max=300000, soft_min=1, soft_max=10000) - - velocity = FloatProperty(name="Outwards Velocity", - default=1, min=0, max=300000, soft_min=0, soft_max=10) - - fade = BoolProperty(name="Fade", - description="Fade the pieces over time.", - default=True) + fade = BoolProperty( + name="Fade", + description="Fade the pieces over time.", + default=True, + ) def execute(self, context): fake_context = bpy.context.copy() @@ -272,12 +297,11 @@ class QuickSmoke(Operator): bl_options = {'REGISTER', 'UNDO'} style = EnumProperty( + name="Smoke Style", items=(('STREAM', "Stream", ""), ('PUFF', "Puff", ""), ('FIRE', "Fire", ""), ), - name="Smoke Style", - description="", default='STREAM', ) @@ -390,19 +414,16 @@ class QuickFluid(Operator): bl_options = {'REGISTER', 'UNDO'} style = EnumProperty( + name="Fluid Style", items=(('INFLOW', "Inflow", ""), - ('BASIC', "Basic", ""), - ), - name="Fluid Style", - description="", - default='BASIC', - ) + ('BASIC', "Basic", "")), + default='BASIC', + ) initial_velocity = FloatVectorProperty( name="Initial Velocity", description="Initial velocity of the fluid", + min=-100.0, max=100.0, default=(0.0, 0.0, 0.0), - min=-100.0, - max=100.0, subtype='VELOCITY', ) show_flows = BoolProperty( diff --git a/release/scripts/startup/bl_operators/object_randomize_transform.py b/release/scripts/startup/bl_operators/object_randomize_transform.py index f65e3d27d83..7aea18487f3 100644 --- a/release/scripts/startup/bl_operators/object_randomize_transform.py +++ b/release/scripts/startup/bl_operators/object_randomize_transform.py @@ -145,9 +145,12 @@ class RandomizeLocRotSize(Operator): default=False, ) - '''scale_min = FloatProperty(name="Minimun Scale Factor", - description="Lowest scale percentage possible", - default=0.15, min=-1.0, max=1.0, precision=3)''' + '''scale_min = FloatProperty( + name="Minimun Scale Factor", + description="Lowest scale percentage possible", + min=-1.0, max=1.0, precision=3, + default=0.15, + )''' scale = FloatVectorProperty( name="Scale", diff --git a/release/scripts/startup/bl_operators/sequencer.py b/release/scripts/startup/bl_operators/sequencer.py index d2f85c8d7c7..856e182279a 100644 --- a/release/scripts/startup/bl_operators/sequencer.py +++ b/release/scripts/startup/bl_operators/sequencer.py @@ -82,8 +82,12 @@ class SequencerCutMulticam(Operator): bl_label = "Cut multicam" bl_options = {'REGISTER', 'UNDO'} - camera = IntProperty(name="Camera", - default=1, min=1, max=32, soft_min=1, soft_max=32) + camera = IntProperty( + name="Camera", + min=1, max=32, + soft_min=1, soft_max=32, + default=1, + ) @classmethod def poll(cls, context): diff --git a/release/scripts/startup/bl_operators/uvcalc_lightmap.py b/release/scripts/startup/bl_operators/uvcalc_lightmap.py index 6b1c6e1be98..060fe400045 100644 --- a/release/scripts/startup/bl_operators/uvcalc_lightmap.py +++ b/release/scripts/startup/bl_operators/uvcalc_lightmap.py @@ -552,7 +552,6 @@ class LightMapPack(Operator): PREF_CONTEXT = bpy.props.EnumProperty( name="Selection", - description="", items=(("SEL_FACES", "Selected Faces", "Space all UVs evently"), ("ALL_FACES", "All Faces", "Average space UVs edge length of each loop"), ("ALL_OBJECTS", "Selected Mesh Object", "Average space UVs edge length of each loop") diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py index 67c2f5d001b..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 @@ -813,39 +813,26 @@ def main(context, global RotMatStepRotation main_consts() - # TODO, all selected meshes - ''' - # objects = context.selected_editable_objects - objects = [] - - # we can will tag them later. - obList = [ob for ob in objects if ob.type == 'MESH'] - - # Face select object may not be selected. - ob = context.active_object - - if ob and (not ob.select) and ob.type == 'MESH': - # Add to the list - obList =[ob] - del objects - ''' + # Create the variables. + USER_PROJECTION_LIMIT = projection_limit + USER_ONLY_SELECTED_FACES = True + USER_SHARE_SPACE = 1 # Only for hole filling. + USER_STRETCH_ASPECT = 1 # Only for hole filling. + USER_ISLAND_MARGIN = island_margin # Only for hole filling. + USER_FILL_HOLES = 0 + USER_FILL_HOLES_QUALITY = 50 # Only for hole filling. + USER_VIEW_INIT = 0 # Only for hole filling. - # quick workaround - obList = [ob for ob in [context.active_object] if ob and ob.type == 'MESH'] + is_editmode = (context.active_object.mode == 'EDIT') + if is_editmode: + obList = [ob for ob in [context.active_object] if ob and ob.type == 'MESH'] + else: + obList = [ob for ob in context.selected_editable_objects if ob and ob.type == 'MESH'] + USER_ONLY_SELECTED_FACES = False if not obList: raise('error, no selected mesh objects') - # Create the variables. - USER_PROJECTION_LIMIT = projection_limit - USER_ONLY_SELECTED_FACES = (1) - USER_SHARE_SPACE = (1) # Only for hole filling. - USER_STRETCH_ASPECT = (1) # Only for hole filling. - USER_ISLAND_MARGIN = island_margin # Only for hole filling. - USER_FILL_HOLES = (0) - USER_FILL_HOLES_QUALITY = (50) # Only for hole filling. - USER_VIEW_INIT = (0) # Only for hole filling. - # Reuse variable if len(obList) == 1: ob = "Unwrap %i Selected Mesh" @@ -906,8 +893,8 @@ def main(context, if USER_ONLY_SELECTED_FACES: meshFaces = [thickface(f, uv_layer[i], me_verts) for i, f in enumerate(me.faces) if f.select] - #else: - # meshFaces = map(thickface, me.faces) + else: + meshFaces = [thickface(f, uv_layer[i], me_verts) for i, f in enumerate(me.faces)] if not meshFaces: continue @@ -922,7 +909,7 @@ def main(context, # meshFaces = [] # meshFaces.sort( lambda a, b: cmp(b.area , a.area) ) # Biggest first. - meshFaces.sort( key = lambda a: -a.area ) + meshFaces.sort(key=lambda a: -a.area) # remove all zero area faces while meshFaces and meshFaces[-1].area <= SMALL_NUM: @@ -1123,21 +1110,28 @@ class SmartProject(Operator): bl_label = "Smart UV Project" bl_options = {'REGISTER', 'UNDO'} - angle_limit = FloatProperty(name="Angle Limit", + angle_limit = FloatProperty( + name="Angle Limit", description="lower for more projection groups, higher for less distortion", - default=66.0, min=1.0, max=89.0) - - island_margin = FloatProperty(name="Island Margin", + min=1.0, max=89.0, + default=66.0, + ) + island_margin = FloatProperty( + name="Island Margin", description="Margin to reduce bleed from adjacent islands", - default=0.0, min=0.0, max=1.0) - - user_area_weight = FloatProperty(name="Area Weight", + min=0.0, max=1.0, + default=0.0, + ) + user_area_weight = FloatProperty( + name="Area Weight", description="Weight projections vector by faces with larger areas", - default=0.0, min=0.0, max=1.0) + min=0.0, max=1.0, + default=0.0, + ) @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/vertexpaint_dirt.py b/release/scripts/startup/bl_operators/vertexpaint_dirt.py index facde82f812..4c78adb7161 100644 --- a/release/scripts/startup/bl_operators/vertexpaint_dirt.py +++ b/release/scripts/startup/bl_operators/vertexpaint_dirt.py @@ -151,11 +151,35 @@ class VertexPaintDirt(Operator): bl_label = "Dirty Vertex Colors" bl_options = {'REGISTER', 'UNDO'} - blur_strength = FloatProperty(name="Blur Strength", description="Blur strength per iteration", default=1.0, min=0.01, max=1.0) - blur_iterations = IntProperty(name="Blur Iterations", description="Number times to blur the colors. (higher blurs more)", default=1, min=0, max=40) - clean_angle = FloatProperty(name="Highlight Angle", description="Less then 90 limits the angle used in the tonal range", default=180.0, min=0.0, max=180.0) - dirt_angle = FloatProperty(name="Dirt Angle", description="Less then 90 limits the angle used in the tonal range", default=0.0, min=0.0, max=180.0) - dirt_only = BoolProperty(name="Dirt Only", description="Dont calculate cleans for convex areas", default=False) + blur_strength = FloatProperty( + name="Blur Strength", + description="Blur strength per iteration", + min=0.01, max=1.0, + default=1.0, + ) + blur_iterations = IntProperty( + name="Blur Iterations", + description="Number times to blur the colors. (higher blurs more)", + min=0, max=40, + default=1, + ) + clean_angle = FloatProperty( + name="Highlight Angle", + description="Less then 90 limits the angle used in the tonal range", + min=0.0, max=180.0, + default=180.0, + ) + dirt_angle = FloatProperty( + name="Dirt Angle", + description="Less then 90 limits the angle used in the tonal range", + min=0.0, max=180.0, + default=0.0, + ) + dirt_only = BoolProperty( + name="Dirt Only", + description="Dont calculate cleans for convex areas", + default=False, + ) def execute(self, context): import time diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index fe75c54e60e..aa09a088c4f 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -20,8 +20,12 @@ import bpy from bpy.types import Menu, Operator -from bpy.props import StringProperty, BoolProperty, IntProperty, \ - FloatProperty, EnumProperty +from bpy.props import (StringProperty, + BoolProperty, + IntProperty, + FloatProperty, + EnumProperty, + ) from rna_prop_ui import rna_idprop_ui_prop_get, rna_idprop_ui_prop_clear @@ -39,23 +43,30 @@ class MESH_OT_delete_edgeloop(Operator): return {'CANCELLED'} -rna_path_prop = StringProperty(name="Context Attributes", - description="rna context string", maxlen=1024, default="") +rna_path_prop = StringProperty( + name="Context Attributes", + description="rna context string", + maxlen=1024, + ) -rna_reverse_prop = BoolProperty(name="Reverse", - description="Cycle backwards", default=False) +rna_reverse_prop = BoolProperty( + name="Reverse", + description="Cycle backwards", + default=False, + ) -rna_relative_prop = BoolProperty(name="Relative", +rna_relative_prop = BoolProperty( + name="Relative", description="Apply relative to the current value (delta)", - default=False) + default=False, + ) def context_path_validate(context, data_path): - import sys try: value = eval("context.%s" % data_path) if data_path else Ellipsis - except AttributeError: - if "'NoneType'" in str(sys.exc_info()[1]): + except AttributeError as e: + if str(e).startswith("'NoneType'"): # One of the items in the rna path is None, just ignore this value = Ellipsis else: @@ -65,16 +76,65 @@ def context_path_validate(context, data_path): return value +def operator_value_is_undo(value): + if value in {None, Ellipsis}: + return False + + # typical properties or objects + id_data = getattr(value, "id_data", Ellipsis) + + if id_data is None: + return False + elif id_data is Ellipsis: + # handle mathutils types + id_data = getattr(getattr(value, "owner", None), "id_data", None) + + if id_data is None: + return False + + # return True if its a non window ID type + return (isinstance(id_data, bpy.types.ID) and + (not isinstance(id_data, (bpy.types.WindowManager, + bpy.types.Screen, + bpy.types.Scene, + bpy.types.Brush, + )))) + + +def operator_path_is_undo(context, data_path): + # note that if we have data paths that use strings this could fail + # luckily we dont do this! + # + # When we cant find the data owner assume no undo is needed. + data_path_head, data_path_sep, data_path_tail = data_path.rpartition(".") + + if not data_path_head: + return False + + value = context_path_validate(context, data_path_head) + + return operator_value_is_undo(value) + + +def operator_path_undo_return(context, data_path): + return {'FINISHED'} if operator_path_is_undo(context, data_path) else {'CANCELLED'} + + +def operator_value_undo_return(value): + return {'FINISHED'} if operator_value_is_undo(value) else {'CANCELLED'} + + def execute_context_assign(self, context): - if context_path_validate(context, self.data_path) is Ellipsis: + data_path = self.data_path + if context_path_validate(context, data_path) is Ellipsis: return {'PASS_THROUGH'} if getattr(self, "relative", False): - exec("context.%s+=self.value" % self.data_path) + exec("context.%s += self.value" % data_path) else: - exec("context.%s=self.value" % self.data_path) + exec("context.%s = self.value" % data_path) - return {'FINISHED'} + return operator_path_undo_return(context, data_path) class BRUSH_OT_active_index_set(Operator): @@ -82,15 +142,21 @@ class BRUSH_OT_active_index_set(Operator): bl_idname = "brush.active_index_set" bl_label = "Set Brush Number" - mode = StringProperty(name="mode", - description="Paint mode to set brush for", maxlen=1024) - index = IntProperty(name="number", - description="Brush number") + mode = StringProperty( + name="mode", + description="Paint mode to set brush for", + maxlen=1024, + ) + index = IntProperty( + name="number", + description="Brush number", + ) _attr_dict = {"sculpt": "use_paint_sculpt", "vertex_paint": "use_paint_vertex", "weight_paint": "use_paint_weight", - "image_paint": "use_paint_image"} + "image_paint": "use_paint_image", + } def execute(self, context): attr = self._attr_dict.get(self.mode) @@ -112,8 +178,11 @@ class WM_OT_context_set_boolean(Operator): bl_options = {'UNDO', 'INTERNAL'} data_path = rna_path_prop - value = BoolProperty(name="Value", - description="Assignment value", default=True) + value = BoolProperty( + name="Value", + description="Assignment value", + default=True, + ) execute = execute_context_assign @@ -125,7 +194,11 @@ class WM_OT_context_set_int(Operator): # same as enum bl_options = {'UNDO', 'INTERNAL'} data_path = rna_path_prop - value = IntProperty(name="Value", description="Assign value", default=0) + value = IntProperty( + name="Value", + description="Assign value", + default=0, + ) relative = rna_relative_prop execute = execute_context_assign @@ -138,17 +211,23 @@ class WM_OT_context_scale_int(Operator): bl_options = {'UNDO', 'INTERNAL'} data_path = rna_path_prop - value = FloatProperty(name="Value", description="Assign value", default=1.0) - always_step = BoolProperty(name="Always Step", - description="Always adjust the value by a minimum of 1 when 'value' is not 1.0.", - default=True) + value = FloatProperty( + name="Value", + description="Assign value", + default=1.0, + ) + always_step = BoolProperty( + name="Always Step", + description="Always adjust the value by a minimum of 1 when 'value' is not 1.0.", + default=True, + ) def execute(self, context): - if context_path_validate(context, self.data_path) is Ellipsis: + data_path = self.data_path + if context_path_validate(context, data_path) is Ellipsis: return {'PASS_THROUGH'} value = self.value - data_path = self.data_path if value == 1.0: # nothing to do return {'CANCELLED'} @@ -160,11 +239,12 @@ class WM_OT_context_scale_int(Operator): else: add = "-1" func = "min" - exec("context.%s = %s(round(context.%s * value), context.%s + %s)" % (data_path, func, data_path, data_path, add)) + exec("context.%s = %s(round(context.%s * value), context.%s + %s)" % + (data_path, func, data_path, data_path, add)) else: - exec("context.%s *= value" % self.data_path) + exec("context.%s *= value" % data_path) - return {'FINISHED'} + return operator_path_undo_return(context, data_path) class WM_OT_context_set_float(Operator): # same as enum @@ -174,8 +254,11 @@ class WM_OT_context_set_float(Operator): # same as enum bl_options = {'UNDO', 'INTERNAL'} data_path = rna_path_prop - value = FloatProperty(name="Value", - description="Assignment value", default=0.0) + value = FloatProperty( + name="Value", + description="Assignment value", + default=0.0, + ) relative = rna_relative_prop execute = execute_context_assign @@ -188,8 +271,11 @@ class WM_OT_context_set_string(Operator): # same as enum bl_options = {'UNDO', 'INTERNAL'} data_path = rna_path_prop - value = StringProperty(name="Value", - description="Assign value", maxlen=1024, default="") + value = StringProperty( + name="Value", + description="Assign value", + maxlen=1024, + ) execute = execute_context_assign @@ -201,9 +287,11 @@ class WM_OT_context_set_enum(Operator): bl_options = {'UNDO', 'INTERNAL'} data_path = rna_path_prop - value = StringProperty(name="Value", + value = StringProperty( + name="Value", description="Assignment value (as a string)", - maxlen=1024, default="") + maxlen=1024, + ) execute = execute_context_assign @@ -215,15 +303,18 @@ class WM_OT_context_set_value(Operator): bl_options = {'UNDO', 'INTERNAL'} data_path = rna_path_prop - value = StringProperty(name="Value", + value = StringProperty( + name="Value", description="Assignment value (as a string)", - maxlen=1024, default="") + maxlen=1024, + ) def execute(self, context): - if context_path_validate(context, self.data_path) is Ellipsis: + data_path = self.data_path + if context_path_validate(context, data_path) is Ellipsis: return {'PASS_THROUGH'} - exec("context.%s=%s" % (self.data_path, self.value)) - return {'FINISHED'} + exec("context.%s = %s" % (data_path, self.value)) + return operator_path_undo_return(context, data_path) class WM_OT_context_toggle(Operator): @@ -235,14 +326,14 @@ class WM_OT_context_toggle(Operator): data_path = rna_path_prop def execute(self, context): + data_path = self.data_path - if context_path_validate(context, self.data_path) is Ellipsis: + if context_path_validate(context, data_path) is Ellipsis: return {'PASS_THROUGH'} - exec("context.%s=not (context.%s)" % - (self.data_path, self.data_path)) + exec("context.%s = not (context.%s)" % (data_path, data_path)) - return {'FINISHED'} + return operator_path_undo_return(context, data_path) class WM_OT_context_toggle_enum(Operator): @@ -252,23 +343,30 @@ class WM_OT_context_toggle_enum(Operator): bl_options = {'UNDO', 'INTERNAL'} data_path = rna_path_prop - value_1 = StringProperty(name="Value", \ - description="Toggle enum", maxlen=1024, default="") - - value_2 = StringProperty(name="Value", \ - description="Toggle enum", maxlen=1024, default="") + value_1 = StringProperty( + name="Value", + description="Toggle enum", + maxlen=1024, + ) + value_2 = StringProperty( + name="Value", + description="Toggle enum", + maxlen=1024, + ) def execute(self, context): + data_path = self.data_path - if context_path_validate(context, self.data_path) is Ellipsis: + if context_path_validate(context, data_path) is Ellipsis: return {'PASS_THROUGH'} - exec("context.%s = ['%s', '%s'][context.%s!='%s']" % \ - (self.data_path, self.value_1,\ - self.value_2, self.data_path, - self.value_2)) + exec("context.%s = ('%s', '%s')[context.%s != '%s']" % + (data_path, self.value_1, + self.value_2, data_path, + self.value_2, + )) - return {'FINISHED'} + return operator_path_undo_return(context, data_path) class WM_OT_context_cycle_int(Operator): @@ -292,7 +390,7 @@ class WM_OT_context_cycle_int(Operator): else: value += 1 - exec("context.%s=value" % data_path) + exec("context.%s = value" % data_path) if value != eval("context.%s" % data_path): # relies on rna clamping int's out of the range @@ -301,9 +399,9 @@ class WM_OT_context_cycle_int(Operator): else: value = -1 << 31 - exec("context.%s=value" % data_path) + exec("context.%s = value" % data_path) - return {'FINISHED'} + return operator_path_undo_return(context, data_path) class WM_OT_context_cycle_enum(Operator): @@ -316,15 +414,15 @@ class WM_OT_context_cycle_enum(Operator): reverse = rna_reverse_prop def execute(self, context): - - value = context_path_validate(context, self.data_path) + data_path = self.data_path + value = context_path_validate(context, data_path) if value is Ellipsis: return {'PASS_THROUGH'} orig_value = value # Have to get rna enum values - rna_struct_str, rna_prop_str = self.data_path.rsplit('.', 1) + rna_struct_str, rna_prop_str = data_path.rsplit('.', 1) i = rna_prop_str.find('[') # just incse we get "context.foo.bar[0]" @@ -354,8 +452,8 @@ class WM_OT_context_cycle_enum(Operator): advance_enum = enums[orig_index + 1] # set the new value - exec("context.%s=advance_enum" % self.data_path) - return {'FINISHED'} + exec("context.%s = advance_enum" % data_path) + return operator_path_undo_return(context, data_path) class WM_OT_context_cycle_array(Operator): @@ -381,9 +479,9 @@ class WM_OT_context_cycle_array(Operator): array.append(array.pop(0)) return array - exec("context.%s=cycle(context.%s[:])" % (data_path, data_path)) + exec("context.%s = cycle(context.%s[:])" % (data_path, data_path)) - return {'FINISHED'} + return operator_path_undo_return(context, data_path) class WM_MT_context_menu_enum(Menu): @@ -426,8 +524,11 @@ class WM_OT_context_set_id(Operator): bl_options = {'UNDO', 'INTERNAL'} data_path = rna_path_prop - value = StringProperty(name="Value", - description="Assign value", maxlen=1024, default="") + value = StringProperty( + name="Value", + description="Assign value", + maxlen=1024, + ) def execute(self, context): value = self.value @@ -449,16 +550,21 @@ class WM_OT_context_set_id(Operator): if id_iter: value_id = getattr(bpy.data, id_iter).get(value) - exec("context.%s=value_id" % data_path) + exec("context.%s = value_id" % data_path) - return {'FINISHED'} + return operator_path_undo_return(context, data_path) -doc_id = StringProperty(name="Doc ID", - description="", maxlen=1024, default="", options={'HIDDEN'}) +doc_id = StringProperty( + name="Doc ID", + maxlen=1024, + options={'HIDDEN'}, + ) -doc_new = StringProperty(name="Edit Description", - description="", maxlen=1024, default="") +doc_new = StringProperty( + name="Edit Description", + maxlen=1024, + ) data_path_iter = StringProperty( description="The data path relative to the context, must point to an iterable.") @@ -476,12 +582,13 @@ class WM_OT_context_collection_boolean_set(Operator): data_path_iter = data_path_iter data_path_item = data_path_item - type = EnumProperty(items=( - ('TOGGLE', "Toggle", ""), - ('ENABLE', "Enable", ""), - ('DISABLE', "Disable", ""), - ), - name="Type") + type = EnumProperty( + name="Type", + items=(('TOGGLE', "Toggle", ""), + ('ENABLE', "Enable", ""), + ('DISABLE', "Disable", ""), + ), + ) def execute(self, context): data_path_iter = self.data_path_iter @@ -507,6 +614,10 @@ class WM_OT_context_collection_boolean_set(Operator): items_ok.append(item) + # avoid undo push when nothing to do + if not items_ok: + return {'CANCELLED'} + if self.type == 'ENABLE': is_set = True elif self.type == 'DISABLE': @@ -518,20 +629,26 @@ class WM_OT_context_collection_boolean_set(Operator): for item in items_ok: exec(exec_str) - return {'FINISHED'} + return operator_value_undo_return(item) class WM_OT_context_modal_mouse(Operator): '''Adjust arbitrary values with mouse input''' bl_idname = "wm.context_modal_mouse" bl_label = "Context Modal Mouse" - bl_options = {'GRAB_POINTER', 'BLOCKING', 'INTERNAL'} + bl_options = {'GRAB_POINTER', 'BLOCKING', 'UNDO', 'INTERNAL'} data_path_iter = data_path_iter data_path_item = data_path_item - input_scale = FloatProperty(default=0.01, description="Scale the mouse movement by this value before applying the delta") - invert = BoolProperty(default=False, description="Invert the mouse input") + input_scale = FloatProperty( + description="Scale the mouse movement by this value before applying the delta", + default=0.01, + ) + invert = BoolProperty( + description="Invert the mouse input", + default=False, + ) initial_x = IntProperty(options={'HIDDEN'}) def _values_store(self, context): @@ -584,12 +701,13 @@ class WM_OT_context_modal_mouse(Operator): self._values_delta(delta) elif 'LEFTMOUSE' == event_type: + item = next(iter(self._values.keys())) self._values_clear() - return {'FINISHED'} + return operator_value_undo_return(item) elif event_type in {'RIGHTMOUSE', 'ESC'}: self._values_restore() - return {'FINISHED'} + return {'CANCELLED'} return {'RUNNING_MODAL'} @@ -613,11 +731,13 @@ class WM_OT_url_open(Operator): bl_idname = "wm.url_open" bl_label = "" - url = StringProperty(name="URL", description="URL to open") + url = StringProperty( + name="URL", + description="URL to open", + ) def execute(self, context): import webbrowser - _webbrowser_bug_fix() webbrowser.open(self.url) return {'FINISHED'} @@ -627,7 +747,11 @@ class WM_OT_path_open(Operator): bl_idname = "wm.path_open" bl_label = "" - filepath = StringProperty(name="File Path", maxlen=1024, subtype='FILE_PATH') + filepath = StringProperty( + name="File Path", + maxlen=1024, + subtype='FILE_PATH', + ) def execute(self, context): import sys @@ -662,9 +786,11 @@ class WM_OT_doc_view(Operator): doc_id = doc_id if bpy.app.version_cycle == "release": - _prefix = "http://www.blender.org/documentation/blender_python_api_%s%s_release" % ("_".join(str(v) for v in bpy.app.version[:2]), bpy.app.version_char) + _prefix = ("http://www.blender.org/documentation/blender_python_api_%s%s_release" % + ("_".join(str(v) for v in bpy.app.version[:2]), bpy.app.version_char)) else: - _prefix = "http://www.blender.org/documentation/blender_python_api_%s" % "_".join(str(v) for v in bpy.app.version) + _prefix = ("http://www.blender.org/documentation/blender_python_api_%s" % + "_".join(str(v) for v in bpy.app.version)) def _nested_class_string(self, class_string): ls = [] @@ -682,8 +808,8 @@ class WM_OT_doc_view(Operator): class_name, class_prop = id_split if hasattr(bpy.types, class_name.upper() + '_OT_' + class_prop): - url = '%s/bpy.ops.%s.html#bpy.ops.%s.%s' % \ - (self._prefix, class_name, class_name, class_prop) + url = ("%s/bpy.ops.%s.html#bpy.ops.%s.%s" % + (self._prefix, class_name, class_name, class_prop)) else: # detect if this is a inherited member and use that name instead @@ -696,14 +822,13 @@ class WM_OT_doc_view(Operator): # It so happens that epydoc nests these, not sphinx # class_name_full = self._nested_class_string(class_name) - url = '%s/bpy.types.%s.html#bpy.types.%s.%s' % \ - (self._prefix, class_name, class_name, class_prop) + url = ("%s/bpy.types.%s.html#bpy.types.%s.%s" % + (self._prefix, class_name, class_name, class_prop)) else: return {'PASS_THROUGH'} import webbrowser - _webbrowser_bug_fix() webbrowser.open(url) return {'FINISHED'} @@ -780,17 +905,36 @@ class WM_OT_doc_edit(Operator): return wm.invoke_props_dialog(self, width=600) -rna_path = StringProperty(name="Property Edit", - description="Property data_path edit", maxlen=1024, default="", options={'HIDDEN'}) +rna_path = StringProperty( + name="Property Edit", + description="Property data_path edit", + maxlen=1024, + options={'HIDDEN'}, + ) -rna_value = StringProperty(name="Property Value", - description="Property value edit", maxlen=1024, default="") +rna_value = StringProperty( + name="Property Value", + description="Property value edit", + maxlen=1024, + ) -rna_property = StringProperty(name="Property Name", - description="Property name edit", maxlen=1024, default="") +rna_property = StringProperty( + name="Property Name", + description="Property name edit", + maxlen=1024, + ) -rna_min = FloatProperty(name="Min", default=0.0, precision=3) -rna_max = FloatProperty(name="Max", default=1.0, precision=3) +rna_min = FloatProperty( + name="Min", + default=0.0, + precision=3, + ) + +rna_max = FloatProperty( + name="Max", + default=1.0, + precision=3, + ) class WM_OT_properties_edit(Operator): @@ -804,7 +948,9 @@ class WM_OT_properties_edit(Operator): value = rna_value min = rna_min max = rna_max - description = StringProperty(name="Tip", default="") + description = StringProperty( + name="Tip", + ) def execute(self, context): data_path = self.data_path @@ -857,14 +1003,15 @@ class WM_OT_properties_edit(Operator): return {'FINISHED'} def invoke(self, context, event): + data_path = self.data_path - if not self.data_path: + if not data_path: self.report({'ERROR'}, "Data path not set") return {'CANCELLED'} self._last_prop = [self.property] - item = eval("context.%s" % self.data_path) + item = eval("context.%s" % data_path) # setup defaults prop_ui = rna_idprop_ui_prop_get(item, self.property, False) # dont create @@ -885,7 +1032,8 @@ class WM_OT_properties_add(Operator): data_path = rna_path def execute(self, context): - item = eval("context.%s" % self.data_path) + data_path = self.data_path + item = eval("context.%s" % data_path) def unique_name(names): prop = 'prop' @@ -908,10 +1056,13 @@ class WM_OT_properties_context_change(Operator): bl_idname = "wm.properties_context_change" bl_label = "" - context = StringProperty(name="Context", maxlen=32) + context = StringProperty( + name="Context", + maxlen=32, + ) def execute(self, context): - context.space_data.context = (self.context) + context.space_data.context = self.context return {'FINISHED'} @@ -924,7 +1075,8 @@ class WM_OT_properties_remove(Operator): property = rna_property def execute(self, context): - item = eval("context.%s" % self.data_path) + data_path = self.data_path + item = eval("context.%s" % data_path) del item[self.property] return {'FINISHED'} @@ -933,7 +1085,10 @@ class WM_OT_keyconfig_activate(Operator): bl_idname = "wm.keyconfig_activate" bl_label = "Activate Keyconfig" - filepath = StringProperty(name="File Path", maxlen=1024) + filepath = StringProperty( + name="File Path", + maxlen=1024, + ) def execute(self, context): bpy.utils.keyconfig_set(self.filepath) @@ -961,7 +1116,10 @@ class WM_OT_appconfig_activate(Operator): bl_idname = "wm.appconfig_activate" bl_label = "Activate Application Configuration" - filepath = StringProperty(name="File Path", maxlen=1024) + filepath = StringProperty( + name="File Path", + maxlen=1024, + ) def execute(self, context): import os @@ -1021,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/__init__.py b/release/scripts/startup/bl_ui/__init__.py index bf63c6071b9..e1a23143bc0 100644 --- a/release/scripts/startup/bl_ui/__init__.py +++ b/release/scripts/startup/bl_ui/__init__.py @@ -102,7 +102,10 @@ def register(): items.extend([(cat, cat, "") for cat in sorted(items_unique)]) return items - WindowManager.addon_search = StringProperty(name="Search", description="Search within the selected filter") + WindowManager.addon_search = StringProperty( + name="Search", + description="Search within the selected filter", + ) WindowManager.addon_filter = EnumProperty( items=addon_filter_items, name="Category", 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_curve.py b/release/scripts/startup/bl_ui/properties_data_curve.py index 7bc136c8ce0..6448b9a5229 100644 --- a/release/scripts/startup/bl_ui/properties_data_curve.py +++ b/release/scripts/startup/bl_ui/properties_data_curve.py @@ -109,7 +109,7 @@ class DATA_PT_shape_curve(CurveButtonsPanel, Panel): if (is_curve or is_text): col.label(text="Fill:") sub = col.column() - sub.active = (curve.bevel_object is None) + sub.active = (curve.dimensions == '2D' or (curve.bevel_object is None and curve.dimensions == '3D')) sub.prop(curve, "use_fill_front") sub.prop(curve, "use_fill_back") col.prop(curve, "use_fill_deform", text="Fill Deformed") diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index e4bbd7d7d7d..179921c3c85 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -577,13 +577,13 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): sub = col.column() sub.active = bool(md.vertex_group) sub.prop(md, "invert_vertex_group", text="Invert") + sub.prop(md, "thickness_vertex_group", text="Factor") col.prop(md, "use_even_offset") col.prop(md, "use_quality_normals") col.prop(md, "use_rim") sub = col.column() - sub.label() row = sub.split(align=True, percentage=0.4) row.prop(md, "material_offset", text="") row = row.row() 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 d457a66def8..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") @@ -141,7 +141,11 @@ class ConsoleLanguage(Operator): '''Set the current language for this console''' bl_idname = "console.language" bl_label = "Console Language" - language = StringProperty(name="Language", maxlen=32, default="") + + language = StringProperty( + name="Language", + maxlen=32, + ) def execute(self, context): sc = context.space_data 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 5d72482ce9c..97b5d8457e0 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -387,7 +387,7 @@ class IMAGE_HT_header(Header): row = layout.row(align=True) row.prop(toolsettings, "use_snap", text="") - row.prop(toolsettings, "snap_element", text="", icon_only=True) + row.prop(toolsettings, "snap_target", text="") mesh = context.edit_object.data layout.prop_search(mesh.uv_textures, "active", mesh, "uv_textures", text="") @@ -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 23dfdcfba90..84cc365425e 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -239,6 +239,7 @@ class SEQUENCER_MT_strip(Menu): layout.operator("sequencer.cut", text="Cut (hard) at frame").type = 'HARD' layout.operator("sequencer.cut", text="Cut (soft) at frame").type = 'SOFT' layout.operator("sequencer.images_separate") + layout.operator("sequencer.offset_clear") layout.operator("sequencer.deinterlace_selected_movies") layout.separator() @@ -381,6 +382,8 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel, Panel): if elem and elem.orig_width > 0 and elem.orig_height > 0: col.label(text="Orig Dim: %dx%d" % (elem.orig_width, elem.orig_height)) + else: + col.label(text="Orig Dim: None") class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel): @@ -565,6 +568,9 @@ class SEQUENCER_PT_input(SequencerButtonsPanel, Panel): col = split.column() col.prop(elem, "filename", text="") # strip.elements[0] could be a fallback + # also accessible from the menu + layout.operator("sequencer.change_path") + elif seq_type == 'MOVIE': split = layout.split(percentage=0.2) col = split.column() diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 148338368fe..13edc3471d2 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -1106,7 +1106,10 @@ class WM_OT_addon_disable(Operator): bl_idname = "wm.addon_disable" bl_label = "Disable Add-On" - module = StringProperty(name="Module", description="Module name of the addon to disable") + module = StringProperty( + name="Module", + description="Module name of the addon to disable", + ) def execute(self, context): addon_utils.disable(self.module) @@ -1118,16 +1121,35 @@ class WM_OT_addon_install(Operator): bl_idname = "wm.addon_install" bl_label = "Install Add-On..." - overwrite = BoolProperty(name="Overwrite", description="Remove existing addons with the same ID", default=True) + overwrite = BoolProperty( + name="Overwrite", + description="Remove existing addons with the same ID", + default=True, + ) target = EnumProperty( name="Target Path", items=(('DEFAULT', "Default", ""), - ('PREFS', "User Prefs", ""))) + ('PREFS', "User Prefs", "")), + ) - filepath = StringProperty(name="File Path", description="File path to write file to") - filter_folder = BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'}) - filter_python = BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'}) - filter_glob = StringProperty(default="*.py;*.zip", options={'HIDDEN'}) + filepath = StringProperty( + name="File Path", + description="File path to write file to", + ) + filter_folder = BoolProperty( + name="Filter folders", + default=True, + options={'HIDDEN'}, + ) + filter_python = BoolProperty( + name="Filter python", + default=True, + options={'HIDDEN'}, + ) + filter_glob = StringProperty( + default="*.py;*.zip", + options={'HIDDEN'}, + ) @staticmethod def _module_remove(path_addons, module): @@ -1264,7 +1286,10 @@ class WM_OT_addon_remove(Operator): bl_idname = "wm.addon_remove" bl_label = "Remove Add-On" - module = StringProperty(name="Module", description="Module name of the addon to remove") + module = StringProperty( + name="Module", + description="Module name of the addon to remove", + ) @staticmethod def path_from_addon(module): @@ -1312,7 +1337,10 @@ class WM_OT_addon_expand(Operator): bl_idname = "wm.addon_expand" bl_label = "" - module = StringProperty(name="Module", description="Module name of the addon to expand") + module = StringProperty( + name="Module", + description="Module name of the addon to expand", + ) def execute(self, context): module_name = self.module diff --git a/release/scripts/startup/bl_ui/space_userpref_keymap.py b/release/scripts/startup/bl_ui/space_userpref_keymap.py index d595b32c710..9ed1591cbf3 100644 --- a/release/scripts/startup/bl_ui/space_userpref_keymap.py +++ b/release/scripts/startup/bl_ui/space_userpref_keymap.py @@ -18,7 +18,7 @@ # import bpy -from bpy.types import Menu, Operator +from bpy.types import Menu, Operator, OperatorProperties import os @@ -533,12 +533,31 @@ class WM_OT_keyconfig_import(Operator): bl_idname = "wm.keyconfig_import" bl_label = "Import Key Configuration..." - filepath = StringProperty(name="File Path", description="Filepath to write file to", default="keymap.py") - filter_folder = BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'}) - filter_text = BoolProperty(name="Filter text", description="", default=True, options={'HIDDEN'}) - filter_python = BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'}) - - keep_original = BoolProperty(name="Keep original", description="Keep original file after copying to configuration folder", default=True) + filepath = StringProperty( + name="File Path", + description="Filepath to write file to", + default="keymap.py", + ) + filter_folder = BoolProperty( + name="Filter folders", + default=True, + options={'HIDDEN'}, + ) + filter_text = BoolProperty( + name="Filter text", + default=True, + options={'HIDDEN'}, + ) + filter_python = BoolProperty( + name="Filter python", + default=True, + options={'HIDDEN'}, + ) + keep_original = BoolProperty( + name="Keep original", + description="Keep original file after copying to configuration folder", + default=True, + ) def execute(self, context): from os.path import basename @@ -580,10 +599,26 @@ class WM_OT_keyconfig_export(Operator): bl_idname = "wm.keyconfig_export" bl_label = "Export Key Configuration..." - filepath = StringProperty(name="File Path", description="Filepath to write file to", default="keymap.py") - filter_folder = BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'}) - filter_text = BoolProperty(name="Filter text", description="", default=True, options={'HIDDEN'}) - filter_python = BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'}) + filepath = StringProperty( + name="File Path", + description="Filepath to write file to", + default="keymap.py", + ) + filter_folder = BoolProperty( + name="Filter folders", + default=True, + options={'HIDDEN'}, + ) + filter_text = BoolProperty( + name="Filter text", + default=True, + options={'HIDDEN'}, + ) + filter_python = BoolProperty( + name="Filter python", + default=True, + options={'HIDDEN'}, + ) def execute(self, context): if not self.filepath: @@ -673,7 +708,10 @@ class WM_OT_keymap_restore(Operator): bl_idname = "wm.keymap_restore" bl_label = "Restore Key Map(s)" - all = BoolProperty(name="All Keymaps", description="Restore all keymaps to default") + all = BoolProperty( + name="All Keymaps", + description="Restore all keymaps to default", + ) def execute(self, context): wm = context.window_manager @@ -693,7 +731,10 @@ class WM_OT_keyitem_restore(Operator): bl_idname = "wm.keyitem_restore" bl_label = "Restore Key Map Item" - item_id = IntProperty(name="Item Identifier", description="Identifier of the item to remove") + item_id = IntProperty( + name="Item Identifier", + description="Identifier of the item to remove", + ) @classmethod def poll(cls, context): @@ -737,7 +778,10 @@ class WM_OT_keyitem_remove(Operator): bl_idname = "wm.keyitem_remove" bl_label = "Remove Key Map Item" - item_id = IntProperty(name="Item Identifier", description="Identifier of the item to remove") + item_id = IntProperty( + name="Item Identifier", + description="Identifier of the item to remove", + ) @classmethod def poll(cls, context): 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/addon_add_object.py b/release/scripts/templates/addon_add_object.py index 98517fd97a0..833ac600995 100644 --- a/release/scripts/templates/addon_add_object.py +++ b/release/scripts/templates/addon_add_object.py @@ -45,10 +45,12 @@ class OBJECT_OT_add_object(bpy.types.Operator, AddObjectHelper): bl_description = "Create a new Mesh Object" bl_options = {'REGISTER', 'UNDO'} - scale = FloatVectorProperty(name='scale', - default=(1.0, 1.0, 1.0), - subtype='TRANSLATION', - description='scaling') + scale = FloatVectorProperty( + name='scale', + default=(1.0, 1.0, 1.0), + subtype='TRANSLATION', + description='scaling', + ) def execute(self, context): diff --git a/release/scripts/templates/operator_export.py b/release/scripts/templates/operator_export.py index 4cf943a53b7..b1d53e6ee0c 100644 --- a/release/scripts/templates/operator_export.py +++ b/release/scripts/templates/operator_export.py @@ -24,22 +24,30 @@ class ExportSomeData(bpy.types.Operator, ExportHelper): # ExportHelper mixin class uses this filename_ext = ".txt" - filter_glob = StringProperty(default="*.txt", options={'HIDDEN'}) + filter_glob = StringProperty( + default="*.txt", + options={'HIDDEN'}, + ) # List of operator properties, the attributes will be assigned # to the class instance from the operator settings before calling. - use_setting = BoolProperty(name="Example Boolean", description="Example Tooltip", default=True) + use_setting = BoolProperty( + name="Example Boolean", + description="Example Tooltip", + default=True, + ) - type = EnumProperty(items=(('OPT_A', "First Option", "Description one"), - ('OPT_B', "Second Option", "Description two."), - ), - name="Example Enum", - description="Choose between two items", - default='OPT_A') + type = EnumProperty( + name="Example Enum", + description="Choose between two items", + items=(('OPT_A', "First Option", "Description one"), + ('OPT_B', "Second Option", "Description two.")), + default='OPT_A', + ) @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_mesh_add.py b/release/scripts/templates/operator_mesh_add.py index 10d23a6712d..d89b7e82f77 100644 --- a/release/scripts/templates/operator_mesh_add.py +++ b/release/scripts/templates/operator_mesh_add.py @@ -43,25 +43,38 @@ class AddBox(bpy.types.Operator): bl_label = "Add Box" bl_options = {'REGISTER', 'UNDO'} - width = FloatProperty(name="Width", + width = FloatProperty( + name="Width", description="Box Width", - default=1.0, min=0.01, max=100.0) - - height = FloatProperty(name="Height", + min=0.01, max=100.0, + default=1.0, + ) + height = FloatProperty( + name="Height", description="Box Height", - default=1.0, min=0.01, max=100.0) - - depth = FloatProperty(name="Depth", + min=0.01, max=100.0, + default=1.0, + ) + depth = FloatProperty( + name="Depth", description="Box Depth", - default=1.0, min=0.01, max=100.0) + min=0.01, max=100.0, + default=1.0, + ) # generic transform props - view_align = BoolProperty(name="Align to View", - default=False) - location = FloatVectorProperty(name="Location", - subtype='TRANSLATION') - rotation = FloatVectorProperty(name="Rotation", - subtype='EULER') + view_align = BoolProperty( + name="Align to View", + default=False, + ) + location = FloatVectorProperty( + name="Location", + subtype='TRANSLATION', + ) + rotation = FloatVectorProperty( + name="Rotation", + subtype='EULER', + ) def execute(self, context): diff --git a/release/scripts/templates/operator_modal_view3d.py b/release/scripts/templates/operator_modal_view3d.py index 925449835ca..263bf72f129 100644 --- a/release/scripts/templates/operator_modal_view3d.py +++ b/release/scripts/templates/operator_modal_view3d.py @@ -8,7 +8,10 @@ class ViewOperator(bpy.types.Operator): bl_idname = "view3d.modal_operator" bl_label = "Simple View Operator" - offset = FloatVectorProperty(name="Offset", size=3) + offset = FloatVectorProperty( + name="Offset", + size=3, + ) def execute(self, context): v3d = context.space_data 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/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index 8aa816f9cb5..fcb8da48962 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -1245,6 +1245,8 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p sim.ob= par; sim.psys= psys; sim.psmd= psys_get_modifier(par, psys); + /* make sure emitter imat is in global coordinates instead of render view coordinates */ + invert_m4_m4(par->imat, par->obmat); /* first check for loops (particle system object used as dupli object) */ if(part->ren_as == PART_DRAW_OB) { @@ -1349,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/cloth.c b/source/blender/blenkernel/intern/cloth.c index ea055e90b45..3a86389dba7 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -923,7 +923,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d for(i = 0; i < dm->getNumVerts(dm); i++) { - maxdist = MAX2(maxdist, clmd->coll_parms->selfepsilon* ( cloth->verts[i].avg_spring_len*2.0)); + maxdist = MAX2(maxdist, clmd->coll_parms->selfepsilon* ( cloth->verts[i].avg_spring_len*2.0f)); } clmd->clothObject->bvhselftree = bvhselftree_build_from_cloth ( clmd, maxdist ); diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index d39be9d683c..667e0850111 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -301,6 +301,7 @@ static void dag_add_driver_relation(AnimData *adt, DagForest *dag, DagNode *node for (fcu= adt->drivers.first; fcu; fcu= fcu->next) { ChannelDriver *driver= fcu->driver; DriverVar *dvar; + int isdata_fcu = isdata || (fcu->rna_path && strstr(fcu->rna_path, "modifiers[")); /* loop over variables to get the target relationships */ for (dvar= driver->variables.first; dvar; dvar= dvar->next) { @@ -320,14 +321,14 @@ static void dag_add_driver_relation(AnimData *adt, DagForest *dag, DagNode *node ( ((dtar->rna_path) && strstr(dtar->rna_path, "pose.bones[")) || ((dtar->flag & DTAR_FLAG_STRUCT_REF) && (dtar->pchan_name[0])) )) { - dag_add_relation(dag, node1, node, isdata?DAG_RL_DATA_DATA:DAG_RL_DATA_OB, "Driver"); + dag_add_relation(dag, node1, node, isdata_fcu?DAG_RL_DATA_DATA:DAG_RL_DATA_OB, "Driver"); } /* check if ob data */ else if (dtar->rna_path && strstr(dtar->rna_path, "data.")) - dag_add_relation(dag, node1, node, isdata?DAG_RL_DATA_DATA:DAG_RL_DATA_OB, "Driver"); + dag_add_relation(dag, node1, node, isdata_fcu?DAG_RL_DATA_DATA:DAG_RL_DATA_OB, "Driver"); /* normal */ else - dag_add_relation(dag, node1, node, isdata?DAG_RL_OB_DATA:DAG_RL_OB_OB, "Driver"); + dag_add_relation(dag, node1, node, isdata_fcu?DAG_RL_OB_DATA:DAG_RL_OB_OB, "Driver"); } } } diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index 8f57490d057..c2ed6468643 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -1369,6 +1369,11 @@ void makeDispListCurveTypes(Scene *scene, Object *ob, int forOrco) Curve *cu= ob->data; ListBase *dispbase; + /* The same check for duplis as in do_makeDispListCurveTypes. + Happens when curve used for constraint/bevel was converted to mesh. + check there is still needed for render displist and orco displists. */ + if(!ELEM3(ob->type, OB_SURF, OB_CURVE, OB_FONT)) return; + freedisplist(&(ob->disp)); dispbase= &(ob->disp); freedisplist(dispbase); diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index d6a9d950015..13e13fbc3ff 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -1002,7 +1002,7 @@ static float dtar_get_prop_val (ChannelDriver *driver, DriverTarget *dtar) /* get property to read from, and get value as appropriate */ if (RNA_path_resolve_full(&id_ptr, dtar->rna_path, &ptr, &prop, &index)) { - if(RNA_property_array_check(&ptr, prop)) { + if(RNA_property_array_check(prop)) { /* array */ if (index < RNA_property_array_length(&ptr, prop)) { switch (RNA_property_type(prop)) { 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/nla.c b/source/blender/blenkernel/intern/nla.c index c02b5dda9ce..bd238e72d0c 100644 --- a/source/blender/blenkernel/intern/nla.c +++ b/source/blender/blenkernel/intern/nla.c @@ -1582,7 +1582,7 @@ void BKE_nla_tweakmode_exit (AnimData *adt) /* Baking Tools ------------------------------------------- */ -static void BKE_nla_bake (Scene *scene, ID *UNUSED(id), AnimData *adt, int UNUSED(flag)) +static void UNUSED_FUNCTION(BKE_nla_bake) (Scene *scene, ID *UNUSED(id), AnimData *adt, int UNUSED(flag)) { /* verify that data is valid diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 13469e0b58b..5f1a6c911bc 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -3243,7 +3243,7 @@ static int node_animation_properties(bNodeTree *ntree, bNode *node) int driven, len=1, index; prop = (PropertyRNA *)link; - if (RNA_property_array_check(&ptr, prop)) + if (RNA_property_array_check(prop)) len = RNA_property_array_length(&ptr, prop); for (index=0; indexlen = 0; } seq->strip->len = seq->len; + break; case SEQ_SOUND: #ifdef WITH_AUDASPACE if(!seq->sound) diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index 036ba34d0c8..493baebd197 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -1005,7 +1005,7 @@ void autotexname(Tex *tex) Tex *give_current_object_texture(Object *ob) { - Material *ma; + Material *ma, *node_ma; Tex *tex= NULL; if(ob==NULL) return NULL; @@ -1015,6 +1015,10 @@ Tex *give_current_object_texture(Object *ob) tex= give_current_lamp_texture(ob->data); } else { ma= give_current_material(ob, ob->actcol); + + if((node_ma=give_node_material(ma))) + ma= node_ma; + tex= give_current_material_texture(ma); } @@ -1080,17 +1084,6 @@ Tex *give_current_material_texture(Material *ma) tex= (Tex *)node->id; ma= NULL; } - else { - node= nodeGetActiveID(ma->nodetree, ID_MA); - if(node) { - ma= (Material*)node->id; - if(ma) { - mtex= ma->mtex[(int)(ma->texact)]; - if(mtex) tex= mtex->tex; - } - } - } - return tex; } if(ma) { @@ -1165,11 +1158,6 @@ void set_current_material_texture(Material *ma, Tex *newtex) id_us_plus(&newtex->id); ma= NULL; } - else { - node= nodeGetActiveID(ma->nodetree, ID_MA); - if(node) - ma= (Material*)node->id; - } } if(ma) { int act= (int)ma->texact; @@ -1198,16 +1186,8 @@ int has_current_material_texture(Material *ma) if(ma && ma->use_nodes && ma->nodetree) { node= nodeGetActiveID(ma->nodetree, ID_TE); - if(node) { + if(node) return 1; - } - else { - node= nodeGetActiveID(ma->nodetree, ID_MA); - if(node) - ma= (Material*)node->id; - else - ma= NULL; - } } return (ma != NULL); 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 9af55601ff7..28ebb254f2a 100644 --- a/source/blender/blenlib/BLI_utildefines.h +++ b/source/blender/blenlib/BLI_utildefines.h @@ -183,6 +183,12 @@ # define UNUSED(x) UNUSED_ ## x #endif +#ifdef __GNUC__ +# define UNUSED_FUNCTION(x) __attribute__((__unused__)) UNUSED_ ## x +#else +# define UNUSED_FUNCTION(x) UNUSED_ ## x +#endif + #ifdef __GNUC__ # define WARN_UNUSED __attribute__((warn_unused_result)) #else diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c index 3c6a20b8ad6..bfee350037a 100644 --- a/source/blender/blenlib/intern/BLI_ghash.c +++ b/source/blender/blenlib/intern/BLI_ghash.c @@ -128,8 +128,8 @@ int BLI_ghash_remove (GHash *gh, void *key, GHashKeyFreeFP keyfreefp, GHashValFr if (valfreefp) valfreefp(e->val); BLI_mempool_free(gh->entrypool, e); - - e= n; + /* correct but 'e' isnt used before return */ + /* e= n; */ /*UNUSED*/ if (p) p->next = n; else 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/jitter.c b/source/blender/blenlib/intern/jitter.c index 16f0c86c449..f0e81d6b5e9 100644 --- a/source/blender/blenlib/intern/jitter.c +++ b/source/blender/blenlib/intern/jitter.c @@ -53,10 +53,10 @@ void BLI_jitterate1(float *jit1, float *jit2, int num, float rad1) y = jit1[i+1]; for (j = 2*num-2; j>=0 ; j-=2) { if (i != j){ - vecx = jit1[j] - x - 1.0; - vecy = jit1[j+1] - y - 1.0; + vecx = jit1[j] - x - 1.0f; + vecy = jit1[j+1] - y - 1.0f; for (k = 3; k>0 ; k--){ - if( fabs(vecx)0 && len0 && len0 && len= 0 ; j-=2){ if (i != j){ - vecx = jit1[j] - x - 1.0; - vecy = jit1[j+1] - y - 1.0; + vecx = jit1[j] - x - 1.0f; + vecy = jit1[j+1] - y - 1.0f; - if( fabs(vecx) 0.0) { + else if (i > 0.0f) { const float i_sqrt= sqrt(i); /* avoid calc twice */ /* first intersection */ @@ -456,7 +456,7 @@ int isect_line_sphere_v2(const float l1[2], const float l2[2], madd_v2_v2v2fl(r_p1, l1, ldir, mu); return 1; } - else if (i > 0.0) { + else if (i > 0.0f) { const float i_sqrt= sqrt(i); /* avoid calc twice */ /* first intersection */ @@ -2010,7 +2010,7 @@ void resolve_quad_uv(float uv[2], const float st[2], const float st0[2], const f } if(IS_ZERO(denom)==0) - uv[1]= (float) (( (1-uv[0])*(st0[i]-st[i]) + uv[0]*(st1[i]-st[i]) ) / denom); + uv[1]= (float) (( (1.0f-uv[0])*(st0[i]-st[i]) + uv[0]*(st1[i]-st[i]) ) / denom); } } diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c index dfd715ccbf2..e3e507d016a 100644 --- a/source/blender/blenlib/intern/math_rotation.c +++ b/source/blender/blenlib/intern/math_rotation.c @@ -213,7 +213,7 @@ void quat_to_mat4(float m[][4], const float q[4]) double q0, q1, q2, q3, qda,qdb,qdc,qaa,qab,qac,qbb,qbc,qcc; #ifdef DEBUG - if(!((q0=dot_qtqt(q, q))==0.0f || (fabsf(q0-1.0f) < (float)QUAT_EPSILON))) { + if(!((q0=dot_qtqt(q, q))==0.0f || (fabs(q0-1.0) < QUAT_EPSILON))) { fprintf(stderr, "Warning! quat_to_mat4() called with non-normalized: size %.8f *** report a bug ***\n", (float)q0); } #endif @@ -492,8 +492,8 @@ void vec_to_quat(float q[4], const float vec[3], short axis, const short upflag) else angle= (float)(-0.5*atan2(-fp[0], -fp[1])); } - co= (float)cos(angle); - si= (float)(sin(angle)/len1); + co= cosf(angle); + si= sinf(angle)/len1; q2[0]= co; q2[1]= x2*si; q2[2]= y2*si; diff --git a/source/blender/blenlib/intern/rct.c b/source/blender/blenlib/intern/rct.c index 17b07b49309..31ae8adc2d4 100644 --- a/source/blender/blenlib/intern/rct.c +++ b/source/blender/blenlib/intern/rct.c @@ -233,10 +233,10 @@ int BLI_isect_rcti(rcti *src1, rcti *src2, rcti *dest) void BLI_copy_rcti_rctf(rcti *tar, const rctf *src) { - tar->xmin= floor(src->xmin + 0.5); - tar->xmax= floor((src->xmax - src->xmin) + 0.5); - tar->ymin= floor(src->ymin + 0.5); - tar->ymax= floor((src->ymax - src->ymin) + 0.5); + tar->xmin= floor(src->xmin + 0.5f); + tar->xmax= floor((src->xmax - src->xmin) + 0.5f); + tar->ymin= floor(src->ymin + 0.5f); + tar->ymax= floor((src->ymax - src->ymin) + 0.5f); } void print_rctf(const char *str, rctf *rect) diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c index 47a07d86e66..b159106f748 100644 --- a/source/blender/blenlib/intern/scanfill.c +++ b/source/blender/blenlib/intern/scanfill.c @@ -288,7 +288,7 @@ static short testedgeside(float *v1, float *v2, float *v3) inp= (v2[cox]-v1[cox])*(v1[coy]-v3[coy]) +(v1[coy]-v2[coy])*(v1[cox]-v3[cox]); - if(inp<0.0) return 0; + if(inp < 0.0f) return 0; else if(inp==0) { if(v1[cox]==v3[cox] && v1[coy]==v3[coy]) return 0; if(v2[cox]==v3[cox] && v2[coy]==v3[coy]) return 0; @@ -312,8 +312,8 @@ static short addedgetoscanvert(ScFillVert *sc, EditEdge *eed) y= eed->v1->co[coy]; fac1= eed->v2->co[coy]-y; - if(fac1==0.0) { - fac1= 1.0e10*(eed->v2->co[cox]-x); + if(fac1==0.0f) { + fac1= 1.0e10f*(eed->v2->co[cox]-x); } else fac1= (x-eed->v2->co[cox])/fac1; @@ -324,8 +324,8 @@ static short addedgetoscanvert(ScFillVert *sc, EditEdge *eed) if(ed->v2==eed->v2) return 0; fac= ed->v2->co[coy]-y; - if(fac==0.0) { - fac= 1.0e10*(ed->v2->co[cox]-x); + if(fac==0.0f) { + fac= 1.0e10f*(ed->v2->co[cox]-x); } else fac= (x-ed->v2->co[cox])/fac; @@ -443,7 +443,7 @@ static void testvertexnearedge(void) vec2[1]= eed->v2->co[coy]; if(boundinsideEV(eed,eve)) { dist= dist_to_line_v2(vec1,vec2,vec3); - if(distv1, eve); @@ -816,7 +816,7 @@ int BLI_edgefill(short mat_nr) if(v2) { if( compare_v3v3(v2, eve->co, COMPLIMIT)==0) { len= normal_tri_v3( norm,v1, v2, eve->co); - if(len != 0.0) break; + if(len != 0.0f) break; } } else if(compare_v3v3(v1, eve->co, COMPLIMIT)==0) { @@ -825,7 +825,7 @@ int BLI_edgefill(short mat_nr) eve= eve->next; } - if(len==0.0) return 0; /* no fill possible */ + if(len==0.0f) return 0; /* no fill possible */ norm[0]= fabs(norm[0]); norm[1]= fabs(norm[1]); diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c index 8e0314ec17f..2f1ddf294ce 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': + *dst= '\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 */ + *dst= '\0'; + break; + } + /* intentionally pass through */ + default: + *dst = *src; + } + dst++; + src++; + len++; + } + + 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/readfile.c b/source/blender/blenloader/intern/readfile.c index 456ef5bf513..20a69b53ee7 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -11859,8 +11859,8 @@ static void do_versions(FileData *fd, Library *lib, Main *main) Tex *tex; for(tex= main->tex.first; tex; tex= tex->id.next) { if(tex->pd) { - if (tex->pd->falloff_speed_scale == 0.0) - tex->pd->falloff_speed_scale = 100.0; + if (tex->pd->falloff_speed_scale == 0.0f) + tex->pd->falloff_speed_scale = 100.0f; if (!tex->pd->falloff_curve) { tex->pd->falloff_curve = curvemapping_add(1, 0, 0, 1, 1); diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 4bf2c70df2b..56f47ddaf88 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); } @@ -2657,7 +2659,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/blenpluginapi/SConscript b/source/blender/blenpluginapi/SConscript index 32e69069bb0..7c7c1318a6e 100644 --- a/source/blender/blenpluginapi/SConscript +++ b/source/blender/blenpluginapi/SConscript @@ -11,7 +11,7 @@ if env['WITH_BF_QUICKTIME']: defs.append('WITH_QUICKTIME') incs += ' ' + env['BF_QUICKTIME_INC'] -if env['OURPLATFORM'] == 'linux2': +if env['OURPLATFORM'] == 'linux': cflags='-pthread' incs += ' ../../../extern/binreloc/include' diff --git a/source/blender/collada/CMakeLists.txt b/source/blender/collada/CMakeLists.txt index e2a68d19682..b5c84bc3c84 100644 --- a/source/blender/collada/CMakeLists.txt +++ b/source/blender/collada/CMakeLists.txt @@ -107,7 +107,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/armature/SConscript b/source/blender/editors/armature/SConscript index beabd912a20..b7f9a263bc1 100644 --- a/source/blender/editors/armature/SConscript +++ b/source/blender/editors/armature/SConscript @@ -7,7 +7,7 @@ incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf ../ incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../gpu ../../makesrna #/intern/opennl/extern' -if env['OURPLATFORM'] == 'linux2': +if env['OURPLATFORM'] == 'linux': cflags='-pthread' incs += ' ../../../extern/binreloc/include' diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 628cdbf21e9..bd8f431535e 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -5402,12 +5402,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/armature/poseSlide.c b/source/blender/editors/armature/poseSlide.c index 3d6888d87dc..69b7fff3607 100644 --- a/source/blender/editors/armature/poseSlide.c +++ b/source/blender/editors/armature/poseSlide.c @@ -1000,7 +1000,7 @@ static short pose_propagate_get_refVal (Object *ob, FCurve *fcu, float *value) /* resolve the property... */ if (RNA_path_resolve(&id_ptr, fcu->rna_path, &ptr, &prop)) { - if (RNA_property_array_check(&ptr, prop)) { + if (RNA_property_array_check(prop)) { /* array */ if (fcu->array_index < RNA_property_array_length(&ptr, prop)) { found= TRUE; diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index e31e3a26b40..a5ceb8bdb19 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -710,6 +710,27 @@ int uiButActiveOnly(const bContext *C, uiBlock *block, uiBut *but) return 1; } +/* use to check if we need to disable undo, but dont make any changes + * returns FALSE if undo needs to be disabled. */ +static int ui_but_is_rna_undo(uiBut *but) +{ + if(but->rnapoin.id.data) { + /* avoid undo push for buttons who's ID are screen or wm level + * we could disable undo for buttons with no ID too but may have + * unforseen conciquences, so best check for ID's we _know_ are not + * handled by undo - campbell */ + ID *id= but->rnapoin.id.data; + if(ELEM(GS(id->name), ID_SCR, ID_WM)) { + return FALSE; + } + else { + return TRUE; + } + } + + return TRUE; +} + /* assigns automatic keybindings to menu items for fast access * (underline key in menu) */ static void ui_menu_block_set_keyaccels(uiBlock *block) @@ -1245,14 +1266,14 @@ int ui_is_but_float(uiBut *but) int ui_is_but_unit(uiBut *but) { - Scene *scene= CTX_data_scene((bContext *)but->block->evil_C); - int unit_type= uiButGetUnitType(but); + UnitSettings *unit= but->block->unit; + const int unit_type= uiButGetUnitType(but); if(unit_type == PROP_UNIT_NONE) return 0; #if 1 // removed so angle buttons get correct snapping - if (scene->unit.system_rotation == USER_UNIT_ROT_RADIANS && unit_type == PROP_UNIT_ROTATION) + if (unit->system_rotation == USER_UNIT_ROT_RADIANS && unit_type == PROP_UNIT_ROTATION) return 0; #endif @@ -1260,7 +1281,7 @@ int ui_is_but_unit(uiBut *but) if (unit_type == PROP_UNIT_TIME) return 0; - if (scene->unit.system == USER_UNIT_NONE) { + if (unit->system == USER_UNIT_NONE) { if (unit_type != PROP_UNIT_ROTATION) { return 0; } @@ -1293,19 +1314,19 @@ double ui_get_but_val(uiBut *but) switch(RNA_property_type(prop)) { case PROP_BOOLEAN: - if(RNA_property_array_length(&but->rnapoin, prop)) + if(RNA_property_array_check(prop)) value= RNA_property_boolean_get_index(&but->rnapoin, prop, but->rnaindex); else value= RNA_property_boolean_get(&but->rnapoin, prop); break; case PROP_INT: - if(RNA_property_array_length(&but->rnapoin, prop)) + if(RNA_property_array_check(prop)) value= RNA_property_int_get_index(&but->rnapoin, prop, but->rnaindex); else value= RNA_property_int_get(&but->rnapoin, prop); break; case PROP_FLOAT: - if(RNA_property_array_length(&but->rnapoin, prop)) + if(RNA_property_array_check(prop)) value= RNA_property_float_get_index(&but->rnapoin, prop, but->rnaindex); else value= RNA_property_float_get(&but->rnapoin, prop); @@ -1459,19 +1480,20 @@ int ui_get_but_string_max_length(uiBut *but) static double ui_get_but_scale_unit(uiBut *but, double value) { - Scene *scene= CTX_data_scene((bContext *)but->block->evil_C); + UnitSettings *unit= but->block->unit; int unit_type= uiButGetUnitType(but); if(unit_type == PROP_UNIT_LENGTH) { - return value * (double)scene->unit.scale_length; + return value * (double)unit->scale_length; } else if(unit_type == PROP_UNIT_AREA) { - return value * pow(scene->unit.scale_length, 2); + return value * pow(unit->scale_length, 2); } else if(unit_type == PROP_UNIT_VOLUME) { - return value * pow(scene->unit.scale_length, 3); + return value * pow(unit->scale_length, 3); } else if(unit_type == PROP_UNIT_TIME) { /* WARNING - using evil_C :| */ + Scene *scene= CTX_data_scene(but->block->evil_C); return FRA2TIME(value); } else { @@ -1483,14 +1505,14 @@ static double ui_get_but_scale_unit(uiBut *but, double value) void ui_convert_to_unit_alt_name(uiBut *but, char *str, int maxlen) { if(ui_is_but_unit(but)) { + UnitSettings *unit= but->block->unit; int unit_type= uiButGetUnitType(but); char *orig_str; - Scene *scene= CTX_data_scene((bContext *)but->block->evil_C); orig_str= MEM_callocN(sizeof(char)*maxlen + 1, "textedit sub str"); memcpy(orig_str, str, maxlen); - bUnit_ToUnitAltName(str, maxlen, orig_str, scene->unit.system, unit_type>>16); + bUnit_ToUnitAltName(str, maxlen, orig_str, unit->system, unit_type>>16); MEM_freeN(orig_str); } @@ -1498,27 +1520,26 @@ void ui_convert_to_unit_alt_name(uiBut *but, char *str, int maxlen) static void ui_get_but_string_unit(uiBut *but, char *str, int len_max, double value, int pad) { - Scene *scene= CTX_data_scene((bContext *)but->block->evil_C); - int do_split= scene->unit.flag & USER_UNIT_OPT_SPLIT; + UnitSettings *unit= but->block->unit; + int do_split= unit->flag & USER_UNIT_OPT_SPLIT; int unit_type= uiButGetUnitType(but); int precision= but->a2; - if(scene->unit.scale_length<0.0001f) scene->unit.scale_length= 1.0f; // XXX do_versions + if(unit->scale_length<0.0001f) unit->scale_length= 1.0f; // XXX do_versions /* Sanity checks */ if(precision > PRECISION_FLOAT_MAX) precision= PRECISION_FLOAT_MAX; else if(precision==0) precision= 2; - bUnit_AsString(str, len_max, ui_get_but_scale_unit(but, value), precision, scene->unit.system, unit_type>>16, do_split, pad); + bUnit_AsString(str, len_max, ui_get_but_scale_unit(but, value), precision, unit->system, unit_type>>16, do_split, pad); } static float ui_get_but_step_unit(uiBut *but, float step_default) { - Scene *scene= CTX_data_scene((bContext *)but->block->evil_C); int unit_type= uiButGetUnitType(but)>>16; float step; - step = bUnit_ClosestScalar(ui_get_but_scale_unit(but, step_default), scene->unit.system, unit_type); + step = bUnit_ClosestScalar(ui_get_but_scale_unit(but, step_default), but->block->unit->system, unit_type); if(step > 0.0f) { /* -1 is an error value */ return (float)((double)step/ui_get_but_scale_unit(but, 1.0))*100.0f; @@ -1606,12 +1627,11 @@ static int ui_set_but_string_eval_num_unit(bContext *C, uiBut *but, const char * { char str_unit_convert[256]; const int unit_type= uiButGetUnitType(but); - Scene *scene= CTX_data_scene((bContext *)but->block->evil_C); BLI_strncpy(str_unit_convert, str, sizeof(str_unit_convert)); /* ugly, use the draw string to get the value, this could cause problems if it includes some text which resolves to a unit */ - bUnit_ReplaceString(str_unit_convert, sizeof(str_unit_convert), but->drawstr, ui_get_but_scale_unit(but, 1.0), scene->unit.system, unit_type>>16); + bUnit_ReplaceString(str_unit_convert, sizeof(str_unit_convert), but->drawstr, ui_get_but_scale_unit(but, 1.0), but->block->unit->system, unit_type>>16); return (BPY_button_exec(C, str_unit_convert, value, TRUE) != -1); } @@ -1958,7 +1978,10 @@ uiBlock *uiBeginBlock(const bContext *C, ARegion *region, const char *name, shor block->active= 1; block->dt= dt; block->evil_C= (void*)C; // XXX - if (scn) block->color_profile= (scn->r.color_mgt_flag & R_COLOR_MANAGEMENT); + if (scn) { + block->color_profile= (scn->r.color_mgt_flag & R_COLOR_MANAGEMENT); + block->unit= &scn->unit; + } BLI_strncpy(block->name, name, sizeof(block->name)); if(region) @@ -2506,12 +2529,10 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str, static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, PointerRNA *ptr, PropertyRNA *prop, int index, float min, float max, float a1, float a2, const char *tip) { + const PropertyType proptype= RNA_property_type(prop); uiBut *but; - PropertyType proptype; int freestr= 0, icon= 0; - proptype= RNA_property_type(prop); - /* use rna values if parameters are not specified */ if(!str) { if(type == MENU && proptype == PROP_ENUM) { @@ -2636,9 +2657,14 @@ static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *s UI_DEF_BUT_RNA_DISABLE(but); } + if (but->flag & UI_BUT_UNDO && (ui_but_is_rna_undo(but) == FALSE)) { + but->flag &= ~UI_BUT_UNDO; + } + /* If this button uses units, calculate the step from this */ - if(ui_is_but_unit(but)) + if((proptype == PROP_FLOAT) && ui_is_but_unit(but)) { but->a1= ui_get_but_step_unit(but, but->a1); + } if(freestr) MEM_freeN((void *)str); @@ -2682,6 +2708,7 @@ static uiBut *ui_def_but_operator(uiBlock *block, int type, const char *opname, but= ui_def_but(block, type, -1, str, x1, y1, x2, y2, NULL, 0, 0, 0, 0, tip); but->optype= ot; but->opcontext= opcontext; + but->flag &= ~UI_BUT_UNDO; /* no need for ui_but_is_undo(), we never need undo here */ if(!ot) { but->flag |= UI_BUT_DISABLED; @@ -2711,6 +2738,7 @@ static uiBut *ui_def_but_operator_text(uiBlock *block, int type, const char *opn but= ui_def_but(block, type, -1, str, x1, y1, x2, y2, poin, min, max, a1, a2, tip); but->optype= ot; but->opcontext= opcontext; + but->flag &= ~UI_BUT_UNDO; /* no need for ui_but_is_undo(), we never need undo here */ if(!ot) { but->flag |= UI_BUT_DISABLED; diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index 97299a6a766..dd7d2ca765f 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -140,26 +140,25 @@ void uiDrawBox(int mode, float minx, float miny, float maxx, float maxy, float r glEnd(); } -static void round_box_shade_col(float *col1, float *col2, float fac) +static void round_box_shade_col(const float col1[3], float const col2[3], const float fac) { - float col[4]; + float col[3]; col[0]= (fac*col1[0] + (1.0f-fac)*col2[0]); col[1]= (fac*col1[1] + (1.0f-fac)*col2[1]); col[2]= (fac*col1[2] + (1.0f-fac)*col2[2]); - col[3]= (fac*col1[3] + (1.0f-fac)*col2[3]); - glColor4fv(col); + glColor3fv(col); } - /* linear horizontal shade within button or in outline */ /* view2d scrollers use it */ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, float rad, float shadetop, float shadedown) { float vec[7][2]= {{0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293}, {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}}; - float div= maxy-miny; - float coltop[4], coldown[4], color[4]; + const float div= maxy - miny; + const float idiv= 1.0f / div; + float coltop[3], coldown[3], color[4]; int a; /* mult */ @@ -173,11 +172,9 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl coltop[0]= color[0]+shadetop; if(coltop[0]>1.0f) coltop[0]= 1.0f; coltop[1]= color[1]+shadetop; if(coltop[1]>1.0f) coltop[1]= 1.0f; coltop[2]= color[2]+shadetop; if(coltop[2]>1.0f) coltop[2]= 1.0f; - coltop[3]= color[3]; coldown[0]= color[0]+shadedown; if(coldown[0]<0.0f) coldown[0]= 0.0f; coldown[1]= color[1]+shadedown; if(coldown[1]<0.0f) coldown[1]= 0.0f; coldown[2]= color[2]+shadedown; if(coldown[2]<0.0f) coldown[2]= 0.0f; - coldown[3]= color[3]; glShadeModel(GL_SMOOTH); glBegin(mode); @@ -189,11 +186,11 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl glVertex2f(maxx-rad, miny); for(a=0; a<7; a++) { - round_box_shade_col(coltop, coldown, vec[a][1]/div); + round_box_shade_col(coltop, coldown, vec[a][1]*idiv); glVertex2f(maxx-rad+vec[a][0], miny+vec[a][1]); } - round_box_shade_col(coltop, coldown, rad/div); + round_box_shade_col(coltop, coldown, rad*idiv); glVertex2f(maxx, miny+rad); } else { @@ -204,11 +201,11 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl /* corner right-top */ if(roundboxtype & 2) { - round_box_shade_col(coltop, coldown, (div-rad)/div); + round_box_shade_col(coltop, coldown, (div-rad)*idiv); glVertex2f(maxx, maxy-rad); for(a=0; a<7; a++) { - round_box_shade_col(coltop, coldown, (div-rad+vec[a][1])/div); + round_box_shade_col(coltop, coldown, (div-rad+vec[a][1])*idiv); glVertex2f(maxx-vec[a][1], maxy-rad+vec[a][0]); } round_box_shade_col(coltop, coldown, 1.0); @@ -226,11 +223,11 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl glVertex2f(minx+rad, maxy); for(a=0; a<7; a++) { - round_box_shade_col(coltop, coldown, (div-vec[a][1])/div); + round_box_shade_col(coltop, coldown, (div-vec[a][1])*idiv); glVertex2f(minx+rad-vec[a][0], maxy-vec[a][1]); } - round_box_shade_col(coltop, coldown, (div-rad)/div); + round_box_shade_col(coltop, coldown, (div-rad)*idiv); glVertex2f(minx, maxy-rad); } else { @@ -241,11 +238,11 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl /* corner left-bottom */ if(roundboxtype & 8) { - round_box_shade_col(coltop, coldown, rad/div); + round_box_shade_col(coltop, coldown, rad*idiv); glVertex2f(minx, miny+rad); for(a=0; a<7; a++) { - round_box_shade_col(coltop, coldown, (rad-vec[a][1])/div); + round_box_shade_col(coltop, coldown, (rad-vec[a][1])*idiv); glVertex2f(minx+vec[a][1], miny+rad-vec[a][0]); } @@ -267,7 +264,8 @@ void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float { float vec[7][2]= {{0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293}, {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}}; - float div= maxx-minx; + const float div= maxx - minx; + const float idiv= 1.0f / div; float colLeft[3], colRight[3], color[4]; int a; @@ -295,11 +293,11 @@ void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float glVertex2f(maxx-rad, miny); for(a=0; a<7; a++) { - round_box_shade_col(colLeft, colRight, vec[a][0]/div); + round_box_shade_col(colLeft, colRight, vec[a][0]*idiv); glVertex2f(maxx-rad+vec[a][0], miny+vec[a][1]); } - round_box_shade_col(colLeft, colRight, rad/div); + round_box_shade_col(colLeft, colRight, rad*idiv); glVertex2f(maxx, miny+rad); } else { @@ -314,10 +312,10 @@ void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float for(a=0; a<7; a++) { - round_box_shade_col(colLeft, colRight, (div-rad-vec[a][0])/div); + round_box_shade_col(colLeft, colRight, (div-rad-vec[a][0])*idiv); glVertex2f(maxx-vec[a][1], maxy-rad+vec[a][0]); } - round_box_shade_col(colLeft, colRight, (div-rad)/div); + round_box_shade_col(colLeft, colRight, (div-rad)*idiv); glVertex2f(maxx-rad, maxy); } else { @@ -327,11 +325,11 @@ void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float /* corner left-top */ if(roundboxtype & 1) { - round_box_shade_col(colLeft, colRight, (div-rad)/div); + round_box_shade_col(colLeft, colRight, (div-rad)*idiv); glVertex2f(minx+rad, maxy); for(a=0; a<7; a++) { - round_box_shade_col(colLeft, colRight, (div-rad+vec[a][0])/div); + round_box_shade_col(colLeft, colRight, (div-rad+vec[a][0])*idiv); glVertex2f(minx+rad-vec[a][0], maxy-vec[a][1]); } @@ -349,7 +347,7 @@ void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float glVertex2f(minx, miny+rad); for(a=0; a<7; a++) { - round_box_shade_col(colLeft, colRight, (vec[a][0])/div); + round_box_shade_col(colLeft, colRight, (vec[a][0])*idiv); glVertex2f(minx+vec[a][1], miny+rad-vec[a][0]); } diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 6f3ca2bf003..3bd29f8de3e 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -2310,13 +2310,13 @@ static float ui_numedit_apply_snapf(uiBut *but, float tempf, float softmin, floa float fac= 1.0f; if(ui_is_but_unit(but)) { - Scene *scene= CTX_data_scene((bContext *)but->block->evil_C); + UnitSettings *unit= but->block->unit; int unit_type= uiButGetUnitType(but)>>16; - if(bUnit_IsValid(scene->unit.system, unit_type)) { - fac= (float)bUnit_BaseScalar(scene->unit.system, unit_type); + if(bUnit_IsValid(unit->system, unit_type)) { + fac= (float)bUnit_BaseScalar(unit->system, unit_type); if(ELEM3(unit_type, B_UNIT_LENGTH, B_UNIT_AREA, B_UNIT_VOLUME)) { - fac /= scene->unit.scale_length; + fac /= unit->scale_length; } } } diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index 8475090b468..40b98bebcd0 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -213,7 +213,7 @@ struct uiBut { BIFIconID icon; char lock; - char dt; + char dt; /* drawtype: UI_EMBOSS, UI_EMBOSSN ... etc, copied from the block */ char changed; /* could be made into a single flag */ unsigned char unit_type; /* so buttons can support unit systems which are not RNA */ short modifier_key; @@ -306,7 +306,8 @@ struct uiBlock { void *drawextra_arg2; int flag; - char direction, dt; + char direction; + char dt; /* drawtype: UI_EMBOSS, UI_EMBOSSN ... etc, copied to buttons */ short auto_open; double auto_open_last; @@ -331,7 +332,9 @@ struct uiBlock { void *evil_C; // XXX hack for dynamic operator enums float _hsv[3]; // XXX, only access via ui_block_hsv_get() - char color_profile; // color profile for correcting linear colors for display + char color_profile; // color profile for correcting linear colors for display + struct UnitSettings *unit; // unit system, used a lot for numeric buttons so include here rather then fetching through the scene every time. + }; typedef struct uiSafetyRct { diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index df654cf3645..3575a8527fc 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -367,7 +367,7 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in unit= UI_UNIT_X*0.75; butw= unit; buth= unit; - + if(ptr->type == &RNA_Armature) { bArmature *arm= (bArmature *)ptr->data; layer_used= arm->layer_used; @@ -379,7 +379,7 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in for(a=0; aroot->block->dt, UI_EMBOSSN, UI_EMBOSSP)) { + boolarr= MEM_callocN(sizeof(int)*len, "ui_item_array"); + RNA_property_boolean_get_array(ptr, prop, boolarr); + } for(a=0; atype==NUM) but->type= NUMSLI; if(toggle && but->type==OPTION) but->type= TOG; } + + if(boolarr) { + MEM_freeN(boolarr); + } } } @@ -951,13 +962,14 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index uiBut *but; PropertyType type; char namestr[UI_MAX_NAME_STR]; - int len, w, h, slider, toggle, expand, icon_only, no_bg; + int len, is_array, w, h, slider, toggle, expand, icon_only, no_bg; uiBlockSetCurLayout(block, layout); /* retrieve info */ type= RNA_property_type(prop); - len= RNA_property_array_length(ptr, prop); + is_array= RNA_property_array_check(prop); + len= (is_array) ? RNA_property_array_length(ptr, prop) : 0; /* set name and icon */ if(!name) @@ -967,14 +979,16 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index if(ELEM4(type, PROP_INT, PROP_FLOAT, PROP_STRING, PROP_POINTER)) name= ui_item_name_add_colon(name, namestr); - else if(type == PROP_BOOLEAN && len && index == RNA_NO_INDEX) + else if(type == PROP_BOOLEAN && is_array && index == RNA_NO_INDEX) name= ui_item_name_add_colon(name, namestr); else if(type == PROP_ENUM && index != RNA_ENUM_VALUE) name= ui_item_name_add_colon(name, namestr); if(layout->root->type == UI_LAYOUT_MENU) { - if(type == PROP_BOOLEAN) - icon= (RNA_property_boolean_get(ptr, prop))? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT; + if(type == PROP_BOOLEAN && ((is_array == FALSE) || (index != RNA_NO_INDEX))) { + if(is_array) icon= (RNA_property_boolean_get_index(ptr, prop, index)) ? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT; + else icon= (RNA_property_boolean_get(ptr, prop)) ? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT; + } else if(type == PROP_ENUM && index == RNA_ENUM_VALUE) { int enum_value= RNA_property_enum_get(ptr, prop); if(RNA_property_flag(prop) & PROP_ENUM_FLAG) { @@ -999,16 +1013,14 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index uiBlockSetEmboss(block, UI_EMBOSSN); /* array property */ - if(index == RNA_NO_INDEX && len > 0) + if(index == RNA_NO_INDEX && is_array) ui_item_array(layout, block, name, icon, ptr, prop, len, 0, 0, w, h, expand, slider, toggle, icon_only); /* enum item */ else if(type == PROP_ENUM && index == RNA_ENUM_VALUE) { - const char *identifier= RNA_property_identifier(prop); - if(icon && name[0] && !icon_only) uiDefIconTextButR_prop(block, ROW, 0, icon, name, 0, 0, w, h, ptr, prop, -1, 0, value, -1, -1, NULL); else if(icon) - uiDefIconButR(block, ROW, 0, icon, 0, 0, w, h, ptr, identifier, -1, 0, value, -1, -1, NULL); + uiDefIconButR_prop(block, ROW, 0, icon, 0, 0, w, h, ptr, prop, -1, 0, value, -1, -1, NULL); else uiDefButR_prop(block, ROW, 0, name, 0, 0, w, h, ptr, prop, -1, 0, value, -1, -1, NULL); } diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index f7460e77030..a55ee01202c 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -424,7 +424,8 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) if (unit_type == PROP_UNIT_ROTATION) { if (RNA_property_type(but->rnaprop) == PROP_FLOAT) { - BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Radians: %f", RNA_property_float_get_index(&but->rnapoin, but->rnaprop, but->rnaindex)); + float value= RNA_property_array_check(but->rnaprop) ? RNA_property_float_get_index(&but->rnapoin, but->rnaprop, but->rnaindex) : RNA_property_float_get(&but->rnapoin, but->rnaprop); + BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Radians: %f", value); data->color[data->totline]= 0x888888; data->totline++; } @@ -1188,7 +1189,7 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but, uiBut *bt; uiSafetyRct *saferct; rctf butrct; - float aspect; + /*float aspect;*/ /*UNUSED*/ int xsize, ysize, xof=0, yof=0, center; short dir1= 0, dir2=0; @@ -1223,7 +1224,7 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but, } } - aspect= (float)(block->maxx - block->minx + 4); + /*aspect= (float)(block->maxx - block->minx + 4);*/ /*UNUSED*/ ui_block_to_window_fl(butregion, but->block, &block->minx, &block->miny); ui_block_to_window_fl(butregion, but->block, &block->maxx, &block->maxy); @@ -1232,7 +1233,7 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but, xsize= block->maxx - block->minx+4; // 4 for shadow ysize= block->maxy - block->miny+4; - aspect/= (float)xsize; + /*aspect/= (float)xsize;*/ /*UNUSED*/ if(but) { int left=0, right=0, top=0, down=0; diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c index f660dbb9edd..a3f56192cb5 100644 --- a/source/blender/editors/interface/interface_utils.c +++ b/source/blender/editors/interface/interface_utils.c @@ -143,7 +143,7 @@ int uiDefAutoButsRNA(uiLayout *layout, PointerRNA *ptr, int (*check_prop)(Proper if(label_align != '\0') { PropertyType type = RNA_property_type(prop); - int is_boolean = (type == PROP_BOOLEAN && !RNA_property_array_check(ptr, prop)); + int is_boolean = (type == PROP_BOOLEAN && !RNA_property_array_check(prop)); name= RNA_property_ui_name(prop); diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index d235fd0c16a..5da875356ea 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -180,7 +180,7 @@ void ui_draw_anti_tria(float x1, float y1, float x2, float y2, float x3, float y glEnable(GL_BLEND); glGetFloatv(GL_CURRENT_COLOR, color); - color[3]*= 0.125; + color[3] *= 0.125f; glColor4fv(color); /* for each AA step */ diff --git a/source/blender/editors/mesh/SConscript b/source/blender/editors/mesh/SConscript index 34936c025bc..b992ae5f04c 100644 --- a/source/blender/editors/mesh/SConscript +++ b/source/blender/editors/mesh/SConscript @@ -8,7 +8,7 @@ incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../gpu ../../blenloader' incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern' -if env['OURPLATFORM'] == 'linux2': +if env['OURPLATFORM'] == 'linux': cflags='-pthread' incs += ' ../../../extern/binreloc/include' diff --git a/source/blender/editors/mesh/editmesh.c b/source/blender/editors/mesh/editmesh.c index ec08bfccda3..4377fb03632 100644 --- a/source/blender/editors/mesh/editmesh.c +++ b/source/blender/editors/mesh/editmesh.c @@ -1449,9 +1449,8 @@ static int mesh_separate_material(wmOperator *op, Main *bmain, Scene *scene, Bas /* select the material */ EM_select_by_material(em, curr_mat); /* and now separate */ - if(0==mesh_separate_selected(op, bmain, scene, editbase)) { - BKE_mesh_end_editmesh(me, em); - return 0; + if(em->totfacesel > 0) { + mesh_separate_selected(op, bmain, scene, editbase); } } diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c index 9497370a4fa..eb6854d2548 100644 --- a/source/blender/editors/mesh/editmesh_mods.c +++ b/source/blender/editors/mesh/editmesh_mods.c @@ -1697,7 +1697,7 @@ void EM_mesh_copy_face_layer(EditMesh *em, wmOperator *op, short type) /* ctrl+c in mesh editmode */ -static void mesh_copy_menu(EditMesh *em, wmOperator *op) +static void UNUSED_FUNCTION(mesh_copy_menu)(EditMesh *em, wmOperator *op) { EditSelection *ese; int ret; diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index bfae101d38e..9ff2923f733 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -3895,7 +3895,7 @@ void MESH_OT_edge_rotate(wmOperatorType *ot) /* XXX old bevel not ported yet */ -static void bevel_menu(EditMesh *em) +static void UNUSED_FUNCTION(bevel_menu)(EditMesh *em) { BME_Mesh *bm; BME_TransData_Head *td; diff --git a/source/blender/editors/object/SConscript b/source/blender/editors/object/SConscript index 660643fbb0f..ca048cb59f9 100644 --- a/source/blender/editors/object/SConscript +++ b/source/blender/editors/object/SConscript @@ -10,7 +10,7 @@ incs += ' ../../render/extern/include ../../gpu' # for object_bake.c defs = [] -if env['OURPLATFORM'] == 'linux2': +if env['OURPLATFORM'] == 'linux': cflags='-pthread' incs += ' ../../../extern/binreloc/include' diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index cd42661f320..d5f10f1d37d 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -182,7 +182,7 @@ void ED_object_add_generic_props(wmOperatorType *ot, int do_editmode) } RNA_def_float_vector_xyz(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "Location for the newly added object", -FLT_MAX, FLT_MAX); - RNA_def_float_rotation(ot->srna, "rotation", 3, NULL, -FLT_MAX, FLT_MAX, "Rotation", "Rotation for the newly added object", -M_PI * 2.0f, M_PI * 2.0f); + RNA_def_float_rotation(ot->srna, "rotation", 3, NULL, -FLT_MAX, FLT_MAX, "Rotation", "Rotation for the newly added object", (float)-M_PI * 2.0f, (float)M_PI * 2.0f); prop = RNA_def_boolean_layer_member(ot->srna, "layers", 20, NULL, "Layer", ""); RNA_def_property_flag(prop, PROP_HIDDEN); diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c index 679e4e58017..ee162464c70 100644 --- a/source/blender/editors/object/object_bake.c +++ b/source/blender/editors/object/object_bake.c @@ -636,14 +636,14 @@ static void apply_heights_data(void *bake_data) if(ibuf->rect_float) { float *rrgbf= ibuf->rect_float + i*4; - if(max-min > 1e-5) height= (heights[i]-min)/(max-min); + if(max-min > 1e-5f) height= (heights[i]-min)/(max-min); else height= 0; rrgbf[0]=rrgbf[1]=rrgbf[2]= height; } else { char *rrgb= (char*)ibuf->rect + i*4; - if(max-min > 1e-5) height= (heights[i]-min)/(max-min); + if(max-min > 1e-5f) height= (heights[i]-min)/(max-min); else height= 0; rrgb[0]=rrgb[1]=rrgb[2]= FTOCHAR(height); diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index c8d38218533..61734bc51a2 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -721,7 +721,7 @@ static void spot_interactive(Object *ob, int mode) } #endif -static void special_editmenu(Scene *scene, View3D *v3d) +static void UNUSED_FUNCTION(special_editmenu)(Scene *scene, View3D *v3d) { // XXX static short numcuts= 2; Object *ob= OBACT; @@ -1343,7 +1343,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event) DAG_ids_flush_update(bmain, 0); } -static void copy_attr_menu(Main *bmain, Scene *scene, View3D *v3d) +static void UNUSED_FUNCTION(copy_attr_menu)(Main *bmain, Scene *scene, View3D *v3d) { Object *ob; short event; @@ -1616,7 +1616,7 @@ void OBJECT_OT_shade_smooth(wmOperatorType *ot) /* ********************** */ -static void image_aspect(Scene *scene, View3D *v3d) +static void UNUSED_FUNCTION(image_aspect)(Scene *scene, View3D *v3d) { /* all selected objects with an image map: scale in image aspect */ Base *base; @@ -1691,7 +1691,7 @@ static int vergbaseco(const void *a1, const void *a2) } -static void auto_timeoffs(Scene *scene, View3D *v3d) +static void UNUSED_FUNCTION(auto_timeoffs)(Scene *scene, View3D *v3d) { Base *base, **basesort, **bs; float start, delta; @@ -1732,7 +1732,7 @@ static void auto_timeoffs(Scene *scene, View3D *v3d) } -static void ofs_timeoffs(Scene *scene, View3D *v3d) +static void UNUSED_FUNCTION(ofs_timeoffs)(Scene *scene, View3D *v3d) { float offset=0.0f; @@ -1751,7 +1751,7 @@ static void ofs_timeoffs(Scene *scene, View3D *v3d) } -static void rand_timeoffs(Scene *scene, View3D *v3d) +static void UNUSED_FUNCTION(rand_timeoffs)(Scene *scene, View3D *v3d) { Base *base; float rand_ofs=0.0f; diff --git a/source/blender/editors/physics/SConscript b/source/blender/editors/physics/SConscript index 274819c918c..188416eb04c 100644 --- a/source/blender/editors/physics/SConscript +++ b/source/blender/editors/physics/SConscript @@ -10,7 +10,7 @@ incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern' defs = '' -if env['OURPLATFORM'] == 'linux2': +if env['OURPLATFORM'] == 'linux': cflags='-pthread' incs += ' ../../../extern/binreloc/include' diff --git a/source/blender/editors/render/SConscript b/source/blender/editors/render/SConscript index 5526194eab4..e7e883f9ef6 100644 --- a/source/blender/editors/render/SConscript +++ b/source/blender/editors/render/SConscript @@ -9,7 +9,7 @@ incs += ' ../../gpu ../../freestyle' incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern' incs += ' ../../blenloader' -if env['OURPLATFORM'] == 'linux2': +if env['OURPLATFORM'] == 'linux': cflags='-pthread' incs += ' ../../../extern/binreloc/include' diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 0484df56a0e..916679fb3f6 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -1297,7 +1297,7 @@ void TEXTURE_OT_envmap_save(wmOperatorType *ot) ot->poll= envmap_save_poll; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag= OPTYPE_REGISTER; /* no undo since this doesnt modify the env-map */ /* properties */ //RNA_def_enum(ot->srna, "file_type", image_file_type_items, R_PNG, "File Type", "File type to save image as."); @@ -1385,8 +1385,6 @@ static int copy_material_exec(bContext *C, wmOperator *UNUSED(op)) copy_matcopybuf(ma); - WM_event_add_notifier(C, NC_MATERIAL, ma); - return OPERATOR_FINISHED; } @@ -1401,7 +1399,7 @@ void MATERIAL_OT_copy(wmOperatorType *ot) ot->exec= copy_material_exec; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag= OPTYPE_REGISTER; /* no undo needed since no changes are made to the material */ } static int paste_material_exec(bContext *C, wmOperator *UNUSED(op)) @@ -1525,8 +1523,6 @@ static int copy_mtex_exec(bContext *C, wmOperator *UNUSED(op)) copy_mtex_copybuf(id); - WM_event_add_notifier(C, NC_TEXTURE, NULL); - return OPERATOR_FINISHED; } @@ -1549,7 +1545,7 @@ void TEXTURE_OT_slot_copy(wmOperatorType *ot) ot->poll= copy_mtex_poll; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag= OPTYPE_REGISTER; /* no undo needed since no changes are made to the mtex */ } static int paste_mtex_exec(bContext *C, wmOperator *UNUSED(op)) diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c index b6fb60ac4f7..85e1eb016d7 100644 --- a/source/blender/editors/render/render_update.c +++ b/source/blender/editors/render/render_update.c @@ -58,6 +58,7 @@ #include "GPU_material.h" +#include "ED_node.h" #include "ED_render.h" #include "render_intern.h" // own include @@ -115,6 +116,8 @@ static void texture_changed(Main *bmain, Tex *tex) Material *ma; Lamp *la; World *wo; + Scene *scene; + bNode *node; /* icons */ BKE_icon_changed(BKE_icon_getid(&tex->id)); @@ -146,6 +149,16 @@ static void texture_changed(Main *bmain, Tex *tex) BKE_icon_changed(BKE_icon_getid(&wo->id)); } + + /* find compositing nodes */ + for(scene=bmain->scene.first; scene; scene=scene->id.next) { + if(scene->use_nodes && scene->nodetree) { + for(node=scene->nodetree->nodes.first; node; node=node->next) { + if(node->id == &tex->id) + ED_node_changed_update(&scene->id, node); + } + } + } } static void lamp_changed(Main *bmain, Lamp *la) diff --git a/source/blender/editors/screen/SConscript b/source/blender/editors/screen/SConscript index 61f3429521d..1381c820224 100644 --- a/source/blender/editors/screen/SConscript +++ b/source/blender/editors/screen/SConscript @@ -10,7 +10,7 @@ incs += ' #/intern/guardedalloc #/extern/glew/include' defs = '' -if env['OURPLATFORM'] == 'linux2': +if env['OURPLATFORM'] == 'linux': cflags='-pthread' incs += ' ../../../extern/binreloc/include' diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 82986dfbcc4..bc97cd9d3ff 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -1406,6 +1406,7 @@ int ED_area_header_switchbutton(const bContext *C, uiBlock *block, int yco) "Displays current editor type. " "Click for menu of available types"); uiButSetFunc(but, spacefunc, NULL, NULL); + uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */ return xco + UI_UNIT_X + 14; } @@ -1414,6 +1415,7 @@ int ED_area_header_standardbuttons(const bContext *C, uiBlock *block, int yco) { ScrArea *sa= CTX_wm_area(C); int xco= 8; + uiBut *but; if (!sa->full) xco= ED_area_header_switchbutton(C, block, yco); @@ -1421,20 +1423,22 @@ int ED_area_header_standardbuttons(const bContext *C, uiBlock *block, int yco) uiBlockSetEmboss(block, UI_EMBOSSN); if (sa->flag & HEADER_NO_PULLDOWN) { - uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, 0, + but= uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, 0, ICON_DISCLOSURE_TRI_RIGHT, xco,yco,UI_UNIT_X,UI_UNIT_Y-2, &(sa->flag), 0, 0, 0, 0, "Show pulldown menus"); } else { - uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, 0, + but= uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, 0, ICON_DISCLOSURE_TRI_DOWN, xco,yco,UI_UNIT_X,UI_UNIT_Y-2, &(sa->flag), 0, 0, 0, 0, "Hide pulldown menus"); } + uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */ + uiBlockSetEmboss(block, UI_EMBOSS); return xco + UI_UNIT_X; diff --git a/source/blender/editors/sculpt_paint/SConscript b/source/blender/editors/sculpt_paint/SConscript index 90b56ded2cd..b3927fcee68 100644 --- a/source/blender/editors/sculpt_paint/SConscript +++ b/source/blender/editors/sculpt_paint/SConscript @@ -10,7 +10,7 @@ incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../render/extern/include' incs += ' ../../gpu ../../makesrna ../../blenloader' -if env['OURPLATFORM'] == 'linux2': +if env['OURPLATFORM'] == 'linux': cflags='-pthread' incs += ' ../../../extern/binreloc/include' diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 8e1a4b2d16c..0d81a84deea 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -904,6 +904,7 @@ void buttons_context_draw(const bContext *C, uiLayout *layout) block= uiLayoutGetBlock(row); uiBlockSetEmboss(block, UI_EMBOSSN); but= uiDefIconButBitC(block, ICONTOG, SB_PIN_CONTEXT, 0, ICON_UNPINNED, 0, 0, UI_UNIT_X, UI_UNIT_Y, &sbuts->flag, 0, 0, 0, 0, "Follow context or keep fixed datablock displayed"); + uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */ uiButSetFunc(but, pin_cb, NULL, NULL); for(a=0; alen; a++) { diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c index 19c600be937..e631718b0cb 100644 --- a/source/blender/editors/space_buttons/buttons_header.c +++ b/source/blender/editors/space_buttons/buttons_header.c @@ -104,6 +104,7 @@ void buttons_header_buttons(const bContext *C, ARegion *ar) { SpaceButs *sbuts= CTX_wm_space_buts(C); uiBlock *block; + uiBut *but; int xco, yco= 2; buttons_context_compute(C, sbuts); @@ -118,33 +119,32 @@ void buttons_header_buttons(const bContext *C, ARegion *ar) xco -= UI_UNIT_X; // Default panels + uiBlockBeginAlign(block); - if(sbuts->pathflag & (1<mainb), 0.0, (float)BCONTEXT_RENDER, 0, 0, "Render"); - if(sbuts->pathflag & (1<mainb), 0.0, (float)BCONTEXT_SCENE, 0, 0, "Scene"); - if(sbuts->pathflag & (1<mainb), 0.0, (float)BCONTEXT_WORLD, 0, 0, "World"); - if(sbuts->pathflag & (1<mainb), 0.0, (float)BCONTEXT_OBJECT, 0, 0, "Object"); - if(sbuts->pathflag & (1<mainb), 0.0, (float)BCONTEXT_CONSTRAINT, 0, 0, "Object Constraints"); - if(sbuts->pathflag & (1<mainb), 0.0, (float)BCONTEXT_MODIFIER, 0, 0, "Modifiers"); - if(sbuts->pathflag & (1<dataicon, xco+=BUT_UNIT_X, yco, BUT_UNIT_X, UI_UNIT_Y, &(sbuts->mainb), 0.0, (float)BCONTEXT_DATA, 0, 0, "Object Data"); - if(sbuts->pathflag & (1<mainb), 0.0, (float)BCONTEXT_BONE, 0, 0, "Bone"); - if(sbuts->pathflag & (1<mainb), 0.0, (float)BCONTEXT_BONE_CONSTRAINT, 0, 0, "Bone Constraints"); - if(sbuts->pathflag & (1<mainb), 0.0, (float)BCONTEXT_MATERIAL, 0, 0, "Material"); - if(sbuts->pathflag & (1<mainb), 0.0, (float)BCONTEXT_TEXTURE, 0, 0, "Texture"); - if(sbuts->pathflag & (1<mainb), 0.0, (float)BCONTEXT_PARTICLE, 0, 0, "Particles"); - if(sbuts->pathflag & (1<mainb), 0.0, (float)BCONTEXT_PHYSICS, 0, 0, "Physics"); + +#define BUTTON_HEADER_CTX(_ctx, _icon, _tip) \ + if(sbuts->pathflag & (1<<_ctx)) { \ + but= uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, _icon, xco+=BUT_UNIT_X, yco, BUT_UNIT_X, UI_UNIT_Y, &(sbuts->mainb), 0.0, (float)_ctx, 0, 0, _tip); \ + uiButClearFlag(but, UI_BUT_UNDO); \ + } \ + + + BUTTON_HEADER_CTX(BCONTEXT_RENDER, ICON_SCENE, "Render") + BUTTON_HEADER_CTX(BCONTEXT_SCENE, ICON_SCENE_DATA, "Scene"); + BUTTON_HEADER_CTX(BCONTEXT_WORLD, ICON_WORLD, "World"); + BUTTON_HEADER_CTX(BCONTEXT_OBJECT, ICON_OBJECT_DATA, "Object"); + BUTTON_HEADER_CTX(BCONTEXT_CONSTRAINT, ICON_CONSTRAINT, "Object Constraints"); + BUTTON_HEADER_CTX(BCONTEXT_MODIFIER, ICON_MODIFIER, "Object Modifiers"); + BUTTON_HEADER_CTX(BCONTEXT_DATA, sbuts->dataicon, "Object Data"); + BUTTON_HEADER_CTX(BCONTEXT_BONE, ICON_BONE_DATA, "Bone"); + BUTTON_HEADER_CTX(BCONTEXT_BONE_CONSTRAINT, ICON_CONSTRAINT_BONE, "Bone Constraints"); + BUTTON_HEADER_CTX(BCONTEXT_MATERIAL, ICON_MATERIAL, "Material"); + BUTTON_HEADER_CTX(BCONTEXT_TEXTURE, ICON_TEXTURE, "Textures"); + BUTTON_HEADER_CTX(BCONTEXT_PARTICLE, ICON_PARTICLES, "Particles"); + BUTTON_HEADER_CTX(BCONTEXT_PHYSICS, ICON_PHYSICS, "Physics"); + +#undef BUTTON_HEADER_CTX + xco+= BUT_UNIT_X; uiBlockEndAlign(block); 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/SConscript b/source/blender/editors/space_file/SConscript index 7c55b40e816..ad96840f7b9 100644 --- a/source/blender/editors/space_file/SConscript +++ b/source/blender/editors/space_file/SConscript @@ -19,7 +19,7 @@ if env['WITH_BF_OPENEXR']: if env['WITH_BF_TIFF']: defs.append('WITH_TIFF') -if env['OURPLATFORM'] == 'linux2': +if env['OURPLATFORM'] == 'linux': cflags='-pthread' incs += ' ../../../extern/binreloc/include' diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index d4253495e97..4dd97c63d40 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -1159,6 +1159,13 @@ int file_filename_exec(bContext *C, wmOperator *UNUSED(unused)) return OPERATOR_FINISHED; } +/* TODO, directory operator is non-functional while a library is loaded + * until this is properly supported just disable it. */ +static int file_directory_poll(bContext *C) +{ + return ED_operator_file_active(C) && filelist_lib(CTX_wm_space_file(C)->files) == NULL; +} + void FILE_OT_directory(struct wmOperatorType *ot) { /* identifiers */ @@ -1169,7 +1176,7 @@ void FILE_OT_directory(struct wmOperatorType *ot) /* api callbacks */ ot->invoke= file_directory_invoke; ot->exec= file_directory_exec; - ot->poll= ED_operator_file_active; /* <- important, handler is on window level */ + ot->poll= file_directory_poll; /* <- important, handler is on window level */ } void FILE_OT_refresh(struct wmOperatorType *ot) diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 6736230e84f..d8be312cf39 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -602,28 +602,6 @@ short filelist_changed(struct FileList* filelist) return filelist->changed; } -static struct ImBuf * filelist_loadimage(struct FileList* filelist, int index) -{ - ImBuf *imb = NULL; - int fidx = 0; - - if ( (index < 0) || (index >= filelist->numfiltered) ) { - return NULL; - } - fidx = filelist->fidx[index]; - imb = filelist->filelist[fidx].image; - if (!imb) - { - if ( (filelist->filelist[fidx].flags & IMAGEFILE) || (filelist->filelist[fidx].flags & MOVIEFILE) ) { - imb = IMB_thumb_read(filelist->filelist[fidx].path, THB_NORMAL); - } - if (imb) { - filelist->filelist[fidx].image = imb; - } - } - return imb; -} - struct ImBuf * filelist_getimage(struct FileList* filelist, int index) { ImBuf* ibuf = NULL; diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index ea8c7fc0cfa..6e0d1909963 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1331,7 +1331,7 @@ void IMAGE_OT_reload(wmOperatorType *ot) ot->exec= reload_exec; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag= OPTYPE_REGISTER; /* no undo, image buffer is not handled by undo */ } /********************** new image operator *********************/ @@ -1989,7 +1989,7 @@ void IMAGE_OT_sample_line(wmOperatorType *ot) ot->cancel= WM_gesture_straightline_cancel; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag= 0; /* no undo/register since this operates on the space */ WM_operator_properties_gesture_straightline(ot, CURSOR_EDIT); } diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c index d58fb7b11f0..e09565d38e9 100644 --- a/source/blender/editors/space_info/info_ops.c +++ b/source/blender/editors/space_info/info_ops.c @@ -273,7 +273,7 @@ void FILE_OT_report_missing_files(wmOperatorType *ot) ot->exec= report_missing_files_exec; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag= 0; /* only reports so no need to undo/register */ } /********************* find missing files operator *********************/ diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index 77c91b28a63..af99087b0b8 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -951,7 +951,7 @@ static int nlaedit_bake_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -static void NLA_OT_bake (wmOperatorType *ot) +void NLA_OT_bake (wmOperatorType *ot) { /* identifiers */ ot->name= "Bake Strips"; diff --git a/source/blender/editors/space_node/SConscript b/source/blender/editors/space_node/SConscript index 634d4b777d9..c4309dcfca3 100644 --- a/source/blender/editors/space_node/SConscript +++ b/source/blender/editors/space_node/SConscript @@ -15,7 +15,7 @@ if env['CC'] == 'gcc': #cf.append('-Werror') pass -if env['OURPLATFORM'] == 'linux2': +if env['OURPLATFORM'] == 'linux': cflags='-pthread' incs += ' ../../../extern/binreloc/include' diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 984e944321e..011f9a31c93 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -550,14 +550,16 @@ void ED_node_set_active(Main *bmain, bNodeTree *ntree, bNode *node) } } else if(node->type==CMP_NODE_COMPOSITE) { - bNode *tnode; - - for(tnode= ntree->nodes.first; tnode; tnode= tnode->next) - if( tnode->type==CMP_NODE_COMPOSITE) - tnode->flag &= ~NODE_DO_OUTPUT; - - node->flag |= NODE_DO_OUTPUT; - ED_node_generic_update(bmain, ntree, node); + if (was_output==0) { + bNode *tnode; + + for(tnode= ntree->nodes.first; tnode; tnode= tnode->next) + if( tnode->type==CMP_NODE_COMPOSITE) + tnode->flag &= ~NODE_DO_OUTPUT; + + node->flag |= NODE_DO_OUTPUT; + ED_node_generic_update(bmain, ntree, node); + } } } else if(ntree->type==NTREE_TEXTURE) { @@ -1641,7 +1643,7 @@ void NODE_OT_link_viewer(wmOperatorType *ot) /* return 0, nothing done */ -static int node_mouse_groupheader(SpaceNode *snode) +static int UNUSED_FUNCTION(node_mouse_groupheader)(SpaceNode *snode) { bNode *gnode; float mx=0, my=0; @@ -3007,10 +3009,10 @@ static int node_mute_exec(bContext *C, wmOperator *UNUSED(op)) for(node= snode->edittree->nodes.first; node; node= node->next) { if(node->flag & SELECT) { - if(node->inputs.first && node->outputs.first) { + /* Be able to mute in-/output nodes as well. - DingTo + if(node->inputs.first && node->outputs.first) { */ node->flag ^= NODE_MUTED; snode_tag_changed(snode, node); - } } } diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h index 85bbbd4fffb..cf4ce9c06a8 100644 --- a/source/blender/editors/space_outliner/outliner_intern.h +++ b/source/blender/editors/space_outliner/outliner_intern.h @@ -124,8 +124,8 @@ typedef struct TreeElement { #define OL_TOGW OL_TOG_RESTRICT_VIEWX #define OL_RNA_COLX (UI_UNIT_X*15) -#define OL_RNA_COL_SIZEX (UI_UNIT_X*7.5) -#define OL_RNA_COL_SPACEX (UI_UNIT_X*2.5) +#define OL_RNA_COL_SIZEX (UI_UNIT_X*7.5f) +#define OL_RNA_COL_SPACEX (UI_UNIT_X*2.5f) /* outliner_tree.c ----------------------------------------------- */ @@ -143,9 +143,6 @@ void outliner_build_tree(struct Main *mainvar, struct Scene *scene, struct Space void draw_outliner(const struct bContext *C); /* outliner_select.c -------------------------------------------- */ - -void outliner_select(struct SpaceOops *soops, ListBase *lb, int *index, short *selecting); - int tree_element_type_active(struct bContext *C, struct Scene *scene, struct SpaceOops *soops, TreeElement *te, TreeStoreElem *tselem, int set); int tree_element_active(struct bContext *C, struct Scene *scene, SpaceOops *soops, TreeElement *te, int set); diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index c571fa1de6c..46a9bde8267 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -106,10 +106,11 @@ /* ****************************************************** */ /* Outliner Selection (grey-blue highlight for rows) */ -void outliner_select(SpaceOops *soops, ListBase *lb, int *index, short *selecting) +static int outliner_select(SpaceOops *soops, ListBase *lb, int *index, short *selecting) { TreeElement *te; TreeStoreElem *tselem; + int change= 0; for (te= lb->first; te && *index >= 0; te=te->next, (*index)--) { tselem= TREESTORE(te); @@ -131,6 +132,8 @@ void outliner_select(SpaceOops *soops, ListBase *lb, int *index, short *selectin tselem->flag |= TSE_SELECTED; else tselem->flag &= ~TSE_SELECTED; + + change |= 1; } } else if ((tselem->flag & TSE_CLOSED)==0) { @@ -142,10 +145,12 @@ void outliner_select(SpaceOops *soops, ListBase *lb, int *index, short *selectin * function correctly */ (*index)--; - outliner_select(soops, &te->subtree, index, selecting); + change |= outliner_select(soops, &te->subtree, index, selecting); (*index)++; } } + + return change; } /* ****************************************************** */ @@ -660,8 +665,8 @@ int tree_element_active(bContext *C, Scene *scene, SpaceOops *soops, TreeElement { switch(te->idcode) { - case ID_OB: - return tree_element_set_active_object(C, scene, soops, te, set); + /* Note: no ID_OB: objects are handled specially to allow multiple + selection. See do_outliner_item_activate. */ case ID_MA: return tree_element_active_material(C, scene, soops, te, set); case ID_WO: @@ -839,11 +844,14 @@ static int outliner_item_activate(bContext *C, wmOperator *op, wmEvent *event) fmval[0], fmval[1], NULL, &row); /* select relevant row */ - outliner_select(soops, &soops->tree, &row, &selecting); + if(outliner_select(soops, &soops->tree, &row, &selecting)) { - soops->storeflag |= SO_TREESTORE_REDRAW; + soops->storeflag |= SO_TREESTORE_REDRAW; - ED_undo_push(C, "Outliner selection event"); + /* no need for undo push here, only changing outliner data which is + * scene level - campbell */ + /* ED_undo_push(C, "Outliner selection event"); */ + } } ED_region_tag_redraw(ar); diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 98687bb90e0..dc84289a8de 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -702,7 +702,7 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline static Sequence *special_seq_update= 0; -static void set_special_seq_update(int val) +static void UNUSED_FUNCTION(set_special_seq_update)(int val) { // int x; diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index a58bec9eeb9..e876da41bd9 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -75,10 +75,6 @@ /* own include */ #include "sequencer_intern.h" -static void error(const char *UNUSED(dummy)) {} -static void waitcursor(int UNUSED(val)) {} -static void activate_fileselect(int UNUSED(d1), const char *UNUSED(d2), const char *UNUSED(d3), void *UNUSED(d4)) {} -static int pupmenu(const char *UNUSED(dummy)) {return 0;} static int okee(const char *UNUSED(dummy)) {return 0;} @@ -139,7 +135,7 @@ void seq_rectf(Sequence *seq, rctf *rectf) rectf->ymax= seq->machine+SEQ_STRIP_OFSTOP; } -static void change_plugin_seq(Scene *scene, char *str) /* called from fileselect */ +static void UNUSED_FUNCTION(change_plugin_seq)(Scene *scene, char *str) /* called from fileselect */ { Editing *ed= seq_give_editing(scene, FALSE); struct SeqEffectHandle sh; @@ -762,7 +758,7 @@ static int insert_gap(Scene *scene, int gap, int cfra) return done; } -static void touch_seq_files(Scene *scene) +static void UNUSED_FUNCTION(touch_seq_files)(Scene *scene) { Sequence *seq; Editing *ed= seq_give_editing(scene, FALSE); @@ -774,7 +770,7 @@ static void touch_seq_files(Scene *scene) if(okee("Touch and print selected movies")==0) return; - waitcursor(1); + WM_cursor_wait(1); SEQP_BEGIN(ed, seq) { if(seq->flag & SELECT) { @@ -789,7 +785,7 @@ static void touch_seq_files(Scene *scene) } SEQ_END - waitcursor(0); + WM_cursor_wait(0); } /* @@ -817,7 +813,7 @@ static void set_filter_seq(Scene *scene) } */ -static void seq_remap_paths(Scene *scene) +static void UNUSED_FUNCTION(seq_remap_paths)(Scene *scene) { Sequence *seq, *last_seq = seq_active_get(scene); Editing *ed= seq_give_editing(scene, FALSE); @@ -858,7 +854,7 @@ static void seq_remap_paths(Scene *scene) } -static void no_gaps(Scene *scene) +static void UNUSED_FUNCTION(no_gaps)(Scene *scene) { Editing *ed= seq_give_editing(scene, FALSE); int cfra, first= 0, done; @@ -1206,7 +1202,7 @@ void SEQUENCER_OT_reload(struct wmOperatorType *ot) ot->poll= sequencer_edit_poll; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag= OPTYPE_REGISTER; /* no undo, the data changed is stored outside 'main' */ } /* reload operator */ @@ -1232,9 +1228,6 @@ void SEQUENCER_OT_refresh_all(struct wmOperatorType *ot) /* api callbacks */ ot->exec= sequencer_refresh_all_exec; ot->poll= sequencer_edit_poll; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } static int sequencer_reassign_inputs_exec(bContext *C, wmOperator *op) @@ -1569,6 +1562,58 @@ void SEQUENCER_OT_delete(wmOperatorType *ot) } +/* offset clear operator */ +static int sequencer_offset_clear_exec(bContext *C, wmOperator *UNUSED(op)) +{ + Scene *scene= CTX_data_scene(C); + Editing *ed= seq_give_editing(scene, FALSE); + Sequence *seq; + + /* for effects, try to find a replacement input */ + for(seq=ed->seqbasep->first; seq; seq=seq->next) { + if((seq->type & SEQ_EFFECT)==0 && (seq->flag & SELECT)) { + seq->startofs= seq->endofs= seq->startstill= seq->endstill= 0; + } + } + + /* updates lengths etc */ + seq= ed->seqbasep->first; + while(seq) { + calc_sequence(scene, seq); + seq= seq->next; + } + + for(seq=ed->seqbasep->first; seq; seq=seq->next) { + if((seq->type & SEQ_EFFECT)==0 && (seq->flag & SELECT)) { + if(seq_test_overlap(ed->seqbasep, seq)) { + shuffle_seq(ed->seqbasep, seq, scene); + } + } + } + + WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + + return OPERATOR_FINISHED; +} + + +void SEQUENCER_OT_offset_clear(wmOperatorType *ot) +{ + + /* identifiers */ + ot->name= "Clear Strip Offset"; + ot->idname= "SEQUENCER_OT_offset_clear"; + ot->description="Clear strip offsets from the start and end frames"; + + /* api callbacks */ + ot->exec= sequencer_offset_clear_exec; + ot->poll= sequencer_edit_poll; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + + /* separate_images operator */ static int sequencer_separate_images_exec(bContext *C, wmOperator *op) { @@ -2477,7 +2522,7 @@ void SEQUENCER_OT_copy(wmOperatorType *ot) ot->poll= sequencer_edit_poll; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag= OPTYPE_REGISTER; /* properties */ } @@ -2803,6 +2848,9 @@ static int sequencer_change_path_exec(bContext *C, wmOperator *op) } RNA_END; + /* reset these else we wont see all the images */ + seq->anim_startofs= seq->anim_endofs= 0; + /* correct start/end frames so we dont move * important not to set seq->len= len; allow the function to handle it */ reload_sequence_new_file(scene, seq, TRUE); @@ -2815,12 +2863,15 @@ static int sequencer_change_path_exec(bContext *C, wmOperator *op) else { /* lame, set rna filepath */ PointerRNA seq_ptr; + PropertyRNA *prop; char filepath[FILE_MAX]; RNA_pointer_create(&scene->id, &RNA_Sequence, seq, &seq_ptr); RNA_string_get(op->ptr, "filepath", filepath); - RNA_string_set(&seq_ptr, "filepath", filepath); + prop= RNA_struct_find_property(&seq_ptr, "filepath"); + RNA_property_string_set(&seq_ptr, prop, filepath); + RNA_property_update(C, &seq_ptr, prop); } WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); diff --git a/source/blender/editors/space_sequencer/sequencer_intern.h b/source/blender/editors/space_sequencer/sequencer_intern.h index 6eef2bb8361..7ab76f9b6d7 100644 --- a/source/blender/editors/space_sequencer/sequencer_intern.h +++ b/source/blender/editors/space_sequencer/sequencer_intern.h @@ -93,6 +93,7 @@ void SEQUENCER_OT_reassign_inputs(struct wmOperatorType *ot); void SEQUENCER_OT_swap_inputs(struct wmOperatorType *ot); void SEQUENCER_OT_duplicate(struct wmOperatorType *ot); void SEQUENCER_OT_delete(struct wmOperatorType *ot); +void SEQUENCER_OT_offset_clear(struct wmOperatorType *ot); void SEQUENCER_OT_images_separate(struct wmOperatorType *ot); void SEQUENCER_OT_meta_toggle(struct wmOperatorType *ot); void SEQUENCER_OT_meta_make(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c index ebf400ad5ff..df33ce73b9c 100644 --- a/source/blender/editors/space_sequencer/sequencer_ops.c +++ b/source/blender/editors/space_sequencer/sequencer_ops.c @@ -68,6 +68,7 @@ void sequencer_operatortypes(void) WM_operatortype_append(SEQUENCER_OT_swap_inputs); WM_operatortype_append(SEQUENCER_OT_duplicate); WM_operatortype_append(SEQUENCER_OT_delete); + WM_operatortype_append(SEQUENCER_OT_offset_clear); WM_operatortype_append(SEQUENCER_OT_images_separate); WM_operatortype_append(SEQUENCER_OT_meta_toggle); WM_operatortype_append(SEQUENCER_OT_meta_make); @@ -149,6 +150,8 @@ void sequencer_keymap(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "SEQUENCER_OT_reassign_inputs", RKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "SEQUENCER_OT_reload", RKEY, KM_PRESS, KM_ALT, 0); + WM_keymap_add_item(keymap, "SEQUENCER_OT_offset_clear", OKEY, KM_PRESS, KM_ALT, 0); + WM_keymap_add_item(keymap, "SEQUENCER_OT_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "SEQUENCER_OT_delete", XKEY, KM_PRESS, 0, 0); diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index 8d5f372f55e..0ac23765167 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -159,7 +159,7 @@ void select_surround_from_last(Scene *scene) #endif -static void select_single_seq(Scene *scene, Sequence *seq, int deselect_all) /* BRING BACK */ +static void UNUSED_FUNCTION(select_single_seq)(Scene *scene, Sequence *seq, int deselect_all) /* BRING BACK */ { Editing *ed= seq_give_editing(scene, FALSE); diff --git a/source/blender/editors/space_text/text_python.c b/source/blender/editors/space_text/text_python.c index 6e6f131655b..51b4b838171 100644 --- a/source/blender/editors/space_text/text_python.c +++ b/source/blender/editors/space_text/text_python.c @@ -43,6 +43,7 @@ #include "BKE_text.h" #include "BLI_blenlib.h" +#include "BLI_utildefines.h" #include "WM_types.h" @@ -192,7 +193,7 @@ static void confirm_suggestion(Text *text, int skipleft) // XXX static int doc_scroll= 0; -static short do_texttools(SpaceText *st, char ascii, unsigned short evnt, short val) +static short UNUSED_FUNCTION(do_texttools)(SpaceText *st, char ascii, unsigned short evnt, short val) { ARegion *ar= NULL; // XXX int qual= 0; // XXX @@ -375,7 +376,7 @@ static short do_texttools(SpaceText *st, char ascii, unsigned short evnt, short ; // XXX redraw_alltext(); #endif -static short do_textmarkers(SpaceText *st, char ascii, unsigned short evnt, short val) +static short UNUSED_FUNCTION(do_textmarkers)(SpaceText *st, char ascii, unsigned short evnt, short val) { Text *text; TextMarker *marker, *mrk, *nxt; diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 78788777f49..ddc10d78cac 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -2367,7 +2367,20 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d, Object *ob, E } } } - + + /* useful for debugging index vs shape key index */ +#if 0 + { + EditVert *eve; + int j; + UI_GetThemeColor3ubv(TH_DRAWEXTRA_FACEANG, col); + for(eve= em->verts.first, j= 0; eve; eve= eve->next, j++) { + sprintf(val, "%d:%d", j, eve->keyindex); + view3d_cached_text_draw_add(eve->co, val, 0, V3D_CACHE_TEXT_ASCII, col); + } + } +#endif + if(v3d->zbuf) { glEnable(GL_DEPTH_TEST); bglPolygonOffset(rv3d->dist, 0.0f); @@ -5477,7 +5490,7 @@ static void drawObjectSelect(Scene *scene, View3D *v3d, ARegion *ar, Base *base) } } else if(ob->type==OB_ARMATURE) { - if(!(ob->mode & OB_MODE_POSE)) + if(!(ob->mode & OB_MODE_POSE && base == scene->basact)) draw_armature(scene, v3d, ar, base, OB_WIRE, FALSE, TRUE); } diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 7cf95261211..f8837594ddb 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -721,7 +721,7 @@ static void draw_rotation_guide(RegionView3D *rv3d) { #define ROT_AXIS_DETAIL 13 const float s = 0.05f * scale; - const float step = 2.f * M_PI / ROT_AXIS_DETAIL; + const float step = 2.f * (float)(M_PI / ROT_AXIS_DETAIL); float angle; int i; @@ -1041,7 +1041,7 @@ static void drawviewborder_triangle(float x1, float x2, float y1, float y2, cons glBegin(GL_LINES); if(w > h) { if(golden) { - ofs = w * (1.0f-(1.0f/1.61803399)); + ofs = w * (1.0f-(1.0f/1.61803399f)); } else { ofs = h * (h / w); @@ -1059,7 +1059,7 @@ static void drawviewborder_triangle(float x1, float x2, float y1, float y2, cons } else { if(golden) { - ofs = h * (1.0f-(1.0f/1.61803399)); + ofs = h * (1.0f-(1.0f/1.61803399f)); } else { ofs = w * (w / h); @@ -1203,7 +1203,7 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d) if (ca->dtx & CAM_DTX_GOLDEN) { UI_ThemeColorBlendShade(TH_WIRE, TH_BACK, 0.25, 0); - drawviewborder_grid3(x1, x2, y1, y2, 1.0f-(1.0f/1.61803399)); + drawviewborder_grid3(x1, x2, y1, y2, 1.0f-(1.0f/1.61803399f)); } if (ca->dtx & CAM_DTX_GOLDEN_TRI_A) { diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 3e6bbc13334..979a602b4f5 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -1697,7 +1697,7 @@ void VIEW3D_OT_zoom(wmOperatorType *ot) static void view_dolly_mouseloc(ARegion *ar, float orig_ofs[3], float dvec[3], float dfac) { RegionView3D *rv3d= ar->regiondata; - madd_v3_v3v3fl(rv3d->ofs, orig_ofs, dvec, -(1.0 - dfac)); + madd_v3_v3v3fl(rv3d->ofs, orig_ofs, dvec, -(1.0f - dfac)); } static void viewdolly_apply(ViewOpsData *vod, int x, int y, const short zoom_invert) @@ -1718,7 +1718,7 @@ static void viewdolly_apply(ViewOpsData *vod, int x, int y, const short zoom_inv if (zoom_invert) SWAP(float, len1, len2); - zfac = 1.0 + ((len2 - len1) * 0.01 * vod->rv3d->dist); + zfac = 1.0f + ((len2 - len1) * 0.01f * vod->rv3d->dist); } if(zfac != 1.0f) diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c index 046037a092f..30d1a508888 100644 --- a/source/blender/editors/space_view3d/view3d_fly.c +++ b/source/blender/editors/space_view3d/view3d_fly.c @@ -867,7 +867,7 @@ static int flyApply(bContext *C, FlyInfo *fly) upvec[2]=1; mul_m3_v3(mat, upvec); /*make sure we have some z rolling*/ - if (fabs(upvec[2]) > 0.00001f) { + if (fabsf(upvec[2]) > 0.00001f) { roll= upvec[2] * -5.0f; upvec[0]= 1.0f; /*rotate the view about this axis*/ diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 5b95ae63e56..78dcf6c9a5c 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -281,31 +281,32 @@ static char *view3d_modeselect_pup(Scene *scene) str += sprintf(str, formatstr, "Object Mode", OB_MODE_OBJECT, ICON_OBJECT_DATA); if(ob==NULL || ob->data==NULL) return string; - if(ob->id.lib || ((ID *)ob->data)->lib) return string; + if(ob->id.lib) return string; - /* if active object is editable */ - if ( ((ob->type == OB_MESH) - || (ob->type == OB_CURVE) || (ob->type == OB_SURF) || (ob->type == OB_FONT) - || (ob->type == OB_MBALL) || (ob->type == OB_LATTICE))) { - - str += sprintf(str, formatstr, "Edit Mode", OB_MODE_EDIT, ICON_EDITMODE_HLT); - } - else if (ob->type == OB_ARMATURE) { - if (ob->mode & OB_MODE_POSE) - str += sprintf(str, formatstr, "Edit Mode", OB_MODE_EDIT|OB_MODE_POSE, ICON_EDITMODE_HLT); - else + if(!((ID *)ob->data)->lib) { + /* if active object is editable */ + if ( ((ob->type == OB_MESH) + || (ob->type == OB_CURVE) || (ob->type == OB_SURF) || (ob->type == OB_FONT) + || (ob->type == OB_MBALL) || (ob->type == OB_LATTICE))) { + str += sprintf(str, formatstr, "Edit Mode", OB_MODE_EDIT, ICON_EDITMODE_HLT); + } + else if (ob->type == OB_ARMATURE) { + if (ob->mode & OB_MODE_POSE) + str += sprintf(str, formatstr, "Edit Mode", OB_MODE_EDIT|OB_MODE_POSE, ICON_EDITMODE_HLT); + else + str += sprintf(str, formatstr, "Edit Mode", OB_MODE_EDIT, ICON_EDITMODE_HLT); + } + + if (ob->type == OB_MESH) { + + str += sprintf(str, formatstr, "Sculpt Mode", OB_MODE_SCULPT, ICON_SCULPTMODE_HLT); + str += sprintf(str, formatstr, "Vertex Paint", OB_MODE_VERTEX_PAINT, ICON_VPAINT_HLT); + str += sprintf(str, formatstr, "Texture Paint", OB_MODE_TEXTURE_PAINT, ICON_TPAINT_HLT); + str += sprintf(str, formatstr, "Weight Paint", OB_MODE_WEIGHT_PAINT, ICON_WPAINT_HLT); + } } - - if (ob->type == OB_MESH) { - - str += sprintf(str, formatstr, "Sculpt Mode", OB_MODE_SCULPT, ICON_SCULPTMODE_HLT); - str += sprintf(str, formatstr, "Vertex Paint", OB_MODE_VERTEX_PAINT, ICON_VPAINT_HLT); - str += sprintf(str, formatstr, "Texture Paint", OB_MODE_TEXTURE_PAINT, ICON_TPAINT_HLT); - str += sprintf(str, formatstr, "Weight Paint", OB_MODE_WEIGHT_PAINT, ICON_WPAINT_HLT); - } - - + /* if active object is an armature */ if (ob->type==OB_ARMATURE) { str += sprintf(str, formatstr, "Pose Mode", OB_MODE_POSE, ICON_POSE_HLT); @@ -465,6 +466,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) Object *ob= OBACT; Object *obedit = CTX_data_edit_object(C); uiBlock *block; + uiBut *but; uiLayout *row; const float dpi_fac= UI_DPI_FAC; @@ -512,9 +514,12 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) block= uiLayoutGetBlock(row); if(v3d->twflag & V3D_USE_MANIPULATOR) { - uiDefIconButBitC(block, TOG, V3D_MANIP_TRANSLATE, B_MAN_TRANS, ICON_MAN_TRANS, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, "Translate manipulator mode"); - uiDefIconButBitC(block, TOG, V3D_MANIP_ROTATE, B_MAN_ROT, ICON_MAN_ROT, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, "Rotate manipulator mode"); - uiDefIconButBitC(block, TOG, V3D_MANIP_SCALE, B_MAN_SCALE, ICON_MAN_SCALE, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, "Scale manipulator mode"); + but= uiDefIconButBitC(block, TOG, V3D_MANIP_TRANSLATE, B_MAN_TRANS, ICON_MAN_TRANS, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, "Translate manipulator mode"); + uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */ + but= uiDefIconButBitC(block, TOG, V3D_MANIP_ROTATE, B_MAN_ROT, ICON_MAN_ROT, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, "Rotate manipulator mode"); + uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */ + but= uiDefIconButBitC(block, TOG, V3D_MANIP_SCALE, B_MAN_SCALE, ICON_MAN_SCALE, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, "Scale manipulator mode"); + uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */ } if (v3d->twmode > (BIF_countTransformOrientation(C) - 1) + V3D_MANIP_CUSTOM) { @@ -522,7 +527,8 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) } str_menu = BIF_menustringTransformOrientation(C, "Orientation"); - uiDefButC(block, MENU, B_MAN_MODE, str_menu,0,0,70 * dpi_fac, UI_UNIT_Y, &v3d->twmode, 0, 0, 0, 0, "Transform Orientation"); + but= uiDefButC(block, MENU, B_MAN_MODE, str_menu,0,0,70 * dpi_fac, UI_UNIT_Y, &v3d->twmode, 0, 0, 0, 0, "Transform Orientation"); + uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */ MEM_freeN((void *)str_menu); } 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 c6835b0cad3..f241e640906 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) { @@ -1335,9 +1335,9 @@ static int mouse_select(bContext *C, const int mval[2], short extend, short obce if(oldbasact != basact) { ED_base_object_activate(C, basact); /* adds notifier */ } - - WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene); } + + WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene); } return retval; @@ -1838,11 +1838,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) { + + 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) @@ -1889,8 +1900,9 @@ void VIEW3D_OT_select(wmOperatorType *ot) /* properties */ 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 (object mode only)."); + 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/transform/transform.c b/source/blender/editors/transform/transform.c index d8f02e48b64..39e3ffa35fd 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -1353,16 +1353,15 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op) ToolSettings *ts = CTX_data_tool_settings(C); int constraint_axis[3] = {0, 0, 0}; int proportional = 0; + PropertyRNA *prop; - if (RNA_struct_find_property(op->ptr, "value")) - { - if (t->flag & T_AUTOVALUES) - { - RNA_float_set_array(op->ptr, "value", t->auto_values); + if ((prop= RNA_struct_find_property(op->ptr, "value"))) { + float *values= (t->flag & T_AUTOVALUES) ? t->auto_values : t->values; + if (RNA_property_array_check(prop)) { + RNA_property_float_set_array(op->ptr, prop, values); } - else - { - RNA_float_set_array(op->ptr, "value", t->values); + else { + RNA_property_float_set(op->ptr, prop, values[0]); } } @@ -4649,7 +4648,7 @@ static int createSlideVerts(TransInfo *t) uv_new = tf->uv[k]; if (ev->tmp.l) { - if (fabs(suv->origuv[0]-uv_new[0]) > 0.0001f || fabs(suv->origuv[1]-uv_new[1]) > 0.0001f) { + if (fabsf(suv->origuv[0]-uv_new[0]) > 0.0001f || fabs(suv->origuv[1]-uv_new[1]) > 0.0001f) { ev->tmp.l = -1; /* Tag as invalid */ BLI_linklist_free(suv->fuv_list,NULL); suv->fuv_list = NULL; diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index ae6836446fa..e8a7896abd5 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -205,11 +205,7 @@ static ParamHandle *construct_param_handle(Scene *scene, EditMesh *em, short imp float *uv[4]; int nverts; - if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) { - if(efa->h) - continue; - } - else if((efa->h) || (sel && (efa->f & SELECT)==0)) + if((efa->h) || (sel && (efa->f & SELECT)==0)) continue; tf= (MTFace *)CustomData_em_get(&em->fdata, efa->data, CD_MTFACE); @@ -586,7 +582,7 @@ void ED_uvedit_live_unwrap_begin(Scene *scene, Object *obedit) return; } - liveHandle = construct_param_handle(scene, em, 0, fillholes, 1, 1); + liveHandle = construct_param_handle(scene, em, 0, fillholes, 0, 1); param_lscm_begin(liveHandle, PARAM_TRUE, abf); BKE_mesh_end_editmesh(obedit->data, em); diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index 274884000db..28624e9350c 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -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/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c index 919b0eb0c29..8b0104fcdca 100644 --- a/source/blender/imbuf/intern/anim_movie.c +++ b/source/blender/imbuf/intern/anim_movie.c @@ -355,7 +355,7 @@ struct anim * IMB_open_anim( const char * name, int ib_flags) { anim = (struct anim*)MEM_callocN(sizeof(struct anim), "anim struct"); if (anim != NULL) { - strcpy(anim->name, name); /* fixme: possible buffer overflow here? */ + BLI_strncpy(anim->name, name, sizeof(anim->name)); anim->ib_flags = ib_flags; } return(anim); diff --git a/source/blender/imbuf/intern/filter.c b/source/blender/imbuf/intern/filter.c index 1644e653df4..7f1eef80318 100644 --- a/source/blender/imbuf/intern/filter.c +++ b/source/blender/imbuf/intern/filter.c @@ -371,11 +371,15 @@ void IMB_filter_extend(struct ImBuf *ibuf, char *mask, int filter) float weight[25]; /* build a weights buffer */ - n= 2; - k= 0; + n= 1; + /*k= 0; for(i = -n; i <= n; i++) for(j = -n; j <= n; j++) weight[k++] = sqrt((float) i * i + j * j); + */ + weight[0]=1; weight[1]=2; weight[2]=1; + weight[3]=2; weight[4]=0; weight[5]=2; + weight[6]=1; weight[7]=2; weight[8]=1; /* run passes */ for(r = 0; cannot_early_out == 1 && r < filter; r++) { diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 3787675f339..053f3b38168 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -712,16 +712,16 @@ typedef struct ShapeKeyModifierData { typedef struct SolidifyModifierData { ModifierData modifier; - char defgrp_name[32]; /* name of vertex group to use */ + char defgrp_name[32]; /* name of vertex group to use */ float offset; /* new surface offset level*/ float offset_fac; /* midpoint of the offset */ + float offset_fac_vg; /* factor for the minimum weight to use when vgroups are used, avoids 0.0 weights giving duplicate geometry */ float crease_inner; float crease_outer; float crease_rim; int flag; short mat_ofs; short mat_ofs_rim; - int pad; } SolidifyModifierData; #define MOD_SOLIDIFY_RIM (1<<0) diff --git a/source/blender/makesdna/DNA_sdna_types.h b/source/blender/makesdna/DNA_sdna_types.h index e5f924b5fa6..829d1eee03b 100644 --- a/source/blender/makesdna/DNA_sdna_types.h +++ b/source/blender/makesdna/DNA_sdna_types.h @@ -54,7 +54,10 @@ typedef struct SDNA { (sp[2], sp[3]), (sp[4], sp[5]), .. are the member type and name numbers respectively */ - + + struct GHash *structs_map; /* ghash for faster lookups, + requires WITH_DNA_GHASH to be used for now */ + /* wrong place for this really, its a simple * cache for findstruct_nr. */ 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/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt index 429db63b526..5edebfe3903 100644 --- a/source/blender/makesdna/intern/CMakeLists.txt +++ b/source/blender/makesdna/intern/CMakeLists.txt @@ -27,12 +27,17 @@ # message(STATUS "Configuring makesdna") +# add_definitions(-DWITH_DNA_GHASH) + blender_include_dirs( ../../../../intern/guardedalloc ../../blenloader + ../../blenlib .. ) + +# ----------------------------------------------------------------------------- # Build makesdna executable set(SRC makesdna.c @@ -56,6 +61,8 @@ add_custom_command( DEPENDS makesdna ) + +# ----------------------------------------------------------------------------- # Build bf_dna library set(INC @@ -72,3 +79,22 @@ set(SRC ) blender_add_lib(bf_dna "${SRC}" "${INC}" "${INC_SYS}") + + +# ----------------------------------------------------------------------------- +# Build bf_dna_blenlib library +set(INC + +) + +set(INC_SYS + +) + +set(SRC + ../../blenlib/intern/BLI_mempool.c + ../../blenlib/intern/listbase.c + ../../blenlib/intern/BLI_ghash.c +) + +blender_add_lib(bf_dna_blenlib "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/makesdna/intern/SConscript b/source/blender/makesdna/intern/SConscript index e51ee53e078..8185676cbfc 100644 --- a/source/blender/makesdna/intern/SConscript +++ b/source/blender/makesdna/intern/SConscript @@ -67,5 +67,6 @@ else: else: dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna.exe $TARGET") +# TODO, get WITH_DNA_GHASH working, see CMake's 'WITH_DNA_GHASH' obj = ['intern/dna.c', 'intern/dna_genfile.c'] Return ('obj') diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index 4e9b023b326..ebcfce84e37 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -42,6 +42,10 @@ #include "MEM_guardedalloc.h" // for MEM_freeN MEM_mallocN MEM_callocN +#ifdef WITH_DNA_GHASH +# include "BLI_ghash.h" +#endif + #include "DNA_genfile.h" #include "DNA_sdna_types.h" // for SDNA ;-) @@ -197,7 +201,11 @@ void DNA_sdna_free(SDNA *sdna) MEM_freeN((void *)sdna->names); MEM_freeN(sdna->types); MEM_freeN(sdna->structs); - + +#ifdef WITH_DNA_GHASH + BLI_ghash_free(sdna->structs_map, NULL, NULL); +#endif + MEM_freeN(sdna); } @@ -275,24 +283,30 @@ static short *findstruct_name(SDNA *sdna, const char *str) int DNA_struct_find_nr(SDNA *sdna, const char *str) { short *sp= NULL; - int a; if(sdna->lastfindnr_structs) { sp= sdna->structs[sdna->lastfind]; if(strcmp( sdna->types[ sp[0] ], str )==0) return sdna->lastfind; } - for(a=0; anr_structs; a++) { +#ifdef WITH_DNA_GHASH + return (intptr_t)BLI_ghash_lookup(sdna->structs_map, str) - 1; +#else + { + int a; - sp= sdna->structs[a]; - - if(strcmp( sdna->types[ sp[0] ], str )==0) { - sdna->lastfind= a; - return a; + for(a=0; anr_structs; a++) { + + sp= sdna->structs[a]; + + if(strcmp( sdna->types[ sp[0] ], str )==0) { + sdna->lastfind= a; + return a; + } } } - return -1; +#endif } /* ************************* END DIV ********************** */ @@ -481,6 +495,16 @@ static void init_structDNA(SDNA *sdna, int do_endian_swap) sp[10]= 9; } } + +#ifdef WITH_DNA_GHASH + /* create a ghash lookup to speed up */ + sdna->structs_map= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "init_structDNA gh"); + + for(nr = 0; nr < sdna->nr_structs; nr++) { + sp= sdna->structs[nr]; + BLI_ghash_insert(sdna->structs_map, (void *)sdna->types[sp[0]], (void *)(nr + 1)); + } +#endif } } diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index b605b1f29a9..a701bff7cf3 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -683,7 +683,7 @@ int RNA_property_flag(PropertyRNA *prop); void *RNA_property_py_data_get(PropertyRNA *prop); int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop); -int RNA_property_array_check(PointerRNA *ptr, PropertyRNA *prop); +int RNA_property_array_check(PropertyRNA *prop); int RNA_property_multi_array_length(PointerRNA *ptr, PropertyRNA *prop, int dimension); int RNA_property_array_dimension(PointerRNA *ptr, PropertyRNA *prop, int length[]); char RNA_property_array_item_char(PropertyRNA *prop, int index); diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h index ec213d6a496..f8199074f27 100644 --- a/source/blender/makesrna/RNA_types.h +++ b/source/blender/makesrna/RNA_types.h @@ -281,7 +281,7 @@ typedef struct ParameterList { typedef struct ParameterIterator { struct ParameterList *parms; - PointerRNA funcptr; + /* PointerRNA funcptr; */ /*UNUSED*/ void *data; int size, offset; diff --git a/source/blender/makesrna/SConscript b/source/blender/makesrna/SConscript index 322101a58cf..9a294737aa2 100644 --- a/source/blender/makesrna/SConscript +++ b/source/blender/makesrna/SConscript @@ -55,7 +55,7 @@ if env['WITH_BF_PYTHON']: if env['WITH_BF_COLLADA']: defs.append('WITH_COLLADA') -if env['OURPLATFORM'] == 'linux2': +if env['OURPLATFORM'] == 'linux': cflags='-pthread' incs += ' ../../../extern/binreloc/include' diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index eb05abd20a6..5398af3b71b 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -245,6 +245,7 @@ blender_include_dirs_sys( add_executable(makesrna ${SRC} ${SRC_RNA_INC} ${SRC_DNA_INC}) target_link_libraries(makesrna bf_dna) +target_link_libraries(makesrna bf_dna_blenlib) # Output rna_*_gen.c # note (linux only): with crashes try add this after COMMAND: valgrind --leak-check=full --track-origins=yes diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript index 5e43ed9b2fb..24c892b96c4 100644 --- a/source/blender/makesrna/intern/SConscript +++ b/source/blender/makesrna/intern/SConscript @@ -91,7 +91,7 @@ if env['WITH_BF_PYTHON']: if env['WITH_BF_COLLADA']: defs.append('WITH_COLLADA') -if env['OURPLATFORM'] == 'linux2': +if env['OURPLATFORM'] == 'linux': cflags='-pthread' incs += ' ../../../extern/binreloc/include' @@ -140,7 +140,7 @@ targetpath = root_build_dir+'/makesrna' if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'): targetpath = '#' + targetpath -if env['OURPLATFORM'] == 'linux2' and root_build_dir[0]==os.sep: +if env['OURPLATFORM'] == 'linux' and root_build_dir[0]==os.sep: makesrna = makesrna_tool.Program (target = targetpath, source = source_files, LIBS=['bf_intern_guardedalloc', 'bf_dna', 'bf_blenlib']) else: makesrna = makesrna_tool.Program (target = targetpath, source = source_files, LIBS=['bf_intern_guardedalloc', 'bf_dna', 'bf_blenlib']) diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index f1056c86a4c..88447f6dd77 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -288,7 +288,7 @@ static int rna_ensure_property_array_length(PointerRNA *ptr, PropertyRNA *prop) } } -static int rna_ensure_property_array_check(PointerRNA *UNUSED(ptr), PropertyRNA *prop) +static int rna_ensure_property_array_check(PropertyRNA *prop) { if(prop->magic == RNA_MAGIC) { return (prop->getlength || prop->totarraylength) ? 1:0; @@ -765,9 +765,9 @@ int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop) return rna_ensure_property_array_length(ptr, prop); } -int RNA_property_array_check(PointerRNA *ptr, PropertyRNA *prop) +int RNA_property_array_check(PropertyRNA *prop) { - return rna_ensure_property_array_check(ptr, prop); + return rna_ensure_property_array_check(prop); } /* used by BPY to make an array from the python object */ @@ -1399,6 +1399,7 @@ int RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop) IDProperty *idprop; BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN); + BLI_assert(RNA_property_array_check(prop) == 0); if((idprop=rna_idproperty_check(&prop, ptr))) return IDP_Int(idprop); @@ -1414,6 +1415,7 @@ void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, int value) IDProperty *idprop; BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN); + BLI_assert(RNA_property_array_check(prop) == 0); /* just incase other values are passed */ if(value) value= 1; @@ -1440,6 +1442,7 @@ void RNA_property_boolean_get_array(PointerRNA *ptr, PropertyRNA *prop, int *val IDProperty *idprop; BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN); + BLI_assert(RNA_property_array_check(prop) != 0); if((idprop=rna_idproperty_check(&prop, ptr))) { if(prop->arraydimension == 0) @@ -1463,6 +1466,7 @@ int RNA_property_boolean_get_index(PointerRNA *ptr, PropertyRNA *prop, int index int len= rna_ensure_property_array_length(ptr, prop); BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN); + BLI_assert(RNA_property_array_check(prop) != 0); if(len <= RNA_MAX_ARRAY_LENGTH) { RNA_property_boolean_get_array(ptr, prop, tmp); @@ -1486,6 +1490,7 @@ void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const in IDProperty *idprop; BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN); + BLI_assert(RNA_property_array_check(prop) != 0); if((idprop=rna_idproperty_check(&prop, ptr))) { if(prop->arraydimension == 0) @@ -1519,6 +1524,7 @@ void RNA_property_boolean_set_index(PointerRNA *ptr, PropertyRNA *prop, int inde int len= rna_ensure_property_array_length(ptr, prop); BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN); + BLI_assert(RNA_property_array_check(prop) != 0); if(len <= RNA_MAX_ARRAY_LENGTH) { RNA_property_boolean_get_array(ptr, prop, tmp); @@ -1541,6 +1547,7 @@ int RNA_property_boolean_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop) BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop; BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN); + BLI_assert(RNA_property_array_check(prop) == 0); return bprop->defaultvalue; } @@ -1550,6 +1557,7 @@ void RNA_property_boolean_get_default_array(PointerRNA *UNUSED(ptr), PropertyRNA BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop; BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN); + BLI_assert(RNA_property_array_check(prop) != 0); if(prop->arraydimension == 0) values[0]= bprop->defaultvalue; @@ -1565,6 +1573,7 @@ int RNA_property_boolean_get_default_index(PointerRNA *ptr, PropertyRNA *prop, i int len= rna_ensure_property_array_length(ptr, prop); BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN); + BLI_assert(RNA_property_array_check(prop) != 0); if(len <= RNA_MAX_ARRAY_LENGTH) { RNA_property_boolean_get_default_array(ptr, prop, tmp); @@ -1588,6 +1597,7 @@ int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop) IDProperty *idprop; BLI_assert(RNA_property_type(prop) == PROP_INT); + BLI_assert(RNA_property_array_check(prop) == 0); if((idprop=rna_idproperty_check(&prop, ptr))) return IDP_Int(idprop); @@ -1603,6 +1613,7 @@ void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value) IDProperty *idprop; BLI_assert(RNA_property_type(prop) == PROP_INT); + BLI_assert(RNA_property_array_check(prop) == 0); /* useful to check on bad values but set function should clamp */ /* BLI_assert(RNA_property_int_clamp(ptr, prop, &value) == 0); */ @@ -1628,6 +1639,7 @@ void RNA_property_int_get_array(PointerRNA *ptr, PropertyRNA *prop, int *values) IDProperty *idprop; BLI_assert(RNA_property_type(prop) == PROP_INT); + BLI_assert(RNA_property_array_check(prop) != 0); if((idprop=rna_idproperty_check(&prop, ptr))) { if(prop->arraydimension == 0) @@ -1688,6 +1700,7 @@ int RNA_property_int_get_index(PointerRNA *ptr, PropertyRNA *prop, int index) int len= rna_ensure_property_array_length(ptr, prop); BLI_assert(RNA_property_type(prop) == PROP_INT); + BLI_assert(RNA_property_array_check(prop) != 0); if(len <= RNA_MAX_ARRAY_LENGTH) { RNA_property_int_get_array(ptr, prop, tmp); @@ -1711,6 +1724,7 @@ void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *v IDProperty *idprop; BLI_assert(RNA_property_type(prop) == PROP_INT); + BLI_assert(RNA_property_array_check(prop) != 0); if((idprop=rna_idproperty_check(&prop, ptr))) { if(prop->arraydimension == 0) @@ -1744,6 +1758,7 @@ void RNA_property_int_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, i int len= rna_ensure_property_array_length(ptr, prop); BLI_assert(RNA_property_type(prop) == PROP_INT); + BLI_assert(RNA_property_array_check(prop) != 0); if(len <= RNA_MAX_ARRAY_LENGTH) { RNA_property_int_get_array(ptr, prop, tmp); @@ -1772,6 +1787,7 @@ void RNA_property_int_get_default_array(PointerRNA *UNUSED(ptr), PropertyRNA *pr IntPropertyRNA *iprop= (IntPropertyRNA*)prop; BLI_assert(RNA_property_type(prop) == PROP_INT); + BLI_assert(RNA_property_array_check(prop) != 0); if(prop->arraydimension == 0) values[0]= iprop->defaultvalue; @@ -1808,6 +1824,7 @@ float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop) IDProperty *idprop; BLI_assert(RNA_property_type(prop) == PROP_FLOAT); + BLI_assert(RNA_property_array_check(prop) == 0); if((idprop=rna_idproperty_check(&prop, ptr))) { if(idprop->type == IDP_FLOAT) @@ -1827,6 +1844,7 @@ void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value) IDProperty *idprop; BLI_assert(RNA_property_type(prop) == PROP_FLOAT); + BLI_assert(RNA_property_array_check(prop) == 0); /* useful to check on bad values but set function should clamp */ /* BLI_assert(RNA_property_float_clamp(ptr, prop, &value) == 0); */ @@ -1858,6 +1876,7 @@ void RNA_property_float_get_array(PointerRNA *ptr, PropertyRNA *prop, float *val int i; BLI_assert(RNA_property_type(prop) == PROP_FLOAT); + BLI_assert(RNA_property_array_check(prop) != 0); if((idprop=rna_idproperty_check(&prop, ptr))) { if(prop->arraydimension == 0) @@ -1923,6 +1942,7 @@ float RNA_property_float_get_index(PointerRNA *ptr, PropertyRNA *prop, int index int len= rna_ensure_property_array_length(ptr, prop); BLI_assert(RNA_property_type(prop) == PROP_FLOAT); + BLI_assert(RNA_property_array_check(prop) != 0); if(len <= RNA_MAX_ARRAY_LENGTH) { RNA_property_float_get_array(ptr, prop, tmp); @@ -1948,6 +1968,7 @@ void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const floa int i; BLI_assert(RNA_property_type(prop) == PROP_FLOAT); + BLI_assert(RNA_property_array_check(prop) != 0); if((idprop=rna_idproperty_check(&prop, ptr))) { if(prop->arraydimension == 0) { @@ -1991,6 +2012,7 @@ void RNA_property_float_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, int len= rna_ensure_property_array_length(ptr, prop); BLI_assert(RNA_property_type(prop) == PROP_FLOAT); + BLI_assert(RNA_property_array_check(prop) != 0); if(len <= RNA_MAX_ARRAY_LENGTH) { RNA_property_float_get_array(ptr, prop, tmp); @@ -2013,6 +2035,7 @@ float RNA_property_float_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop) FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop; BLI_assert(RNA_property_type(prop) == PROP_FLOAT); + BLI_assert(RNA_property_array_check(prop) == 0); return fprop->defaultvalue; } @@ -2022,6 +2045,7 @@ void RNA_property_float_get_default_array(PointerRNA *UNUSED(ptr), PropertyRNA * FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop; BLI_assert(RNA_property_type(prop) == PROP_FLOAT); + BLI_assert(RNA_property_array_check(prop) != 0); if(prop->arraydimension == 0) values[0]= fprop->defaultvalue; @@ -2037,6 +2061,7 @@ float RNA_property_float_get_default_index(PointerRNA *ptr, PropertyRNA *prop, i int len= rna_ensure_property_array_length(ptr, prop); BLI_assert(RNA_property_type(prop) == PROP_FLOAT); + BLI_assert(RNA_property_array_check(prop) != 0); if(len <= RNA_MAX_ARRAY_LENGTH) { RNA_property_float_get_default_array(ptr, prop, tmp); @@ -4484,7 +4509,8 @@ int RNA_parameter_list_ret_count(ParameterList *parms) void RNA_parameter_list_begin(ParameterList *parms, ParameterIterator *iter) { - RNA_pointer_create(NULL, &RNA_Function, parms->func, &iter->funcptr); + /* may be useful but unused now */ + /* RNA_pointer_create(NULL, &RNA_Function, parms->func, &iter->funcptr); */ /*UNUSED*/ iter->parms= parms; iter->parm= parms->func->cont.properties.first; diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c index 1ce4108bab2..1b2396a4215 100644 --- a/source/blender/makesrna/intern/rna_cloth.c +++ b/source/blender/makesrna/intern/rna_cloth.c @@ -294,6 +294,7 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_SIMSETTINGS_FLAG_GOAL); RNA_def_property_ui_text(prop, "Pin Cloth", "Enable pinning of cloth vertices to other objects/positions"); RNA_def_property_update(prop, 0, "rna_cloth_pinning_changed"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); prop= RNA_def_property(srna, "pin_stiffness", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "goalspring"); @@ -313,6 +314,7 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_SIMSETTINGS_FLAG_SCALING); RNA_def_property_ui_text(prop, "Stiffness Scaling", "If enabled, stiffness can be scaled along a weight painted vertex group"); RNA_def_property_update(prop, 0, "rna_cloth_update"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); prop= RNA_def_property(srna, "spring_damping", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "Cdis"); diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index ba655915fb6..5c5391b0bba 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -2265,6 +2265,13 @@ static void rna_def_modifier_solidify(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Thickness", "Thickness of the shell"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); + prop= RNA_def_property(srna, "thickness_vertex_group", PROP_FLOAT, PROP_FACTOR); + RNA_def_property_float_sdna(prop, NULL, "offset_fac_vg"); + RNA_def_property_range(prop, 0.0, 1.0); + RNA_def_property_ui_range(prop, 0, 1, 0.1, 3); + RNA_def_property_ui_text(prop, "Vertex Group Factor", "Thickness factor to use for zero vertex group influence"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "offset_fac"); RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 76bbfcbed41..55e1119f58e 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -2025,7 +2025,14 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Input Matrix", "Matrix access to location, rotation and scale (including deltas), before constraints and parenting are applied."); RNA_def_property_float_funcs(prop, "rna_Object_matrix_basis_get", "rna_Object_matrix_basis_set", NULL); RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); - + + /*parent_inverse*/ + prop= RNA_def_property(srna, "matrix_parent_inverse", PROP_FLOAT, PROP_MATRIX); + RNA_def_property_float_sdna(prop, NULL, "parentinv"); + RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4); + RNA_def_property_ui_text(prop, "Matrix", "Inverse of object's parent matrix at time of parenting"); + RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); + /* collections */ prop= RNA_def_property(srna, "constraints", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_type(prop, "Constraint"); diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index ca679239dd3..463f65fd3d5 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -770,7 +770,6 @@ static void rna_def_pointcache(BlenderRNA *brna) prop= RNA_def_property(srna, "compression", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, point_cache_compress_items); RNA_def_property_ui_text(prop, "Cache Compression", "Compression method to be used"); - RNA_def_property_update(prop, 0, NULL); /* flags */ prop= RNA_def_property(srna, "is_baked", PROP_BOOLEAN, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 97140cf440b..055d0730c86 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -703,8 +703,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) @@ -2318,7 +2318,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); diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c index 5cc8539f187..1f64603d6b4 100644 --- a/source/blender/makesrna/intern/rna_sensor.c +++ b/source/blender/makesrna/intern/rna_sensor.c @@ -803,7 +803,7 @@ static void rna_def_joystick_sensor(BlenderRNA *brna) prop= RNA_def_property(srna, "axis_number", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "axis"); RNA_def_property_ui_text(prop, "Axis Number", "Specify which axis pair to use, 1 is usually the main direction input"); - RNA_def_property_range(prop, 1, 2); + RNA_def_property_range(prop, 1, 8); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "axis_threshold", PROP_INT, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index 8c4e4d9e736..476ac325848 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -1481,7 +1481,7 @@ static void rna_def_wipe(BlenderRNA *brna) #if 1 /* expose as radians */ prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE); RNA_def_property_float_funcs(prop, "rna_WipeSequence_angle_get", "rna_WipeSequence_angle_set", NULL); - RNA_def_property_range(prop, DEG2RAD(-90.0f), DEG2RAD(90.0f)); + RNA_def_property_range(prop, DEG2RAD(-90.0), DEG2RAD(90.0)); #else prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "angle"); diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c index 43d1aa24229..d439c2551f1 100644 --- a/source/blender/makesrna/intern/rna_smoke.c +++ b/source/blender/makesrna/intern/rna_smoke.c @@ -241,13 +241,12 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "cache_comp"); RNA_def_property_enum_items(prop, smoke_cache_comp_items); RNA_def_property_ui_text(prop, "Cache Compression", "Compression method to be used"); - RNA_def_property_update(prop, 0, NULL); prop= RNA_def_property(srna, "collision_extents", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "border_collisions"); RNA_def_property_enum_items(prop, smoke_domain_colli_items); RNA_def_property_ui_text(prop, "Border Collisions", "Selects which domain border will be treated as collision object."); - RNA_def_property_update(prop, 0, NULL); + RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset"); prop= RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "EffectorWeights"); @@ -290,14 +289,12 @@ static void rna_def_smoke_flow_settings(BlenderRNA *brna) RNA_def_property_range(prop, 0.001, 1); RNA_def_property_ui_range(prop, 0.001, 1.0, 1.0, 4); RNA_def_property_ui_text(prop, "Density", ""); - RNA_def_property_update(prop, 0, NULL); // NC_OBJECT|ND_MODIFIER prop= RNA_def_property(srna, "temperature", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "temp"); RNA_def_property_range(prop, -10, 10); RNA_def_property_ui_range(prop, -10, 10, 1, 1); RNA_def_property_ui_text(prop, "Temp. Diff.", "Temperature difference to ambient temperature"); - RNA_def_property_update(prop, 0, NULL); prop= RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "psys"); @@ -309,24 +306,20 @@ static void rna_def_smoke_flow_settings(BlenderRNA *brna) prop= RNA_def_property(srna, "use_outflow", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "type", MOD_SMOKE_FLOW_TYPE_OUTFLOW); RNA_def_property_ui_text(prop, "Outflow", "Deletes smoke from simulation"); - RNA_def_property_update(prop, 0, NULL); prop= RNA_def_property(srna, "use_absolute", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_FLOW_ABSOLUTE); RNA_def_property_ui_text(prop, "Absolute Density", "Only allows given density value in emitter area."); - RNA_def_property_update(prop, 0, NULL); prop= RNA_def_property(srna, "initial_velocity", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_FLOW_INITVELOCITY); RNA_def_property_ui_text(prop, "Initial Velocity", "Smoke inherits it's velocity from the emitter particle"); - RNA_def_property_update(prop, 0, NULL); prop= RNA_def_property(srna, "velocity_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "vel_multi"); RNA_def_property_range(prop, -2.0, 2.0); RNA_def_property_ui_range(prop, -2.0, 2.0, 0.05, 5); RNA_def_property_ui_text(prop, "Multiplier", "Multiplier to adjust velocity passed to smoke"); - RNA_def_property_update(prop, 0, NULL); } static void rna_def_smoke_coll_settings(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c index 9e3a31ddb2e..f459563f49e 100644 --- a/source/blender/makesrna/intern/rna_texture.c +++ b/source/blender/makesrna/intern/rna_texture.c @@ -1147,6 +1147,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/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 307cf0e175a..93adf808f83 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -1746,6 +1746,7 @@ static void rna_def_keyconfig(BlenderRNA *brna) RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", KMI_INACTIVE); RNA_def_property_ui_text(prop, "Active", "Activate or deactivate item"); RNA_def_property_ui_icon(prop, ICON_CHECKBOX_DEHLT, 1); + RNA_def_property_update(prop, 0, "rna_KeyMapItem_update"); prop= RNA_def_property(srna, "is_user_modified", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", KMI_USER_MODIFIED); diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c index 0b1fac06e14..afe6da8b38a 100644 --- a/source/blender/modifiers/intern/MOD_solidify.c +++ b/source/blender/modifiers/intern/MOD_solidify.c @@ -232,8 +232,10 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, float (*vert_nors)[3]= NULL; - float const ofs_orig= - (((-smd->offset_fac + 1.0f) * 0.5f) * smd->offset); - float const ofs_new= smd->offset - (((-smd->offset_fac + 1.0f) * 0.5f) * smd->offset); + const float ofs_orig= - (((-smd->offset_fac + 1.0f) * 0.5f) * smd->offset); + const float ofs_new= smd->offset - (((-smd->offset_fac + 1.0f) * 0.5f) * smd->offset); + const float offset_fac_vg= smd->offset_fac_vg; + const float offset_fac_vg_inv= 1.0f - smd->offset_fac_vg; /* weights */ MDeformVert *dvert, *dv= NULL; @@ -391,8 +393,9 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, dv= dvert; for(i=0; ico, mv->co, mv->no, scalar_short_vgroup); @@ -405,8 +408,9 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, dv= dvert; for(i=0; ico, mv->co, mv->no, scalar_short_vgroup); @@ -466,15 +470,21 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, /* vertex group support */ if(dvert) { + float scalar; + dv= dvert; if(defgrp_invert) { for(i=0; i 0.f) { float a = (float)(6.283185307f * frand()); r = (float)sqrt(r); - v[0] = (float)(r * cos(a)); - v[1] = (float)(r * sin(a)); + v[0] = (float)(r * cosf(a)); + v[1] = (float)(r * sinf(a)); } else { v[2] = 1.f; @@ -254,7 +254,7 @@ static PyObject *Noise_noise(PyObject *UNUSED(self), PyObject *args) if(!PyArg_ParseTuple(args, "(fff)|i:noise", &x, &y, &z, &nb)) return NULL; - return PyFloat_FromDouble((2.0 * BLI_gNoise(1.0, x, y, z, 0, nb) - 1.0)); + return PyFloat_FromDouble((2.0f * BLI_gNoise(1.0f, x, y, z, 0, nb) - 1.0f)); } /*-------------------------------------------------------------------------*/ @@ -264,11 +264,11 @@ static PyObject *Noise_noise(PyObject *UNUSED(self), PyObject *args) static void noise_vector(float x, float y, float z, int nb, float v[3]) { /* Simply evaluate noise at 3 different positions */ - v[0] = (float)(2.0 * BLI_gNoise(1.f, x + 9.321f, y - 1.531f, z - 7.951f, 0, - nb) - 1.0); - v[1] = (float)(2.0 * BLI_gNoise(1.f, x, y, z, 0, nb) - 1.0); - v[2] = (float)(2.0 * BLI_gNoise(1.f, x + 6.327f, y + 0.1671f, z - 2.672f, 0, - nb) - 1.0); + v[0]= (float)(2.0f * BLI_gNoise(1.f, x + 9.321f, y - 1.531f, z - 7.951f, 0, + nb) - 1.0f); + v[1]= (float)(2.0f * BLI_gNoise(1.f, x, y, z, 0, nb) - 1.0f); + v[2]= (float)(2.0f * BLI_gNoise(1.f, x + 6.327f, y + 0.1671f, z - 2.672f, 0, + nb) - 1.0f); } static PyObject *Noise_vector(PyObject *UNUSED(self), PyObject *args) @@ -291,7 +291,7 @@ static float turb(float x, float y, float z, int oct, int hard, int nb, float amp, out, t; int i; amp = 1.f; - out = (float)(2.0 * BLI_gNoise(1.f, x, y, z, 0, nb) - 1.0); + out = (float)(2.0f * BLI_gNoise(1.f, x, y, z, 0, nb) - 1.0f); if(hard) out = (float)fabs(out); for(i = 1; i < oct; i++) { @@ -299,7 +299,7 @@ static float turb(float x, float y, float z, int oct, int hard, int nb, x *= freqscale; y *= freqscale; z *= freqscale; - t = (float)(amp * (2.0 * BLI_gNoise(1.f, x, y, z, 0, nb) - 1.0)); + t = (float)(amp * (2.0f * BLI_gNoise(1.f, x, y, z, 0, nb) - 1.0f)); if(hard) t = (float)fabs(t); out += t; diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index 8bd6e6c611c..e5e90380d61 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -87,6 +87,14 @@ static double bpy_timer_run; /* time for each python script run */ static double bpy_timer_run_tot; /* accumulate python runs */ #endif +/* use for updating while a python script runs - in case of file load */ +void bpy_context_update(bContext *C) +{ + BPy_SetContext(C); + bpy_import_main_set(CTX_data_main(C)); + BPY_modules_update(C); /* can give really bad results if this isnt here */ +} + void bpy_context_set(bContext *C, PyGILState_STATE *gilstate) { py_call_level++; @@ -95,16 +103,7 @@ void bpy_context_set(bContext *C, PyGILState_STATE *gilstate) *gilstate= PyGILState_Ensure(); if(py_call_level==1) { - - if(C) { // XXX - should always be true. - BPy_SetContext(C); - bpy_import_main_set(CTX_data_main(C)); - } - else { - fprintf(stderr, "ERROR: Python context called with a NULL Context. this should not happen!\n"); - } - - BPY_modules_update(C); /* can give really bad results if this isnt here */ + bpy_context_update(C); #ifdef TIME_PY_RUN if(bpy_timer_count==0) { @@ -570,6 +569,12 @@ void BPY_modules_load_user(bContext *C) if(bmain==NULL) return; + /* update pointers since this can run from a nested script + * on file load */ + if(py_call_level) { + bpy_context_update(C); + } + bpy_context_set(C, &gilstate); for(text=CTX_data_main(C)->text.first; text; text= text->id.next) { diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 4447a0476f4..72553872057 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -84,7 +84,9 @@ int pyrna_struct_validity_check(BPy_StructRNA *pysrna) { if(pysrna->ptr.type) return 0; - PyErr_Format(PyExc_ReferenceError, "StructRNA of type %.200s has been removed", Py_TYPE(pysrna)->tp_name); + PyErr_Format(PyExc_ReferenceError, + "StructRNA of type %.200s has been removed", + Py_TYPE(pysrna)->tp_name); return -1; } @@ -790,43 +792,62 @@ static PyObject *pyrna_struct_str(BPy_StructRNA *self) const char *name; if(!PYRNA_STRUCT_IS_VALID(self)) { - return PyUnicode_FromFormat("", Py_TYPE(self)->tp_name); + return PyUnicode_FromFormat("", + Py_TYPE(self)->tp_name); } /* print name if available */ name= RNA_struct_name_get_alloc(&self->ptr, NULL, FALSE); if(name) { - ret= PyUnicode_FromFormat("", RNA_struct_identifier(self->ptr.type), name); + ret= PyUnicode_FromFormat("", + RNA_struct_identifier(self->ptr.type), + name); MEM_freeN((void *)name); return ret; } - return PyUnicode_FromFormat("", RNA_struct_identifier(self->ptr.type), self->ptr.data); + return PyUnicode_FromFormat("", + RNA_struct_identifier(self->ptr.type), + self->ptr.data); } 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\"]", BKE_idcode_to_name_plural(GS(id->name)), id->name+2); + ret= PyUnicode_FromFormat("bpy.data.%s[%R]", + BKE_idcode_to_name_plural(GS(id->name)), + 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", 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", BKE_idcode_to_name_plural(GS(id->name)), id->name+2, RNA_struct_identifier(self->ptr.type)); + ret= PyUnicode_FromFormat("bpy.data.%s[%R]...%s", + BKE_idcode_to_name_plural(GS(id->name)), + tmp_str, + RNA_struct_identifier(self->ptr.type)); } - - return ret; } + + Py_DECREF(tmp_str); + + return ret; } static PyObject *pyrna_prop_str(BPy_PropertyRNA *self) @@ -856,7 +877,7 @@ static PyObject *pyrna_prop_str(BPy_PropertyRNA *self) if(type==PROP_COLLECTION) { len= pyrna_prop_collection_length(self); } - else if (RNA_property_array_check(&self->ptr, self->prop)) { + else if (RNA_property_array_check(self->prop)) { len= pyrna_prop_array_length((BPy_PropertyArrayRNA *)self); } @@ -870,7 +891,11 @@ static PyObject *pyrna_prop_str(BPy_PropertyRNA *self) name= RNA_struct_name_get_alloc(&ptr, NULL, FALSE); if(name) { - ret= PyUnicode_FromFormat("", type_fmt, RNA_struct_identifier(self->ptr.type), RNA_property_identifier(self->prop), name); + ret= PyUnicode_FromFormat("", + type_fmt, + RNA_struct_identifier(self->ptr.type), + RNA_property_identifier(self->prop), + name); MEM_freeN((void *)name); return ret; } @@ -878,40 +903,59 @@ static PyObject *pyrna_prop_str(BPy_PropertyRNA *self) if(RNA_property_type(self->prop) == PROP_COLLECTION) { PointerRNA r_ptr; if(RNA_property_collection_type_get(&self->ptr, self->prop, &r_ptr)) { - return PyUnicode_FromFormat("", type_fmt, RNA_struct_identifier(r_ptr.type)); + return PyUnicode_FromFormat("", + type_fmt, + RNA_struct_identifier(r_ptr.type)); } } - return PyUnicode_FromFormat("", type_fmt, RNA_struct_identifier(self->ptr.type), RNA_property_identifier(self->prop)); + return PyUnicode_FromFormat("", + type_fmt, + RNA_struct_identifier(self->ptr.type), + RNA_property_identifier(self->prop)); } 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", BKE_idcode_to_name_plural(GS(id->name)), id->name+2, RNA_property_identifier(self->prop)); + ret= PyUnicode_FromFormat("bpy.data.%s[%R]...%s", + BKE_idcode_to_name_plural(GS(id->name)), + tmp_str, + RNA_property_identifier(self->prop)); } + Py_DECREF(tmp_str); + return ret; } static PyObject *pyrna_func_repr(BPy_FunctionRNA *self) { - return PyUnicode_FromFormat("<%.200s %.200s.%.200s()>", Py_TYPE(self)->tp_name, RNA_struct_identifier(self->ptr.type), RNA_function_identifier(self->func)); + return PyUnicode_FromFormat("<%.200s %.200s.%.200s()>", + Py_TYPE(self)->tp_name, + RNA_struct_identifier(self->ptr.type), + RNA_function_identifier(self->func)); } @@ -1224,7 +1268,7 @@ PyObject *pyrna_prop_to_py(PointerRNA *ptr, PropertyRNA *prop) PyObject *ret; int type= RNA_property_type(prop); - if (RNA_property_array_check(ptr, prop)) { + if (RNA_property_array_check(prop)) { return pyrna_py_from_array(ptr, prop); } @@ -1369,7 +1413,7 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb int type= RNA_property_type(prop); - if (RNA_property_array_check(ptr, prop)) { + if (RNA_property_array_check(prop)) { /* done getting the length */ if(pyrna_py_to_array(ptr, prop, data, value, error_prefix) == -1) { return -1; @@ -2995,7 +3039,9 @@ static PyObject *pyrna_struct_getattro(BPy_StructRNA *self, PyObject *pyname) else if (self->ptr.type == &RNA_Context) { bContext *C= self->ptr.data; if(C==NULL) { - PyErr_Format(PyExc_AttributeError, "bpy_struct: Context is 'NULL', can't get \"%.200s\" from context", name); + PyErr_Format(PyExc_AttributeError, + "bpy_struct: Context is 'NULL', can't get \"%.200s\" from context", + name); ret= NULL; } else { @@ -3054,7 +3100,9 @@ static PyObject *pyrna_struct_getattro(BPy_StructRNA *self, PyObject *pyname) } else { #if 0 - PyErr_Format(PyExc_AttributeError, "bpy_struct: attribute \"%.200s\" not found", name); + PyErr_Format(PyExc_AttributeError, + "bpy_struct: attribute \"%.200s\" not found", + name); ret= NULL; #endif /* Include this incase this instance is a subtype of a python class @@ -3170,7 +3218,9 @@ static int pyrna_struct_meta_idprop_setattro(PyObject *cls, PyObject *attr, PyOb const char *attr_str= _PyUnicode_AsString(attr); int ret= RNA_def_property_free_identifier(srna, attr_str); if (ret == -1) { - PyErr_Format(PyExc_TypeError, "struct_meta_idprop.detattr(): '%s' not a dynamic property", attr_str); + PyErr_Format(PyExc_TypeError, + "struct_meta_idprop.detattr(): '%s' not a dynamic property", + attr_str); return -1; } } @@ -3208,7 +3258,9 @@ static int pyrna_struct_setattro(BPy_StructRNA *self, PyObject *pyname, PyObject /* code just raises correct error, context prop's cant be set, unless its apart of the py class */ bContext *C= self->ptr.data; if(C==NULL) { - PyErr_Format(PyExc_AttributeError, "bpy_struct: Context is 'NULL', can't set \"%.200s\" from context", name); + PyErr_Format(PyExc_AttributeError, + "bpy_struct: Context is 'NULL', can't set \"%.200s\" from context", + name); return -1; } else { @@ -3219,7 +3271,9 @@ static int pyrna_struct_setattro(BPy_StructRNA *self, PyObject *pyname, PyObject int done= CTX_data_get(C, name, &newptr, &newlb, &newtype); if(done==1) { - PyErr_Format(PyExc_AttributeError, "bpy_struct: Context property \"%.200s\" is read-only", name); + PyErr_Format(PyExc_AttributeError, + "bpy_struct: Context property \"%.200s\" is read-only", + name); BLI_freelistN(&newlb); return -1; } @@ -3363,7 +3417,9 @@ static int pyrna_prop_collection_setattro(BPy_PropertyRNA *self, PyObject *pynam } } - PyErr_Format(PyExc_AttributeError, "bpy_prop_collection: attribute \"%.200s\" not found", name); + PyErr_Format(PyExc_AttributeError, + "bpy_prop_collection: attribute \"%.200s\" not found", + name); return -1; } @@ -4048,11 +4104,14 @@ static PyObject *pyrna_struct_new(PyTypeObject *type, PyObject *args, PyObject * } /* error, invalid type given */ - PyErr_Format(PyExc_TypeError, "bpy_struct.__new__(type): type '%.200s' is not a subtype of bpy_struct", type->tp_name); + PyErr_Format(PyExc_TypeError, + "bpy_struct.__new__(type): type '%.200s' is not a subtype of bpy_struct", + type->tp_name); return NULL; } else { - PyErr_Format(PyExc_TypeError, "bpy_struct.__new__(type): expected a single argument"); + PyErr_Format(PyExc_TypeError, + "bpy_struct.__new__(type): expected a single argument"); return NULL; } } @@ -4077,7 +4136,9 @@ static PyObject *pyrna_prop_new(PyTypeObject *type, PyObject *args, PyObject *UN return (PyObject *)ret; } else { - PyErr_Format(PyExc_TypeError, "bpy_prop.__new__(type): type '%.200s' is not a subtype of bpy_prop", type->tp_name); + PyErr_Format(PyExc_TypeError, + "bpy_prop.__new__(type): type '%.200s' is not a subtype of bpy_prop", + type->tp_name); return NULL; } } @@ -4088,7 +4149,7 @@ static PyObject *pyrna_param_to_py(PointerRNA *ptr, PropertyRNA *prop, void *dat int type= RNA_property_type(prop); int flag= RNA_property_flag(prop); - if(RNA_property_array_check(ptr, prop)) { + if(RNA_property_array_check(prop)) { int a, len; if (flag & PROP_DYNAMIC) { @@ -4139,7 +4200,9 @@ static PyObject *pyrna_param_to_py(PointerRNA *ptr, PropertyRNA *prop, void *dat } break; default: - PyErr_Format(PyExc_TypeError, "RNA Error: unknown array type \"%d\" (pyrna_param_to_py)", type); + PyErr_Format(PyExc_TypeError, + "RNA Error: unknown array type \"%d\" (pyrna_param_to_py)", + type); ret= NULL; break; } @@ -4237,7 +4300,9 @@ static PyObject *pyrna_param_to_py(PointerRNA *ptr, PropertyRNA *prop, void *dat break; } default: - PyErr_Format(PyExc_TypeError, "RNA Error: unknown type \"%d\" (pyrna_param_to_py)", type); + PyErr_Format(PyExc_TypeError, + "RNA Error: unknown type \"%d\" (pyrna_param_to_py)", + type); ret= NULL; break; } @@ -4246,6 +4311,27 @@ static PyObject *pyrna_param_to_py(PointerRNA *ptr, PropertyRNA *prop, void *dat return ret; } +/* Use to replace PyDict_GetItemString() when the overhead of converting a + * string into a python unicode is higher than a non hash lookup. + * works on small dict's such as keyword args. */ +static PyObject *small_dict_get_item_string(PyObject *dict, const char *key_lookup) +{ + PyObject *key= NULL; + 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) { + return value; + } + } + } + + return NULL; +} + static PyObject *pyrna_func_call(BPy_FunctionRNA *self, PyObject *args, PyObject *kw) { /* Note, both BPy_StructRNA and BPy_PropertyRNA can be used here */ @@ -4258,7 +4344,6 @@ static PyObject *pyrna_func_call(BPy_FunctionRNA *self, PyObject *args, PyObject PropertyRNA *parm; PyObject *ret, *item; int i, pyargs_len, pykw_len, parms_len, ret_len, flag, err= 0, kw_tot= 0, kw_arg; - const char *parm_id; PropertyRNA *pret_single= NULL; void *retdata_single= NULL; @@ -4334,28 +4419,33 @@ static PyObject *pyrna_func_call(BPy_FunctionRNA *self, PyObject *args, PyObject continue; } - parm_id= RNA_property_identifier(parm); item= NULL; if (i < pyargs_len) { item= PyTuple_GET_ITEM(args, i); - i++; - kw_arg= FALSE; } else if (kw != NULL) { - item= PyDict_GetItemString(kw, parm_id); /* borrow ref */ +#if 0 + item= PyDict_GetItemString(kw, RNA_property_identifier(parm)); /* borrow ref */ +#else + item= small_dict_get_item_string(kw, RNA_property_identifier(parm)); /* borrow ref */ +#endif if(item) kw_tot++; /* make sure invalid keywords are not given */ kw_arg= TRUE; } + i++; /* current argument */ + if (item==NULL) { if(flag & PROP_REQUIRED) { PyErr_Format(PyExc_TypeError, "%.200s.%.200s(): required parameter \"%.200s\" not specified", - RNA_struct_identifier(self_ptr->type), RNA_function_identifier(self_func), parm_id); + RNA_struct_identifier(self_ptr->type), + RNA_function_identifier(self_func), + RNA_property_identifier(parm)); err= -1; break; } @@ -4382,9 +4472,18 @@ static PyObject *pyrna_func_call(BPy_FunctionRNA *self, PyObject *args, PyObject PyErr_Clear(); /* re-raise */ if(kw_arg==TRUE) - snprintf(error_prefix, sizeof(error_prefix), "%s.%s(): error with keyword argument \"%s\" - ", RNA_struct_identifier(self_ptr->type), RNA_function_identifier(self_func), parm_id); + BLI_snprintf(error_prefix, sizeof(error_prefix), + "%.200s.%.200s(): error with keyword argument \"%.200s\" - ", + RNA_struct_identifier(self_ptr->type), + RNA_function_identifier(self_func), + RNA_property_identifier(parm)); else - snprintf(error_prefix, sizeof(error_prefix), "%s.%s(): error with argument %d, \"%s\" - ", RNA_struct_identifier(self_ptr->type), RNA_function_identifier(self_func), i, parm_id); + BLI_snprintf(error_prefix, sizeof(error_prefix), + "%.200s.%.200s(): error with argument %d, \"%.200s\" - ", + RNA_struct_identifier(self_ptr->type), + RNA_function_identifier(self_func), + i, + RNA_property_identifier(parm)); pyrna_py_to_prop(&funcptr, parm, iter.data, item, error_prefix); @@ -5519,7 +5618,7 @@ PyObject *pyrna_prop_CreatePyObject(PointerRNA *ptr, PropertyRNA *prop) { BPy_PropertyRNA *pyrna; - if (RNA_property_array_check(ptr, prop) == 0) { + if (RNA_property_array_check(prop) == 0) { PyTypeObject *type; if (RNA_property_type(prop) != PROP_COLLECTION) { diff --git a/source/blender/python/intern/bpy_rna_anim.c b/source/blender/python/intern/bpy_rna_anim.c index 30d83e196ba..8bde1db96ca 100644 --- a/source/blender/python/intern/bpy_rna_anim.c +++ b/source/blender/python/intern/bpy_rna_anim.c @@ -107,7 +107,7 @@ static int pyrna_struct_anim_args_parse(PointerRNA *ptr, const char *error_prefi return -1; } - if(RNA_property_array_check(&r_ptr, prop) == 0) { + if(RNA_property_array_check(prop) == 0) { if((*index) == -1) { *index= 0; } diff --git a/source/blender/python/intern/bpy_util.h b/source/blender/python/intern/bpy_util.h index b16c8fe2e8c..09fbdf96ed2 100644 --- a/source/blender/python/intern/bpy_util.h +++ b/source/blender/python/intern/bpy_util.h @@ -51,6 +51,7 @@ short BPy_errors_to_report(struct ReportList *reports); struct bContext *BPy_GetContext(void); void BPy_SetContext(struct bContext *C); +extern void bpy_context_update(struct bContext *C); extern void bpy_context_set(struct bContext *C, PyGILState_STATE *gilstate); extern void bpy_context_clear(struct bContext *C, PyGILState_STATE *gilstate); #endif diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c index 9d52f45665f..56c1334ecac 100644 --- a/source/blender/python/mathutils/mathutils_Vector.c +++ b/source/blender/python/mathutils/mathutils_Vector.c @@ -37,8 +37,6 @@ #include "BLI_math.h" #include "BLI_utildefines.h" -extern void PyC_LineSpit(void); - #define MAX_DIMENSIONS 4 /* Swizzle axes get packed into a single value that is used as a closure. Each @@ -1161,28 +1159,18 @@ static PyObject *Vector_mul(PyObject *v1, PyObject *v2) } else if (vec1) { if (MatrixObject_Check(v2)) { - extern void PyC_LineSpit(void); - - /* VEC * MATRIX */ - /* this is deprecated!, use the reverse instead */ - float tvec[MAX_DIMENSIONS]; - /* ------ to be removed ------*/ -#ifndef MATH_STANDALONE -#ifdef WITH_ASSERT_ABORT +#if 1 PyErr_SetString(PyExc_ValueError, "(Vector * Matrix) is now removed, reverse the " "order (promoted to an Error for Debug builds)"); return NULL; #else - printf("Warning: (Vector * Matrix) is now deprecated, " - "reverse the multiplication order in the script.\n"); - PyC_LineSpit(); -#endif -#endif /* ifndef MATH_STANDALONE */ -/* ------ to be removed ------*/ + /* VEC * MATRIX */ + /* this is deprecated!, use the reverse instead */ + float tvec[MAX_DIMENSIONS]; if(BaseMath_ReadCallback((MatrixObject *)v2) == -1) return NULL; @@ -1191,9 +1179,18 @@ static PyObject *Vector_mul(PyObject *v1, PyObject *v2) } return newVectorObject(tvec, vec1->size, Py_NEW, Py_TYPE(vec1)); +#endif +/* ------ to be removed ------*/ } else if (QuaternionObject_Check(v2)) { /* VEC * QUAT */ +/* ------ to be removed ------*/ +#if 1 + PyErr_SetString(PyExc_ValueError, + "(Vector * Quat) is now removed, reverse the " + "order (promoted to an Error for Debug builds)"); + return NULL; +#else QuaternionObject *quat2 = (QuaternionObject*)v2; float tvec[3]; @@ -1207,26 +1204,11 @@ static PyObject *Vector_mul(PyObject *v1, PyObject *v2) return NULL; } - -/* ------ to be removed ------*/ -#ifndef MATH_STANDALONE -#ifdef WITH_ASSERT_ABORT - PyErr_SetString(PyExc_ValueError, - "(Vector * Quat) is now removed, reverse the " - "order (promoted to an Error for Debug builds)"); - return NULL; -#else - printf("Warning: (Vector * Quat) is now deprecated, " - "reverse the multiplication order in the script.\n"); - PyC_LineSpit(); -#endif -#endif /* ifndef MATH_STANDALONE */ -/* ------ to be removed ------*/ - - copy_v3_v3(tvec, vec1->vec); mul_qt_v3(quat2->quat, tvec); return newVectorObject(tvec, 3, Py_NEW, Py_TYPE(vec1)); +#endif +/* ------ to be removed ------*/ } else if (((scalar= PyFloat_AsDouble(v2)) == -1.0f && PyErr_Occurred())==0) { /* VEC * FLOAT */ return vector_mul_float(vec1, scalar); @@ -1260,6 +1242,14 @@ static PyObject *Vector_imul(PyObject *v1, PyObject *v2) /* only support vec*=float and vec*=mat vec*=vec result is a float so that wont work */ if (MatrixObject_Check(v2)) { +/* ------ to be removed ------*/ +#if 1 + PyErr_SetString(PyExc_ValueError, + "(Vector *= Matrix) is now removed, reverse the " + "order (promoted to an Error for Debug builds) " + "and uses the non in-place multiplication."); + return NULL; +#else float rvec[MAX_DIMENSIONS]; if(BaseMath_ReadCallback((MatrixObject *)v2) == -1) return NULL; @@ -1267,28 +1257,21 @@ static PyObject *Vector_imul(PyObject *v1, PyObject *v2) if(column_vector_multiplication(rvec, vec, (MatrixObject*)v2) == -1) return NULL; - -/* ------ to be removed ------*/ -#ifndef MATH_STANDALONE -#ifdef WITH_ASSERT_ABORT - PyErr_SetString(PyExc_ValueError, - "(Vector *= Matrix) is now removed, reverse the " - "order (promoted to an Error for Debug builds) " - "and uses the non in-place multiplication."); - return NULL; -#else - printf("Warning: (Vector *= Matrix) is now deprecated, " - "reverse the (non in-place) multiplication order in the script.\n"); - PyC_LineSpit(); -#endif -#endif /* ifndef MATH_STANDALONE */ -/* ------ to be removed ------*/ - - memcpy(vec->vec, rvec, sizeof(float) * vec->size); +#endif +/* ------ to be removed ------*/ } else if (QuaternionObject_Check(v2)) { /* VEC *= QUAT */ + +/* ------ to be removed ------*/ +#if 1 + PyErr_SetString(PyExc_ValueError, + "(Vector *= Quat) is now removed, reverse the " + "order (promoted to an Error for Debug builds) " + "and uses the non in-place multiplication."); + return NULL; +#else QuaternionObject *quat2 = (QuaternionObject*)v2; if(vec->size != 3) { @@ -1302,25 +1285,9 @@ static PyObject *Vector_imul(PyObject *v1, PyObject *v2) return NULL; } - -/* ------ to be removed ------*/ -#ifndef MATH_STANDALONE -#ifdef WITH_ASSERT_ABORT - PyErr_SetString(PyExc_ValueError, - "(Vector *= Quat) is now removed, reverse the " - "order (promoted to an Error for Debug builds) " - "and uses the non in-place multiplication."); - return NULL; -#else - printf("Warning: (Vector *= Quat) is now deprecated, " - "reverse the (non in-place) multiplication order in the script.\n"); - PyC_LineSpit(); -#endif -#endif /* ifndef MATH_STANDALONE */ -/* ------ to be removed ------*/ - - mul_qt_v3(quat2->quat, vec->vec); +#endif +/* ------ to be removed ------*/ } else if (((scalar= PyFloat_AsDouble(v2)) == -1.0f && PyErr_Occurred())==0) { /* VEC *= FLOAT */ mul_vn_fl(vec->vec, vec->size, scalar); diff --git a/source/blender/render/SConscript b/source/blender/render/SConscript index ade3b5b9f59..53e9027484b 100644 --- a/source/blender/render/SConscript +++ b/source/blender/render/SConscript @@ -32,7 +32,7 @@ if env['OURPLATFORM'] == 'darwin': cflags_raytrace = env['CFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] cxxflags_raytrace = env['CXXFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] -if env['OURPLATFORM'] == 'linux2': +if env['OURPLATFORM'] == 'linux': if env['WITH_BF_RAYOPTIMIZATION']: cflags_raytrace = env['CCFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] cxxflags_raytrace = env['CXXFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index b385b507707..7033ec27fc0 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -192,10 +192,10 @@ void RE_make_stars(Render *re, Scene *scenev3d, void (*initfunc)(void), /* minimal free space (starting at camera) */ starmindist= wrld->starmindist; - if (stargrid <= 0.10) return; + if (stargrid <= 0.10f) return; if (re) re->flag |= R_HALO; - else stargrid *= 1.0; /* then it draws fewer */ + else stargrid *= 1.0f; /* then it draws fewer */ if(re) invert_m4_m4(mat, re->viewmat); else unit_m4(mat); @@ -267,17 +267,17 @@ void RE_make_stars(Render *re, Scene *scenev3d, void (*initfunc)(void), if (alpha >= clipend) alpha = 0.0; else if (alpha <= starmindist) alpha = 0.0; - else if (alpha <= 2.0 * starmindist) { + else if (alpha <= 2.0f * starmindist) { alpha = (alpha - starmindist) / starmindist; } else { - alpha -= 2.0 * starmindist; - alpha /= (clipend - 2.0 * starmindist); - alpha = 1.0 - alpha; + alpha -= 2.0f * starmindist; + alpha /= (clipend - 2.0f * starmindist); + alpha = 1.0f - alpha; } } - if (alpha != 0.0) { + if (alpha != 0.0f) { fac = force * BLI_drand(); har = initstar(re, obr, vec, fac); @@ -822,7 +822,7 @@ static void autosmooth(Render *UNUSED(re), ObjectRen *obr, float mat[][4], int d if(obr->totvert==0) return; asverts= MEM_callocN(sizeof(ASvert)*obr->totvert, "all smooth verts"); - thresh= cos( M_PI*(0.5f+(float)degr)/180.0 ); + thresh= cosf((float)M_PI*(0.5f+(float)degr)/180.0f ); /* step zero: give faces normals of original mesh, if this is provided */ @@ -1046,9 +1046,9 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par float fac; if(ma->strand_ease!=0.0f) { if(ma->strand_ease<0.0f) - fac= pow(sd->time, 1.0+ma->strand_ease); + fac= pow(sd->time, 1.0f+ma->strand_ease); else - fac= pow(sd->time, 1.0/(1.0f-ma->strand_ease)); + fac= pow(sd->time, 1.0f/(1.0f-ma->strand_ease)); } else fac= sd->time; @@ -1063,7 +1063,7 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par width= w; /*cross is the radius of the strand so we want it to be half of full width */ - mul_v3_fl(cross,0.5/crosslen); + mul_v3_fl(cross,0.5f/crosslen); } else width/=w; @@ -1984,8 +1984,8 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem else { /* render normal particles */ if(part->trail_count > 1) { - float length = part->path_end * (1.0 - part->randlength * r_length); - int trail_count = part->trail_count * (1.0 - part->randlength * r_length); + float length = part->path_end * (1.0f - part->randlength * r_length); + int trail_count = part->trail_count * (1.0f - part->randlength * r_length); float ct = (part->draw & PART_ABS_PATH_TIME) ? cfra : pa_time; float dt = length / (trail_count ? (float)trail_count : 1.0f); @@ -2159,7 +2159,7 @@ static void make_render_halos(Render *re, ObjectRen *obr, Mesh *UNUSED(me), int normalize_v3(view); zn= nor[0]*view[0]+nor[1]*view[1]+nor[2]*view[2]; - if(zn>=0.0) hasize= 0.0; + if(zn>=0.0f) hasize= 0.0f; else hasize*= zn*zn*zn*zn; } @@ -3599,7 +3599,7 @@ static void initshadowbuf(Render *re, LampRen *lar, float mat[][4]) /* bias is percentage, made 2x larger because of correction for angle of incidence */ /* when a ray is closer to parallel of a face, bias value is increased during render */ - shb->bias= (0.02*lar->bias)*0x7FFFFFFF; + shb->bias= (0.02f*lar->bias)*0x7FFFFFFF; /* halfway method (average of first and 2nd z) reduces bias issues */ if(ELEM(lar->buftype, LA_SHADBUF_HALFWAY, LA_SHADBUF_DEEP)) @@ -3610,7 +3610,7 @@ static void initshadowbuf(Render *re, LampRen *lar, float mat[][4]) static void area_lamp_vectors(LampRen *lar) { - float xsize= 0.5*lar->area_size, ysize= 0.5*lar->area_sizey, multifac; + float xsize= 0.5f*lar->area_size, ysize= 0.5f*lar->area_sizey, multifac; /* make it smaller, so area light can be multisampled */ multifac= 1.0f/sqrt((float)lar->ray_totsamp); @@ -3637,7 +3637,7 @@ static void area_lamp_vectors(LampRen *lar) lar->area[3][1]= lar->co[1] + xsize*lar->mat[0][1] - ysize*lar->mat[1][1]; lar->area[3][2]= lar->co[2] + xsize*lar->mat[0][2] - ysize*lar->mat[1][2]; /* only for correction button size, matrix size works on energy */ - lar->areasize= lar->dist*lar->dist/(4.0*xsize*ysize); + lar->areasize= lar->dist*lar->dist/(4.0f*xsize*ysize); } /* If lar takes more lamp data, the decoupling will be better. */ @@ -3791,10 +3791,10 @@ static GroupObject *add_render_lamp(Render *re, Object *ob) lar->spotsi= la->spotsize; if(lar->mode & LA_HALO) { - if(lar->spotsi>170.0) lar->spotsi= 170.0; + if(lar->spotsi>170.0f) lar->spotsi= 170.0f; } - lar->spotsi= cos( M_PI*lar->spotsi/360.0 ); - lar->spotbl= (1.0-lar->spotsi)*la->spotblend; + lar->spotsi= cos( M_PI*lar->spotsi/360.0f ); + lar->spotbl= (1.0f-lar->spotsi)*la->spotblend; memcpy(lar->mtex, la->mtex, MAX_MTEX*sizeof(void *)); @@ -3813,7 +3813,7 @@ static GroupObject *add_render_lamp(Render *re, Object *ob) xn= saacos(lar->spotsi); xn= sin(xn)/cos(xn); - lar->spottexfac= 1.0/(xn); + lar->spottexfac= 1.0f/(xn); if(lar->mode & LA_ONLYSHADOW) { if((lar->mode & (LA_SHAD_BUF|LA_SHAD_RAY))==0) lar->mode -= LA_ONLYSHADOW; @@ -3823,7 +3823,7 @@ static GroupObject *add_render_lamp(Render *re, Object *ob) /* set flag for spothalo en initvars */ if(la->type==LA_SPOT && (la->mode & LA_HALO) && (la->buftype != LA_SHADBUF_DEEP)) { - if(la->haint>0.0) { + if(la->haint>0.0f) { re->flag |= R_LAMPHALO; /* camera position (0,0,0) rotate around lamp */ @@ -3990,9 +3990,9 @@ void init_render_world(Render *re) cp= (char *)&re->wrld.fastcol; - cp[0]= 255.0*re->wrld.horr; - cp[1]= 255.0*re->wrld.horg; - cp[2]= 255.0*re->wrld.horb; + cp[0]= 255.0f*re->wrld.horr; + cp[1]= 255.0f*re->wrld.horg; + cp[2]= 255.0f*re->wrld.horb; cp[3]= 1; VECCOPY(re->grvec, re->viewmat[2]); @@ -4047,25 +4047,25 @@ static void set_phong_threshold(ObjectRen *obr) if(vlr->flag & R_SMOOTH) { dot= INPR(vlr->n, vlr->v1->n); dot= ABS(dot); - if(dot>0.9) { + if(dot>0.9f) { thresh+= dot; tot++; } dot= INPR(vlr->n, vlr->v2->n); dot= ABS(dot); - if(dot>0.9) { + if(dot>0.9f) { thresh+= dot; tot++; } dot= INPR(vlr->n, vlr->v3->n); dot= ABS(dot); - if(dot>0.9) { + if(dot>0.9f) { thresh+= dot; tot++; } if(vlr->v4) { dot= INPR(vlr->n, vlr->v4->n); dot= ABS(dot); - if(dot>0.9) { + if(dot>0.9f) { thresh+= dot; tot++; } } @@ -4105,7 +4105,7 @@ static void set_fullsample_trace_flag(Render *re, ObjectRen *obr) else if((mode & MA_RAYMIRROR) || ((mode & MA_TRANSP) && (mode & MA_RAYTRANSP))) { /* for blurry reflect/refract, better to take more samples * inside the raytrace than as OSA samples */ - if ((vlr->mat->gloss_mir == 1.0) && (vlr->mat->gloss_tra == 1.0)) + if ((vlr->mat->gloss_mir == 1.0f) && (vlr->mat->gloss_tra == 1.0f)) vlr->flag |= R_FULL_OSA; } } @@ -4221,11 +4221,11 @@ static void check_non_flat_quads(ObjectRen *obr) /* render normals are inverted in render! we calculate normal of single tria here */ flen= normal_tri_v3( nor,vlr->v4->co, vlr->v3->co, vlr->v1->co); - if(flen==0.0) normal_tri_v3( nor,vlr->v4->co, vlr->v2->co, vlr->v1->co); + if(flen==0.0f) normal_tri_v3( nor,vlr->v4->co, vlr->v2->co, vlr->v1->co); xn= nor[0]*vlr->n[0] + nor[1]*vlr->n[1] + nor[2]*vlr->n[2]; - if(ABS(xn) < 0.999995 ) { // checked on noisy fractal grid + if(ABS(xn) < 0.999995f ) { // checked on noisy fractal grid float d1, d2; @@ -5461,7 +5461,7 @@ static int load_fluidsimspeedvectors(Render *re, ObjectInstanceRen *obi, float * for(j=0;j<3;j++) fsvec[j] = velarray[a].vel[j]; /* (bad) HACK insert average velocity if none is there (see previous comment) */ - if((fsvec[0] == 0.0) && (fsvec[1] == 0.0) && (fsvec[2] == 0.0)) + if((fsvec[0] == 0.0f) && (fsvec[1] == 0.0f) && (fsvec[2] == 0.0f)) { fsvec[0] = avgvel[0]; fsvec[1] = avgvel[1]; diff --git a/source/blender/render/intern/source/envmap.c b/source/blender/render/intern/source/envmap.c index e2ab21ef877..66a73b47790 100644 --- a/source/blender/render/intern/source/envmap.c +++ b/source/blender/render/intern/source/envmap.c @@ -595,7 +595,7 @@ static int envcube_isect(EnvMap *env, float *vec, float *answ) if(env->type==ENV_PLANE) { face= 1; - labda= 1.0/vec[2]; + labda= 1.0f/vec[2]; answ[0]= env->viewscale*labda*vec[0]; answ[1]= -env->viewscale*labda*vec[1]; } @@ -603,44 +603,44 @@ static int envcube_isect(EnvMap *env, float *vec, float *answ) /* which face */ if( vec[2]<=-fabs(vec[0]) && vec[2]<=-fabs(vec[1]) ) { face= 0; - labda= -1.0/vec[2]; + labda= -1.0f/vec[2]; answ[0]= labda*vec[0]; answ[1]= labda*vec[1]; } else if( vec[2]>=fabs(vec[0]) && vec[2]>=fabs(vec[1]) ) { face= 1; - labda= 1.0/vec[2]; + labda= 1.0f/vec[2]; answ[0]= labda*vec[0]; answ[1]= -labda*vec[1]; } else if( vec[1]>=fabs(vec[0]) ) { face= 2; - labda= 1.0/vec[1]; + labda= 1.0f/vec[1]; answ[0]= labda*vec[0]; answ[1]= labda*vec[2]; } else if( vec[0]<=-fabs(vec[1]) ) { face= 3; - labda= -1.0/vec[0]; + labda= -1.0f/vec[0]; answ[0]= labda*vec[1]; answ[1]= labda*vec[2]; } else if( vec[1]<=-fabs(vec[0]) ) { face= 4; - labda= -1.0/vec[1]; + labda= -1.0f/vec[1]; answ[0]= -labda*vec[0]; answ[1]= labda*vec[2]; } else { face= 5; - labda= 1.0/vec[0]; + labda= 1.0f/vec[0]; answ[0]= -labda*vec[1]; answ[1]= labda*vec[2]; } } - answ[0]= 0.5+0.5*answ[0]; - answ[1]= 0.5+0.5*answ[1]; + answ[0]= 0.5f+0.5f*answ[0]; + answ[1]= 0.5f+0.5f*answ[1]; return face; } @@ -725,7 +725,7 @@ int envmaptex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, TexRe /* edges? */ - if(texres->ta<1.0) { + if(texres->ta<1.0f) { TexResult texr1, texr2; texr1.nor= texr2.nor= NULL; @@ -756,8 +756,8 @@ int envmaptex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, TexRe else texr2.tr= texr2.tg= texr2.tb= texr2.ta= 0.0; fac= (texres->ta+texr1.ta+texr2.ta); - if(fac!=0.0) { - fac= 1.0/fac; + if(fac!=0.0f) { + fac= 1.0f/fac; texres->tr= fac*(texres->ta*texres->tr + texr1.ta*texr1.tr + texr2.ta*texr2.tr ); texres->tg= fac*(texres->ta*texres->tg + texr1.ta*texr1.tg + texr2.ta*texr2.tg ); diff --git a/source/blender/render/intern/source/gammaCorrectionTables.c b/source/blender/render/intern/source/gammaCorrectionTables.c index 4a16341093c..f88a5d240c3 100644 --- a/source/blender/render/intern/source/gammaCorrectionTables.c +++ b/source/blender/render/intern/source/gammaCorrectionTables.c @@ -107,7 +107,7 @@ void makeGammaTables(float gamma) int i; valid_gamma = gamma; - valid_inv_gamma = 1.0 / gamma; + valid_inv_gamma = 1.0f / gamma; color_step = 1.0 / RE_GAMMA_TABLE_SIZE; inv_color_step = (float) RE_GAMMA_TABLE_SIZE; diff --git a/source/blender/render/intern/source/initrender.c b/source/blender/render/intern/source/initrender.c index 2f09742f130..bea86264af1 100644 --- a/source/blender/render/intern/source/initrender.c +++ b/source/blender/render/intern/source/initrender.c @@ -126,8 +126,8 @@ static float filt_cubic(float x) if (x < 0.0f) x = -x; - if (x < 1.0f) return 0.5*x*x2 - x2 + 2.0f/3.0f; - if (x < 2.0f) return (2.0-x)*(2.0-x)*(2.0-x)/6.0f; + if (x < 1.0f) return 0.5f*x*x2 - x2 + 2.0f/3.0f; + if (x < 2.0f) return (2.0f-x)*(2.0f-x)*(2.0f-x)/6.0f; return 0.0f; } @@ -138,27 +138,27 @@ static float filt_catrom(float x) if (x < 0.0f) x = -x; if (x < 1.0f) return 1.5f*x2*x - 2.5f*x2 + 1.0f; - if (x < 2.0f) return -0.5f*x2*x + 2.5*x2 - 4.0f*x + 2.0f; + if (x < 2.0f) return -0.5f*x2*x + 2.5f*x2 - 4.0f*x + 2.0f; return 0.0f; } static float filt_mitchell(float x) /* Mitchell & Netravali's two-param cubic */ { float b = 1.0f/3.0f, c = 1.0f/3.0f; - float p0 = ( 6.0 - 2.0*b ) / 6.0; - float p2 = (-18.0 + 12.0*b + 6.0*c) / 6.0; - float p3 = ( 12.0 - 9.0*b - 6.0*c) / 6.0; - float q0 = ( 8.0*b + 24.0*c) / 6.0; - float q1 = ( - 12.0*b - 48.0*c) / 6.0; - float q2 = ( 6.0*b + 30.0*c) / 6.0; - float q3 = ( - b - 6.0*c) / 6.0; + float p0 = ( 6.0f - 2.0f*b ) / 6.0f; + float p2 = (-18.0f + 12.0f*b + 6.0f*c) / 6.0f; + float p3 = ( 12.0f - 9.0f*b - 6.0f*c) / 6.0f; + float q0 = ( 8.0f*b + 24.0f*c) / 6.0f; + float q1 = ( - 12.0f *b - 48.0f*c) / 6.0f; + float q2 = ( 6.0f *b + 30.0f*c) / 6.0f; + float q3 = ( - b - 6.0f*c) / 6.0f; - if (x<-2.0) return 0.0; - if (x<-1.0) return (q0-x*(q1-x*(q2-x*q3))); - if (x< 0.0) return (p0+x*x*(p2-x*p3)); - if (x< 1.0) return (p0+x*x*(p2+x*p3)); - if (x< 2.0) return (q0+x*(q1+x*(q2+x*q3))); - return 0.0; + if (x<-2.0f) return 0.0f; + if (x<-1.0f) return (q0-x*(q1-x*(q2-x*q3))); + if (x< 0.0f) return (p0+x*x*(p2-x*p3)); + if (x< 1.0f) return (p0+x*x*(p2+x*p3)); + if (x< 2.0f) return (q0+x*(q1+x*(q2+x*q3))); + return 0.0f; } /* x ranges from -1 to 1 */ @@ -170,16 +170,16 @@ float RE_filter_value(int type, float x) switch(type) { case R_FILTER_BOX: - if(x>1.0) return 0.0f; - return 1.0; + if(x>1.0f) return 0.0f; + return 1.0f; case R_FILTER_TENT: - if(x>1.0) return 0.0f; + if(x>1.0f) return 0.0f; return 1.0f-x; case R_FILTER_GAUSS: x*= gaussfac; - return (1.0/exp(x*x) - 1.0/exp(gaussfac*gaussfac*2.25)); + return (1.0f/expf(x*x) - 1.0f/expf(gaussfac*gaussfac*2.25f)); case R_FILTER_MITCH: return filt_mitchell(x*gaussfac); @@ -221,7 +221,7 @@ static float calc_weight(Render *re, float *weight, int i, int j) case R_FILTER_GAUSS: x = dist*re->r.gauss; - weight[a]= (1.0/exp(x*x) - 1.0/exp(re->r.gauss*re->r.gauss*2.25)); + weight[a]= (1.0f/expf(x*x) - 1.0f/expf(re->r.gauss*re->r.gauss*2.25f)); break; case R_FILTER_MITCH: @@ -309,7 +309,7 @@ void make_sample_tables(Render *re) st->centmask= MEM_mallocN((1<osa), "Initfilt3"); for(a=0; a<16; a++) { - st->centLut[a]= -0.45+((float)a)/16.0; + st->centLut[a]= -0.45f+((float)a)/16.0f; } /* calculate totw */ @@ -327,7 +327,7 @@ void make_sample_tables(Render *re) memset(weight, 0, sizeof(weight)); calc_weight(re, weight, i, j); - for(a=0; a<16; a++) flweight[a]= weight[a]*(1.0/totw); + for(a=0; a<16; a++) flweight[a]= weight[a]*(1.0f/totw); m3= st->fmask1[ 3*(j+1)+i+1 ]; m4= st->fmask2[ 3*(j+1)+i+1 ]; @@ -430,9 +430,9 @@ void make_sample_tables(Render *re) for(a= (1<osa)-1; a>0; a--) { val= st->cmask[a & 255] + st->cmask[a>>8]; - i= 8+(15.9*(fpy1[a & 255]+fpy2[a>>8])/val); + i= 8+(15.9f*(fpy1[a & 255]+fpy2[a>>8])/val); CLAMP(i, 0, 15); - j= 8+(15.9*(fpx1[a & 255]+fpx2[a>>8])/val); + j= 8+(15.9f*(fpx1[a & 255]+fpx2[a>>8])/val); CLAMP(j, 0, 15); i= j + (i<<4); st->centmask[a]= i; diff --git a/source/blender/render/intern/source/occlusion.c b/source/blender/render/intern/source/occlusion.c index 0aa65479a4f..54137c62d22 100644 --- a/source/blender/render/intern/source/occlusion.c +++ b/source/blender/render/intern/source/occlusion.c @@ -1414,7 +1414,7 @@ static void sample_occ_tree(Render *re, OcclusionTree *tree, OccFace *exclude, f if(env) { /* sky shading using bent normal */ if(ELEM(envcolor, WO_AOSKYCOL, WO_AOSKYTEX)) { - fac= 0.5*(1.0f+bn[0]*re->grvec[0]+ bn[1]*re->grvec[1]+ bn[2]*re->grvec[2]); + fac= 0.5f*(1.0f+bn[0]*re->grvec[0]+ bn[1]*re->grvec[1]+ bn[2]*re->grvec[2]); env[0]= (1.0f-fac)*re->wrld.horr + fac*re->wrld.zenr; env[1]= (1.0f-fac)*re->wrld.horg + fac*re->wrld.zeng; env[2]= (1.0f-fac)*re->wrld.horb + fac*re->wrld.zenb; diff --git a/source/blender/render/intern/source/pixelblending.c b/source/blender/render/intern/source/pixelblending.c index c2e34e2a70d..d945436be6b 100644 --- a/source/blender/render/intern/source/pixelblending.c +++ b/source/blender/render/intern/source/pixelblending.c @@ -68,11 +68,11 @@ extern struct Render R; /* Threshold for a 'full' pixel: pixels with alpha above this level are */ /* considered opaque This is the decimal value for 0xFFF0 / 0xFFFF */ -#define RE_FULL_COLOR_FLOAT 0.9998 +#define RE_FULL_COLOR_FLOAT 0.9998f /* Threshold for an 'empty' pixel: pixels with alpha above this level are */ /* considered completely transparent. This is the decimal value */ /* for 0x000F / 0xFFFF */ -#define RE_EMPTY_COLOR_FLOAT 0.0002 +#define RE_EMPTY_COLOR_FLOAT 0.0002f /* ------------------------------------------------------------------------- */ @@ -82,7 +82,7 @@ void addAlphaOverFloat(float *dest, float *source) /* d = s + (1-alpha_s)d*/ float mul; - mul= 1.0 - source[3]; + mul= 1.0f - source[3]; dest[0]= (mul*dest[0]) + source[0]; dest[1]= (mul*dest[1]) + source[1]; @@ -98,7 +98,7 @@ void addAlphaUnderFloat(float *dest, float *source) { float mul; - mul= 1.0 - dest[3]; + mul= 1.0f - dest[3]; dest[0]+= (mul*source[0]); dest[1]+= (mul*source[1]); @@ -115,7 +115,7 @@ void addalphaAddfacFloat(float *dest, float *source, char addfac) /* Addfac is a number between 0 and 1: rescale */ /* final target is to diminish the influence of dest when addfac rises */ - m = 1.0 - ( source[3] * ((255.0 - addfac) / 255.0)); + m = 1.0f - ( source[3] * ((255 - addfac) / 255.0f)); /* blend colors*/ c= (m * dest[0]) + source[0]; @@ -178,7 +178,7 @@ void add_filt_fmask(unsigned int mask, float *col, float *rowbuf, int row_w) a= j; val= *(fmask1[a] +maskand) + *(fmask2[a] +maskshift); - if(val!=0.0) { + if(val!=0.0f) { rb1[0]+= val*r; rb1[1]+= val*g; rb1[2]+= val*b; @@ -187,7 +187,7 @@ void add_filt_fmask(unsigned int mask, float *col, float *rowbuf, int row_w) a+=3; val= *(fmask1[a] +maskand) + *(fmask2[a] +maskshift); - if(val!=0.0) { + if(val!=0.0f) { rb2[0]+= val*r; rb2[1]+= val*g; rb2[2]+= val*b; @@ -196,7 +196,7 @@ void add_filt_fmask(unsigned int mask, float *col, float *rowbuf, int row_w) a+=3; val= *(fmask1[a] +maskand) + *(fmask2[a] +maskshift); - if(val!=0.0) { + if(val!=0.0f) { rb3[0]+= val*r; rb3[1]+= val*g; rb3[2]+= val*b; @@ -345,21 +345,21 @@ void add_filt_fmask_pixsize(unsigned int mask, float *in, float *rowbuf, int row a= j; val= *(fmask1[a] +maskand) + *(fmask2[a] +maskshift); - if(val!=0.0) { + if(val!=0.0f) { for(i= 0; ico); - dco[0]=dco[1]=dco[2]= 1.0/har->rad; + dco[0]=dco[1]=dco[2]= 1.0f/har->rad; vn= har->no; @@ -114,9 +114,9 @@ static void render_lighting_halo(HaloRen *har, float *colf) if(lar->mode & LA_QUAD) { t= 1.0; - if(lar->ld1>0.0) + if(lar->ld1>0.0f) t= lar->dist/(lar->dist+lar->ld1*ld); - if(lar->ld2>0.0) + if(lar->ld2>0.0f) t*= lar->distkw/(lar->distkw+lar->ld2*ld*ld); lampdist= t; @@ -127,7 +127,7 @@ static void render_lighting_halo(HaloRen *har, float *colf) if(lar->mode & LA_SPHERE) { t= lar->dist - ld; - if(t<0.0) continue; + if(t<0.0f) continue; t/= lar->dist; lampdist*= (t); @@ -155,7 +155,7 @@ static void render_lighting_halo(HaloRen *har, float *colf) if(lar->type==LA_SPOT) { if(lar->mode & LA_SQUARE) { - if(lv[0]*lar->vec[0]+lv[1]*lar->vec[1]+lv[2]*lar->vec[2]>0.0) { + if(lv[0]*lar->vec[0]+lv[1]*lar->vec[1]+lv[2]*lar->vec[2]>0.0f) { float x, lvrot[3]; /* rotate view to lampspace */ @@ -165,7 +165,7 @@ static void render_lighting_halo(HaloRen *har, float *colf) x= MAX2(fabs(lvrot[0]/lvrot[2]) , fabs(lvrot[1]/lvrot[2])); /* 1.0/(sqrt(1+x*x)) is equivalent to cos(atan(x)) */ - inpr= 1.0/(sqrt(1.0+x*x)); + inpr= 1.0/(sqrt(1.0f+x*x)); } else inpr= 0.0; } @@ -179,21 +179,21 @@ static void render_lighting_halo(HaloRen *har, float *colf) t= inpr-t; i= 1.0; soft= 1.0; - if(tspotbl && lar->spotbl!=0.0) { + if(tspotbl && lar->spotbl!=0.0f) { /* soft area */ i= t/lar->spotbl; t= i*i; - soft= (3.0*t-2.0*t*i); + soft= (3.0f*t-2.0f*t*i); inpr*= soft; } if(lar->mode & LA_ONLYSHADOW) { /* if(ma->mode & MA_SHADOW) { */ /* dot product positive: front side face! */ inp= vn[0]*lv[0] + vn[1]*lv[1] + vn[2]*lv[2]; - if(inp>0.0) { + if(inp>0.0f) { /* testshadowbuf==0.0 : 100% shadow */ shadfac = testshadowbuf(&R, lar->shb, rco, dco, dco, inp, 0.0f); - if( shadfac>0.0 ) { + if( shadfac>0.0f ) { shadfac*= inp*soft*lar->energy; ir -= shadfac; ig -= shadfac; @@ -219,32 +219,32 @@ static void render_lighting_halo(HaloRen *har, float *colf) i= inp; if(lar->type==LA_HEMI) { - i= 0.5*i+0.5; + i= 0.5f*i+0.5f; } - if(i>0.0) { + if(i>0.0f) { i*= lampdist; } /* shadow */ - if(i> -0.41) { /* heuristic valua! */ + if(i> -0.41f) { /* heuristic valua! */ shadfac= 1.0; if(lar->shb) { shadfac = testshadowbuf(&R, lar->shb, rco, dco, dco, inp, 0.0f); - if(shadfac==0.0) continue; + if(shadfac==0.0f) continue; i*= shadfac; } } - if(i>0.0) { + if(i>0.0f) { ir+= i*lacol[0]; ig+= i*lacol[1]; ib+= i*lacol[2]; } } - if(ir<0.0) ir= 0.0; - if(ig<0.0) ig= 0.0; - if(ib<0.0) ib= 0.0; + if(ir<0.0f) ir= 0.0f; + if(ig<0.0f) ig= 0.0f; + if(ib<0.0f) ib= 0.0f; colf[0]*= ir; colf[1]*= ig; @@ -301,7 +301,7 @@ int shadeHaloFloat(HaloRen *har, float *col, int zz, } else alpha= har->alfa; - if(alpha==0.0) + if(alpha==0.0f) return 0; /* soften the halo if it intersects geometry */ @@ -355,15 +355,15 @@ int shadeHaloFloat(HaloRen *har, float *col, int zz, fac= fabs( rc[1]*(har->rad*fabs(rc[0]) - radist) ); - if(fac< 1.0) { - ringf+= (1.0-fac); + if(fac< 1.0f) { + ringf+= (1.0f-fac); } } } if(har->type & HA_VECT) { dist= fabs( har->cos*(yn) - har->sin*(xn) )/har->rad; - if(dist>1.0) dist= 1.0; + if(dist>1.0f) dist= 1.0f; if(har->tex) { zn= har->sin*xn - har->cos*yn; yn= har->cos*xn + har->sin*yn; @@ -374,7 +374,7 @@ int shadeHaloFloat(HaloRen *har, float *col, int zz, if(har->type & HA_FLARECIRC) { - dist= 0.5+fabs(dist-0.5); + dist= 0.5+fabs(dist-0.5f); } @@ -418,7 +418,7 @@ int shadeHaloFloat(HaloRen *har, float *col, int zz, float ster, angle; /* rotation */ angle= atan2(yn, xn); - angle*= (1.0+0.25*har->starpoints); + angle*= (1.0f+0.25f*har->starpoints); co= cos(angle); si= sin(angle); @@ -426,15 +426,15 @@ int shadeHaloFloat(HaloRen *har, float *col, int zz, angle= (co*xn+si*yn)*(co*yn-si*xn); ster= fabs(angle); - if(ster>1.0) { + if(ster>1.0f) { ster= (har->rad)/(ster); - if(ster<1.0) dist*= sqrt(ster); + if(ster<1.0f) dist*= sqrt(ster); } } /* disputable optimize... (ton) */ - if(dist<=0.00001) + if(dist<=0.00001f) return 0; dist*= alpha; @@ -471,7 +471,7 @@ int shadeHaloFloat(HaloRen *har, float *col, int zz, } /* Next, we do the line and ring factor modifications. */ - if(linef!=0.0) { + if(linef!=0.0f) { Material *ma= har->mat; col[0]+= linef * ma->specr; @@ -481,7 +481,7 @@ int shadeHaloFloat(HaloRen *har, float *col, int zz, if(har->type & HA_XALPHA) col[3]+= linef*linef; else col[3]+= linef; } - if(ringf!=0.0) { + if(ringf!=0.0f) { Material *ma= har->mat; col[0]+= ringf * ma->mirr; @@ -516,16 +516,16 @@ void shadeSkyView(float *colf, float *rco, float *view, float *dxyview, short th blend= view[0]*R.grvec[0]+ view[1]*R.grvec[1]+ view[2]*R.grvec[2]; - if(blend<0.0) skyflag= 0; + if(blend<0.0f) skyflag= 0; blend= fabs(blend); } else if(R.wrld.skytype & WO_SKYPAPER) { - blend= 0.5+ 0.5*view[1]; + blend= 0.5f + 0.5f * view[1]; } else { /* the fraction of how far we are above the bottom of the screen */ - blend= fabs(0.5+ view[1]); + blend= fabs(0.5f + view[1]); } VECCOPY(hor, &R.wrld.horr); @@ -545,8 +545,8 @@ void shadeSkyView(float *colf, float *rco, float *view, float *dxyview, short th do_sky_tex(rco, lo, dxyview, hor, zen, &blend, skyflag, thread); } - if(blend>1.0) blend= 1.0; - blendm= 1.0-blend; + if(blend>1.0f) blend= 1.0f; + blendm= 1.0f-blend; /* No clipping, no conversion! */ if(R.wrld.skytype & WO_SKYBLEND) { @@ -580,8 +580,8 @@ void shadeSunView(float *colf, float *view) VECCOPY(sview, view); normalize_v3(sview); mul_m3_v3(R.imat, sview); - if (sview[2] < 0.0) - sview[2] = 0.0; + if (sview[2] < 0.0f) + sview[2] = 0.0f; normalize_v3(sview); do_init= 0; } diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c index 34d3adcf15b..e82e969d502 100644 --- a/source/blender/render/intern/source/rayshade.c +++ b/source/blender/render/intern/source/rayshade.c @@ -611,12 +611,12 @@ static int refraction(float *refract, float *n, float *view, float index) index = 1.0f/index; fac= 1.0f - (1.0f - dot*dot)*index*index; if(fac<= 0.0f) return 0; - fac= -dot*index + sqrt(fac); + fac= -dot*index + sqrtf(fac); } else { fac= 1.0f - (1.0f - dot*dot)*index*index; if(fac<= 0.0f) return 0; - fac= -dot*index - sqrt(fac); + fac= -dot*index - sqrtf(fac); } refract[0]= index*view[0] + fac*n[0]; @@ -693,7 +693,7 @@ static float shade_by_transmission(Isect *is, ShadeInput *shi, ShadeResult *shr) if(p < 0.0f) p= 0.0f; else if (p > 10.0f) p= 10.0f; - shr->alpha *= pow(d, p); + shr->alpha *= powf(d, p); if (shr->alpha > 1.0f) shr->alpha= 1.0f; } @@ -720,11 +720,11 @@ static void ray_fadeout(Isect *is, ShadeInput *shi, float *col, float *blendcol, /* if fading out, linear blend against fade color */ float blendfac; - blendfac = 1.0 - len_v3v3(shi->co, is->start)/dist_mir; + blendfac = 1.0f - len_v3v3(shi->co, is->start)/dist_mir; - col[0] = col[0]*blendfac + (1.0 - blendfac)*blendcol[0]; - col[1] = col[1]*blendfac + (1.0 - blendfac)*blendcol[1]; - col[2] = col[2]*blendfac + (1.0 - blendfac)*blendcol[2]; + col[0] = col[0]*blendfac + (1.0f - blendfac)*blendcol[0]; + col[1] = col[1]*blendfac + (1.0f - blendfac)*blendcol[1]; + col[2] = col[2]*blendfac + (1.0f - blendfac)*blendcol[2]; } /* the main recursive tracer itself @@ -870,7 +870,7 @@ static void traceray(ShadeInput *origshi, ShadeResult *origshr, short depth, flo col[2]= shr.diff[2] + shr.spec[2]; } - if (dist_mir > 0.0) { + if (dist_mir > 0.0f) { float blendcol[3]; /* max ray distance set, but found an intersection, so fade this color @@ -922,11 +922,11 @@ static void DP_energy(float *table, float *vec, int tot, float xsize, float ysiz } } } - vec[0] += 0.1*min*result[0]/(float)tot; - vec[1] += 0.1*min*result[1]/(float)tot; + vec[0] += 0.1f*min*result[0]/(float)tot; + vec[1] += 0.1f*min*result[1]/(float)tot; // cyclic clamping - vec[0]= vec[0] - xsize*floor(vec[0]/xsize + 0.5); - vec[1]= vec[1] - ysize*floor(vec[1]/ysize + 0.5); + vec[0]= vec[0] - xsize*floorf(vec[0]/xsize + 0.5f); + vec[1]= vec[1] - ysize*floorf(vec[1]/ysize + 0.5f); } // random offset of 1 in 2 @@ -934,7 +934,7 @@ static void jitter_plane_offset(float *jitter1, float *jitter2, int tot, float s { float dsizex= sizex*ofsx; float dsizey= sizey*ofsy; - float hsizex= 0.5*sizex, hsizey= 0.5*sizey; + float hsizex= 0.5f*sizex, hsizey= 0.5f*sizey; int x; for(x=tot; x>0; x--, jitter1+=2, jitter2+=2) { @@ -968,8 +968,8 @@ void init_jitter_plane(LampRen *lar) /* fill table with random locations, area_size large */ for(x=0; xarea_size; - fp[1]= (BLI_frand()-0.5)*lar->area_sizey; + fp[0]= (BLI_frand()-0.5f)*lar->area_size; + fp[1]= (BLI_frand()-0.5f)*lar->area_sizey; } while(iter--) { @@ -1081,8 +1081,8 @@ static void QMC_initPixel(QMCSampler *qsa, int thread) { /* hammersley sequence is fixed, already created in QMCSampler init. * per pixel, gets a random offset. We create separate offsets per thread, for write-safety */ - qsa->offs[thread][0] = 0.5 * BLI_thread_frand(thread); - qsa->offs[thread][1] = 0.5 * BLI_thread_frand(thread); + qsa->offs[thread][0] = 0.5f * BLI_thread_frand(thread); + qsa->offs[thread][1] = 0.5f * BLI_thread_frand(thread); } else { /* SAMP_TYPE_HALTON */ @@ -1136,8 +1136,8 @@ static void QMC_samplePhong(float *vec, QMCSampler *qsa, int thread, int num, fl pz = pow(s[1], blur); sqr = sqrt(1.0f-pz*pz); - vec[0] = cos(phi)*sqr; - vec[1] = sin(phi)*sqr; + vec[0] = (float)(cosf(phi)*sqr); + vec[1] = (float)(sinf(phi)*sqr); vec[2] = 0.0f; } @@ -1148,8 +1148,8 @@ static void QMC_sampleRect(float *vec, QMCSampler *qsa, int thread, int num, flo QMC_getSample(s, qsa, thread, num); - vec[0] = (s[0] - 0.5) * sizex; - vec[1] = (s[1] - 0.5) * sizey; + vec[0] = (float)(s[0] - 0.5) * sizex; + vec[1] = (float)(s[1] - 0.5) * sizey; vec[2] = 0.0f; } @@ -1164,8 +1164,8 @@ static void QMC_sampleDisc(float *vec, QMCSampler *qsa, int thread, int num, flo phi = s[0]*2*M_PI; sqr = sqrt(s[1]); - vec[0] = cos(phi)*sqr* radius/2.0; - vec[1] = sin(phi)*sqr* radius/2.0; + vec[0] = cosf(phi)*sqr* radius/2.0f; + vec[1] = sinf(phi)*sqr* radius/2.0f; vec[2] = 0.0f; } @@ -1177,12 +1177,12 @@ static void QMC_sampleHemi(float *vec, QMCSampler *qsa, int thread, int num) QMC_getSample(s, qsa, thread, num); - phi = s[0]*2.f*M_PI; + phi = s[0]*2.0*M_PI; sqr = sqrt(s[1]); - vec[0] = cos(phi)*sqr; - vec[1] = sin(phi)*sqr; - vec[2] = 1.f - s[1]*s[1]; + vec[0] = cosf(phi)*sqr; + vec[1] = sinf(phi)*sqr; + vec[2] = (float)(1.0 - s[1]*s[1]); } #if 0 /* currently not used */ @@ -1272,7 +1272,7 @@ static int adaptive_sample_variance(int samples, float *col, float *colsq, float var[1] = (colsq[1] / (float)samples) - (mean[1]*mean[1]); var[2] = (colsq[2] / (float)samples) - (mean[2]*mean[2]); - if ((var[0] * 0.4 < thresh) && (var[1] * 0.3 < thresh) && (var[2] * 0.6 < thresh)) + if ((var[0] * 0.4f < thresh) && (var[1] * 0.3f < thresh) && (var[2] * 0.6f < thresh)) return 1; else return 0; @@ -1283,7 +1283,7 @@ static int adaptive_sample_contrast_val(int samples, float prev, float val, floa /* if the last sample's contribution to the total value was below a small threshold * (i.e. the samples taken are very similar), then taking more samples that are probably * going to be the same is wasting effort */ - if (fabs( prev/(float)(samples-1) - val/(float)samples ) < thresh) { + if (fabsf( prev/(float)(samples-1) - val/(float)samples ) < thresh) { return 1; } else return 0; @@ -1293,10 +1293,10 @@ static float get_avg_speed(ShadeInput *shi) { float pre_x, pre_y, post_x, post_y, speedavg; - pre_x = (shi->winspeed[0] == PASS_VECTOR_MAX)?0.0:shi->winspeed[0]; - pre_y = (shi->winspeed[1] == PASS_VECTOR_MAX)?0.0:shi->winspeed[1]; - post_x = (shi->winspeed[2] == PASS_VECTOR_MAX)?0.0:shi->winspeed[2]; - post_y = (shi->winspeed[3] == PASS_VECTOR_MAX)?0.0:shi->winspeed[3]; + pre_x = (shi->winspeed[0] == PASS_VECTOR_MAX)?0.0f:shi->winspeed[0]; + pre_y = (shi->winspeed[1] == PASS_VECTOR_MAX)?0.0f:shi->winspeed[1]; + post_x = (shi->winspeed[2] == PASS_VECTOR_MAX)?0.0f:shi->winspeed[2]; + post_y = (shi->winspeed[3] == PASS_VECTOR_MAX)?0.0f:shi->winspeed[3]; speedavg = (sqrt(pre_x*pre_x + pre_y*pre_y) + sqrt(post_x*post_x + post_y*post_y)) / 2.0; @@ -1316,7 +1316,7 @@ static void trace_refract(float *col, ShadeInput *shi, ShadeResult *shr) float v_refract[3], v_refract_new[3]; float sampcol[4], colsq[4]; - float blur = pow(1.0 - shi->mat->gloss_tra, 3); + float blur = powf(1.0f - shi->mat->gloss_tra, 3); short max_samples = shi->mat->samp_gloss_tra; float adapt_thresh = shi->mat->adapt_thresh_tra; @@ -1325,9 +1325,9 @@ static void trace_refract(float *col, ShadeInput *shi, ShadeResult *shr) colsq[0] = colsq[1] = colsq[2] = 0.0; col[0] = col[1] = col[2] = 0.0; col[3]= shr->alpha; - - if (blur > 0.0) { - if (adapt_thresh != 0.0) samp_type = SAMP_TYPE_HALTON; + + if (blur > 0.0f) { + if (adapt_thresh != 0.0f) samp_type = SAMP_TYPE_HALTON; else samp_type = SAMP_TYPE_HAMMERSLEY; /* all samples are generated per pixel */ @@ -1386,13 +1386,13 @@ static void trace_refract(float *col, ShadeInput *shi, ShadeResult *shr) samples++; /* adaptive sampling */ - if (adapt_thresh < 1.0 && samples > max_samples/2) + if (adapt_thresh < 1.0f && samples > max_samples/2) { if (adaptive_sample_variance(samples, col, colsq, adapt_thresh)) break; /* if the pixel so far is very dark, we can get away with less samples */ - if ( (col[0] + col[1] + col[2])/3.0/(float)samples < 0.01 ) + if ( (col[0] + col[1] + col[2])/3.0f/(float)samples < 0.01f ) max_samples--; } } @@ -1415,18 +1415,18 @@ static void trace_reflect(float *col, ShadeInput *shi, ShadeResult *shr, float f float v_nor_new[3], v_reflect[3]; float sampcol[4], colsq[4]; - float blur = pow(1.0 - shi->mat->gloss_mir, 3); + float blur = powf(1.0f - shi->mat->gloss_mir, 3); short max_samples = shi->mat->samp_gloss_mir; float adapt_thresh = shi->mat->adapt_thresh_mir; - float aniso = 1.0 - shi->mat->aniso_gloss_mir; + float aniso = 1.0f - shi->mat->aniso_gloss_mir; int samples=0; col[0] = col[1] = col[2] = 0.0; colsq[0] = colsq[1] = colsq[2] = 0.0; - if (blur > 0.0) { - if (adapt_thresh != 0.0) samp_type = SAMP_TYPE_HALTON; + if (blur > 0.0f) { + if (adapt_thresh != 0.0f) samp_type = SAMP_TYPE_HALTON; else samp_type = SAMP_TYPE_HAMMERSLEY; /* all samples are generated per pixel */ @@ -1485,22 +1485,22 @@ static void trace_reflect(float *col, ShadeInput *shi, ShadeResult *shr, float f samples++; /* adaptive sampling */ - if (adapt_thresh > 0.0 && samples > max_samples/3) + if (adapt_thresh > 0.0f && samples > max_samples/3) { if (adaptive_sample_variance(samples, col, colsq, adapt_thresh)) break; /* if the pixel so far is very dark, we can get away with less samples */ - if ( (col[0] + col[1] + col[2])/3.0/(float)samples < 0.01 ) + if ( (col[0] + col[1] + col[2])/3.0f/(float)samples < 0.01f ) max_samples--; /* reduce samples when reflection is dim due to low ray mirror blend value or fresnel factor * and when reflection is blurry */ - if (fresnelfac < 0.1 * (blur+1)) { + if (fresnelfac < 0.1f * (blur+1)) { max_samples--; /* even more for very dim */ - if (fresnelfac < 0.05 * (blur+1)) + if (fresnelfac < 0.05f * (blur+1)) max_samples--; } } @@ -1659,7 +1659,7 @@ static void ray_trace_shadow_tra(Isect *is, ShadeInput *origshi, int depth, int col[1] = a*col[1] + shr.alpha*shr.combined[1]; col[2] = a*col[2] + shr.alpha*shr.combined[2]; - col[3] = (1.0 - shr.alpha)*a; + col[3] = (1.0f - shr.alpha)*a; } if(depth>0 && col[3]>0.0f) { @@ -1679,7 +1679,7 @@ static void ray_trace_shadow_tra(Isect *is, ShadeInput *origshi, int depth, int /* not used, test function for ambient occlusion (yaf: pathlight) */ /* main problem; has to be called within shading loop, giving unwanted recursion */ -static int ray_trace_shadow_rad(ShadeInput *ship, ShadeResult *shr) +static int UNUSED_FUNCTION(ray_trace_shadow_rad)(ShadeInput *ship, ShadeResult *shr) { static int counter=0, only_one= 0; extern float hashvectf[]; @@ -1758,8 +1758,8 @@ static void RandomSpherical(float *v) if ((r = 1.f - v[2]*v[2])>0.f) { float a = 6.283185307f*BLI_frand(); r = sqrt(r); - v[0] = r * cos(a); - v[1] = r * sin(a); + v[0] = r * cosf(a); + v[1] = r * sinf(a); } else v[2] = 1.f; } @@ -1956,7 +1956,7 @@ static void ray_ao_qmc(ShadeInput *shi, float *ao, float *env) float speedfac; speedfac = get_avg_speed(shi) * adapt_speed_fac; - CLAMP(speedfac, 1.0, 1000.0); + CLAMP(speedfac, 1.0f, 1000.0f); max_samples /= speedfac; if (max_samples < 5) max_samples = 5; @@ -1985,7 +1985,7 @@ static void ray_ao_qmc(ShadeInput *shi, float *ao, float *env) prev = fac; if(RE_rayobject_raycast(R.raytree, &isec)) { - if (R.wrld.aomode & WO_AODIST) fac+= exp(-isec.dist*R.wrld.aodistfac); + if (R.wrld.aomode & WO_AODIST) fac+= expf(-isec.dist*R.wrld.aodistfac); else fac+= 1.0f; } else if(envcolor!=WO_AOPLAIN) { @@ -1998,7 +1998,7 @@ static void ray_ao_qmc(ShadeInput *shi, float *ao, float *env) normalize_v3(view); if(envcolor==WO_AOSKYCOL) { - skyfac= 0.5*(1.0f+view[0]*R.grvec[0]+ view[1]*R.grvec[1]+ view[2]*R.grvec[2]); + skyfac= 0.5f*(1.0f+view[0]*R.grvec[0]+ view[1]*R.grvec[1]+ view[2]*R.grvec[2]); env[0]+= (1.0f-skyfac)*R.wrld.horr + skyfac*R.wrld.zenr; env[1]+= (1.0f-skyfac)*R.wrld.horg + skyfac*R.wrld.zeng; env[2]+= (1.0f-skyfac)*R.wrld.horb + skyfac*R.wrld.zenb; @@ -2017,7 +2017,7 @@ static void ray_ao_qmc(ShadeInput *shi, float *ao, float *env) if (qsa->type == SAMP_TYPE_HALTON) { /* adaptive sampling - consider samples below threshold as in shadow (or vice versa) and exit early */ - if (adapt_thresh > 0.0 && (samples > max_samples/2) ) { + if (adapt_thresh > 0.0f && (samples > max_samples/2) ) { if (adaptive_sample_contrast_val(samples, prev, fac, adapt_thresh)) { break; @@ -2123,7 +2123,7 @@ static void ray_ao_spheresamp(ShadeInput *shi, float *ao, float *env) /* do the trace */ if(RE_rayobject_raycast(R.raytree, &isec)) { - if (R.wrld.aomode & WO_AODIST) sh+= exp(-isec.dist*R.wrld.aodistfac); + if (R.wrld.aomode & WO_AODIST) sh+= expf(-isec.dist*R.wrld.aodistfac); else sh+= 1.0f; } else if(envcolor!=WO_AOPLAIN) { @@ -2136,7 +2136,7 @@ static void ray_ao_spheresamp(ShadeInput *shi, float *ao, float *env) normalize_v3(view); if(envcolor==WO_AOSKYCOL) { - fac= 0.5*(1.0f+view[0]*R.grvec[0]+ view[1]*R.grvec[1]+ view[2]*R.grvec[2]); + fac= 0.5f*(1.0f+view[0]*R.grvec[0]+ view[1]*R.grvec[1]+ view[2]*R.grvec[2]); env[0]+= (1.0f-fac)*R.wrld.horr + fac*R.wrld.zenr; env[1]+= (1.0f-fac)*R.wrld.horg + fac*R.wrld.zeng; env[2]+= (1.0f-fac)*R.wrld.horb + fac*R.wrld.zenb; @@ -2367,14 +2367,14 @@ static void ray_shadow_qmc(ShadeInput *shi, LampRen *lar, float *lampco, float * if (lar->ray_samp_method == LA_SAMP_HALTON) { /* adaptive sampling - consider samples below threshold as in shadow (or vice versa) and exit early */ - if ((max_samples > min_adapt_samples) && (adapt_thresh > 0.0) && (samples > max_samples / 3)) { + if ((max_samples > min_adapt_samples) && (adapt_thresh > 0.0f) && (samples > max_samples / 3)) { if (isec->mode==RE_RAY_SHADOW_TRA) { - if ((shadfac[3] / samples > (1.0-adapt_thresh)) || (shadfac[3] / samples < adapt_thresh)) + if ((shadfac[3] / samples > (1.0f-adapt_thresh)) || (shadfac[3] / samples < adapt_thresh)) break; else if (adaptive_sample_variance(samples, shadfac, colsq, adapt_thresh)) break; } else { - if ((fac / samples > (1.0-adapt_thresh)) || (fac / samples < adapt_thresh)) + if ((fac / samples > (1.0f-adapt_thresh)) || (fac / samples < adapt_thresh)) break; } } diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c index 5aad055a8f6..a4c1778c624 100644 --- a/source/blender/render/intern/source/render_texture.c +++ b/source/blender/render/intern/source/render_texture.c @@ -175,9 +175,9 @@ static void tex_normal_derivate(Tex *tex, TexResult *texres) do_colorband(tex->coba, texres->nor[2], col); fac3= (col[0]+col[1]+col[2]); - texres->nor[0]= 0.3333*(fac0 - fac1); - texres->nor[1]= 0.3333*(fac0 - fac2); - texres->nor[2]= 0.3333*(fac0 - fac3); + texres->nor[0]= 0.3333f*(fac0 - fac1); + texres->nor[1]= 0.3333f*(fac0 - fac2); + texres->nor[2]= 0.3333f*(fac0 - fac3); return; } @@ -203,31 +203,31 @@ static int blend(Tex *tex, float *texvec, TexResult *texres) } if(tex->stype==TEX_LIN) { /* lin */ - texres->tin= (1.0+x)/2.0; + texres->tin= (1.0f+x)/2.0f; } else if(tex->stype==TEX_QUAD) { /* quad */ - texres->tin= (1.0+x)/2.0; - if(texres->tin<0.0) texres->tin= 0.0; + texres->tin= (1.0f+x)/2.0f; + if(texres->tin<0.0f) texres->tin= 0.0f; else texres->tin*= texres->tin; } else if(tex->stype==TEX_EASE) { /* ease */ - texres->tin= (1.0+x)/2.0; - if(texres->tin<=.0) texres->tin= 0.0; - else if(texres->tin>=1.0) texres->tin= 1.0; + texres->tin= (1.0f+x)/2.0f; + if(texres->tin<=0.0f) texres->tin= 0.0f; + else if(texres->tin>=1.0f) texres->tin= 1.0f; else { t= texres->tin*texres->tin; - texres->tin= (3.0*t-2.0*t*texres->tin); + texres->tin= (3.0f*t-2.0f*t*texres->tin); } } else if(tex->stype==TEX_DIAG) { /* diag */ - texres->tin= (2.0+x+y)/4.0; + texres->tin= (2.0f+x+y)/4.0f; } else if(tex->stype==TEX_RAD) { /* radial */ texres->tin= (atan2(y,x) / (2*M_PI) + 0.5); } else { /* sphere TEX_SPHERE */ texres->tin= 1.0-sqrt(x*x+ y*y+texvec[2]*texvec[2]); - if(texres->tin<0.0) texres->tin= 0.0; + if(texres->tin<0.0f) texres->tin= 0.0f; if(tex->stype==TEX_HALO) texres->tin*= texres->tin; /* halo */ } @@ -299,7 +299,7 @@ static float tex_tri(float a) const float b = 2*M_PI; const float rmax = 1.0; - a = rmax - 2.0*fabs(floor((a*(1.0/b))+0.5) - (a*(1.0/b))); + a = rmax - 2.0f*fabsf(floorf((a*(1.0f/b))+0.5f) - (a*(1.0f/b))); return a; } @@ -319,18 +319,18 @@ static float wood_int(Tex *tex, float x, float y, float z) if ((wf>TEX_TRI) || (wfturbul*BLI_gNoise(tex->noisesize, x, y, z, (tex->noisetype!=TEX_NOISESOFT), tex->noisebasis); - wi = waveform[wf]((x + y + z)*10.0 + wi); + wi = waveform[wf]((x + y + z)*10.0f + wi); } else if (wt==TEX_RINGNOISE) { wi = tex->turbul*BLI_gNoise(tex->noisesize, x, y, z, (tex->noisetype!=TEX_NOISESOFT), tex->noisebasis); - wi = waveform[wf](sqrt(x*x + y*y + z*z)*20.0 + wi); + wi = waveform[wf](sqrt(x*x + y*y + z*z)*20.0f + wi); } return wi; @@ -370,7 +370,7 @@ static float marble_int(Tex *tex, float x, float y, float z) if ((wf>TEX_TRI) || (wfturbul * BLI_gTurbulence(tex->noisesize, x, y, z, tex->noisedepth, (tex->noisetype!=TEX_NOISESOFT), tex->noisebasis); @@ -417,11 +417,11 @@ static int magic(Tex *tex, float *texvec, TexResult *texres) int n; n= tex->noisedepth; - turb= tex->turbul/5.0; + turb= tex->turbul/5.0f; - x= sin( ( texvec[0]+texvec[1]+texvec[2])*5.0 ); - y= cos( (-texvec[0]+texvec[1]-texvec[2])*5.0 ); - z= -cos( (-texvec[0]-texvec[1]+texvec[2])*5.0 ); + x= sin( ( texvec[0]+texvec[1]+texvec[2])*5.0f ); + y= cos( (-texvec[0]+texvec[1]-texvec[2])*5.0f ); + z= -cos( (-texvec[0]-texvec[1]+texvec[2])*5.0f ); if(n>0) { x*= turb; y*= turb; @@ -466,17 +466,17 @@ static int magic(Tex *tex, float *texvec, TexResult *texres) } } - if(turb!=0.0) { - turb*= 2.0; + if(turb!=0.0f) { + turb*= 2.0f; x/= turb; y/= turb; z/= turb; } - texres->tr= 0.5-x; - texres->tg= 0.5-y; - texres->tb= 0.5-z; + texres->tr= 0.5f-x; + texres->tg= 0.5f-y; + texres->tb= 0.5f-z; - texres->tin= 0.3333*(texres->tr+texres->tg+texres->tb); + texres->tin= 0.3333f*(texres->tr+texres->tg+texres->tb); BRICONTRGB; texres->ta= 1.0; @@ -494,7 +494,7 @@ static int stucci(Tex *tex, float *texvec, TexResult *texres) b2= BLI_gNoise(tex->noisesize, texvec[0], texvec[1], texvec[2], (tex->noisetype!=TEX_NOISESOFT), tex->noisebasis); - ofs= tex->turbul/200.0; + ofs= tex->turbul/200.0f; if(tex->stype) ofs*=(b2*b2); nor[0] = BLI_gNoise(tex->noisesize, texvec[0]+ofs, texvec[1], texvec[2], (tex->noisetype!=TEX_NOISESOFT), tex->noisebasis); @@ -732,7 +732,7 @@ static int texnoise(Tex *tex, TexResult *texres) while(loop--) { ran= (ran>>2); val*= (ran & 3); - div*= 3.0; + div*= 3.0f; } texres->tin= ((float)val)/div; @@ -829,18 +829,18 @@ static int cubemap_glob(float *n, float x, float y, float z, float *adr1, float z1= fabs(nor[2]); if(z1>=x1 && z1>=y1) { - *adr1 = (x + 1.0) / 2.0; - *adr2 = (y + 1.0) / 2.0; + *adr1 = (x + 1.0f) / 2.0f; + *adr2 = (y + 1.0f) / 2.0f; ret= 0; } else if(y1>=x1 && y1>=z1) { - *adr1 = (x + 1.0) / 2.0; - *adr2 = (z + 1.0) / 2.0; + *adr1 = (x + 1.0f) / 2.0f; + *adr2 = (z + 1.0f) / 2.0f; ret= 1; } else { - *adr1 = (y + 1.0) / 2.0; - *adr2 = (z + 1.0) / 2.0; + *adr1 = (y + 1.0f) / 2.0f; + *adr2 = (z + 1.0f) / 2.0f; ret= 2; } return ret; @@ -884,17 +884,17 @@ static int cubemap(MTex *mtex, VlakRen *vlr, float *n, float x, float y, float z } if(vlr->puno & proj[1]) { - *adr1 = (x + 1.0) / 2.0; - *adr2 = (y + 1.0) / 2.0; + *adr1 = (x + 1.0f) / 2.0f; + *adr2 = (y + 1.0f) / 2.0f; } else if(vlr->puno & proj[2]) { - *adr1 = (x + 1.0) / 2.0; - *adr2 = (z + 1.0) / 2.0; + *adr1 = (x + 1.0f) / 2.0f; + *adr2 = (z + 1.0f) / 2.0f; ret= 1; } else { - *adr1 = (y + 1.0) / 2.0; - *adr2 = (z + 1.0) / 2.0; + *adr1 = (y + 1.0f) / 2.0f; + *adr2 = (z + 1.0f) / 2.0f; ret= 2; } } @@ -922,18 +922,18 @@ static int cubemap_ob(Object *ob, float *n, float x, float y, float z, float *ad z1= fabs(nor[2]); if(z1>=x1 && z1>=y1) { - *adr1 = (x + 1.0) / 2.0; - *adr2 = (y + 1.0) / 2.0; + *adr1 = (x + 1.0f) / 2.0f; + *adr2 = (y + 1.0f) / 2.0f; ret= 0; } else if(y1>=x1 && y1>=z1) { - *adr1 = (x + 1.0) / 2.0; - *adr2 = (z + 1.0) / 2.0; + *adr1 = (x + 1.0f) / 2.0f; + *adr2 = (z + 1.0f) / 2.0f; ret= 1; } else { - *adr1 = (y + 1.0) / 2.0; - *adr2 = (z + 1.0) / 2.0; + *adr1 = (y + 1.0f) / 2.0f; + *adr2 = (z + 1.0f) / 2.0f; ret= 2; } return ret; @@ -957,8 +957,8 @@ static void do_2d_mapping(MTex *mtex, float *t, VlakRen *vlr, float *n, float *d if(R.osa==0) { if(wrap==MTEX_FLAT) { - fx = (t[0] + 1.0) / 2.0; - fy = (t[1] + 1.0) / 2.0; + fx = (t[0] + 1.0f) / 2.0f; + fy = (t[1] + 1.0f) / 2.0f; } else if(wrap==MTEX_TUBE) map_to_tube( &fx, &fy,t[0], t[1], t[2]); else if(wrap==MTEX_SPHERE) map_to_sphere( &fx, &fy,t[0], t[1], t[2]); @@ -973,34 +973,34 @@ static void do_2d_mapping(MTex *mtex, float *t, VlakRen *vlr, float *n, float *d if(tex->xrepeat>1) { float origf= fx *= tex->xrepeat; - if(fx>1.0) fx -= (int)(fx); - else if(fx<0.0) fx+= 1-(int)(fx); + if(fx>1.0f) fx -= (int)(fx); + else if(fx<0.0f) fx+= 1-(int)(fx); if(tex->flag & TEX_REPEAT_XMIR) { int orig= (int)floor(origf); if(orig & 1) - fx= 1.0-fx; + fx= 1.0f-fx; } } if(tex->yrepeat>1) { float origf= fy *= tex->yrepeat; - if(fy>1.0) fy -= (int)(fy); - else if(fy<0.0) fy+= 1-(int)(fy); + if(fy>1.0f) fy -= (int)(fy); + else if(fy<0.0f) fy+= 1-(int)(fy); if(tex->flag & TEX_REPEAT_YMIR) { int orig= (int)floor(origf); if(orig & 1) - fy= 1.0-fy; + fy= 1.0f-fy; } } } /* crop */ - if(tex->cropxmin!=0.0 || tex->cropxmax!=1.0) { + if(tex->cropxmin!=0.0f || tex->cropxmax!=1.0f) { fac1= tex->cropxmax - tex->cropxmin; fx= tex->cropxmin+ fx*fac1; } - if(tex->cropymin!=0.0 || tex->cropymax!=1.0) { + if(tex->cropymin!=0.0f || tex->cropymax!=1.0f) { fac1= tex->cropymax - tex->cropymin; fy= tex->cropymin+ fy*fac1; } @@ -1011,23 +1011,23 @@ static void do_2d_mapping(MTex *mtex, float *t, VlakRen *vlr, float *n, float *d else { if(wrap==MTEX_FLAT) { - fx= (t[0] + 1.0) / 2.0; - fy= (t[1] + 1.0) / 2.0; - dxt[0]/= 2.0; - dxt[1]/= 2.0; - dxt[2]/= 2.0; - dyt[0]/= 2.0; - dyt[1]/= 2.0; - dyt[2]/= 2.0; + fx= (t[0] + 1.0f) / 2.0f; + fy= (t[1] + 1.0f) / 2.0f; + dxt[0]/= 2.0f; + dxt[1]/= 2.0f; + dxt[2]/= 2.0f; + dyt[0]/= 2.0f; + dyt[1]/= 2.0f; + dyt[2]/= 2.0f; } else if ELEM(wrap, MTEX_TUBE, MTEX_SPHERE) { /* exception: the seam behind (y<0.0) */ ok= 1; - if(t[1]<=0.0) { + if(t[1]<=0.0f) { fx= t[0]+dxt[0]; fy= t[0]+dyt[0]; - if(fx>=0.0 && fy>=0.0 && t[0]>=0.0); - else if(fx<=0.0 && fy<=0.0 && t[0]<=0.0); + if(fx>=0.0f && fy>=0.0f && t[0]>=0.0f); + else if(fx<=0.0f && fy<=0.0f && t[0]<=0.0f); else ok= 0; } if(ok) { @@ -1046,10 +1046,10 @@ static void do_2d_mapping(MTex *mtex, float *t, VlakRen *vlr, float *n, float *d else { if(wrap==MTEX_TUBE) map_to_tube( &fx, &fy,t[0], t[1], t[2]); else map_to_sphere( &fx, &fy,t[0], t[1], t[2]); - dxt[0]/= 2.0; - dxt[1]/= 2.0; - dyt[0]/= 2.0; - dyt[1]/= 2.0; + dxt[0]/= 2.0f; + dxt[1]/= 2.0f; + dyt[0]/= 2.0f; + dyt[1]/= 2.0f; } } else { @@ -1143,13 +1143,13 @@ static void do_2d_mapping(MTex *mtex, float *t, VlakRen *vlr, float *n, float *d } /* crop */ - if(tex->cropxmin!=0.0 || tex->cropxmax!=1.0) { + if(tex->cropxmin!=0.0f || tex->cropxmax!=1.0f) { fac1= tex->cropxmax - tex->cropxmin; fx= tex->cropxmin+ fx*fac1; dxt[0]*= fac1; dyt[0]*= fac1; } - if(tex->cropymin!=0.0 || tex->cropymax!=1.0) { + if(tex->cropymin!=0.0f || tex->cropymax!=1.0f) { fac1= tex->cropymax - tex->cropymin; fy= tex->cropymin+ fy*fac1; dxt[1]*= fac1; @@ -1220,7 +1220,7 @@ static int multitex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, * artificer: added the use of tmpvec to avoid scaling texvec */ VECCOPY(tmpvec, texvec); - mul_v3_fl(tmpvec, 1.0/tex->noisesize); + mul_v3_fl(tmpvec, 1.0f/tex->noisesize); switch(tex->stype) { case TEX_MFRACTAL: @@ -1242,7 +1242,7 @@ static int multitex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, * artificer: added the use of tmpvec to avoid scaling texvec */ VECCOPY(tmpvec, texvec); - mul_v3_fl(tmpvec, 1.0/tex->noisesize); + mul_v3_fl(tmpvec, 1.0f/tex->noisesize); retval= voronoiTex(tex, tmpvec, texres); break; @@ -1251,7 +1251,7 @@ static int multitex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, * artificer: added the use of tmpvec to avoid scaling texvec */ VECCOPY(tmpvec, texvec); - mul_v3_fl(tmpvec, 1.0/tex->noisesize); + mul_v3_fl(tmpvec, 1.0f/tex->noisesize); retval= mg_distNoiseTex(tex, tmpvec, texres); break; @@ -1381,7 +1381,7 @@ void texture_rgb_blend(float *in, float *tex, float *out, float fact, float facg switch(blendtype) { case MTEX_BLEND: fact*= facg; - facm= 1.0-fact; + facm= 1.0f-fact; in[0]= (fact*tex[0] + facm*out[0]); in[1]= (fact*tex[1] + facm*out[1]); @@ -1390,7 +1390,7 @@ void texture_rgb_blend(float *in, float *tex, float *out, float fact, float facg case MTEX_MUL: fact*= facg; - facm= 1.0-facg; + facm= 1.0f-facg; in[0]= (facm+fact*tex[0])*out[0]; in[1]= (facm+fact*tex[1])*out[1]; in[2]= (facm+fact*tex[2])*out[2]; @@ -1398,28 +1398,28 @@ void texture_rgb_blend(float *in, float *tex, float *out, float fact, float facg case MTEX_SCREEN: fact*= facg; - facm= 1.0-facg; - in[0]= 1.0 - (facm+fact*(1.0-tex[0])) * (1.0-out[0]); - in[1]= 1.0 - (facm+fact*(1.0-tex[1])) * (1.0-out[1]); - in[2]= 1.0 - (facm+fact*(1.0-tex[2])) * (1.0-out[2]); + facm= 1.0f-facg; + in[0]= 1.0f - (facm+fact*(1.0f-tex[0])) * (1.0f-out[0]); + in[1]= 1.0f - (facm+fact*(1.0f-tex[1])) * (1.0f-out[1]); + in[2]= 1.0f - (facm+fact*(1.0f-tex[2])) * (1.0f-out[2]); break; case MTEX_OVERLAY: fact*= facg; - facm= 1.0-facg; + facm= 1.0f-facg; if(out[0] < 0.5f) in[0] = out[0] * (facm + 2.0f*fact*tex[0]); else - in[0] = 1.0f - (facm + 2.0f*fact*(1.0 - tex[0])) * (1.0 - out[0]); + in[0] = 1.0f - (facm + 2.0f*fact*(1.0f - tex[0])) * (1.0f - out[0]); if(out[1] < 0.5f) in[1] = out[1] * (facm + 2.0f*fact*tex[1]); else - in[1] = 1.0f - (facm + 2.0f*fact*(1.0 - tex[1])) * (1.0 - out[1]); + in[1] = 1.0f - (facm + 2.0f*fact*(1.0f - tex[1])) * (1.0f - out[1]); if(out[2] < 0.5f) in[2] = out[2] * (facm + 2.0f*fact*tex[2]); else - in[2] = 1.0f - (facm + 2.0f*fact*(1.0 - tex[2])) * (1.0 - out[2]); + in[2] = 1.0f - (facm + 2.0f*fact*(1.0f - tex[2])) * (1.0f - out[2]); break; case MTEX_SUB: @@ -1433,20 +1433,20 @@ void texture_rgb_blend(float *in, float *tex, float *out, float fact, float facg case MTEX_DIV: fact*= facg; - facm= 1.0-fact; + facm= 1.0f-fact; - if(tex[0]!=0.0) + if(tex[0]!=0.0f) in[0]= facm*out[0] + fact*out[0]/tex[0]; - if(tex[1]!=0.0) + if(tex[1]!=0.0f) in[1]= facm*out[1] + fact*out[1]/tex[1]; - if(tex[2]!=0.0) + if(tex[2]!=0.0f) in[2]= facm*out[2] + fact*out[2]/tex[2]; break; case MTEX_DIFF: fact*= facg; - facm= 1.0-fact; + facm= 1.0f-fact; in[0]= facm*out[0] + fact*fabs(tex[0]-out[0]); in[1]= facm*out[1] + fact*fabs(tex[1]-out[1]); in[2]= facm*out[2] + fact*fabs(tex[2]-out[2]); @@ -1454,7 +1454,7 @@ void texture_rgb_blend(float *in, float *tex, float *out, float fact, float facg case MTEX_DARK: fact*= facg; - facm= 1.0-fact; + facm= 1.0f-fact; col= tex[0]+((1-tex[0])*facm); if(col < out[0]) in[0]= col; else in[0]= out[0]; @@ -1516,7 +1516,7 @@ float texture_value_blend(float tex, float out, float fact, float facg, int blen facg= fabsf(facg); fact*= facg; - facm= 1.0-fact; + facm= 1.0f-fact; if(flip) SWAP(float, fact, facm); switch(blendtype) { @@ -1525,21 +1525,21 @@ float texture_value_blend(float tex, float out, float fact, float facg, int blen break; case MTEX_MUL: - facm= 1.0-facg; + facm= 1.0f-facg; in= (facm+fact*tex)*out; break; case MTEX_SCREEN: - facm= 1.0-facg; - in= 1.0-(facm+fact*(1.0-tex))*(1.0-out); + facm= 1.0f-facg; + in= 1.0f-(facm+fact*(1.0f-tex))*(1.0f-out); break; case MTEX_OVERLAY: - facm= 1.0-facg; + facm= 1.0f-facg; if(out < 0.5f) in = out * (facm + 2.0f*fact*tex); else - in = 1.0f - (facm + 2.0f*fact*(1.0 - tex)) * (1.0 - out); + in = 1.0f - (facm + 2.0f*fact*(1.0f - tex)) * (1.0f - out); break; case MTEX_SUB: @@ -1549,7 +1549,7 @@ float texture_value_blend(float tex, float out, float fact, float facg, int blen break; case MTEX_DIV: - if(tex!=0.0) + if(tex!=0.0f) in= facm*out + fact*out/tex; break; @@ -1568,15 +1568,15 @@ float texture_value_blend(float tex, float out, float fact, float facg, int blen break; case MTEX_SOFT_LIGHT: - scf=1.0 - (1.0 - tex) * (1.0 - out); - in= facm*out + fact * ((1.0 - out) * tex * out) + (out * scf); + scf=1.0f - (1.0f - tex) * (1.0f - out); + in= facm*out + fact * ((1.0f - out) * tex * out) + (out * scf); break; case MTEX_LIN_LIGHT: - if (tex > 0.5) - in = out + fact*(2*(tex - 0.5)); + if (tex > 0.5f) + in = out + fact*(2.0f*(tex - 0.5f)); else - in = out + fact*(2*tex - 1); + in = out + fact*(2.0f*tex - 1.0f); break; } @@ -1905,11 +1905,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; @@ -1929,8 +1931,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; @@ -2087,11 +2112,11 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T // crazy hack solution that gives results similar to normal mapping - part 2 float vec[2]; - vec[0] = tex->ima->gen_x*dxt[0]; - vec[1] = tex->ima->gen_y*dxt[1]; + vec[0] = dimx*dxt[0]; + vec[1] = dimy*dxt[1]; dHdx *= 1.0f/len_v2(vec); - vec[0] = tex->ima->gen_x*dyt[0]; - vec[1] = tex->ima->gen_y*dyt[1]; + vec[0] = dimx*dyt[0]; + vec[1] = dimy*dyt[1]; dHdy *= 1.0f/len_v2(vec); } } @@ -2119,7 +2144,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); @@ -2139,8 +2164,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) { @@ -2289,16 +2315,16 @@ void do_material_tex(ShadeInput *shi) /* texture output */ if( (rgbnor & TEX_RGB) && (mtex->texflag & MTEX_RGBTOINT)) { - texres.tin= (0.35*texres.tr+0.45*texres.tg+0.2*texres.tb); + texres.tin= (0.35f*texres.tr+0.45f*texres.tg+0.2f*texres.tb); rgbnor-= TEX_RGB; } if(mtex->texflag & MTEX_NEGATIVE) { if(rgbnor & TEX_RGB) { - texres.tr= 1.0-texres.tr; - texres.tg= 1.0-texres.tg; - texres.tb= 1.0-texres.tb; + texres.tr= 1.0f-texres.tr; + texres.tg= 1.0f-texres.tg; + texres.tb= 1.0f-texres.tb; } - texres.tin= 1.0-texres.tin; + texres.tin= 1.0f-texres.tin; } if(mtex->texflag & MTEX_STENCIL) { if(rgbnor & TEX_RGB) { @@ -2325,8 +2351,8 @@ void do_material_tex(ShadeInput *shi) texres.nor[2]= texres.tb; } else { - float co_nor= 0.5*cos(texres.tin-0.5); - float si= 0.5*sin(texres.tin-0.5); + float co_nor= 0.5*cos(texres.tin-0.5f); + float si= 0.5*sin(texres.tin-0.5f); float f1, f2; f1= shi->vn[0]; @@ -2412,7 +2438,7 @@ void do_material_tex(ShadeInput *shi) // exception for envmap only if(tex->type==TEX_ENVMAP && mtex->blendtype==MTEX_BLEND) { fact= texres.tin*mirrfac; - facm= 1.0- fact; + facm= 1.0f- fact; shi->refcol[0]= fact + facm*shi->refcol[0]; shi->refcol[1]= fact*tcol[0] + facm*shi->refcol[1]; shi->refcol[2]= fact*tcol[1] + facm*shi->refcol[2]; @@ -2557,65 +2583,65 @@ void do_material_tex(ShadeInput *shi) if(rgbnor & TEX_RGB) { if(texres.talpha) texres.tin= texres.ta; - else texres.tin= (0.35*texres.tr+0.45*texres.tg+0.2*texres.tb); + else texres.tin= (0.35f*texres.tr+0.45f*texres.tg+0.2f*texres.tb); } if(mtex->mapto & MAP_REF) { float difffac= mtex->difffac*stencilTin; shi->refl= texture_value_blend(mtex->def_var, shi->refl, texres.tin, difffac, mtex->blendtype); - if(shi->refl<0.0) shi->refl= 0.0; + if(shi->refl<0.0f) shi->refl= 0.0f; } if(mtex->mapto & MAP_SPEC) { float specfac= mtex->specfac*stencilTin; shi->spec= texture_value_blend(mtex->def_var, shi->spec, texres.tin, specfac, mtex->blendtype); - if(shi->spec<0.0) shi->spec= 0.0; + if(shi->spec<0.0f) shi->spec= 0.0f; } if(mtex->mapto & MAP_EMIT) { float emitfac= mtex->emitfac*stencilTin; shi->emit= texture_value_blend(mtex->def_var, shi->emit, texres.tin, emitfac, mtex->blendtype); - if(shi->emit<0.0) shi->emit= 0.0; + if(shi->emit<0.0f) shi->emit= 0.0f; } if(mtex->mapto & MAP_ALPHA) { float alphafac= mtex->alphafac*stencilTin; shi->alpha= texture_value_blend(mtex->def_var, shi->alpha, texres.tin, alphafac, mtex->blendtype); - if(shi->alpha<0.0) shi->alpha= 0.0; - else if(shi->alpha>1.0) shi->alpha= 1.0; + if(shi->alpha<0.0f) shi->alpha= 0.0f; + else if(shi->alpha>1.0f) shi->alpha= 1.0f; } if(mtex->mapto & MAP_HAR) { float har; // have to map to 0-1 float hardfac= mtex->hardfac*stencilTin; - har= ((float)shi->har)/128.0; - har= 128.0*texture_value_blend(mtex->def_var, har, texres.tin, hardfac, mtex->blendtype); + har= ((float)shi->har)/128.0f; + har= 128.0f*texture_value_blend(mtex->def_var, har, texres.tin, hardfac, mtex->blendtype); - if(har<1.0) shi->har= 1; - else if(har>511.0) shi->har= 511; + if(har<1.0f) shi->har= 1; + else if(har>511) shi->har= 511; else shi->har= (int)har; } if(mtex->mapto & MAP_RAYMIRR) { float raymirrfac= mtex->raymirrfac*stencilTin; shi->ray_mirror= texture_value_blend(mtex->def_var, shi->ray_mirror, texres.tin, raymirrfac, mtex->blendtype); - if(shi->ray_mirror<0.0) shi->ray_mirror= 0.0; - else if(shi->ray_mirror>1.0) shi->ray_mirror= 1.0; + if(shi->ray_mirror<0.0f) shi->ray_mirror= 0.0f; + else if(shi->ray_mirror>1.0f) shi->ray_mirror= 1.0f; } if(mtex->mapto & MAP_TRANSLU) { float translfac= mtex->translfac*stencilTin; shi->translucency= texture_value_blend(mtex->def_var, shi->translucency, texres.tin, translfac, mtex->blendtype); - if(shi->translucency<0.0) shi->translucency= 0.0; - else if(shi->translucency>1.0) shi->translucency= 1.0; + if(shi->translucency<0.0f) shi->translucency= 0.0f; + else if(shi->translucency>1.0f) shi->translucency= 1.0f; } if(mtex->mapto & MAP_AMB) { float ambfac= mtex->ambfac*stencilTin; shi->amb= texture_value_blend(mtex->def_var, shi->amb, texres.tin, ambfac, mtex->blendtype); - if(shi->amb<0.0) shi->amb= 0.0; - else if(shi->amb>1.0) shi->amb= 1.0; + if(shi->amb<0.0f) shi->amb= 0.0f; + else if(shi->amb>1.0f) shi->amb= 1.0f; shi->ambr= shi->amb*R.wrld.ambr; shi->ambg= shi->amb*R.wrld.ambg; @@ -2711,16 +2737,16 @@ void do_volume_tex(ShadeInput *shi, float *xyz, int mapto_flag, float *col, floa /* texture output */ if( (rgbnor & TEX_RGB) && (mtex->texflag & MTEX_RGBTOINT)) { - texres.tin= (0.35*texres.tr+0.45*texres.tg+0.2*texres.tb); + texres.tin= (0.35f*texres.tr+0.45f*texres.tg+0.2f*texres.tb); rgbnor-= TEX_RGB; } if(mtex->texflag & MTEX_NEGATIVE) { if(rgbnor & TEX_RGB) { - texres.tr= 1.0-texres.tr; - texres.tg= 1.0-texres.tg; - texres.tb= 1.0-texres.tb; + texres.tr= 1.0f-texres.tr; + texres.tg= 1.0f-texres.tg; + texres.tb= 1.0f-texres.tb; } - texres.tin= 1.0-texres.tin; + texres.tin= 1.0f-texres.tin; } if(mtex->texflag & MTEX_STENCIL) { if(rgbnor & TEX_RGB) { @@ -2777,7 +2803,7 @@ void do_volume_tex(ShadeInput *shi, float *xyz, int mapto_flag, float *col, floa if (!(rgbnor & TEX_INT)) { if (rgbnor & TEX_RGB) { if(texres.talpha) texres.tin= texres.ta; - else texres.tin= (0.35*texres.tr+0.45*texres.tg+0.2*texres.tb); + else texres.tin= (0.35f*texres.tr+0.45f*texres.tg+0.2f*texres.tb); } } @@ -2785,25 +2811,25 @@ void do_volume_tex(ShadeInput *shi, float *xyz, int mapto_flag, float *col, floa float emitfac= mtex->emitfac*stencilTin; *val = texture_value_blend(mtex->def_var, *val, texres.tin, emitfac, mtex->blendtype); - if(*val<0.0) *val= 0.0; + if(*val<0.0f) *val= 0.0f; } if((mapto_flag & MAP_DENSITY) && (mtex->mapto & MAP_DENSITY)) { float densfac= mtex->densfac*stencilTin; *val = texture_value_blend(mtex->def_var, *val, texres.tin, densfac, mtex->blendtype); - CLAMP(*val, 0.0, 1.0); + CLAMP(*val, 0.0f, 1.0f); } if((mapto_flag & MAP_SCATTERING) && (mtex->mapto & MAP_SCATTERING)) { float scatterfac= mtex->scatterfac*stencilTin; *val = texture_value_blend(mtex->def_var, *val, texres.tin, scatterfac, mtex->blendtype); - CLAMP(*val, 0.0, 1.0); + CLAMP(*val, 0.0f, 1.0f); } if((mapto_flag & MAP_REFLECTION) && (mtex->mapto & MAP_REFLECTION)) { float reflfac= mtex->reflfac*stencilTin; *val = texture_value_blend(mtex->def_var, *val, texres.tin, reflfac, mtex->blendtype); - CLAMP(*val, 0.0, 1.0); + CLAMP(*val, 0.0f, 1.0f); } } } @@ -2847,7 +2873,7 @@ void do_halo_tex(HaloRen *har, float xn, float yn, float *colf) if(osatex) { - dx= 1.0/har->rad; + dx= 1.0f/har->rad; if(mtex->projx) { dxt[0]= mtex->size[0]*dx; @@ -2875,16 +2901,16 @@ void do_halo_tex(HaloRen *har, float xn, float yn, float *colf) /* texture output */ if(rgb && (mtex->texflag & MTEX_RGBTOINT)) { - texres.tin= (0.35*texres.tr+0.45*texres.tg+0.2*texres.tb); + texres.tin= (0.35f*texres.tr+0.45f*texres.tg+0.2f*texres.tb); rgb= 0; } if(mtex->texflag & MTEX_NEGATIVE) { if(rgb) { - texres.tr= 1.0-texres.tr; - texres.tg= 1.0-texres.tg; - texres.tb= 1.0-texres.tb; + texres.tr= 1.0f-texres.tr; + texres.tg= 1.0f-texres.tg; + texres.tb= 1.0f-texres.tb; } - else texres.tin= 1.0-texres.tin; + else texres.tin= 1.0f-texres.tin; } /* mapping */ @@ -2911,10 +2937,10 @@ void do_halo_tex(HaloRen *har, float xn, float yn, float *colf) } fact= texres.tin*mtex->colfac; - facm= 1.0-fact; + facm= 1.0f-fact; if(mtex->blendtype==MTEX_MUL) { - facm= 1.0-mtex->colfac; + facm= 1.0f-mtex->colfac; } if(mtex->blendtype==MTEX_SUB) fact= -fact; @@ -2934,15 +2960,15 @@ void do_halo_tex(HaloRen *har, float xn, float yn, float *colf) colf[1]= (fact*texres.tg + har->g); colf[2]= (fact*texres.tb + har->b); - CLAMP(colf[0], 0.0, 1.0); - CLAMP(colf[1], 0.0, 1.0); - CLAMP(colf[2], 0.0, 1.0); + CLAMP(colf[0], 0.0f, 1.0f); + CLAMP(colf[1], 0.0f, 1.0f); + CLAMP(colf[2], 0.0f, 1.0f); } } if(mtex->mapto & MAP_ALPHA) { if(rgb) { if(texres.talpha) texres.tin= texres.ta; - else texres.tin= (0.35*texres.tr+0.45*texres.tg+0.2*texres.tb); + else texres.tin= (0.35f*texres.tr+0.45f*texres.tg+0.2f*texres.tb); } colf[3]*= texres.tin; @@ -2992,7 +3018,7 @@ void do_sky_tex(float *rco, float *lo, float *dxyview, float *hor, float *zen, f /* only works with texture being "real" */ /* use saacos(), fixes bug [#22398], float precision caused lo[2] to be slightly less then -1.0 */ if(lo[0] || lo[1]) { /* check for zero case [#24807] */ - fact= (1.0/M_PI)*saacos(lo[2])/(sqrt(lo[0]*lo[0] + lo[1]*lo[1])); + fact= (1.0f/(float)M_PI)*saacos(lo[2])/(sqrt(lo[0]*lo[0] + lo[1]*lo[1])); tempvec[0]= lo[0]*fact; tempvec[1]= lo[1]*fact; tempvec[2]= 0.0; @@ -3013,13 +3039,13 @@ void do_sky_tex(float *rco, float *lo, float *dxyview, float *hor, float *zen, f if(mtex->texco==TEXCO_H_TUBEMAP) map_to_tube( tempvec, tempvec+1,lo[0], lo[2], lo[1]); else map_to_sphere( tempvec, tempvec+1,lo[0], lo[2], lo[1]); /* tube/spheremap maps for outside view, not inside */ - tempvec[0]= 1.0-tempvec[0]; + tempvec[0]= 1.0f-tempvec[0]; /* only top half */ - tempvec[1]= 2.0*tempvec[1]-1.0; + tempvec[1]= 2.0f*tempvec[1]-1.0f; tempvec[2]= 0.0; /* and correction for do_2d_mapping */ - tempvec[0]= 2.0*tempvec[0]-1.0; - tempvec[1]= 2.0*tempvec[1]-1.0; + tempvec[0]= 2.0f*tempvec[0]-1.0f; + tempvec[1]= 2.0f*tempvec[1]-1.0f; co= tempvec; } else { @@ -3068,16 +3094,16 @@ void do_sky_tex(float *rco, float *lo, float *dxyview, float *hor, float *zen, f /* texture output */ if(rgb && (mtex->texflag & MTEX_RGBTOINT)) { - texres.tin= (0.35*texres.tr+0.45*texres.tg+0.2*texres.tb); + texres.tin= (0.35f*texres.tr+0.45f*texres.tg+0.2f*texres.tb); rgb= 0; } if(mtex->texflag & MTEX_NEGATIVE) { if(rgb) { - texres.tr= 1.0-texres.tr; - texres.tg= 1.0-texres.tg; - texres.tb= 1.0-texres.tb; + texres.tr= 1.0f-texres.tr; + texres.tg= 1.0f-texres.tg; + texres.tb= 1.0f-texres.tb; } - else texres.tin= 1.0-texres.tin; + else texres.tin= 1.0f-texres.tin; } if(mtex->texflag & MTEX_STENCIL) { if(rgb) { @@ -3138,7 +3164,7 @@ void do_sky_tex(float *rco, float *lo, float *dxyview, float *hor, float *zen, f } } if(mtex->mapto & WOMAP_BLEND) { - if(rgb) texres.tin= (0.35*texres.tr+0.45*texres.tg+0.2*texres.tb); + if(rgb) texres.tin= (0.35f*texres.tr+0.45f*texres.tg+0.2f*texres.tb); *blend= texture_value_blend(mtex->def_var, *blend, texres.tin, mtex->blendfac, mtex->blendtype); } @@ -3274,16 +3300,16 @@ void do_lamp_tex(LampRen *la, float *lavec, ShadeInput *shi, float *colf, int ef /* texture output */ if(rgb && (mtex->texflag & MTEX_RGBTOINT)) { - texres.tin= (0.35*texres.tr+0.45*texres.tg+0.2*texres.tb); + texres.tin= (0.35f*texres.tr+0.45f*texres.tg+0.2f*texres.tb); rgb= 0; } if(mtex->texflag & MTEX_NEGATIVE) { if(rgb) { - texres.tr= 1.0-texres.tr; - texres.tg= 1.0-texres.tg; - texres.tb= 1.0-texres.tb; + texres.tr= 1.0f-texres.tr; + texres.tg= 1.0f-texres.tg; + texres.tb= 1.0f-texres.tb; } - else texres.tin= 1.0-texres.tin; + else texres.tin= 1.0f-texres.tin; } if(mtex->texflag & MTEX_STENCIL) { if(rgb) { @@ -3368,7 +3394,7 @@ int externtex(MTex *mtex, float *vec, float *tin, float *tr, float *tg, float *t rgb= multitex(tex, texvec, dxt, dyt, 0, &texr, thread, mtex->which_output); if(rgb) { - texr.tin= (0.35*texr.tr+0.45*texr.tg+0.2*texr.tb); + texr.tin= (0.35f*texr.tr+0.45f*texr.tg+0.2f*texr.tb); } else { texr.tr= mtex->r; @@ -3417,14 +3443,14 @@ void render_realtime_texture(ShadeInput *shi, Image *ima) tex= &imatex[shi->thread]; tex->iuser.ok= ima->ok; - texvec[0]= 0.5+0.5*suv->uv[0]; - texvec[1]= 0.5+0.5*suv->uv[1]; - texvec[2] = 0; // initalize it because imagewrap looks at it. + texvec[0]= 0.5f+0.5f*suv->uv[0]; + texvec[1]= 0.5f+0.5f*suv->uv[1]; + texvec[2] = 0.0f; // initalize it because imagewrap looks at it. if(shi->osatex) { - dx[0]= 0.5*suv->dxuv[0]; - dx[1]= 0.5*suv->dxuv[1]; - dy[0]= 0.5*suv->dyuv[0]; - dy[1]= 0.5*suv->dyuv[1]; + dx[0]= 0.5f*suv->dxuv[0]; + dx[1]= 0.5f*suv->dxuv[1]; + dy[0]= 0.5f*suv->dyuv[0]; + dy[1]= 0.5f*suv->dyuv[1]; } texr.nor= NULL; diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c index c08d6c0f456..b66740c87ba 100644 --- a/source/blender/render/intern/source/rendercore.c +++ b/source/blender/render/intern/source/rendercore.c @@ -758,7 +758,7 @@ static void atm_tile(RenderPart *pa, RenderLayer *rl) if(lar->type==LA_SUN && lar->sunsky) { /* if it's sky continue and don't apply atmosphere effect on it */ - if(*zrect >= 9.9e10 || rgbrect[3]==0.0f) { + if(*zrect >= 9.9e10f || rgbrect[3]==0.0f) { continue; } @@ -1098,7 +1098,7 @@ static unsigned short *make_solid_mask(RenderPart *pa) static void addAlphaOverFloatMask(float *dest, float *source, unsigned short dmask, unsigned short smask) { unsigned short shared= dmask & smask; - float mul= 1.0 - source[3]; + float mul= 1.0f - source[3]; if(shared) { /* overlapping masks */ @@ -1892,13 +1892,13 @@ static void renderflare(RenderResult *rr, float *rectf, HaloRen *har) fla.r= fabs(rc[0]); fla.g= fabs(rc[1]); fla.b= fabs(rc[2]); - fla.alfa= ma->flareboost*fabs(alfa*visifac*rc[3]); - fla.hard= 20.0f + fabs(70*rc[7]); + fla.alfa= ma->flareboost*fabsf(alfa*visifac*rc[3]); + fla.hard= 20.0f + fabsf(70.0f*rc[7]); fla.tex= 0; - type= (int)(fabs(3.9*rc[6])); + type= (int)(fabs(3.9f*rc[6])); - fla.rad= ma->subsize*sqrt(fabs(2.0f*har->rad*rc[4])); + fla.rad= ma->subsize*sqrtf(fabs(2.0f*har->rad*rc[4])); if(type==3) { fla.rad*= 3.0f; @@ -1907,22 +1907,22 @@ static void renderflare(RenderResult *rr, float *rectf, HaloRen *har) fla.radsq= fla.rad*fla.rad; - vec[0]= 1.4*rc[5]*(har->xs-R.winx/2); - vec[1]= 1.4*rc[5]*(har->ys-R.winy/2); - vec[2]= 32.0f*sqrt(vec[0]*vec[0] + vec[1]*vec[1] + 1.0f); + vec[0]= 1.4f*rc[5]*(har->xs-R.winx/2); + vec[1]= 1.4f*rc[5]*(har->ys-R.winy/2); + vec[2]= 32.0f*sqrtf(vec[0]*vec[0] + vec[1]*vec[1] + 1.0f); - fla.xs= R.winx/2 + vec[0] + (1.2+rc[8])*R.rectx*vec[0]/vec[2]; - fla.ys= R.winy/2 + vec[1] + (1.2+rc[8])*R.rectx*vec[1]/vec[2]; + fla.xs= R.winx/2 + vec[0] + (1.2f+rc[8])*R.rectx*vec[0]/vec[2]; + fla.ys= R.winy/2 + vec[1] + (1.2f+rc[8])*R.rectx*vec[1]/vec[2]; if(R.flag & R_SEC_FIELD) { - if(R.r.mode & R_ODDFIELD) fla.ys += 0.5; - else fla.ys -= 0.5; + if(R.r.mode & R_ODDFIELD) fla.ys += 0.5f; + else fla.ys -= 0.5f; } if(type & 1) fla.type= HA_FLARECIRC; else fla.type= 0; renderhalo_post(rr, rectf, &fla); - fla.alfa*= 0.5; + fla.alfa*= 0.5f; if(type & 2) fla.type= HA_FLARECIRC; else fla.type= 0; renderhalo_post(rr, rectf, &fla); @@ -2205,7 +2205,7 @@ static void bake_displacement(void *handle, ShadeInput *UNUSED(shi), float dist, if(R.r.bake_flag & R_BAKE_NORMALIZE && R.r.bake_maxdist) { disp = (dist+R.r.bake_maxdist) / (R.r.bake_maxdist*2); /* alter the range from [-bake_maxdist, bake_maxdist] to [0, 1]*/ } else { - disp = 0.5 + dist; /* alter the range from [-0.5,0.5] to [0,1]*/ + disp = 0.5f + dist; /* alter the range from [-0.5,0.5] to [0,1]*/ } if(bs->rect_float) { @@ -2277,7 +2277,7 @@ static void bake_set_vlr_dxyco(BakeShade *bs, float *uv1, float *uv2, float *uv3 * then taking u and v partial derivatives to get dxco and dyco */ A= (uv2[0] - uv1[0])*(uv3[1] - uv1[1]) - (uv3[0] - uv1[0])*(uv2[1] - uv1[1]); - if(fabs(A) > FLT_EPSILON) { + if(fabsf(A) > FLT_EPSILON) { A= 0.5f/A; d1= uv2[1] - uv3[1]; @@ -2532,8 +2532,8 @@ static void shade_tface(BakeShade *bs) * where a pixel gets in between 2 faces or the middle of a quad, * camera aligned quads also have this problem but they are less common. * Add a small offset to the UVs, fixes bug #18685 - Campbell */ - vec[a][0]= tface->uv[a][0]*(float)bs->rectx - (0.5f + 0.001); - vec[a][1]= tface->uv[a][1]*(float)bs->recty - (0.5f + 0.002); + vec[a][0]= tface->uv[a][0]*(float)bs->rectx - (0.5f + 0.001f); + vec[a][1]= tface->uv[a][1]*(float)bs->recty - (0.5f + 0.002f); } /* UV indices have to be corrected for possible quad->tria splits */ diff --git a/source/blender/render/intern/source/renderdatabase.c b/source/blender/render/intern/source/renderdatabase.c index 456162d2d30..0c5ad0475ab 100644 --- a/source/blender/render/intern/source/renderdatabase.c +++ b/source/blender/render/intern/source/renderdatabase.c @@ -943,13 +943,13 @@ HaloRen *RE_inithalo(Render *re, ObjectRen *obr, Material *ma, float *vec, f float tin, tr, tg, tb, ta; float xn, yn, zn, texvec[3], hoco[4], hoco1[4]; - if(hasize==0.0) return NULL; + if(hasize==0.0f) return NULL; projectverto(vec, re->winmat, hoco); - if(hoco[3]==0.0) return NULL; + if(hoco[3]==0.0f) return NULL; if(vec1) { projectverto(vec1, re->winmat, hoco1); - if(hoco1[3]==0.0) return NULL; + if(hoco1[3]==0.0f) return NULL; } har= RE_findOrAddHalo(obr, obr->tothalo++); @@ -959,8 +959,8 @@ HaloRen *RE_inithalo(Render *re, ObjectRen *obr, Material *ma, float *vec, f /* actual projectvert is done in function project_renderdata() because of parts/border/pano */ /* we do it here for sorting of halos */ zn= hoco[3]; - har->xs= 0.5*re->winx*(hoco[0]/zn); - har->ys= 0.5*re->winy*(hoco[1]/zn); + har->xs= 0.5f*re->winx*(hoco[0]/zn); + har->ys= 0.5f*re->winy*(hoco[1]/zn); har->zs= 0x7FFFFF*(hoco[2]/zn); har->zBufDist = 0x7FFFFFFF*(hoco[2]/zn); @@ -970,16 +970,16 @@ HaloRen *RE_inithalo(Render *re, ObjectRen *obr, Material *ma, float *vec, f har->type |= HA_VECT; - xn= har->xs - 0.5*re->winx*(hoco1[0]/hoco1[3]); - yn= har->ys - 0.5*re->winy*(hoco1[1]/hoco1[3]); - if(xn==0.0 || (xn==0.0 && yn==0.0)) zn= 0.0; + xn= har->xs - 0.5f*re->winx*(hoco1[0]/hoco1[3]); + yn= har->ys - 0.5f*re->winy*(hoco1[1]/hoco1[3]); + if(xn==0.0f || (xn==0.0f && yn==0.0f)) zn= 0.0f; else zn= atan2(yn, xn); har->sin= sin(zn); har->cos= cos(zn); zn= len_v3v3(vec1, vec); - har->hasize= vectsize*zn + (1.0-vectsize)*hasize; + har->hasize= vectsize*zn + (1.0f-vectsize)*hasize; sub_v3_v3v3(har->no, vec, vec1); normalize_v3(har->no); @@ -991,7 +991,7 @@ HaloRen *RE_inithalo(Render *re, ObjectRen *obr, Material *ma, float *vec, f har->r= ma->r; har->g= ma->g; har->b= ma->b; - har->add= (255.0*ma->add); + har->add= (255.0f*ma->add); har->mat= ma; har->hard= ma->har; har->seed= seed % 256; @@ -1032,7 +1032,7 @@ HaloRen *RE_inithalo(Render *re, ObjectRen *obr, Material *ma, float *vec, f zn= tin*mtex->alphafac; if(mtex->mapto & MAP_COL) { - zn= 1.0-yn; + zn= 1.0f-yn; har->r= (yn*tr+ zn*ma->r); har->g= (yn*tg+ zn*ma->g); har->b= (yn*tb+ zn*ma->b); @@ -1057,13 +1057,13 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater float xn, yn, zn, texvec[3], hoco[4], hoco1[4], in[3],tex[3],out[3]; int i, hasrgb; - if(hasize==0.0) return NULL; + if(hasize==0.0f) return NULL; projectverto(vec, re->winmat, hoco); - if(hoco[3]==0.0) return NULL; + if(hoco[3]==0.0f) return NULL; if(vec1) { projectverto(vec1, re->winmat, hoco1); - if(hoco1[3]==0.0) return NULL; + if(hoco1[3]==0.0f) return NULL; } har= RE_findOrAddHalo(obr, obr->tothalo++); @@ -1073,8 +1073,8 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater /* actual projectvert is done in function project_renderdata() because of parts/border/pano */ /* we do it here for sorting of halos */ zn= hoco[3]; - har->xs= 0.5*re->winx*(hoco[0]/zn); - har->ys= 0.5*re->winy*(hoco[1]/zn); + har->xs= 0.5f*re->winx*(hoco[0]/zn); + har->ys= 0.5f*re->winy*(hoco[1]/zn); har->zs= 0x7FFFFF*(hoco[2]/zn); har->zBufDist = 0x7FFFFFFF*(hoco[2]/zn); @@ -1084,16 +1084,16 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater har->type |= HA_VECT; - xn= har->xs - 0.5*re->winx*(hoco1[0]/hoco1[3]); - yn= har->ys - 0.5*re->winy*(hoco1[1]/hoco1[3]); - if(xn==0.0 || (xn==0.0 && yn==0.0)) zn= 0.0; + xn= har->xs - 0.5f*re->winx*(hoco1[0]/hoco1[3]); + yn= har->ys - 0.5f*re->winy*(hoco1[1]/hoco1[3]); + if(xn==0.0f || (xn==0.0f && yn==0.0f)) zn= 0.0; else zn= atan2(yn, xn); har->sin= sin(zn); har->cos= cos(zn); - zn= len_v3v3(vec1, vec)*0.5; + zn= len_v3v3(vec1, vec)*0.5f; - har->hasize= vectsize*zn + (1.0-vectsize)*hasize; + har->hasize= vectsize*zn + (1.0f-vectsize)*hasize; sub_v3_v3v3(har->no, vec, vec1); normalize_v3(har->no); @@ -1105,7 +1105,7 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater har->r= ma->r; har->g= ma->g; har->b= ma->b; - har->add= (255.0*ma->add); + har->add= (255.0f*ma->add); har->mat= ma; har->hard= ma->har; har->seed= seed % 256; @@ -1185,13 +1185,13 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater if(mtex->mapto & MAP_ALPHA) har->alfa = texture_value_blend(mtex->def_var,har->alfa,tin,mtex->alphafac,mtex->blendtype); if(mtex->mapto & MAP_HAR) - har->hard = 1.0+126.0*texture_value_blend(mtex->def_var,((float)har->hard)/127.0,tin,mtex->hardfac,mtex->blendtype); + har->hard = 1.0f+126.0f*texture_value_blend(mtex->def_var,((float)har->hard)/127.0f,tin,mtex->hardfac,mtex->blendtype); if(mtex->mapto & MAP_RAYMIRR) - har->hasize = 100.0*texture_value_blend(mtex->def_var,har->hasize/100.0,tin,mtex->raymirrfac,mtex->blendtype); + har->hasize = 100.0f*texture_value_blend(mtex->def_var,har->hasize/100.0f,tin,mtex->raymirrfac,mtex->blendtype); if(mtex->mapto & MAP_TRANSLU) { - float add = texture_value_blend(mtex->def_var,(float)har->add/255.0,tin,mtex->translfac,mtex->blendtype); + float add = texture_value_blend(mtex->def_var,(float)har->add/255.0f,tin,mtex->translfac,mtex->blendtype); CLAMP(add, 0.f, 1.f); - har->add = 255.0*add; + har->add = 255.0f*add; } /* now what on earth is this good for?? */ //if(mtex->texco & 16) { @@ -1270,24 +1270,24 @@ void project_renderdata(Render *re, void (*projectfunc)(float *, float mat[][4], projectfunc(vec, re->winmat, hoco); /* we clip halos less critical, but not for the Z */ - hoco[0]*= 0.5; - hoco[1]*= 0.5; + hoco[0]*= 0.5f; + hoco[1]*= 0.5f; if( panotestclip(re, do_pano, hoco) ) { har->miny= har->maxy= -10000; /* that way render clips it */ } - else if(hoco[3]<0.0) { + else if(hoco[3]<0.0f) { har->miny= har->maxy= -10000; /* render clips it */ } else /* do the projection...*/ { /* bring back hocos */ - hoco[0]*= 2.0; - hoco[1]*= 2.0; + hoco[0]*= 2.0f; + hoco[1]*= 2.0f; zn= hoco[3]; - har->xs= 0.5*re->winx*(1.0+hoco[0]/zn); /* the 0.5 negates the previous 2...*/ - har->ys= 0.5*re->winy*(1.0+hoco[1]/zn); + har->xs= 0.5f*re->winx*(1.0f+hoco[0]/zn); /* the 0.5 negates the previous 2...*/ + har->ys= 0.5f*re->winy*(1.0f+hoco[1]/zn); /* this should be the zbuffer coordinate */ har->zs= 0x7FFFFF*(hoco[2]/zn); @@ -1298,11 +1298,11 @@ void project_renderdata(Render *re, void (*projectfunc)(float *, float mat[][4], projectfunc(vec, re->winmat, hoco); vec[0]-= har->hasize; zn= hoco[3]; - har->rad= fabs(har->xs- 0.5*re->winx*(1.0+hoco[0]/zn)); + har->rad= fabsf(har->xs- 0.5f*re->winx*(1.0f+hoco[0]/zn)); /* this clip is not really OK, to prevent stars to become too large */ if(har->type & HA_ONLYSKY) { - if(har->rad>3.0) har->rad= 3.0; + if(har->rad>3.0f) har->rad= 3.0f; } har->radsq= har->rad*har->rad; diff --git a/source/blender/render/intern/source/shadbuf.c b/source/blender/render/intern/source/shadbuf.c index dcb9a3063e1..5860c395b07 100644 --- a/source/blender/render/intern/source/shadbuf.c +++ b/source/blender/render/intern/source/shadbuf.c @@ -260,7 +260,7 @@ static int compress_deepsamples(DeepSample *dsample, int tot, float epsilon) } else { /* compute visibility at center between slopes at z */ - slope= (slopemin+slopemax)*0.5; + slope= (slopemin+slopemax)*0.5f; v= newds->v + slope*((z - newds->z)/(double)0x7FFFFFFF); } @@ -774,7 +774,7 @@ void makeshadowbuf(Render *re, LampRen *lar) angle= saacos(lar->spotsi); temp= 0.5f*shb->size*cos(angle)/sin(angle); shb->pixsize= (shb->d)/temp; - wsize= shb->pixsize*(shb->size/2.0); + wsize= shb->pixsize*(shb->size/2.0f); perspective_m4( shb->winmat,-wsize, wsize, -wsize, wsize, shb->d, shb->clipend); mul_m4_m4m4(shb->persmat, shb->viewmat, shb->winmat); @@ -1094,7 +1094,7 @@ static float readshadowbuf(ShadBuf *shb, ShadSampleBuf *shsample, int bias, int else { /* soft area */ temp= ( (float)(zs- zsamp) )/(float)bias; - return 1.0 - temp*temp; + return 1.0f - temp*temp; } } @@ -1287,7 +1287,7 @@ static float readshadowbuf_halo(ShadBuf *shb, ShadSampleBuf *shsample, int xs, i /* soft area */ temp= ( (float)(zs- zsamp) )/(float)bias; - return 1.0 - temp*temp; + return 1.0f - temp*temp; } @@ -1303,15 +1303,15 @@ float shadow_halo(LampRen *lar, float *p1, float *p2) int x, y, z, xs1, ys1; int dx = 0, dy = 0; - siz= 0.5*(float)shb->size; + siz= 0.5f*(float)shb->size; co[0]= p1[0]; co[1]= p1[1]; co[2]= p1[2]/lar->sh_zfac; co[3]= 1.0; mul_m4_v4(shb->winmat, co); /* rational hom co */ - xf1= siz*(1.0+co[0]/co[3]); - yf1= siz*(1.0+co[1]/co[3]); + xf1= siz*(1.0f+co[0]/co[3]); + yf1= siz*(1.0f+co[1]/co[3]); zf1= (co[2]/co[3]); @@ -1320,8 +1320,8 @@ float shadow_halo(LampRen *lar, float *p1, float *p2) co[2]= p2[2]/lar->sh_zfac; co[3]= 1.0; mul_m4_v4(shb->winmat, co); /* rational hom co */ - xf2= siz*(1.0+co[0]/co[3]); - yf2= siz*(1.0+co[1]/co[3]); + xf2= siz*(1.0f+co[0]/co[3]); + yf2= siz*(1.0f+co[1]/co[3]); zf2= (co[2]/co[3]); /* the 2dda (a pixel line formula) */ @@ -1330,8 +1330,8 @@ float shadow_halo(LampRen *lar, float *p1, float *p2) ys1= (int)yf1; if(xf1 != xf2) { - if(xf2-xf1 > 0.0) { - labdax= (xf1-xs1-1.0)/(xf1-xf2); + if(xf2-xf1 > 0.0f) { + labdax= (xf1-xs1-1.0f)/(xf1-xf2); ldx= -shb->shadhalostep/(xf1-xf2); dx= shb->shadhalostep; } @@ -1347,8 +1347,8 @@ float shadow_halo(LampRen *lar, float *p1, float *p2) } if(yf1 != yf2) { - if(yf2-yf1 > 0.0) { - labday= (yf1-ys1-1.0)/(yf1-yf2); + if(yf2-yf1 > 0.0f) { + labday= (yf1-ys1-1.0f)/(yf1-yf2); ldy= -shb->shadhalostep/(yf1-yf2); dy= shb->shadhalostep; } @@ -1389,16 +1389,16 @@ float shadow_halo(LampRen *lar, float *p1, float *p2) } labda= MIN2(labdax, labday); - if(labda==labdao || labda>=1.0) break; + if(labda==labdao || labda>=1.0f) break; zf= zf1 + labda*(zf2-zf1); count+= (float)shb->totbuf; - if(zf<= -1.0) lightcount += 1.0; /* close to the spot */ + if(zf<= -1.0f) lightcount += 1.0f; /* close to the spot */ else { /* make sure, behind the clipend we extend halolines. */ - if(zf>=1.0) z= 0x7FFFF000; + if(zf>=1.0f) z= 0x7FFFF000; else z= (int)(0x7FFFF000*zf); for(shsample= shb->buffers.first; shsample; shsample= shsample->next) @@ -1407,8 +1407,8 @@ float shadow_halo(LampRen *lar, float *p1, float *p2) } } - if(count!=0.0) return (lightcount/count); - return 0.0; + if(count!=0.0f) return (lightcount/count); + return 0.0f; } @@ -2081,11 +2081,11 @@ static int viewpixel_to_lampbuf(ShadBuf *shb, ObjectInstanceRen *obi, VlakRen *v /* ortho viewplane cannot intersect using view vector originating in (0,0,0) */ if(R.r.mode & R_ORTHO) { /* x and y 3d coordinate can be derived from pixel coord and winmat */ - float fx= 2.0/(R.winx*R.winmat[0][0]); - float fy= 2.0/(R.winy*R.winmat[1][1]); + float fx= 2.0f/(R.winx*R.winmat[0][0]); + float fy= 2.0f/(R.winy*R.winmat[1][1]); - hoco[0]= (x - 0.5*R.winx)*fx - R.winmat[3][0]/R.winmat[0][0]; - hoco[1]= (y - 0.5*R.winy)*fy - R.winmat[3][1]/R.winmat[1][1]; + hoco[0]= (x - 0.5f*R.winx)*fx - R.winmat[3][0]/R.winmat[0][0]; + hoco[1]= (y - 0.5f*R.winy)*fy - R.winmat[3][1]/R.winmat[1][1]; /* using a*x + b*y + c*z = d equation, (a b c) is normal */ if(nor[2]!=0.0f) @@ -2141,9 +2141,9 @@ static void isb_add_shadfac(ISBShadfacA **isbsapp, MemArena *mem, int obi, int f /* in osa case, the samples were filled in with factor 1.0/R.osa. if fewer samples we have to correct */ if(R.osa) - shadfacf= ((float)shadfac*R.osa)/(4096.0*samples); + shadfacf= ((float)shadfac*R.osa)/(4096.0f*samples); else - shadfacf= ((float)shadfac)/(4096.0); + shadfacf= ((float)shadfac)/(4096.0f); new= BLI_memarena_alloc(mem, sizeof(ISBShadfacA)); new->obi= obi; @@ -2640,4 +2640,3 @@ void ISB_free(RenderPart *pa) } } } - diff --git a/source/blender/render/intern/source/sss.c b/source/blender/render/intern/source/sss.c index f7d1b43d4f7..0ba13b31c4b 100644 --- a/source/blender/render/intern/source/sss.c +++ b/source/blender/render/intern/source/sss.c @@ -172,7 +172,7 @@ static float f_Rd(float alpha_, float A, float ro) float sq; sq= sqrt(3.0f*(1.0f - alpha_)); - return (alpha_/2.0f)*(1.0f + exp((-4.0f/3.0f)*A*sq))*exp(-sq) - ro; + return (alpha_/2.0f)*(1.0f + expf((-4.0f/3.0f)*A*sq))*expf(-sq) - ro; } static float compute_reduced_albedo(ScatterSettings *ss) @@ -189,10 +189,10 @@ static float compute_reduced_albedo(ScatterSettings *ss) for(i= 0; i < max_iteration_count; i++) { fsub= (fxn - fxn_1); - if(fabs(fsub) < tolerance) + if(fabsf(fsub) < tolerance) break; d= ((xn - xn_1)/fsub)*fxn; - if(fabs(d) < tolerance) + if(fabsf(d) < tolerance) break; xn_1= xn; @@ -221,10 +221,10 @@ static float Rd_rsquare(ScatterSettings *ss, float rr) sr= sqrt(rr + ss->zr*ss->zr); sv= sqrt(rr + ss->zv*ss->zv); - Rdr= ss->zr*(1.0f + ss->sigma*sr)*exp(-ss->sigma*sr)/(sr*sr*sr); - Rdv= ss->zv*(1.0f + ss->sigma*sv)*exp(-ss->sigma*sv)/(sv*sv*sv); + Rdr= ss->zr*(1.0f + ss->sigma*sr)*expf(-ss->sigma*sr)/(sr*sr*sr); + Rdv= ss->zv*(1.0f + ss->sigma*sv)*expf(-ss->sigma*sv)/(sv*sv*sv); - return /*ss->alpha_*/(1.0f/(4.0f*M_PI))*(Rdr + Rdv); + return /*ss->alpha_*/(1.0f/(4.0f*(float)M_PI))*(Rdr + Rdv); } static float Rd(ScatterSettings *ss, float r) @@ -316,7 +316,7 @@ ScatterSettings *scatter_settings_new(float refl, float radius, float ior, float ss->alpha_= compute_reduced_albedo(ss); ss->sigma= 1.0f/ss->ld; - ss->sigma_t_= ss->sigma/sqrt(3.0f*(1.0f - ss->alpha_)); + ss->sigma_t_= ss->sigma/sqrtf(3.0f*(1.0f - ss->alpha_)); ss->sigma_s_= ss->alpha_*ss->sigma_t_; ss->sigma_a= ss->sigma_t_ - ss->sigma_s_; @@ -489,7 +489,7 @@ static void sum_leaf_radiance(ScatterTree *UNUSED(tree), ScatterNode *node) for(i=0; itotpoint; i++) { p= &node->points[i]; - rad= p->area*fabs(p->rad[0] + p->rad[1] + p->rad[2]); + rad= p->area*fabsf(p->rad[0] + p->rad[1] + p->rad[2]); totrad += rad; node->co[0] += rad*p->co[0]; @@ -513,20 +513,20 @@ static void sum_leaf_radiance(ScatterTree *UNUSED(tree), ScatterNode *node) } if(node->area > 1e-16f) { - inv= 1.0/node->area; + inv= 1.0f/node->area; node->rad[0] *= inv; node->rad[1] *= inv; node->rad[2] *= inv; } if(node->backarea > 1e-16f) { - inv= 1.0/node->backarea; + inv= 1.0f/node->backarea; node->backrad[0] *= inv; node->backrad[1] *= inv; node->backrad[2] *= inv; } if(totrad > 1e-16f) { - inv= 1.0/totrad; + inv= 1.0f/totrad; node->co[0] *= inv; node->co[1] *= inv; node->co[2] *= inv; @@ -566,8 +566,8 @@ static void sum_branch_radiance(ScatterTree *UNUSED(tree), ScatterNode *node) subnode= node->child[i]; - rad= subnode->area*fabs(subnode->rad[0] + subnode->rad[1] + subnode->rad[2]); - rad += subnode->backarea*fabs(subnode->backrad[0] + subnode->backrad[1] + subnode->backrad[2]); + rad= subnode->area*fabsf(subnode->rad[0] + subnode->rad[1] + subnode->rad[2]); + rad += subnode->backarea*fabsf(subnode->backrad[0] + subnode->backrad[1] + subnode->backrad[2]); totrad += rad; node->co[0] += rad*subnode->co[0]; @@ -587,20 +587,20 @@ static void sum_branch_radiance(ScatterTree *UNUSED(tree), ScatterNode *node) } if(node->area > 1e-16f) { - inv= 1.0/node->area; + inv= 1.0f/node->area; node->rad[0] *= inv; node->rad[1] *= inv; node->rad[2] *= inv; } if(node->backarea > 1e-16f) { - inv= 1.0/node->backarea; + inv= 1.0f/node->backarea; node->backrad[0] *= inv; node->backrad[1] *= inv; node->backrad[2] *= inv; } if(totrad > 1e-16f) { - inv= 1.0/totrad; + inv= 1.0f/totrad; node->co[0] *= inv; node->co[1] *= inv; node->co[2] *= inv; @@ -668,9 +668,9 @@ static void create_octree_node(ScatterTree *tree, ScatterNode *node, float *mid, return; } - subsize[0]= size[0]*0.5; - subsize[1]= size[1]*0.5; - subsize[2]= size[2]*0.5; + subsize[0]= size[0]*0.5f; + subsize[1]= size[1]*0.5f; + subsize[2]= size[2]*0.5f; node->split[0]= mid[0]; node->split[1]= mid[1]; @@ -764,7 +764,7 @@ ScatterTree *scatter_tree_new(ScatterSettings *ss[3], float scale, float error, for(i=0; iscale*tree->scale); + points[i].area= fabsf(area[i])/(tree->scale*tree->scale); points[i].back= (area[i] < 0.0f); mul_v3_fl(points[i].co, 1.0f/tree->scale); @@ -794,13 +794,13 @@ void scatter_tree_build(ScatterTree *tree) tree->root->points= newpoints; tree->root->totpoint= totpoint; - mid[0]= (tree->min[0]+tree->max[0])*0.5; - mid[1]= (tree->min[1]+tree->max[1])*0.5; - mid[2]= (tree->min[2]+tree->max[2])*0.5; + mid[0]= (tree->min[0]+tree->max[0])*0.5f; + mid[1]= (tree->min[1]+tree->max[1])*0.5f; + mid[2]= (tree->min[2]+tree->max[2])*0.5f; - size[0]= (tree->max[0]-tree->min[0])*0.5; - size[1]= (tree->max[1]-tree->min[1])*0.5; - size[2]= (tree->max[2]-tree->min[2])*0.5; + size[0]= (tree->max[0]-tree->min[0])*0.5f; + size[1]= (tree->max[1]-tree->min[1])*0.5f; + size[2]= (tree->max[2]-tree->min[2])*0.5f; create_octree_node(tree, tree->root, mid, size, tree->refpoints, 0); diff --git a/source/blender/render/intern/source/strand.c b/source/blender/render/intern/source/strand.c index 72cb35e7827..840e5444ff0 100644 --- a/source/blender/render/intern/source/strand.c +++ b/source/blender/render/intern/source/strand.c @@ -78,9 +78,9 @@ static float strand_eval_width(Material *ma, float strandco) if(ma->strand_ease!=0.0f) { if(ma->strand_ease<0.0f) - fac= pow(strandco, 1.0+ma->strand_ease); + fac= pow(strandco, 1.0f+ma->strand_ease); else - fac= pow(strandco, 1.0/(1.0f-ma->strand_ease)); + fac= pow(strandco, 1.0f/(1.0f-ma->strand_ease)); } else fac= strandco; @@ -816,8 +816,8 @@ int zbuffer_strands_abuf(Render *re, RenderPart *pa, APixstrand *apixbuf, ListBa zbuf_alloc_span(&zspan, pa->rectx, pa->recty, clipcrop); /* needed for transform from hoco to zbuffer co */ - zspan.zmulx= ((float)winx)/2.0; - zspan.zmuly= ((float)winy)/2.0; + zspan.zmulx= ((float)winx)/2.0f; + zspan.zmuly= ((float)winy)/2.0f; zspan.zofsx= -pa->disprect.xmin; zspan.zofsy= -pa->disprect.ymin; diff --git a/source/blender/render/intern/source/sunsky.c b/source/blender/render/intern/source/sunsky.c index 5877fa42292..e824b81096b 100644 --- a/source/blender/render/intern/source/sunsky.c +++ b/source/blender/render/intern/source/sunsky.c @@ -68,12 +68,12 @@ * */ void ClipColor(float c[3]) { - if (c[0] > 1.0) c[0] = 1.0; - if (c[0] < 0.0) c[0] = 0.0; - if (c[1] > 1.0) c[1] = 1.0; - if (c[1] < 0.0) c[1] = 0.0; - if (c[2] > 1.0) c[2] = 1.0; - if (c[2] < 0.0) c[2] = 0.0; + if (c[0] > 1.0f) c[0] = 1.0f; + if (c[0] < 0.0f) c[0] = 0.0f; + if (c[1] > 1.0f) c[1] = 1.0f; + if (c[1] < 0.0f) c[1] = 0.0f; + if (c[2] > 1.0f) c[2] = 1.0f; + if (c[2] < 0.0f) c[2] = 0.0f; } /** @@ -85,9 +85,9 @@ static float AngleBetween(float thetav, float phiv, float theta, float phi) { float cospsi = sin(thetav) * sin(theta) * cos(phi - phiv) + cos(thetav) * cos(theta); - if (cospsi > 1.0) + if (cospsi > 1.0f) return 0; - if (cospsi < -1.0) + if (cospsi < -1.0f) return M_PI; return acos(cospsi); @@ -117,11 +117,11 @@ static float PerezFunction(struct SunSky *sunsky, const float *lam, float theta, { float den, num; - den = ((1 + lam[0] * exp(lam[1])) * - (1 + lam[2] * exp(lam[3] * sunsky->theta) + lam[4] * cos(sunsky->theta) * cos(sunsky->theta))); + den = ((1 + lam[0] * expf(lam[1])) * + (1 + lam[2] * expf(lam[3] * sunsky->theta) + lam[4] * cosf(sunsky->theta) * cosf(sunsky->theta))); - num = ((1 + lam[0] * exp(lam[1] / cos(theta))) * - (1 + lam[2] * exp(lam[3] * gamma) + lam[4] * cos(gamma) * cos(gamma))); + num = ((1 + lam[0] * expf(lam[1] / cosf(theta))) * + (1 + lam[2] * expf(lam[3] * gamma) + lam[4] * cosf(gamma) * cosf(gamma))); return(lvz * num / den);} @@ -173,41 +173,41 @@ void InitSunSky(struct SunSky *sunsky, float turb, float *toSun, float horizon_b T = turb; T2 = turb*turb; - chi = (4.0 / 9.0 - T / 120.0) * (M_PI - 2 * sunsky->theta); - sunsky->zenith_Y = (4.0453 * T - 4.9710) * tan(chi) - .2155 * T + 2.4192; + chi = (4.0f / 9.0f - T / 120.0f) * ((float)M_PI - 2.0f * sunsky->theta); + sunsky->zenith_Y = (4.0453f * T - 4.9710f) * tanf(chi) - 0.2155f * T + 2.4192f; sunsky->zenith_Y *= 1000; // conversion from kcd/m^2 to cd/m^2 if (sunsky->zenith_Y<=0) sunsky->zenith_Y = 1e-6; sunsky->zenith_x = - ( + 0.00165 * theta3 - 0.00374 * theta2 + 0.00208 * sunsky->theta + 0) * T2 + - ( -0.02902 * theta3 + 0.06377 * theta2 - 0.03202 * sunsky->theta + 0.00394) * T + - ( + 0.11693 * theta3 - 0.21196 * theta2 + 0.06052 * sunsky->theta + 0.25885); + ( + 0.00165f * theta3 - 0.00374f * theta2 + 0.00208f * sunsky->theta + 0.0f) * T2 + + ( -0.02902f * theta3 + 0.06377f * theta2 - 0.03202f * sunsky->theta + 0.00394f) * T + + ( + 0.11693f * theta3 - 0.21196f * theta2 + 0.06052f * sunsky->theta + 0.25885f); sunsky->zenith_y = - ( + 0.00275 * theta3 - 0.00610 * theta2 + 0.00316 * sunsky->theta + 0) * T2 + - ( -0.04214 * theta3 + 0.08970 * theta2 - 0.04153 * sunsky->theta + 0.00515) * T + - ( + 0.15346 * theta3 - 0.26756 * theta2 + 0.06669 * sunsky->theta + 0.26688); + ( + 0.00275f * theta3 - 0.00610f * theta2 + 0.00316f * sunsky->theta + 0.0f) * T2 + + ( -0.04214f * theta3 + 0.08970f * theta2 - 0.04153f * sunsky->theta + 0.00515f) * T + + ( + 0.15346f * theta3 - 0.26756f * theta2 + 0.06669f * sunsky->theta + 0.26688f); - sunsky->perez_Y[0] = 0.17872 * T - 1.46303; - sunsky->perez_Y[1] = -0.35540 * T + 0.42749; - sunsky->perez_Y[2] = -0.02266 * T + 5.32505; - sunsky->perez_Y[3] = 0.12064 * T - 2.57705; - sunsky->perez_Y[4] = -0.06696 * T + 0.37027; + sunsky->perez_Y[0] = 0.17872f * T - 1.46303f; + sunsky->perez_Y[1] = -0.35540f * T + 0.42749f; + sunsky->perez_Y[2] = -0.02266f * T + 5.32505f; + sunsky->perez_Y[3] = 0.12064f * T - 2.57705f; + sunsky->perez_Y[4] = -0.06696f * T + 0.37027f; - sunsky->perez_x[0] = -0.01925 * T - 0.25922; - sunsky->perez_x[1] = -0.06651 * T + 0.00081; - sunsky->perez_x[2] = -0.00041 * T + 0.21247; - sunsky->perez_x[3] = -0.06409 * T - 0.89887; - sunsky->perez_x[4] = -0.00325 * T + 0.04517; + sunsky->perez_x[0] = -0.01925f * T - 0.25922f; + sunsky->perez_x[1] = -0.06651f * T + 0.00081f; + sunsky->perez_x[2] = -0.00041f * T + 0.21247f; + sunsky->perez_x[3] = -0.06409f * T - 0.89887f; + sunsky->perez_x[4] = -0.00325f * T + 0.04517f; - sunsky->perez_y[0] = -0.01669 * T - 0.26078; - sunsky->perez_y[1] = -0.09495 * T + 0.00921; - sunsky->perez_y[2] = -0.00792 * T + 0.21023; - sunsky->perez_y[3] = -0.04405 * T - 1.65369; - sunsky->perez_y[4] = -0.01092 * T + 0.05291; + sunsky->perez_y[0] = -0.01669f * T - 0.26078f; + sunsky->perez_y[1] = -0.09495f * T + 0.00921f; + sunsky->perez_y[2] = -0.00792f * T + 0.21023f; + sunsky->perez_y[3] = -0.04405f * T - 1.65369f; + sunsky->perez_y[4] = -0.01092f * T + 0.05291f; /* suggested by glome in * http://projects.blender.org/tracker/?func=detail&atid=127&aid=8063&group_id=9*/ @@ -248,17 +248,17 @@ void GetSkyXYZRadiance(struct SunSky* sunsky, float theta, float phi, float colo float hfade=1, nfade=1; - if (theta>(0.5*M_PI)) { - hfade = 1.0-(theta*M_1_PI-0.5)*2.0; - hfade = hfade*hfade*(3.0-2.0*hfade); + if (theta>(0.5f*(float)M_PI)) { + hfade = 1.0f-(theta*(float)M_1_PI-0.5f)*2.0f; + hfade = hfade*hfade*(3.0f-2.0f*hfade); theta = 0.5*M_PI; } - if (sunsky->theta>(0.5*M_PI)) { - if (theta<=0.5*M_PI) { - nfade = 1.0-(0.5-theta*M_1_PI)*2.0; - nfade *= 1.0-(sunsky->theta*M_1_PI-0.5)*2.0; - nfade = nfade*nfade*(3.0-2.0*nfade); + if (sunsky->theta>(0.5f*(float)M_PI)) { + if (theta<=0.5f*(float)M_PI) { + nfade = 1.0f-(0.5f-theta*(float)M_1_PI)*2.0f; + nfade *= 1.0f-(sunsky->theta*(float)M_1_PI-0.5f)*2.0f; + nfade = nfade*nfade*(3.0f-2.0f*nfade); } } @@ -267,7 +267,7 @@ void GetSkyXYZRadiance(struct SunSky* sunsky, float theta, float phi, float colo // Compute xyY values x = PerezFunction(sunsky, sunsky->perez_x, theta, gamma, sunsky->zenith_x); y = PerezFunction(sunsky, sunsky->perez_y, theta, gamma, sunsky->zenith_y); - Y = 6.666666667e-5 * nfade * hfade * PerezFunction(sunsky, sunsky->perez_Y, theta, gamma, sunsky->zenith_Y); + Y = 6.666666667e-5f * nfade * hfade * PerezFunction(sunsky, sunsky->perez_Y, theta, gamma, sunsky->zenith_Y); if(sunsky->sky_exposure!=0.0f) Y = 1.0 - exp(Y*sunsky->sky_exposure); @@ -296,8 +296,8 @@ void GetSkyXYZRadiancef(struct SunSky* sunsky, const float varg[3], float color_ copy_v3_v3(v, (float*)varg); normalize_v3(v); - if (v[2] < 0.001){ - v[2] = 0.001; + if (v[2] < 0.001f) { + v[2] = 0.001f; normalize_v3(v); } @@ -329,15 +329,15 @@ static void ComputeAttenuatedSunlight(float theta, int turbidity, float fTau[3]) fAlpha = 1.3f; fBeta = 0.04608365822050f * turbidity - 0.04586025928522f; - m = 1.0/(cos(theta) + 0.15f*pow(93.885f-theta/M_PI*180.0f,-1.253f)); + m = 1.0f/(cosf(theta) + 0.15f*powf(93.885f-theta/(float)M_PI*180.0f,-1.253f)); for(i = 0; i < 3; i++) { // Rayleigh Scattering - fTauR = exp( -m * 0.008735f * pow(fLambda[i], (float)(-4.08f))); + fTauR = expf( -m * 0.008735f * powf(fLambda[i], (float)(-4.08f))); // Aerosal (water + dust) attenuation - fTauA = exp(-m * fBeta * pow(fLambda[i], -fAlpha)); + fTauA = exp(-m * fBeta * powf(fLambda[i], -fAlpha)); fTau[i] = fTauR * fTauA; } @@ -364,8 +364,8 @@ void InitAtmosphere(struct SunSky *sunSky, float sun_intens, float mief, float r const float pn = 0.035f; const float T = 2.0f; float fTemp, fTemp2, fTemp3, fBeta, fBetaDash; - float c = (6.544*T - 6.51)*1e-17; - float K[3] = {0.685f, 0.679f, 0.670f}; + float c = (6.544f*T - 6.51f)*1e-17f; + float K[3] = {0.685f, 0.679f, 0.670f}; float vBetaMieTemp[3]; float fLambda[3],fLambda2[3], fLambda4[3]; @@ -410,7 +410,7 @@ void InitAtmosphere(struct SunSky *sunSky, float sun_intens, float mief, float r // Mie scattering constants. - fTemp2 = 0.434*c*(2*pi)*(2*pi)*0.5f; + fTemp2 = 0.434f*c*(2*pi)*(2*pi)*0.5f; vec3opf(sunSky->atm_BetaDashMie, vLambda2, *, fTemp2); fTemp3 = 0.434f*c*pi*(2*pi)*(2*pi); @@ -460,7 +460,7 @@ void AtmospherePixleShader( struct SunSky* sunSky, float view[3], float s, float vec3opv(sunSky->atm_BetaRM, sunSky->atm_BetaRay, +, sunSky->atm_BetaMie); //e^(-(beta_1 + beta_2) * s) = E1 - vec3opf(E1, sunSky->atm_BetaRM, *, -s/M_LN2); + vec3opf(E1, sunSky->atm_BetaRM, *, -s/(float)M_LN2); E1[0] = exp(E1[0]); E1[1] = exp(E1[1]); E1[2] = exp(E1[2]); @@ -469,17 +469,17 @@ void AtmospherePixleShader( struct SunSky* sunSky, float view[3], float s, float //Phase2(theta) = (1-g^2)/(1+g-2g*cos(theta))^(3/2) fTemp = 1 + sunSky->atm_HGg - 2 * sunSky->atm_HGg * costheta; - fTemp = fTemp * sqrt(fTemp); + fTemp = fTemp * sqrtf(fTemp); Phase_2 = (1 - sunSky->atm_HGg * sunSky->atm_HGg)/fTemp; vec3opf(vTemp1, sunSky->atm_BetaDashRay, *, Phase_1); vec3opf(vTemp2, sunSky->atm_BetaDashMie, *, Phase_2); vec3opv(vTemp1, vTemp1, +, vTemp2); - fopvec3(vTemp2, 1.0, -, E1); + fopvec3(vTemp2, 1.0f, -, E1); vec3opv(vTemp1, vTemp1, *, vTemp2); - fopvec3(vTemp2, 1.0, / , sunSky->atm_BetaRM); + fopvec3(vTemp2, 1.0f, / , sunSky->atm_BetaRM); vec3opv(I, vTemp1, *, vTemp2); diff --git a/source/blender/render/intern/source/volume_precache.c b/source/blender/render/intern/source/volume_precache.c index faa915b7f6c..2037acc943f 100644 --- a/source/blender/render/intern/source/volume_precache.c +++ b/source/blender/render/intern/source/volume_precache.c @@ -400,7 +400,7 @@ static void multiple_scattering_diffusion(Render *re, VolumePrecache *vp, Materi sb[j] += vp->data_b[i]; /* Displays progress every second */ - if(time-lasttime>1.0f) { + if(time-lasttime>1.0) { char str[64]; BLI_snprintf(str, sizeof(str), "Simulating multiple scattering: %d%%", (int)(100.0f * (c / total))); re->i.infostr= str; @@ -747,7 +747,7 @@ static void vol_precache_objectinstance_threads(Render *re, ObjectInstanceRen *o caching=0; time= PIL_check_seconds_timer(); - if(time-lasttime>1.0f) { + if(time-lasttime>1.0) { char str[64]; BLI_snprintf(str, sizeof(str), "Precaching volume: %d%%", (int)(100.0f * ((float)counter / (float)totparts))); re->i.infostr= str; diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c index 359002d05ae..19bbb11e143 100644 --- a/source/blender/render/intern/source/volumetric.c +++ b/source/blender/render/intern/source/volumetric.c @@ -422,9 +422,9 @@ static void vol_get_transmittance_seg(ShadeInput *shi, float *tr, float stepsize tau[1] += stepd * sigma_t[1]; tau[2] += stepd * sigma_t[2]; - tr[0] *= exp(-tau[0]); - tr[1] *= exp(-tau[1]); - tr[2] *= exp(-tau[2]); + tr[0] *= expf(-tau[0]); + tr[1] *= expf(-tau[1]); + tr[2] *= expf(-tau[2]); } /* Compute transmittance = e^(-attenuation) */ @@ -473,7 +473,7 @@ static void vol_shade_one_lamp(struct ShadeInput *shi, float *co, LampRen *lar, if (lar->mode & LA_LAYER) if((lar->lay & shi->obi->lay)==0) return; if ((lar->lay & shi->lay)==0) return; - if (lar->energy == 0.0) return; + if (lar->energy == 0.0f) return; if ((visifac= lamp_get_visibility(lar, co, lv, &lampdist)) == 0.f) return; @@ -613,7 +613,7 @@ static void volumeintegrate(struct ShadeInput *shi, float *col, float *co, float /* transmittance component (alpha) */ vol_get_transmittance_seg(shi, tr, stepsize, co, density); - if (t0 > t1 * 0.25) { + if (t0 > t1 * 0.25f) { /* only use depth cutoff after we've traced a little way into the volume */ if (luminance(tr) < shi->mat->vol.depth_cutoff) break; } @@ -623,9 +623,9 @@ static void volumeintegrate(struct ShadeInput *shi, float *col, float *co, float if (shi->obi->volume_precache) { float p2[3]; - p2[0] = p[0] + (step_vec[0] * 0.5); - p2[1] = p[1] + (step_vec[1] * 0.5); - p2[2] = p[2] + (step_vec[2] * 0.5); + p2[0] = p[0] + (step_vec[0] * 0.5f); + p2[1] = p[1] + (step_vec[1] * 0.5f); + p2[2] = p[2] + (step_vec[2] * 0.5f); vol_get_precached_scattering(&R, shi, scatter_col, p2); } else @@ -817,7 +817,7 @@ void shade_volume_inside(ShadeInput *shi, ShadeResult *shr) volume_trace(shi, shr, VOL_SHADE_INSIDE); shr->alpha = shr->alpha + prev_alpha; - CLAMP(shr->alpha, 0.0, 1.0); + CLAMP(shr->alpha, 0.0f, 1.0f); shi->mat = mat_backup; shi->obi = obi_backup; diff --git a/source/blender/render/intern/source/voxeldata.c b/source/blender/render/intern/source/voxeldata.c index 232f7fdeede..2ba346ae4c5 100644 --- a/source/blender/render/intern/source/voxeldata.c +++ b/source/blender/render/intern/source/voxeldata.c @@ -413,9 +413,9 @@ int voxeldatatex(struct Tex *tex, float *texvec, struct TexResult *texres) } case TEX_REPEAT: { - co[0] = co[0] - floor(co[0]); - co[1] = co[1] - floor(co[1]); - co[2] = co[2] - floor(co[2]); + co[0] = co[0] - floorf(co[0]); + co[1] = co[1] - floorf(co[1]); + co[2] = co[2] - floorf(co[2]); break; } case TEX_EXTEND: diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c index 13d9ead79e8..04e4ce2c647 100644 --- a/source/blender/render/intern/source/zbuf.c +++ b/source/blender/render/intern/source/zbuf.c @@ -217,24 +217,24 @@ static short cliptestf(float p, float q, float *u1, float *u2) { float r; - if(p<0.0) { + if(p<0.0f) { if(q*u2) return 0; else if(r>*u1) *u1=r; } } else { - if(p>0.0) { - if(q<0.0) return 0; + if(p>0.0f) { + if(q<0.0f) return 0; else if(q0.0) { + if(u1>0.0f) { v1[0]= v1[0]+u1*dx; v1[1]= v1[1]+u1*dy; v1[2]= v1[2]+u1*dz; @@ -898,8 +898,8 @@ void hoco_to_zco(ZSpan *zspan, float *zco, float *hoco) float div; div= 1.0f/hoco[3]; - zco[0]= zspan->zmulx*(1.0+hoco[0]*div) + zspan->zofsx; - zco[1]= zspan->zmuly*(1.0+hoco[1]*div) + zspan->zofsy; + zco[0]= zspan->zmulx*(1.0f+hoco[0]*div) + zspan->zofsx; + zco[1]= zspan->zmuly*(1.0f+hoco[1]*div) + zspan->zofsy; zco[2]= 0x7FFFFFFF *(hoco[2]*div); } @@ -1083,7 +1083,7 @@ static void zbuffillGLinv4(ZSpan *zspan, int obi, int zvlnr, float *v1, float *v y0= z1*x2-x1*z2; z0= x1*y2-y1*x2; - if(z0==0.0) return; + if(z0==0.0f) return; xx1= (x0*v1[0] + y0*v1[1])/z0 + v1[2]; @@ -1203,7 +1203,7 @@ static void zbuffillGL4(ZSpan *zspan, int obi, int zvlnr, float *v1, float *v2, y0= z1*x2-x1*z2; z0= x1*y2-y1*x2; - if(z0==0.0) return; + if(z0==0.0f) return; xx1= (x0*v1[0] + y0*v1[1])/z0 + v1[2]; @@ -1330,7 +1330,7 @@ static void zbuffillGL_onlyZ(ZSpan *zspan, int UNUSED(obi), int UNUSED(zvlnr), f y0= z1*x2-x1*z2; z0= x1*y2-y1*x2; - if(z0==0.0) return; + if(z0==0.0f) return; xx1= (x0*v1[0] + y0*v1[1])/z0 + v1[2]; @@ -1627,12 +1627,12 @@ static void clippyra(float *labda, float *v1, float *v2, int *b2, int *b3, int a if(cliptestf(-da-dw, v13+v1[a], &u1,&u2)) { if(cliptestf(da-dw, v13-v1[a], &u1,&u2)) { *b3=1; - if(u2<1.0) { + if(u2<1.0f) { labda[1]= u2; *b2=1; } else labda[1]=1.0; /* u2 */ - if(u1>0.0) { + if(u1>0.0f) { labda[0]= u1; *b2=1; } else labda[0]=0.0; @@ -1662,8 +1662,8 @@ static void makevertpyra(float *vez, float *labda, float **trias, float *v1, flo l1= labda[0]; l2= labda[1]; - if(l1!= -1.0) { - if(l1!= 0.0) { + if(l1!= -1.0f) { + if(l1!= 0.0f) { adr= vez+4*(*clve); trias[*b1]=adr; (*clve)++; @@ -1676,8 +1676,8 @@ static void makevertpyra(float *vez, float *labda, float **trias, float *v1, flo (*b1)++; } - if(l2!= -1.0) { - if(l2!= 1.0) { + if(l2!= -1.0f) { + if(l2!= 1.0f) { adr= vez+4*(*clve); trias[*b1]=adr; (*clve)++; @@ -2066,8 +2066,8 @@ void zbuffer_solid(RenderPart *pa, RenderLayer *rl, void(*fillfunc)(RenderPart*, zbuf_alloc_span(zspan, pa->rectx, pa->recty, R.clipcrop); /* needed for transform from hoco to zbuffer co */ - zspan->zmulx= ((float)R.winx)/2.0; - zspan->zmuly= ((float)R.winy)/2.0; + zspan->zmulx= ((float)R.winx)/2.0f; + zspan->zmuly= ((float)R.winy)/2.0f; if(R.osa) { zspan->zofsx= -pa->disprect.xmin - R.jit[pa->sample+zsample][0]; @@ -2290,8 +2290,8 @@ void zbuffer_shadow(Render *re, float winmat[][4], LampRen *lar, int *rectz, int /* 1.0f for clipping in clippyra()... bad stuff actually */ zbuf_alloc_span(&zspan, size, size, 1.0f); - zspan.zmulx= ((float)size)/2.0; - zspan.zmuly= ((float)size)/2.0; + zspan.zmulx= ((float)size)/2.0f; + zspan.zmuly= ((float)size)/2.0f; /* -0.5f to center the sample position */ zspan.zofsx= jitx - 0.5f; zspan.zofsy= jity - 0.5f; @@ -2527,8 +2527,8 @@ void zbuffer_sss(RenderPart *pa, unsigned int lay, void *handle, void (*func)(vo zspan.sss_func= func; /* needed for transform from hoco to zbuffer co */ - zspan.zmulx= ((float)R.winx)/2.0; - zspan.zmuly= ((float)R.winy)/2.0; + zspan.zmulx= ((float)R.winx)/2.0f; + zspan.zmuly= ((float)R.winy)/2.0f; /* -0.5f to center the sample position */ zspan.zofsx= -pa->disprect.xmin - 0.5f; @@ -2671,7 +2671,7 @@ static void zbuf_fill_in_rgba(ZSpan *zspan, DrawBufPixel *col, float *v1, float y0= z1*x2-x1*z2; z0= x1*y2-y1*x2; - if(z0==0.0) return; + if(z0==0.0f) return; xx1= (x0*v1[0] + y0*v1[1])/z0 + v1[2]; @@ -2840,8 +2840,8 @@ static void quad_bezier_2d(float *result, float *v1, float *v2, float *ipodata) p1[1]= v1[1]; /* official formula 2*p2 - .5*p1 - .5*p3 */ - p2[0]= -0.5*p1[0] - 0.5*p3[0]; - p2[1]= -0.5*p1[1] - 0.5*p3[1]; + p2[0]= -0.5f*p1[0] - 0.5f*p3[0]; + p2[1]= -0.5f*p1[1] - 0.5f*p3[1]; result[0]= ipodata[0]*p1[0] + ipodata[1]*p2[0] + ipodata[2]*p3[0]; result[1]= ipodata[0]*p1[1] + ipodata[1]*p2[1] + ipodata[2]*p3[1]; @@ -2871,8 +2871,8 @@ void RE_zbuf_accumulate_vecblur(NodeBlurData *nbd, int xsize, int ysize, float * char *rectmove, *dm; zbuf_alloc_span(&zspan, xsize, ysize, 1.0f); - zspan.zmulx= ((float)xsize)/2.0; - zspan.zmuly= ((float)ysize)/2.0; + zspan.zmulx= ((float)xsize)/2.0f; + zspan.zmuly= ((float)ysize)/2.0f; zspan.zofsx= 0.0f; zspan.zofsy= 0.0f; @@ -3258,8 +3258,8 @@ static int zbuffer_abuf(Render *re, RenderPart *pa, APixstr *APixbuf, ListBase * zbuf_alloc_span(zspan, pa->rectx, pa->recty, re->clipcrop); /* needed for transform from hoco to zbuffer co */ - zspan->zmulx= ((float)winx)/2.0; - zspan->zmuly= ((float)winy)/2.0; + zspan->zmulx= ((float)winx)/2.0f; + zspan->zmuly= ((float)winy)/2.0f; /* the buffers */ zspan->arectz= MEM_mallocN(sizeof(int)*pa->rectx*pa->recty, "Arectz"); @@ -3344,15 +3344,15 @@ static int zbuffer_abuf(Render *re, RenderPart *pa, APixstr *APixbuf, ListBase * if(partclip==0) { /* a little advantage for transp rendering (a z offset) */ - if(!shadow && ma->zoffs != 0.0) { + if(!shadow && ma->zoffs != 0.0f) { mul= 0x7FFFFFFF; - zval= mul*(1.0+ho1[2]/ho1[3]); + zval= mul*(1.0f+ho1[2]/ho1[3]); VECCOPY(vec, v1->co); /* z is negative, otherwise its being clipped */ vec[2]-= ma->zoffs; projectverto(vec, obwinmat, hoco); - fval= mul*(1.0+hoco[2]/hoco[3]); + fval= mul*(1.0f+hoco[2]/hoco[3]); polygon_offset= (int) fabs(zval - fval ); } @@ -4240,7 +4240,3 @@ unsigned short *zbuffer_transp_shade(RenderPart *pa, RenderLayer *rl, float *pas /* end of zbuf.c */ - - - - 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 5b6e8b1ab30..80c526f8649 100644 --- a/source/blender/windowmanager/SConscript +++ b/source/blender/windowmanager/SConscript @@ -26,7 +26,7 @@ if env['WITH_BF_PYTHON']: if env['WITH_BF_COLLADA']: defs.append('WITH_COLLADA') -if env['OURPLATFORM'] == 'linux2': +if env['OURPLATFORM'] == 'linux': cflags='-pthread' incs += ' ../../../extern/binreloc/include' @@ -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/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 20f9d2237c2..6b3a574b6b6 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -450,7 +450,7 @@ void WM_read_file(bContext *C, const char *filepath, ReportList *reports) /* called on startup, (context entirely filled with NULLs) */ /* or called for 'New File' */ /* op can be NULL */ -int WM_read_homefile(bContext *C, ReportList *reports, short from_memory) +int WM_read_homefile(bContext *C, ReportList *UNUSED(reports), short from_memory) { ListBase wmbase; char tstr[FILE_MAXDIR+FILE_MAXFILE]; @@ -466,7 +466,6 @@ int WM_read_homefile(bContext *C, ReportList *reports, short from_memory) } else { tstr[0] = '\0'; from_memory = 1; - BKE_report(reports, RPT_INFO, "Config directory with "STRINGIFY(BLENDER_STARTUP_FILE)" file not found."); } } diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c index 2dfe4d8ccdc..6887aa4c717 100644 --- a/source/blender/windowmanager/intern/wm_keymap.c +++ b/source/blender/windowmanager/intern/wm_keymap.c @@ -106,6 +106,9 @@ static int wm_keymap_item_equals_result(wmKeyMapItem *a, wmKeyMapItem *b) (a->ptr && b->ptr && IDP_EqualsProperties(a->ptr->data, b->ptr->data)))) return 0; + if((a->flag & KMI_INACTIVE) != (b->flag & KMI_INACTIVE)) + return 0; + return (a->propvalue == b->propvalue); } diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 105b2e8189a..d794685ea70 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1202,7 +1202,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 +1219,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 +1228,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); @@ -2010,8 +2010,6 @@ static void WM_OT_save_mainfile(wmOperatorType *ot) static int wm_collada_export_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - int selected = 0; - if(!RNA_property_is_set(op->ptr, "filepath")) { char filepath[FILE_MAX]; BLI_strncpy(filepath, G.main->name, sizeof(filepath)); @@ -2928,7 +2926,7 @@ static void radial_control_paint_cursor(bContext *C, int x, int y, void *customd case PROP_FACTOR: r1= (1 - rc->current_value) * WM_RADIAL_CONTROL_DISPLAY_SIZE; r2= tex_radius= WM_RADIAL_CONTROL_DISPLAY_SIZE; - alpha = rc->current_value / 2 + 0.5; + alpha = rc->current_value / 2.0f + 0.5f; break; case PROP_ANGLE: r1= r2= tex_radius= WM_RADIAL_CONTROL_DISPLAY_SIZE; 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 48dfe74afde..608971338c5 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( @@ -137,6 +134,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}") @@ -548,11 +546,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 23931381579..2135af0e3a2 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -184,20 +184,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); @@ -371,9 +357,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; @@ -1183,18 +1169,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/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/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp index 49f00e39110..3f09eee013e 100644 --- a/source/gameengine/Ketsji/KX_Light.cpp +++ b/source/gameengine/Ketsji/KX_Light.cpp @@ -254,8 +254,12 @@ void KX_LightObject::BindShadowBuffer(RAS_IRasterizer *ras, KX_Camera *cam, MT_T cam->NodeUpdateGS(0); /* setup rasterizer transformations */ + /* SetViewMatrix may use stereomode which we temporarily disable here */ + RAS_IRasterizer::StereoMode stereomode = ras->GetStereoMode(); + ras->SetStereoMode(RAS_IRasterizer::RAS_STEREO_NOSTEREO); ras->SetProjectionMatrix(projectionmat); ras->SetViewMatrix(modelviewmat, cam->NodeGetWorldOrientation(), cam->NodeGetWorldPosition(), cam->GetCameraData()->m_perspective); + ras->SetStereoMode(stereomode); } void KX_LightObject::UnbindShadowBuffer(RAS_IRasterizer *ras)