Merge with trunk r37849
authorMiika Hamalainen <blender@miikah.org>
Mon, 27 Jun 2011 08:11:05 +0000 (08:11 +0000)
committerMiika Hamalainen <blender@miikah.org>
Mon, 27 Jun 2011 08:11:05 +0000 (08:11 +0000)
229 files changed:
CMakeLists.txt
SConstruct
build_files/buildbot/master.cfg
build_files/buildbot/master_unpack.py
build_files/buildbot/slave_pack.py
build_files/cmake/FindPythonLibsUnix.cmake [deleted file]
build_files/cmake/Modules/FindFftw3.cmake [new file with mode: 0644]
build_files/cmake/Modules/FindJack.cmake [new file with mode: 0644]
build_files/cmake/Modules/FindJeMalloc.cmake [new file with mode: 0644]
build_files/cmake/Modules/FindOpenEXR.cmake
build_files/cmake/Modules/FindOpenJPEG.cmake [new file with mode: 0644]
build_files/cmake/Modules/FindPythonLibsUnix.cmake [new file with mode: 0644]
build_files/cmake/Modules/FindSamplerate.cmake [new file with mode: 0644]
build_files/cmake/Modules/FindSndFile.cmake [new file with mode: 0644]
build_files/cmake/cmake_consistency_check.py
build_files/cmake/cmake_consistency_check_config.py [new file with mode: 0644]
build_files/cmake/macros.cmake
build_files/scons/config/aix4-config.py
build_files/scons/config/linux2-config.py
build_files/scons/config/win32-vc-config.py
build_files/scons/config/win64-vc-config.py
doc/blender_file_format/BlendFileDnaExporter_25.py
doc/blender_file_format/BlendFileReader.py
doc/doxygen/Doxyfile
doc/python_api/blender-org/layout.html
doc/python_api/examples/aud.py [new file with mode: 0644]
doc/python_api/examples/bpy.props.4.py [new file with mode: 0644]
doc/python_api/rst/change_log.rst
doc/python_api/sphinx_changelog_gen.py
doc/python_api/sphinx_doc_gen.py
extern/bullet2/CMakeLists.txt
extern/libopenjpeg/CMakeLists.txt
intern/CMakeLists.txt
intern/audaspace/CMakeLists.txt
intern/ffmpeg/ffmpeg_compat.h
intern/ghost/intern/GHOST_SystemCocoa.mm
intern/ghost/intern/GHOST_Window.cpp
intern/ghost/intern/GHOST_Window.h
intern/ghost/intern/GHOST_WindowCarbon.cpp
intern/ghost/intern/GHOST_WindowCocoa.h
intern/ghost/intern/GHOST_WindowCocoa.mm
intern/ghost/intern/GHOST_WindowWin32.cpp
intern/ghost/intern/GHOST_WindowX11.cpp
intern/iksolver/intern/IK_QSegment.cpp
intern/itasc/ConstraintSet.cpp
intern/smoke/CMakeLists.txt
release/datafiles/splash.png
release/scripts/modules/bpy_extras/image_utils.py
release/scripts/modules/bpy_extras/mesh_utils.py
release/scripts/modules/bpy_extras/view3d_utils.py
release/scripts/modules/bpy_types.py
release/scripts/modules/rna_prop_ui.py
release/scripts/startup/bl_operators/mesh.py
release/scripts/startup/bl_operators/nla.py
release/scripts/startup/bl_operators/object_quick_effects.py
release/scripts/startup/bl_operators/uvcalc_smart_project.py
release/scripts/startup/bl_operators/wm.py
release/scripts/startup/bl_ui/properties_data_curve.py
release/scripts/startup/bl_ui/properties_data_mesh.py
release/scripts/startup/bl_ui/properties_data_metaball.py
release/scripts/startup/bl_ui/properties_data_modifier.py
release/scripts/startup/bl_ui/properties_material.py
release/scripts/startup/bl_ui/properties_object_constraint.py
release/scripts/startup/bl_ui/properties_particle.py
release/scripts/startup/bl_ui/space_info.py
release/scripts/startup/bl_ui/space_userpref.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
release/text/GPL-license.txt
release/text/readme.html
source/blender/blenkernel/BKE_blender.h
source/blender/blenkernel/BKE_particle.h
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/brush.c
source/blender/blenkernel/intern/bvhutils.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/paint.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenkernel/intern/sound.c
source/blender/blenkernel/intern/writeffmpeg.c
source/blender/blenlib/BLI_callbacks.h [new file with mode: 0644]
source/blender/blenlib/BLI_math_color.h
source/blender/blenlib/BLI_math_geom.h
source/blender/blenlib/CMakeLists.txt
source/blender/blenlib/intern/callbacks.c [new file with mode: 0644]
source/blender/blenlib/intern/math_color.c
source/blender/blenlib/intern/math_geom.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/blenpluginapi/CMakeLists.txt
source/blender/collada/AnimationImporter.cpp
source/blender/collada/ArmatureImporter.cpp
source/blender/collada/CMakeLists.txt
source/blender/collada/DocumentImporter.cpp
source/blender/collada/DocumentImporter.h
source/blender/collada/LightExporter.cpp
source/blender/collada/MeshImporter.cpp
source/blender/collada/SkinInfo.cpp
source/blender/collada/collada_internal.cpp
source/blender/editors/datafiles/splash.png.c
source/blender/editors/datafiles/startup.blend.c
source/blender/editors/include/UI_interface.h
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/interface/interface_style.c
source/blender/editors/interface/view2d.c
source/blender/editors/mesh/editmesh_mods.c
source/blender/editors/object/object_bake.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/render/CMakeLists.txt
source/blender/editors/render/render_opengl.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sound/CMakeLists.txt
source/blender/editors/sound/sound_ops.c
source/blender/editors/space_buttons/buttons_intern.h
source/blender/editors/space_buttons/buttons_ops.c
source/blender/editors/space_buttons/space_buttons.c
source/blender/editors/space_console/console_ops.c
source/blender/editors/space_file/file_draw.c
source/blender/editors/space_file/file_ops.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_file/filesel.c
source/blender/editors/space_graph/CMakeLists.txt
source/blender/editors/space_graph/graph_edit.c
source/blender/editors/space_info/info_stats.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/space_node.c
source/blender/editors/space_outliner/outliner.c
source/blender/editors/space_sequencer/CMakeLists.txt
source/blender/editors/space_sequencer/sequencer_add.c
source/blender/editors/space_view3d/drawanimviz.c
source/blender/editors/space_view3d/drawarmature.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_intern.h
source/blender/editors/transform/transform.h
source/blender/editors/transform/transform_constraints.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_snap.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/gpu/intern/gpu_material.c
source/blender/imbuf/CMakeLists.txt
source/blender/imbuf/IMB_imbuf.h
source/blender/imbuf/intern/divers.c
source/blender/imbuf/intern/util.c
source/blender/makesdna/DNA_particle_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_space_types.h
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_curve.c
source/blender/makesrna/intern/rna_mesh.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_particle.c
source/blender/makesrna/intern/rna_rna.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/modifiers/intern/MOD_explode.c
source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c
source/blender/nodes/intern/CMP_nodes/CMP_glare.c
source/blender/nodes/intern/CMP_nodes/CMP_rotate.c
source/blender/nodes/intern/SHD_nodes/SHD_material.c
source/blender/python/BPY_extern.h
source/blender/python/generic/IDProp.c
source/blender/python/generic/IDProp.h
source/blender/python/generic/mathutils_Matrix.c
source/blender/python/generic/mathutils_Vector.c
source/blender/python/generic/mathutils_geometry.c
source/blender/python/generic/py_capi_utils.c
source/blender/python/generic/py_capi_utils.h
source/blender/python/intern/CMakeLists.txt
source/blender/python/intern/bpy.c
source/blender/python/intern/bpy_app.c
source/blender/python/intern/bpy_app_handlers.c [new file with mode: 0644]
source/blender/python/intern/bpy_app_handlers.h [moved from source/blender/blenlib/intern/BLI_callbacks.h with 64% similarity]
source/blender/python/intern/bpy_interface.c
source/blender/python/intern/bpy_intern_string.c [new file with mode: 0644]
source/blender/python/intern/bpy_intern_string.h [new file with mode: 0644]
source/blender/python/intern/bpy_props.c
source/blender/python/intern/bpy_rna.c
source/blender/python/intern/bpy_rna_array.c
source/blender/python/intern/bpy_util.c
source/blender/quicktime/CMakeLists.txt
source/blender/quicktime/apple/qtkit_export.m
source/blender/render/CMakeLists.txt
source/blender/render/extern/include/RE_shader_ext.h
source/blender/render/intern/include/rayobject.h
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/rayshade.c
source/blender/render/intern/source/render_texture.c
source/blender/render/intern/source/rendercore.c
source/blender/render/intern/source/renderdatabase.c
source/blender/render/intern/source/shadeinput.c
source/blender/render/intern/source/shadeoutput.c
source/blender/render/intern/source/strand.c
source/blender/render/intern/source/volume_precache.c
source/blender/render/intern/source/volumetric.c
source/blender/render/intern/source/zbuf.c
source/blender/windowmanager/CMakeLists.txt
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_init_exit.c
source/blender/windowmanager/intern/wm_operators.c
source/blender/windowmanager/intern/wm_window.c
source/blenderplayer/bad_level_call_stubs/CMakeLists.txt
source/creator/CMakeLists.txt
source/creator/creator.c
source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
source/gameengine/BlenderRoutines/CMakeLists.txt
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Converter/CMakeLists.txt
source/gameengine/Converter/KX_ConvertActuators.cpp
source/gameengine/Ketsji/CMakeLists.txt
source/gameengine/Ketsji/KX_Camera.cpp
source/gameengine/Ketsji/KX_KetsjiEngine.cpp
source/gameengine/Ketsji/KX_SoundActuator.cpp
source/gameengine/Ketsji/KX_SoundActuator.h
source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h
source/gameengine/VideoTexture/CMakeLists.txt

index f767b2c3e3fcb4b1941017792f9bf225514e5274..d65e62d88fc3c58a47881bd6c980645ec2beae9b 100644 (file)
@@ -49,8 +49,13 @@ endif()
 
 cmake_minimum_required(VERSION 2.8)
 
+if(NOT EXECUTABLE_OUTPUT_PATH)
+       set(FIRST_RUN "TRUE")
+endif()
+
+
 # this starts out unset
-set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/build_files/cmake/Modules/")
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/build_files/cmake/Modules")
 
 # quiet output for Makefiles, 'make -s' helps too
 # set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
@@ -99,6 +104,9 @@ option(WITH_BULLET        "Enable Bullet (Physics Engine)" ON)
 option(WITH_GAMEENGINE    "Enable Game Engine" ON)
 option(WITH_PLAYER        "Build Player" OFF)
 
+option(WITH_AUDASPACE    "Build with blenders audio library" ON)
+mark_as_advanced(WITH_AUDASPACE)
+
 option(WITH_HEADLESS      "Build without graphical support (renderfarm, server mode only)" OFF)
 mark_as_advanced(WITH_HEADLESS)
 
@@ -195,8 +203,8 @@ if(NOT WITH_GAMEENGINE AND WITH_PLAYER)
        message(FATAL_ERROR "WITH_PLAYER requires WITH_GAMEENGINE")
 endif()
 
-if(NOT WITH_SAMPLERATE AND (WITH_OPENAL OR WITH_SDL OR WITH_JACK))
-       message(FATAL_ERROR "WITH_OPENAL/WITH_SDL/WITH_JACK require WITH_SAMPLERATE")
+if(NOT WITH_AUDASPACE AND (WITH_OPENAL OR WITH_SDL OR WITH_JACK))
+       message(FATAL_ERROR "WITH_OPENAL/WITH_SDL/WITH_JACK/WITH_CODEC_FFMPEG require WITH_AUDASPACE")
 endif()
 
 if(NOT WITH_IMAGE_OPENJPEG AND WITH_IMAGE_REDCODE)
@@ -246,13 +254,12 @@ set(CXX_WARNINGS "")
 # On Unix: 
 #   cmake ../blender \
 #         -D PYTHON_VERSION=3.2 \
-#         -D PYTHON_INCLUDE_DIRS=/opt/py32/include/python3.2d \
-#         -D PYTHON_LIBPATH=/opt/py32/lib \
-#         -D PYTHON_LIBRARY=python3.2d
+#         -D PYTHON_INCLUDE_DIR=/opt/py32/include/python3.2d \
+#         -D PYTHON_LIBRARY=/opt/py32/lib/libpython3.2d.so
 #
 # On Macs: 
 #   cmake ../blender \
-#         -D PYTHON_INCLUDE_DIRS=/System/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2 \
+#         -D PYTHON_INCLUDE_DIR=/System/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2 \
 #         -D PYTHON_LIBPATH=/System/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/config \
 #         -G Xcode
 #
@@ -268,65 +275,48 @@ if(UNIX AND NOT APPLE)
                set(CMAKE_LIBRARY_PATH "/usr/lib/x86_64-linux-gnu;${CMAKE_LIBRARY_PATH}")
        endif()
 
-       if(WITH_OPENAL)
-               find_package(OpenAL)
-               if(NOT OPENAL_FOUND)
-                       set(WITH_OPENAL OFF)
-               endif()
-       endif()
+       find_package(JPEG REQUIRED)
+       find_package(PNG REQUIRED)
+       find_package(ZLIB REQUIRED)
+       find_package(Freetype REQUIRED)
 
-       if(WITH_JACK)
-               set(JACK /usr)
-               set(JACK_INC ${JACK}/include/jack)
-               set(JACK_LIB jack)
-               set(JACK_LIBPATH ${JACK}/lib)
-       endif()
+       if(WITH_PYTHON)
+               # No way to set py32. remove for now.
+               # find_package(PythonLibs)
 
-       if(WITH_CODEC_SNDFILE)
-               set(SNDFILE /usr)
-               set(SNDFILE_INC ${SNDFILE}/include)
-               set(SNDFILE_LIB sndfile)
-               set(SNDFILE_LIBPATH ${SNDFILE}/lib)
+               # Use our own instead, since wothout py is such a rare case,
+               # require this package
+               find_package(PythonLibsUnix REQUIRED)
        endif()
 
-       if(WITH_INTERNATIONAL)
-               find_library(INTL_LIBRARY
-                       NAMES intl
-                       PATHS
-                       /sw/lib
-               )
 
-               find_library(ICONV_LIBRARY
-                       NAMES iconv
-                       PATHS
-                       /sw/lib
-               )
-               mark_as_advanced(ICONV_LIBRARY)
-               mark_as_advanced(INTL_LIBRARY)
-
-               if(INTL_LIBRARY AND ICONV_LIBRARY)
-                       set(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY})
+       if(WITH_IMAGE_OPENEXR)
+               find_package(OpenEXR)  # our own module
+               if(NOT OPENEXR_FOUND)
+                       set(WITH_IMAGE_OPENEXR OFF)
                endif()
        endif()
 
-       find_package(Freetype)
-       # unset(FREETYPE_INCLUDE_DIRS CACHE) # cant use
-
-
-       if(WITH_PYTHON)
-               # No way to set py32. remove for now.
-               # find_package(PythonLibs)
-
-               # defines...
-               
-               #  PYTHON_VERSION
-               #  PYTHON_INCLUDE_DIRS
-               #  PYTHON_LIBRARY
-               #  PYTHON_LIBPATH
-               #  PYTHON_LINKFLAGS
+       if(WITH_IMAGE_OPENJPEG)
+               find_package(OpenJPEG)
+               if(NOT OPENJPEG_FOUND)
+                       set(WITH_IMAGE_OPENJPEG OFF)
+               endif()
+       endif()
 
-               include(build_files/cmake/FindPythonLibsUnix.cmake)
+       if(WITH_IMAGE_TIFF)
+               find_package(TIFF)
+               if(NOT TIFF_FOUND)
+                       set(WITH_IMAGE_TIFF OFF)
+               endif()
+       endif()
 
+       # Audio IO
+       if(WITH_OPENAL)
+               find_package(OpenAL)
+               if(NOT OPENAL_FOUND)
+                       set(WITH_OPENAL OFF)
+               endif()
        endif()
 
        if(WITH_SDL)
@@ -341,56 +331,71 @@ if(UNIX AND NOT APPLE)
                endif()
        endif()
 
-       if(WITH_IMAGE_OPENEXR)
-               find_package(OpenEXR)  # our own module
-               if(NOT OPENEXR_FOUND)
-                       set(WITH_IMAGE_OPENEXR OFF)
+       if(WITH_JACK)
+               find_package(Jack)
+               if(NOT JACK_FOUND)
+                       set(WITH_JACK OFF)
                endif()
        endif()
 
-       if(WITH_IMAGE_TIFF)
-               find_package(TIFF)
-               if(NOT TIFF_FOUND)
-                       set(WITH_IMAGE_TIFF OFF)
+       # Codecs
+       if(WITH_CODEC_SNDFILE)
+               find_package(SndFile)
+               if(NOT SNDFILE_FOUND)
+                       set(WITH_CODEC_SNDFILE OFF)
                endif()
        endif()
 
-       find_package(JPEG REQUIRED)
-
-       find_package(PNG REQUIRED)
-
-       find_package(ZLIB REQUIRED)
-
        if(WITH_CODEC_FFMPEG)
                set(FFMPEG /usr CACHE FILEPATH "FFMPEG Directory")
                mark_as_advanced(FFMPEG)
-               set(FFMPEG_INC ${FFMPEG}/include)
-               set(FFMPEG_LIB avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries")
-               mark_as_advanced(FFMPEG_LIB)
+               set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
+               set(FFMPEG_LIBRARIES avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries")
+               mark_as_advanced(FFMPEG_LIBRARIES)
                set(FFMPEG_LIBPATH ${FFMPEG}/lib)
                set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS")
        endif()
 
+       if(WITH_INTERNATIONAL)
+               find_library(INTL_LIBRARY
+                       NAMES intl
+                       PATHS
+                       /sw/lib
+               )
+
+               find_library(ICONV_LIBRARY
+                       NAMES iconv
+                       PATHS
+                       /sw/lib
+               )
+               mark_as_advanced(ICONV_LIBRARY)
+               mark_as_advanced(INTL_LIBRARY)
+
+               if(INTL_LIBRARY AND ICONV_LIBRARY)
+                       set(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY})
+               endif()
+       endif()
+
        if(WITH_FFTW3)
-               set(FFTW3 /usr)
-               set(FFTW3_INC ${FFTW3}/include)
-               set(FFTW3_LIB fftw3)
-               set(FFTW3_LIBPATH ${FFTW3}/lib)
+               find_package(Fftw3)
+               if(NOT FFTW3_FOUND)
+                       set(WITH_FFTW3 OFF)
+               endif()
        endif()
 
        if(WITH_SAMPLERATE)
-               set(LIBSAMPLERATE /usr)
-               set(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
-               set(LIBSAMPLERATE_LIB samplerate)
-               set(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
+               find_package(Samplerate)
+               if(NOT SAMPLERATE_FOUND)
+                       set(WITH_SAMPLERATE OFF)
+               endif()
        endif()
 
        if(WITH_OPENCOLLADA)
                set(OPENCOLLADA /usr/local/opencollada CACHE FILEPATH "OpenCollada Directory")
                mark_as_advanced(OPENCOLLADA)
                set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
-               set(OPENCOLLADA_LIB OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre ftoa buffer xml2)
-               set(OPENCOLLADA_INC ${OPENCOLLADA})
+               set(OPENCOLLADA_LIBRARIES OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre ftoa buffer xml2)
+               set(OPENCOLLADA_INCLUDE_DIR ${OPENCOLLADA})
 
                set(PCRE /usr CACHE FILEPATH "PCRE Directory")
                mark_as_advanced(PCRE)
@@ -404,12 +409,10 @@ if(UNIX AND NOT APPLE)
        endif()
 
        if(WITH_MEM_JEMALLOC)
-               set(JEMALLOC /usr)
-               set(JEMALLOC_LIBRARY jemalloc CACHE STRING "JeMalloc library")
-               set(JEMALLOC_LIBPATH ${JEMALLOC}/lib  CACHE FILEPATH "JeMalloc library path")
-               # no use for this yet.
-               # set(JEMALLOC_INCLUDE_DIR ${JEMALLOC}/include  CACHE FILEPATH "JeMalloc include path")
-               unset(JEMALLOC)
+               find_package(JeMalloc)
+               if(NOT JEMALLOC_FOUND)
+                       set(WITH_MEM_JEMALLOC OFF)
+               endif()
        endif()
 
        # OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed
@@ -431,10 +434,8 @@ if(UNIX AND NOT APPLE)
                if(NOT WITH_PYTHON_MODULE)
                        # BSD's dont use libdl.so
                        list(APPEND LLIBS -ldl)
-
                        # binreloc is linux only
-                       set(BINRELOC ${CMAKE_SOURCE_DIR}/extern/binreloc)
-                       set(BINRELOC_INC ${BINRELOC}/include)
+                       set(BINRELOC_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/binreloc/include)
                        set(WITH_BINRELOC ON)
                endif()
        endif()
@@ -487,16 +488,16 @@ elseif(WIN32)
 
        if(WITH_INTERNATIONAL)
                set(ICONV ${LIBDIR}/iconv)
-               set(ICONV_INC ${ICONV}/include)
-               set(ICONV_LIB iconv)
+               set(ICONV_INCLUDE_DIRS ${ICONV}/include)
+               set(ICONV_LIBRARIES iconv)
                set(ICONV_LIBPATH ${ICONV}/lib)
        endif()
 
        if(WITH_SAMPLERATE)
-               set(LIBSAMPLERATE ${LIBDIR}/samplerate)
-               set(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
-               set(LIBSAMPLERATE_LIB libsamplerate)
-               set(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
+               set(SAMPLERATE ${LIBDIR}/samplerate)
+               set(SAMPLERATE_INCLUDE_DIRS ${SAMPLERATE}/include)
+               set(SAMPLERATE_LIBRARIES libsamplerate)
+               set(SAMPLERATE_LIBPATH ${SAMPLERATE}/lib)
        endif()
 
        set(PNG "${LIBDIR}/png")
@@ -518,9 +519,9 @@ elseif(WIN32)
 
        if(WITH_CODEC_SNDFILE)
                set(SNDFILE ${LIBDIR}/sndfile)
-               set(SNDFILE_INC ${SNDFILE}/include)
-               set(SNDFILE_LIB libsndfile-1)
-               set(SNDFILE_LIBPATH ${SNDFILE}/lib)
+               set(SNDFILE_INCLUDE_DIRS ${SNDFILE}/include)
+               set(SNDFILE_LIBRARIES libsndfile-1)
+               set(SNDFILE_LIBPATH ${SNDFILE}/lib) # TODO, deprecate
        endif()
 
        if(WITH_SDL)
@@ -532,8 +533,8 @@ elseif(WIN32)
 
        if(WITH_CODEC_QUICKTIME)
                set(QUICKTIME ${LIBDIR}/QTDevWin)
-               set(QUICKTIME_INC ${QUICKTIME}/CIncludes)
-               set(QUICKTIME_LIB qtmlClient)
+               set(QUICKTIME_INCLUDE_DIRS ${QUICKTIME}/CIncludes)
+               set(QUICKTIME_LIBRARIES qtmlClient)
                set(QUICKTIME_LIBPATH ${QUICKTIME}/Libraries)
        endif()
 
@@ -543,13 +544,13 @@ elseif(WIN32)
 
        if(MSVC)
                if(CMAKE_CL_64)
-                       set(LLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid )
+                       set(LLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid)
                else()
-                       set(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32 vfw32 winmm)
+                       set(LLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid)
                endif()
                
-               set(CMAKE_CXX_FLAGS "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /we4013 /wd4018 /wd4800 /wd4244 /wd4305 /wd4065 /wd4267" CACHE STRING "MSVC MT C++ flags " FORCE)
-               set(CMAKE_C_FLAGS   "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /we4013 /wd4018 /wd4800 /wd4244 /wd4305 /wd4065 /wd4267" CACHE STRING "MSVC MT C++ flags " FORCE)
+               set(CMAKE_CXX_FLAGS "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_CONSOLE /D_LIB /nologo /Ob1 /J /W0 /Gd /wd4018 /wd4244 /wd4305 /wd4800 /wd4065 /wd4267 /we4013" CACHE STRING "MSVC MT C++ flags " FORCE)
+               set(CMAKE_C_FLAGS   "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_CONSOLE /D_LIB /nologo /Ob1 /J /W0 /Gd /wd4018 /wd4244 /wd4305 /wd4800 /wd4065 /wd4267 /we4013 /EHsc" CACHE STRING "MSVC MT C++ flags " FORCE)
 
                if(CMAKE_CL_64)
                        set(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
@@ -596,9 +597,9 @@ elseif(WIN32)
                endif()
 
                set(PTHREADS ${LIBDIR}/pthreads)
-               set(PTHREADS_INC ${PTHREADS}/include)
+               set(PTHREADS_INCLUDE_DIRS ${PTHREADS}/include)
                set(PTHREADS_LIBPATH ${PTHREADS}/lib)
-               set(PTHREADS_LIB pthreadVC2)
+               set(PTHREADS_LIBRARIES pthreadVC2)
                
                set(FREETYPE ${LIBDIR}/freetype)
                set(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
@@ -607,23 +608,36 @@ elseif(WIN32)
 
                if(WITH_FFTW3)
                        set(FFTW3 ${LIBDIR}/fftw3)
-                       set(FFTW3_LIB libfftw)
-                       set(FFTW3_INC ${FFTW3}/include)
+                       set(FFTW3_LIBRARIES libfftw)
+                       set(FFTW3_INCLUDE_DIRS ${FFTW3}/include)
                        set(FFTW3_LIBPATH ${FFTW3}/lib)
                endif()
 
                if(WITH_OPENCOLLADA)
-                       set(OPENCOLLADA ${LIBDIR}/opencollada)
-                       set(OPENCOLLADA_INC ${OPENCOLLADA}/include)
-                       set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
-                       set(OPENCOLLADA_LIB OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils OpenCOLLADAStreamWriter MathMLSolver GeneratedSaxParser xml2 buffer ftoa UTF)
-                       set(PCRE_LIB pcre)
+                       set(OPENCOLLADA_INCLUDE_DIR
+                               ${LIBDIR}/opencollada/include
+                       )
+                       set(OPENCOLLADA_LIBRARIES
+                               ${LIBDIR}/opencollada/lib/OpenCOLLADASaxFrameworkLoader.lib
+                               ${LIBDIR}/opencollada/lib/OpenCOLLADAFramework.lib
+                               ${LIBDIR}/opencollada/lib/OpenCOLLADABaseUtils.lib
+                               ${LIBDIR}/opencollada/lib/OpenCOLLADAStreamWriter.lib
+                               ${LIBDIR}/opencollada/lib/MathMLSolver.lib
+                               ${LIBDIR}/opencollada/lib/GeneratedSaxParser.lib
+                               ${LIBDIR}/opencollada/lib/xml2.lib
+                               ${LIBDIR}/opencollada/lib/buffer.lib
+                               ${LIBDIR}/opencollada/lib/ftoa.lib
+                               ${LIBDIR}/opencollada/lib/UTF.lib
+                       )
+                       set(PCRE_LIB
+                               ${LIBDIR}/opencollada/lib/pcre.lib
+                       )
                endif()
-       
+
                if(WITH_CODEC_FFMPEG)
                        set(FFMPEG ${LIBDIR}/ffmpeg)
-                       set(FFMPEG_INC ${FFMPEG}/include ${FFMPEG}/include/msvc)
-                       set(FFMPEG_LIB avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0)
+                       set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include ${FFMPEG}/include/msvc)
+                       set(FFMPEG_LIBRARIES avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0)
                        set(FFMPEG_LIBPATH ${FFMPEG}/lib)
                endif()
 
@@ -667,25 +681,23 @@ elseif(WIN32)
 
                if(WITH_JACK)
                        set(JACK ${LIBDIR}/jack)
-                       set(JACK_INC ${JACK}/include/jack ${JACK}/include)
-                       set(JACK_LIB libjack)
+                       set(JACK_INCLUDE_DIRS ${JACK}/include/jack ${JACK}/include)
+                       set(JACK_LIBRARIES libjack)
                        set(JACK_LIBPATH ${JACK}/lib)
                endif()
 
                if(WITH_PYTHON)
-                       set(PYTHON ${LIBDIR}/python)
                        set(PYTHON_VERSION 3.2)
-                       set(PYTHON_INCLUDE_DIRS "${PYTHON}/include/python${PYTHON_VERSION}")
+                       set(PYTHON_INCLUDE_DIRS "${LIBDIR}/python/include/python${PYTHON_VERSION}")
                        # set(PYTHON_BINARY python) # not used yet
-                       set(PYTHON_LIBRARY python32)
-                       set(PYTHON_LIBPATH ${PYTHON}/lib)
+                       set(PYTHON_LIBRARIES ${LIBDIR}/python/lib/python32.lib)
                endif()
 
                # MSVC only, Mingw doesnt need
                if(CMAKE_CL_64)
-                       set(PLATFORM_LINKFLAGS "/MACHINE:X64 /NODEFAULTLIB:libc.lib /STACK:2097152 ")
+                       set(PLATFORM_LINKFLAGS "/SUBSYSTEM:CONSOLE /MACHINE:X64 /STACK:2097152 /OPT:NOREF /INCREMENTAL:NO /NODEFAULTLIB:\"msvcrt.lib\" /NODEFAULTLIB:\"msvcmrt.lib\" /NODEFAULTLIB:\"msvcurt.lib\" /NODEFAULTLIB:\"msvcrtd.lib\" ")
                else()
-                       set(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib /STACK:2097152 ")
+                       set(PLATFORM_LINKFLAGS "/SUBSYSTEM:CONSOLE /MACHINE:IX86 /STACK:2097152 /INCREMENTAL:NO /LARGEADDRESSAWARE /NODEFAULTLIB:\"msvcrt.lib\" /NODEFAULTLIB:\"msvcmrt.lib\" /NODEFAULTLIB:\"msvcurt.lib\" /NODEFAULTLIB:\"msvcrtd.lib\" ")
                endif()
 
                set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt.lib;libc.lib ")
@@ -721,9 +733,9 @@ elseif(WIN32)
                set(ZLIB_LIBRARIES z)
 
                set(PTHREADS ${LIBDIR}/pthreads)
-               set(PTHREADS_INC ${PTHREADS}/include)
+               set(PTHREADS_INCLUDE_DIRS ${PTHREADS}/include)
                set(PTHREADS_LIBPATH ${PTHREADS}/lib)
-               set(PTHREADS_LIB pthreadGC2)
+               set(PTHREADS_LIBRARIES pthreadGC2)
                
                set(FREETYPE ${LIBDIR}/gcc/freetype)
                set(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
@@ -732,23 +744,23 @@ elseif(WIN32)
 
                if(WITH_FFTW3)
                        set(FFTW3 ${LIBDIR}/gcc/fftw3)
-                       set(FFTW3_LIB fftw3)
-                       set(FFTW3_INC ${FFTW3}/include)
+                       set(FFTW3_LIBRARIES fftw3)
+                       set(FFTW3_INCLUDE_DIRS ${FFTW3}/include)
                        set(FFTW3_LIBPATH ${FFTW3}/lib)
                endif()
 
                if(WITH_OPENCOLLADA)
                        set(OPENCOLLADA ${LIBDIR}/gcc/opencollada)
-                       set(OPENCOLLADA_INC ${OPENCOLLADA}/include)
+                       set(OPENCOLLADA_INCLUDE_DIR ${OPENCOLLADA}/include)
                        set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib ${OPENCOLLADA}/lib)
-                       set(OPENCOLLADA_LIB OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa)
+                       set(OPENCOLLADA_LIBRARIES OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa)
                        set(PCRE_LIB pcre)
                endif()
                
                if(WITH_CODEC_FFMPEG)
                        set(FFMPEG ${LIBDIR}/ffmpeg)
-                       set(FFMPEG_INC ${FFMPEG}/include ${FFMPEG}/include)
-                       set(FFMPEG_LIB avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0)
+                       set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include ${FFMPEG}/include)
+                       set(FFMPEG_LIBRARIES avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0)
                        set(FFMPEG_LIBPATH ${FFMPEG}/lib)
                endif()
 
@@ -771,8 +783,8 @@ elseif(WIN32)
 
                if(WITH_JACK)
                        set(JACK ${LIBDIR}/jack)
-                       set(JACK_INC ${JACK}/include/jack ${JACK}/include)
-                       set(JACK_LIB jack)
+                       set(JACK_INCLUDE_DIRS ${JACK}/include/jack ${JACK}/include)
+                       set(JACK_LIBRARIES jack)
                        set(JACK_LIBPATH ${JACK}/lib)
                        
                        # TODO, gives linking errors, force off
@@ -784,7 +796,7 @@ elseif(WIN32)
                        set(PYTHON_VERSION 3.2)
                        set(PYTHON_INCLUDE_DIRS "${PYTHON}/include/python${PYTHON_VERSION}")
                        # set(PYTHON_BINARY python) # not used yet
-                       set(PYTHON_LIBRARY python32mw)
+                       set(PYTHON_LIBRARIES ${PYTHON}/lib/python32mw.lib)
                        set(PYTHON_LIBPATH ${PYTHON}/lib)
                endif()
 
@@ -793,7 +805,7 @@ elseif(WIN32)
        endif()
 
        # used in many places so include globally, like OpenGL
-       blender_include_dirs("${PTHREADS_INC}")
+       blender_include_dirs("${PTHREADS_INCLUDE_DIRS}")
 
 elseif(APPLE)
 
@@ -824,16 +836,16 @@ elseif(APPLE)
 
        if(WITH_JACK)
                set(JACK /usr)
-               set(JACK_INC ${JACK}/include/jack)
-               set(JACK_LIB jack)
+               set(JACK_INCLUDE_DIRS ${JACK}/include/jack)
+               set(JACK_LIBRARIES jack)
                set(JACK_LIBPATH ${JACK}/lib)
        endif()
 
        if(WITH_CODEC_SNDFILE)
                set(SNDFILE ${LIBDIR}/sndfile)
-               set(SNDFILE_INC ${SNDFILE}/include)
-               set(SNDFILE_LIB sndfile FLAC ogg vorbis vorbisenc)
-               set(SNDFILE_LIBPATH ${SNDFILE}/lib ${FFMPEG}/lib)
+               set(SNDFILE_INCLUDE_DIRS ${SNDFILE}/include)
+               set(SNDFILE_LIBRARIES sndfile FLAC ogg vorbis vorbisenc)
+               set(SNDFILE_LIBPATH ${SNDFILE}/lib ${FFMPEG}/lib)  # TODO, deprecate
        endif()
 
        set(PYTHON_VERSION 3.2)
@@ -844,7 +856,7 @@ elseif(APPLE)
                set(PYTHON ${LIBDIR}/python)
                set(PYTHON_INCLUDE_DIRS "${PYTHON}/include/python${PYTHON_VERSION}")
                # set(PYTHON_BINARY "${PYTHON}/bin/python${PYTHON_VERSION}") # not used yet
-               set(PYTHON_LIBRARY python${PYTHON_VERSION})
+               set(PYTHON_LIBRARIES python${PYTHON_VERSION})
                set(PYTHON_LIBPATH "${PYTHON}/lib/python${PYTHON_VERSION}")
                # set(PYTHON_LINKFLAGS "-u _PyMac_Error")  # won't  build with this enabled
        else()
@@ -854,7 +866,7 @@ elseif(APPLE)
                set(PYTHON_VERSION 3.2)
                set(PYTHON_INCLUDE_DIRS "${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}")
                # set(PYTHON_BINARY ${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION}) # not used yet
-               set(PYTHON_LIBRARY "")
+               set(PYTHON_LIBRARIES "")
                set(PYTHON_LIBPATH ${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config)
                set(PYTHON_LINKFLAGS "-u _PyMac_Error -framework System -framework Python")
        endif()
@@ -868,8 +880,8 @@ elseif(APPLE)
 
        if(WITH_FFTW3)
                set(FFTW3 ${LIBDIR}/fftw3)
-               set(FFTW3_INC ${FFTW3}/include)
-               set(FFTW3_LIB fftw3)
+               set(FFTW3_INCLUDE_DIRS ${FFTW3}/include)
+               set(FFTW3_LIBRARIES fftw3)
                set(FFTW3_LIBPATH ${FFTW3}/lib)
        endif()
 
@@ -894,17 +906,17 @@ elseif(APPLE)
 
        if(WITH_CODEC_FFMPEG)
                set(FFMPEG ${LIBDIR}/ffmpeg)
-               set(FFMPEG_INC ${FFMPEG}/include)
-               set(FFMPEG_LIB avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg)
+               set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
+               set(FFMPEG_LIBRARIES avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg)
                set(FFMPEG_LIBPATH ${FFMPEG}/lib)
                set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS")
        endif()
 
        if(WITH_SAMPLERATE)
-               set(LIBSAMPLERATE ${LIBDIR}/samplerate)
-               set(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
-               set(LIBSAMPLERATE_LIB samplerate)
-               set(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
+               set(SAMPLERATE ${LIBDIR}/samplerate)
+               set(SAMPLERATE_INCLUDE_DIRS ${SAMPLERATE}/include)
+               set(SAMPLERATE_LIBRARIES samplerate)
+               set(SAMPLERATE_LIBPATH ${SAMPLERATE}/lib)
        endif()
 
        set(LLIBS stdc++ SystemStubs)
@@ -929,9 +941,9 @@ elseif(APPLE)
 
        if(WITH_OPENCOLLADA)
                set(OPENCOLLADA ${LIBDIR}/opencollada)
-               set(OPENCOLLADA_INC ${OPENCOLLADA}/include)
+               set(OPENCOLLADA_INCLUDE_DIR ${OPENCOLLADA}/include)
                set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
-               set(OPENCOLLADA_LIB "OpenCOLLADASaxFrameworkLoader -lOpenCOLLADAFramework -lOpenCOLLADABaseUtils -lOpenCOLLADAStreamWriter -lMathMLSolver -lGeneratedSaxParser -lUTF -lxml2 -lbuffer -lftoa" )
+               set(OPENCOLLADA_LIBRARIES "OpenCOLLADASaxFrameworkLoader -lOpenCOLLADAFramework -lOpenCOLLADABaseUtils -lOpenCOLLADAStreamWriter -lMathMLSolver -lGeneratedSaxParser -lUTF -lxml2 -lbuffer -lftoa" )
                #pcre is bundled with openCollada
                #set(PCRE ${LIBDIR}/pcre)
                #set(PCRE_LIBPATH ${PCRE}/lib)
@@ -984,7 +996,7 @@ endif()
 # Common.
 
 if(APPLE OR WIN32)
-       if(NOT IS_DIRECTORY "${LIBDIR}")
+       if(NOT EXISTS "${LIBDIR}/")
                message(FATAL_ERROR "Apple and Windows require pre-compiled libs at: '${LIBDIR}'")
        endif()
 endif()
@@ -1007,13 +1019,9 @@ endif()
 
 if(WITH_IMAGE_OPENJPEG)
        if(UNIX AND NOT APPLE)
-               set(OPENJPEG /usr)
-               set(OPENJPEG_INC ${OPENJPEG}/include)
-               set(OPENJPEG_LIB openjpeg)
-               set(OPENJPEG_LIBPATH ${OPENJPEG}/lib)
+               # dealt with above
        else()
-               set(OPENJPEG ${CMAKE_SOURCE_DIR}/extern/libopenjpeg)
-               set(OPENJPEG_INC ${OPENJPEG})
+               set(OPENJPEG_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/libopenjpeg")
        endif()
 endif()
 
@@ -1183,3 +1191,83 @@ endif()
 #-----------------------------------------------------------------------------
 # CPack for generating packages
 include(build_files/cmake/packaging.cmake)
+
+
+#-----------------------------------------------------------------------------
+# Print Final Configuration
+
+if(FIRST_RUN)
+       set(_config_msg "\n* Blender Configuration *")
+       macro(info_cfg_option
+               _setting)
+               set(_msg "   * ${_setting}")
+               string(LENGTH "${_msg}" _len)
+               while("28" GREATER "${_len}")
+                       set(_msg "${_msg} ")
+                        math(EXPR _len "${_len} + 1")
+               endwhile()
+
+               set(_config_msg "${_config_msg}\n${_msg}${${_setting}}")
+       endmacro()
+
+       macro(info_cfg_text
+               _text)
+               set(_config_msg "${_config_msg}\n\n  ${_text}")
+               
+               
+       endmacro()
+
+       info_cfg_text("Build Options:")
+       info_cfg_option(WITH_GAMEENGINE)
+       info_cfg_option(WITH_PLAYER)
+       info_cfg_option(WITH_BULLET)
+       info_cfg_option(WITH_IK_ITASC)
+       info_cfg_option(WITH_OPENCOLLADA)
+       info_cfg_option(WITH_FFTW3)
+       info_cfg_option(WITH_INTERNATIONAL)
+
+       info_cfg_text("Compiler Options:")
+       info_cfg_option(WITH_BUILDINFO)
+       info_cfg_option(WITH_OPENMP)
+       info_cfg_option(WITH_RAYOPTIMIZATION)
+
+       info_cfg_text("System Options:")
+       info_cfg_option(WITH_INSTALL_PORTABLE)
+       info_cfg_option(WITH_X11_XINPUT)
+       info_cfg_option(WITH_BUILTIN_GLEW)
+
+       info_cfg_text("Image Formats:")
+       info_cfg_option(WITH_IMAGE_CINEON)
+       info_cfg_option(WITH_IMAGE_DDS)
+       info_cfg_option(WITH_IMAGE_HDR)
+       info_cfg_option(WITH_IMAGE_OPENEXR)
+       info_cfg_option(WITH_IMAGE_OPENJPEG)
+       info_cfg_option(WITH_IMAGE_REDCODE)
+       info_cfg_option(WITH_IMAGE_TIFF)
+
+       info_cfg_text("Audio:")
+       info_cfg_option(WITH_OPENAL)
+       info_cfg_option(WITH_SDL)
+       info_cfg_option(WITH_JACK)
+       info_cfg_option(WITH_CODEC_FFMPEG)
+       info_cfg_option(WITH_CODEC_SNDFILE)
+       info_cfg_option(WITH_SAMPLERATE)
+
+       info_cfg_text("Compression:")
+       info_cfg_option(WITH_LZMA)
+       info_cfg_option(WITH_LZO)
+
+       info_cfg_text("Python:")
+       info_cfg_option(WITH_PYTHON_INSTALL)
+       info_cfg_option(WITH_PYTHON_MODULE)
+       info_cfg_option(WITH_PYTHON_SAFETY)
+
+       info_cfg_text("Modifiers:")
+       info_cfg_option(WITH_MOD_BOOLEAN)
+       info_cfg_option(WITH_MOD_DECIMATE)
+       info_cfg_option(WITH_MOD_FLUID)
+
+       info_cfg_text("")
+
+       message("${_config_msg}")
+endif()
index 2f63ddf050186d039df56b68d33a74fb44877520..291460187045fc0bb9af4899cd3dfabc7acf6de4 100644 (file)
@@ -306,6 +306,11 @@ if env['BF_NO_ELBEEM'] == 1:
     env['CXXFLAGS'].append('-DDISABLE_ELBEEM')
     env['CCFLAGS'].append('-DDISABLE_ELBEEM')
 
+# TODO, make optional
+env['CPPFLAGS'].append('-DWITH_AUDASPACE')
+env['CXXFLAGS'].append('-DWITH_AUDASPACE')
+env['CCFLAGS'].append('-DWITH_AUDASPACE')
+
 # lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
 B.root_build_dir = env['BF_BUILDDIR']
 B.doc_build_dir = os.path.join(env['BF_INSTALLDIR'], 'doc')
index b4d69a289eecd0d7f83fbe78109e30985f7345a1..fd712f1b832c8c58c70ecc41f76e6bfb651d11c8 100644 (file)
@@ -74,6 +74,7 @@ def svn_step(branch=''):
     else:
         return SVN(baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/blender', mode='update', defaultBranch='trunk', workdir='blender')
 
+
 def lib_svn_step(dir):
     return SVN(name='lib svn', baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/lib/' + dir, mode='update', defaultBranch='trunk', workdir='lib/' + dir)
 
index 3e1dec726e5035538134f7bdd7cf88310fd6f452..ad7c09933c69ad2058d4b0dcc366733ba988c28b 100644 (file)
@@ -64,10 +64,11 @@ def get_platform(filename):
 
     return '-'.join(platform_tokens)
 
+
 def get_branch(filename):
     tokens = filename.split("-")
     branch = ""
-    
+
     for token in tokens:
         if branch == "":
             branch = token
index cdc7cff32754a13082daa205aafc98bdbf586e51..4c19b723fc8635061ab12d6bf0c71bb2cedecab4 100644 (file)
@@ -36,7 +36,7 @@ builder = sys.argv[1]
 branch = ''
 
 if len(sys.argv) >= 3:
-       branch = sys.argv[2]
+    branch = sys.argv[2]
 
 # scons does own packaging
 if builder.find('scons') != -1:
diff --git a/build_files/cmake/FindPythonLibsUnix.cmake b/build_files/cmake/FindPythonLibsUnix.cmake
deleted file mode 100644 (file)
index 90bd79a..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-# - Find python libraries
-#
-#  PYTHON_VERSION
-#  PYTHON_INCLUDE_DIRS
-#  PYTHON_LIBRARY
-#  PYTHON_LIBPATH
-#  PYTHON_LINKFLAGS
-
-#=============================================================================
-
-set(PYTHON_VERSION 3.2 CACHE STRING "")
-mark_as_advanced(PYTHON_VERSION)
-
-set(PYTHON_LINKFLAGS "-Xlinker -export-dynamic")
-mark_as_advanced(PYTHON_LINKFLAGS)
-
-set(_Python_ABI_FLAGS
-       "m;mu;u; ")
-
-string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
-
-set(_Python_PATHS
-       "$ENV{HOME}/py${_PYTHON_VERSION_NO_DOTS}"
-       "/opt/py${_PYTHON_VERSION_NO_DOTS}"
-       "/usr"
-       "/usr/local"
-)
-
-if(NOT DEFINED PYTHON_INCLUDE_DIRS OR
-   NOT DEFINED PYTHON_LIBRARY OR
-   NOT DEFINED PYTHON_LIBPATH)
-   
-       message(STATUS "Looking for include Python.h")
-       set(_Found_PYTHON_H OFF)
-
-       foreach(_CURRENT_PATH ${_Python_PATHS})
-               foreach(_CURRENT_ABI_FLAGS ${_Python_ABI_FLAGS})
-                       if(CMAKE_BUILD_TYPE STREQUAL Debug)
-                               set(_CURRENT_ABI_FLAGS "d${_CURRENT_ABI_FLAGS}")
-                       endif()
-                       string(REPLACE " " "" _CURRENT_ABI_FLAGS ${_CURRENT_ABI_FLAGS})
-
-                       set(_Python_HEADER "${_CURRENT_PATH}/include/python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS}/Python.h")
-
-                       if(EXISTS ${_Python_HEADER})
-                               message(STATUS "Checking for header: ${_Python_HEADER} - found")
-                               set(_Found_PYTHON_H ON)
-                               set(PYTHON ${_CURRENT_PATH})
-                               set(PYTHON_ABI_FLAGS ${_CURRENT_ABI_FLAGS})
-                               break()
-                       else()
-                               message(STATUS "Checking for header: ${_Python_HEADER}")
-                       endif()
-               endforeach()
-               
-               if(_Found_PYTHON_H)
-                       break()
-               endif()
-       endforeach()
-
-       if(NOT _Found_PYTHON_H)
-               message(FATAL_ERROR "Python.h not found")
-       endif()
-       
-       unset(_Found_PYTHON_H)
-       unset(_Python_HEADER)
-       unset(_CURRENT_ABI_FLAGS)
-       unset(_CURRENT_PATH)
-
-
-       set(PYTHON_INCLUDE_DIRS "${PYTHON}/include/python${PYTHON_VERSION}${PYTHON_ABI_FLAGS}" CACHE STRING "")
-       mark_as_advanced(PYTHON_INCLUDE_DIRS)
-       set(PYTHON_LIBRARY "python${PYTHON_VERSION}${PYTHON_ABI_FLAGS}" CACHE STRING "")
-       mark_as_advanced(PYTHON_LIBRARY)
-       set(PYTHON_LIBPATH ${PYTHON}/lib CACHE STRING "")
-       mark_as_advanced(PYTHON_LIBPATH)
-       # set(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
-endif()
-
-unset(_Python_ABI_FLAGS)
-unset(_Python_PATHS)
-
-#=============================================================================
-# now the python versions are found
-
-
-if(NOT EXISTS "${PYTHON_INCLUDE_DIRS}/Python.h")
-       message(FATAL_ERROR " Missing python header: ${PYTHON_INCLUDE_DIRS}/Python.h")
-endif()
diff --git a/build_files/cmake/Modules/FindFftw3.cmake b/build_files/cmake/Modules/FindFftw3.cmake
new file mode 100644 (file)
index 0000000..197d4aa
--- /dev/null
@@ -0,0 +1,70 @@
+# - Find Fftw3 library
+# Find the native Fftw3 includes and library
+# This module defines
+#  FFTW3_INCLUDE_DIRS, where to find fftw3.h, Set when
+#                        FFTW3_INCLUDE_DIR is found.
+#  FFTW3_LIBRARIES, libraries to link against to use Fftw3.
+#  FFTW3_ROOT_DIR, The base directory to search for Fftw3.
+#                    This can also be an environment variable.
+#  FFTW3_FOUND, If false, do not try to use Fftw3.
+#
+# also defined, but not for general use are
+#  FFTW3_LIBRARY, where to find the Fftw3 library.
+
+#=============================================================================
+# Copyright 2011 Blender Foundation.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+# If FFTW3_ROOT_DIR was defined in the environment, use it.
+IF(NOT FFTW3_ROOT_DIR AND NOT $ENV{FFTW3_ROOT_DIR} STREQUAL "")
+  SET(FFTW3_ROOT_DIR $ENV{FFTW3_ROOT_DIR})
+ENDIF()
+
+SET(_fftw3_SEARCH_DIRS
+  ${FFTW3_ROOT_DIR}
+  /usr/local
+  /sw # Fink
+  /opt/local # DarwinPorts
+  /opt/csw # Blastwave
+)
+
+FIND_PATH(FFTW3_INCLUDE_DIR
+  NAMES
+    fftw3.h
+  HINTS
+    ${_fftw3_SEARCH_DIRS}
+  PATH_SUFFIXES
+    include
+)
+
+FIND_LIBRARY(FFTW3_LIBRARY
+  NAMES
+    fftw3
+  HINTS
+    ${_fftw3_SEARCH_DIRS}
+  PATH_SUFFIXES
+    lib64 lib
+  )
+
+# handle the QUIETLY and REQUIRED arguments and set FFTW3_FOUND to TRUE if 
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Fftw3 DEFAULT_MSG
+    FFTW3_LIBRARY FFTW3_INCLUDE_DIR)
+
+IF(FFTW3_FOUND)
+  SET(FFTW3_LIBRARIES ${FFTW3_LIBRARY})
+  SET(FFTW3_INCLUDE_DIRS ${FFTW3_INCLUDE_DIR})
+ENDIF(FFTW3_FOUND)
+
+MARK_AS_ADVANCED(
+  FFTW3_INCLUDE_DIR
+  FFTW3_LIBRARY
+)
diff --git a/build_files/cmake/Modules/FindJack.cmake b/build_files/cmake/Modules/FindJack.cmake
new file mode 100644 (file)
index 0000000..9a847fa
--- /dev/null
@@ -0,0 +1,70 @@
+# - Find Jack library
+# Find the native Jack includes and library
+# This module defines
+#  JACK_INCLUDE_DIRS, where to find jack.h, Set when
+#                        JACK_INCLUDE_DIR is found.
+#  JACK_LIBRARIES, libraries to link against to use Jack.
+#  JACK_ROOT_DIR, The base directory to search for Jack.
+#                    This can also be an environment variable.
+#  JACK_FOUND, If false, do not try to use Jack.
+#
+# also defined, but not for general use are
+#  JACK_LIBRARY, where to find the Jack library.
+
+#=============================================================================
+# Copyright 2011 Blender Foundation.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+# If JACK_ROOT_DIR was defined in the environment, use it.
+IF(NOT JACK_ROOT_DIR AND NOT $ENV{JACK_ROOT_DIR} STREQUAL "")
+  SET(JACK_ROOT_DIR $ENV{JACK_ROOT_DIR})
+ENDIF()
+
+SET(_jack_SEARCH_DIRS
+  ${JACK_ROOT_DIR}
+  /usr/local
+  /sw # Fink
+  /opt/local # DarwinPorts
+  /opt/csw # Blastwave
+)
+
+FIND_PATH(JACK_INCLUDE_DIR
+  NAMES
+    jack.h
+  HINTS
+    ${_jack_SEARCH_DIRS}
+  PATH_SUFFIXES
+    include/jack
+)
+
+FIND_LIBRARY(JACK_LIBRARY
+  NAMES
+    jack
+  HINTS
+    ${_jack_SEARCH_DIRS}
+  PATH_SUFFIXES
+    lib64 lib
+  )
+
+# handle the QUIETLY and REQUIRED arguments and set JACK_FOUND to TRUE if 
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jack DEFAULT_MSG
+    JACK_LIBRARY JACK_INCLUDE_DIR)
+
+IF(JACK_FOUND)
+  SET(JACK_LIBRARIES ${JACK_LIBRARY})
+  SET(JACK_INCLUDE_DIRS ${JACK_INCLUDE_DIR})
+ENDIF(JACK_FOUND)
+
+MARK_AS_ADVANCED(
+  JACK_INCLUDE_DIR
+  JACK_LIBRARY
+)
diff --git a/build_files/cmake/Modules/FindJeMalloc.cmake b/build_files/cmake/Modules/FindJeMalloc.cmake
new file mode 100644 (file)
index 0000000..5c7aa2c
--- /dev/null
@@ -0,0 +1,70 @@
+# - Find JeMalloc library
+# Find the native JeMalloc includes and library
+# This module defines
+#  JEMALLOC_INCLUDE_DIRS, where to find jemalloc.h, Set when
+#                        JEMALLOC_INCLUDE_DIR is found.
+#  JEMALLOC_LIBRARIES, libraries to link against to use JeMalloc.
+#  JEMALLOC_ROOT_DIR, The base directory to search for JeMalloc.
+#                    This can also be an environment variable.
+#  JEMALLOC_FOUND, If false, do not try to use JeMalloc.
+#
+# also defined, but not for general use are
+#  JEMALLOC_LIBRARY, where to find the JeMalloc library.
+
+#=============================================================================
+# Copyright 2011 Blender Foundation.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+# If JEMALLOC_ROOT_DIR was defined in the environment, use it.
+IF(NOT JEMALLOC_ROOT_DIR AND NOT $ENV{JEMALLOC_ROOT_DIR} STREQUAL "")
+  SET(JEMALLOC_ROOT_DIR $ENV{JEMALLOC_ROOT_DIR})
+ENDIF()
+
+SET(_jemalloc_SEARCH_DIRS
+  ${JEMALLOC_ROOT_DIR}
+  /usr/local
+  /sw # Fink
+  /opt/local # DarwinPorts
+  /opt/csw # Blastwave
+)
+
+FIND_PATH(JEMALLOC_INCLUDE_DIR
+  NAMES
+    jemalloc.h
+  HINTS
+    ${_jemalloc_SEARCH_DIRS}
+  PATH_SUFFIXES
+    include/jemalloc
+)
+
+FIND_LIBRARY(JEMALLOC_LIBRARY
+  NAMES
+    jemalloc
+  HINTS
+    ${_jemalloc_SEARCH_DIRS}
+  PATH_SUFFIXES
+    lib64 lib
+  )
+
+# handle the QUIETLY and REQUIRED arguments and set JEMALLOC_FOUND to TRUE if 
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(JeMalloc DEFAULT_MSG
+    JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR)
+
+IF(JEMALLOC_FOUND)
+  SET(JEMALLOC_LIBRARIES ${JEMALLOC_LIBRARY})
+  SET(JEMALLOC_INCLUDE_DIRS ${JEMALLOC_INCLUDE_DIR})
+ENDIF(JEMALLOC_FOUND)
+
+MARK_AS_ADVANCED(
+  JEMALLOC_INCLUDE_DIR
+  JEMALLOC_LIBRARY
+)
index 9a1169733481662678e4ae3e99358786ca60c1ac..546f690dbf6e8ca2a74db933166d29e31ccfb508 100644 (file)
@@ -19,7 +19,7 @@
 #  OPENEXR_LIBRARY, where to find the OpenEXR library.
 
 #=============================================================================
-# Copyright 2002-2009 Kitware, Inc.
+# Copyright 2011 Blender Foundation.
 #
 # Distributed under the OSI-approved BSD License (the "License");
 # see accompanying file Copyright.txt for details.
@@ -28,8 +28,6 @@
 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 # See the License for more information.
 #=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)
 
 # If OPENEXR_ROOT_DIR was defined in the environment, use it.
 IF(NOT OPENEXR_ROOT_DIR AND NOT $ENV{OPENEXR_ROOT_DIR} STREQUAL "")
@@ -52,7 +50,9 @@ SET(_openexr_SEARCH_DIRS
   /opt/csw # Blastwave
 )
 
-FIND_PATH(OPENEXR_INCLUDE_DIR ImfXdr.h
+FIND_PATH(OPENEXR_INCLUDE_DIR
+  NAMES
+    ImfXdr.h
   HINTS
     ${_openexr_SEARCH_DIRS}
   PATH_SUFFIXES
@@ -63,10 +63,14 @@ SET(_openexr_LIBRARIES)
 FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
   STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
 
-  FIND_LIBRARY(OPENEXR_${UPPERCOMPONENT}_LIBRARY NAMES ${COMPONENT}
-      HINTS ${_openexr_SEARCH_DIRS}
-      PATH_SUFFIXES lib64 lib
-      )
+  FIND_LIBRARY(OPENEXR_${UPPERCOMPONENT}_LIBRARY
+    NAMES
+      ${COMPONENT}
+    HINTS
+      ${_openexr_SEARCH_DIRS}
+    PATH_SUFFIXES
+      lib64 lib
+    )
   LIST(APPEND _openexr_LIBRARIES "${OPENEXR_${UPPERCOMPONENT}_LIBRARY}")
 ENDFOREACH()
 
@@ -79,7 +83,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR  DEFAULT_MSG
 IF(OPENEXR_FOUND)
   SET(OPENEXR_LIBRARIES ${_openexr_LIBRARIES})
   SET(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR})
-ENDIF(OPENEXR_FOUND)
+ENDIF()
 
 MARK_AS_ADVANCED(OPENEXR_INCLUDE_DIR)
 FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
diff --git a/build_files/cmake/Modules/FindOpenJPEG.cmake b/build_files/cmake/Modules/FindOpenJPEG.cmake
new file mode 100644 (file)
index 0000000..8d901ed
--- /dev/null
@@ -0,0 +1,70 @@
+# - Find OpenJPEG library
+# Find the native OpenJPEG includes and library
+# This module defines
+#  OPENJPEG_INCLUDE_DIRS, where to find openjpeg.h, Set when
+#                        OPENJPEG_INCLUDE_DIR is found.
+#  OPENJPEG_LIBRARIES, libraries to link against to use OpenJPEG.
+#  OPENJPEG_ROOT_DIR, The base directory to search for OpenJPEG.
+#                    This can also be an environment variable.
+#  OPENJPEG_FOUND, If false, do not try to use OpenJPEG.
+#
+# also defined, but not for general use are
+#  OPENJPEG_LIBRARY, where to find the OpenJPEG library.
+
+#=============================================================================
+# Copyright 2011 Blender Foundation.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+# If OPENJPEG_ROOT_DIR was defined in the environment, use it.
+IF(NOT OPENJPEG_ROOT_DIR AND NOT $ENV{OPENJPEG_ROOT_DIR} STREQUAL "")
+  SET(OPENJPEG_ROOT_DIR $ENV{OPENJPEG_ROOT_DIR})
+ENDIF()
+
+SET(_openjpeg_SEARCH_DIRS
+  ${OPENJPEG_ROOT_DIR}
+  /usr/local
+  /sw # Fink
+  /opt/local # DarwinPorts
+  /opt/csw # Blastwave
+)
+
+FIND_PATH(OPENJPEG_INCLUDE_DIR
+  NAMES
+    openjpeg.h
+  HINTS
+    ${_openjpeg_SEARCH_DIRS}
+  PATH_SUFFIXES
+    include
+)
+
+FIND_LIBRARY(OPENJPEG_LIBRARY
+  NAMES
+    openjpeg
+  HINTS
+    ${_openjpeg_SEARCH_DIRS}
+  PATH_SUFFIXES
+    lib64 lib
+  )
+
+# handle the QUIETLY and REQUIRED arguments and set OPENJPEG_FOUND to TRUE if 
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenJPEG DEFAULT_MSG
+    OPENJPEG_LIBRARY OPENJPEG_INCLUDE_DIR)
+
+IF(OPENJPEG_FOUND)
+  SET(OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARY})
+  SET(OPENJPEG_INCLUDE_DIRS ${OPENJPEG_INCLUDE_DIR})
+ENDIF(OPENJPEG_FOUND)
+
+MARK_AS_ADVANCED(
+  OPENJPEG_INCLUDE_DIR
+  OPENJPEG_LIBRARY
+)
diff --git a/build_files/cmake/Modules/FindPythonLibsUnix.cmake b/build_files/cmake/Modules/FindPythonLibsUnix.cmake
new file mode 100644 (file)
index 0000000..882f1e2
--- /dev/null
@@ -0,0 +1,121 @@
+# - Find Python libraries
+# Find the native Python includes and library
+#
+# Note:, This is not _yet_ intended to be a general python module for other
+#  projects to use since its hard coded to python 3.2 as blender only supports
+#  a single python version.
+#  This is for blender/unix python only.
+#
+# This module defines
+#  PYTHON_VERSION
+#  PYTHON_INCLUDE_DIRS
+#  PYTHON_LIBRARIES
+#  PYTHON_LIBPATH, Used for installation
+#  PYTHON_LINKFLAGS
+#  PYTHON_ROOT_DIR, The base directory to search for Python.
+#                   This can also be an environment variable.
+#
+# also defined, but not for general use are
+#  PYTHON_LIBRARY, where to find the python library.
+
+#=============================================================================
+# Copyright 2011 Blender Foundation.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+# If PYTHON_ROOT_DIR was defined in the environment, use it.
+IF(NOT PYTHON_ROOT_DIR AND NOT $ENV{PYTHON_ROOT_DIR} STREQUAL "")
+  SET(PYTHON_ROOT_DIR $ENV{PYTHON_ROOT_DIR})
+ENDIF()
+
+IF(DEFINED PYTHON_VERSION)
+  SET(PYTHON_VERSION "${PYTHON_VERSION}" CACHE STRING "")
+ELSE()
+  SET(PYTHON_VERSION 3.2 CACHE STRING "")
+ENDIF()
+MARK_AS_ADVANCED(PYTHON_VERSION)
+
+SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic")
+MARK_AS_ADVANCED(PYTHON_LINKFLAGS)
+
+SET(_python_ABI_FLAGS
+  "m;mu;u; "  # release
+  "md;mud;ud;d" # debug
+)
+
+STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
+
+SET(_python_SEARCH_DIRS
+  ${PYTHON_ROOT_DIR}
+  "$ENV{HOME}/py${_PYTHON_VERSION_NO_DOTS}"
+  "/opt/py${_PYTHON_VERSION_NO_DOTS}"
+)
+
+FOREACH(_CURRENT_ABI_FLAGS ${_python_ABI_FLAGS})
+  #IF(CMAKE_BUILD_TYPE STREQUAL Debug)
+  #  SET(_CURRENT_ABI_FLAGS "d${_CURRENT_ABI_FLAGS}")
+  #ENDIF()
+  STRING(REPLACE " " "" _CURRENT_ABI_FLAGS ${_CURRENT_ABI_FLAGS})
+
+  FIND_PATH(PYTHON_INCLUDE_DIR
+    NAMES
+      Python.h
+    HINTS
+      ${_python_SEARCH_DIRS}
+    PATH_SUFFIXES
+      include/python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS}
+  )
+
+  FIND_LIBRARY(PYTHON_LIBRARY
+    NAMES
+      "python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS}"
+    HINTS
+      ${_python_SEARCH_DIRS}
+    PATH_SUFFIXES
+      lib64 lib
+  )
+
+  IF(PYTHON_LIBRARY AND PYTHON_INCLUDE_DIR)
+    break()
+  ELSE()
+    # ensure we dont find values from 2 different ABI versions
+    UNSET(PYTHON_INCLUDE_DIR CACHE)
+    UNSET(PYTHON_LIBRARY CACHE)
+  ENDIF()
+ENDFOREACH()
+
+UNSET(_CURRENT_ABI_FLAGS)
+UNSET(_CURRENT_PATH)
+
+UNSET(_python_ABI_FLAGS)
+UNSET(_python_SEARCH_DIRS)
+
+# handle the QUIETLY and REQUIRED arguments and SET PYTHONLIBSUNIX_FOUND to TRUE IF 
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibsUnix  DEFAULT_MSG
+    PYTHON_LIBRARY PYTHON_INCLUDE_DIR)
+
+
+IF(PYTHONLIBSUNIX_FOUND)
+  # Assign cache items
+  SET(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIR})
+  SET(PYTHON_LIBRARIES ${PYTHON_LIBRARY})
+
+  # we need this for installation
+  GET_FILENAME_COMPONENT(PYTHON_LIBPATH ${PYTHON_LIBRARY} PATH)
+
+  # not used
+  # SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
+
+  MARK_AS_ADVANCED(
+    PYTHON_INCLUDE_DIR
+    PYTHON_LIBRARY
+  )
+ENDIF()
diff --git a/build_files/cmake/Modules/FindSamplerate.cmake b/build_files/cmake/Modules/FindSamplerate.cmake
new file mode 100644 (file)
index 0000000..ea7a0d7
--- /dev/null
@@ -0,0 +1,70 @@
+# - Find Samplerate library
+# Find the native Samplerate includes and library
+# This module defines
+#  SAMPLERATE_INCLUDE_DIRS, where to find samplerate.h, Set when
+#                        SAMPLERATE_INCLUDE_DIR is found.
+#  SAMPLERATE_LIBRARIES, libraries to link against to use Samplerate.
+#  SAMPLERATE_ROOT_DIR, The base directory to search for Samplerate.
+#                    This can also be an environment variable.
+#  SAMPLERATE_FOUND, If false, do not try to use Samplerate.
+#
+# also defined, but not for general use are
+#  SAMPLERATE_LIBRARY, where to find the Samplerate library.
+
+#=============================================================================
+# Copyright 2011 Blender Foundation.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+# If SAMPLERATE_ROOT_DIR was defined in the environment, use it.
+IF(NOT SAMPLERATE_ROOT_DIR AND NOT $ENV{SAMPLERATE_ROOT_DIR} STREQUAL "")
+  SET(SAMPLERATE_ROOT_DIR $ENV{SAMPLERATE_ROOT_DIR})
+ENDIF()
+
+SET(_samplerate_SEARCH_DIRS
+  ${SAMPLERATE_ROOT_DIR}
+  /usr/local
+  /sw # Fink
+  /opt/local # DarwinPorts
+  /opt/csw # Blastwave
+)
+
+FIND_PATH(SAMPLERATE_INCLUDE_DIR
+  NAMES
+    samplerate.h
+  HINTS
+    ${_samplerate_SEARCH_DIRS}
+  PATH_SUFFIXES
+    include
+)
+
+FIND_LIBRARY(SAMPLERATE_LIBRARY
+  NAMES
+    samplerate
+  HINTS
+    ${_samplerate_SEARCH_DIRS}
+  PATH_SUFFIXES
+    lib64 lib
+  )
+
+# handle the QUIETLY and REQUIRED arguments and set SAMPLERATE_FOUND to TRUE if 
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Samplerate DEFAULT_MSG
+    SAMPLERATE_LIBRARY SAMPLERATE_INCLUDE_DIR)
+
+IF(SAMPLERATE_FOUND)
+  SET(SAMPLERATE_LIBRARIES ${SAMPLERATE_LIBRARY})
+  SET(SAMPLERATE_INCLUDE_DIRS ${SAMPLERATE_INCLUDE_DIR})
+ENDIF(SAMPLERATE_FOUND)
+
+MARK_AS_ADVANCED(
+  SAMPLERATE_INCLUDE_DIR
+  SAMPLERATE_LIBRARY
+)
diff --git a/build_files/cmake/Modules/FindSndFile.cmake b/build_files/cmake/Modules/FindSndFile.cmake
new file mode 100644 (file)
index 0000000..1b685ea
--- /dev/null
@@ -0,0 +1,68 @@
+# - Find SndFile library
+# Find the native SndFile includes and library
+# This module defines
+#  SNDFILE_INCLUDE_DIRS, where to find sndfile.h, Set when
+#                        SNDFILE_INCLUDE_DIR is found.
+#  SNDFILE_LIBRARIES, libraries to link against to use SndFile.
+#  SNDFILE_ROOT_DIR, The base directory to search for SndFile.
+#                    This can also be an environment variable.
+#  SNDFILE_FOUND, If false, do not try to use SndFile.
+#
+# also defined, but not for general use are
+#  SNDFILE_LIBRARY, where to find the SndFile library.
+
+#=============================================================================
+# Copyright 2011 Blender Foundation.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+# If SNDFILE_ROOT_DIR was defined in the environment, use it.
+IF(NOT SNDFILE_ROOT_DIR AND NOT $ENV{SNDFILE_ROOT_DIR} STREQUAL "")
+  SET(SNDFILE_ROOT_DIR $ENV{SNDFILE_ROOT_DIR})
+ENDIF()
+
+SET(_sndfile_SEARCH_DIRS
+  ${SNDFILE_ROOT_DIR}
+  /usr/local
+  /sw # Fink
+  /opt/local # DarwinPorts
+  /opt/csw # Blastwave
+)
+
+FIND_PATH(SNDFILE_INCLUDE_DIR sndfile.h
+  HINTS
+    ${_sndfile_SEARCH_DIRS}
+  PATH_SUFFIXES
+    include
+)
+
+FIND_LIBRARY(SNDFILE_LIBRARY
+  NAMES
+    sndfile
+  HINTS
+    ${_sndfile_SEARCH_DIRS}
+  PATH_SUFFIXES
+    lib64 lib
+  )
+
+# handle the QUIETLY and REQUIRED arguments and set SNDFILE_FOUND to TRUE if 
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(SndFile DEFAULT_MSG
+    SNDFILE_LIBRARY SNDFILE_INCLUDE_DIR)
+
+IF(SNDFILE_FOUND)
+  SET(SNDFILE_LIBRARIES ${SNDFILE_LIBRARY})
+  SET(SNDFILE_INCLUDE_DIRS ${SNDFILE_INCLUDE_DIR})
+ENDIF(SNDFILE_FOUND)
+
+MARK_AS_ADVANCED(
+  SNDFILE_INCLUDE_DIR
+  SNDFILE_LIBRARY
+)
index 8dbfadb118795c20d51f70c8b90f1296ad5cf2d5..b0fd242db4a22cf9c3614c75fe33424c6ae91927 100755 (executable)
 
 # <pep8 compliant>
 
-IGNORE = (
-    "/test/",
-    "/decimate_glut_test/",
-    "/BSP_GhostTest/",
-    "/release/",
-    "/xembed/",
-    "/decimation/intern/future/",
-    "/TerraplayNetwork/",
-    "/ik_glut_test/",
-    )
+from cmake_consistency_check_config import IGNORE, UTF8_CHECK, SOURCE_DIR
 
 import os
 from os.path import join, dirname, normpath, abspath, splitext
 
-base = join(os.path.dirname(__file__), "..", "..")
-base = normpath(base)
-base = abspath(base)
-
-print("Scanning:", base)
+print("Scanning:", SOURCE_DIR)
 
 global_h = set()
 global_c = set()
+global_refs = {}
 
 
 def source_list(path, filename_check=None):
@@ -147,11 +135,17 @@ def cmake_get_src(f):
 
                         if is_c_header(new_file):
                             sources_h.append(new_file)
+                            global_refs.setdefault(new_file, []).append((f, i))
                         elif is_c(new_file):
                             sources_c.append(new_file)
+                            global_refs.setdefault(new_file, []).append((f, i))
                         elif l in ("PARENT_SCOPE", ):
                             # cmake var, ignore
                             pass
+                        elif new_file.endswith(".list"):
+                            pass
+                        elif new_file.endswith(".def"):
+                            pass
                         else:
                             raise Exception("unknown file type - not c or h %s -> %s" % (f, new_file))
 
@@ -176,7 +170,7 @@ def cmake_get_src(f):
     filen.close()
 
 
-for cmake in source_list(base, is_cmake):
+for cmake in source_list(SOURCE_DIR, is_cmake):
     cmake_get_src(cmake)
 
 
@@ -186,39 +180,75 @@ def is_ignore(f):
             return True
     return False
 
+
 # First do stupid check, do these files exist?
+print("\nChecking for missing references:")
+import sys
+is_err = False
+errs = []
 for f in (global_h | global_c):
     if f.endswith("dna.c"):
         continue
 
     if not os.path.exists(f):
-        raise Exception("CMake referenced file missing: " + f)
-
+        refs = global_refs[f]
+        if refs:
+            for cf, i in refs:
+                errs.append((cf, i))
+        else:
+            raise Exception("CMake referenecs missing, internal error, aborting!")
+        is_err = True
+
+errs.sort()
+errs.reverse()
+for cf, i in errs:
+    print("%s:%d" % (cf, i))
+    # Write a 'sed' script, useful if we get a lot of these
+    # print("sed '%dd' '%s' > '%s.tmp' ; mv '%s.tmp' '%s'" % (i, cf, cf, cf, cf))
+
+
+if is_err:
+    raise Exception("CMake referenecs missing files, aborting!")
+del is_err
+del errs
 
 # now check on files not accounted for.
 print("\nC/C++ Files CMake doesnt know about...")
-for cf in sorted(source_list(base, is_c)):
+for cf in sorted(source_list(SOURCE_DIR, is_c)):
     if not is_ignore(cf):
         if cf not in global_c:
             print("missing_c: ", cf)
+
+        # check if automake builds a corrasponding .o file.
+        '''
+        if cf in global_c:
+            out1 = os.path.splitext(cf)[0] + ".o"
+            out2 = os.path.splitext(cf)[0] + ".Po"
+            out2_dir, out2_file = out2 = os.path.split(out2)
+            out2 = os.path.join(out2_dir, ".deps", out2_file)
+            if not os.path.exists(out1) and not os.path.exists(out2):
+                print("bad_c: ", cf)
+        '''
+
 print("\nC/C++ Headers CMake doesnt know about...")
-for hf in sorted(source_list(base, is_c_header)):
+for hf in sorted(source_list(SOURCE_DIR, is_c_header)):
     if not is_ignore(hf):
         if hf not in global_h:
             print("missing_h: ", hf)
 
-# test encoding
-import traceback
-for files in (global_c, global_h):
-    for f in sorted(files):
-        if os.path.exists(f):
-            # ignore outside of our source tree
-            if "extern" not in f:
-                i = 1
-                try:
-                    for l in open(f, "r", encoding="utf8"):
-                        i += 1
-                except:
-                    print("Non utf8: %s:%d" % (f, i))
-                    if i > 1:
-                        traceback.print_exc()
+if UTF8_CHECK:
+    # test encoding
+    import traceback
+    for files in (global_c, global_h):
+        for f in sorted(files):
+            if os.path.exists(f):
+                # ignore outside of our source tree
+                if "extern" not in f:
+                    i = 1
+                    try:
+                        for l in open(f, "r", encoding="utf8"):
+                            i += 1
+                    except:
+                        print("Non utf8: %s:%d" % (f, i))
+                        if i > 1:
+                            traceback.print_exc()
diff --git a/build_files/cmake/cmake_consistency_check_config.py b/build_files/cmake/cmake_consistency_check_config.py
new file mode 100644 (file)
index 0000000..60a46d3
--- /dev/null
@@ -0,0 +1,48 @@
+import os
+
+IGNORE = (
+    "/test/",
+    "/decimate_glut_test/",
+    "/BSP_GhostTest/",
+    "/release/",
+    "/xembed/",
+    "/decimation/intern/future/",
+    "/TerraplayNetwork/",
+    "/ik_glut_test/",
+
+    # specific source files
+    "extern/Eigen2/Eigen/src/Cholesky/CholeskyInstantiations.cpp",
+    "extern/Eigen2/Eigen/src/Core/CoreInstantiations.cpp",
+    "extern/Eigen2/Eigen/src/QR/QrInstantiations.cpp",
+    "extern/bullet2/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp",
+    "extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp",
+    "extern/bullet2/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp",
+    "extern/bullet2/src/BulletCollision/CollisionShapes/btBox2dShape.cpp",
+    "extern/bullet2/src/BulletCollision/CollisionShapes/btConvex2dShape.cpp",
+    "extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.cpp",
+    "extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.cpp",
+    "extern/bullet2/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp",
+    "extern/eltopo/common/meshes/ObjLoader.cpp",
+    "extern/eltopo/common/meshes/meshloader.cpp",
+    "extern/eltopo/common/openglutils.cpp",
+    "extern/eltopo/eltopo3d/broadphase_blenderbvh.cpp",
+    "source/blender/imbuf/intern/imbuf_cocoa.m",
+
+    "extern/bullet2/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h",
+    "extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h",
+    "extern/bullet2/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.h",
+    "extern/bullet2/src/BulletCollision/CollisionShapes/btBox2dShape.h",
+    "extern/bullet2/src/BulletCollision/CollisionShapes/btConvex2dShape.h",
+    "extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.h",
+    "extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.h",
+    "extern/bullet2/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.h",
+    "extern/eltopo/common/meshes/Edge.hpp",
+    "extern/eltopo/common/meshes/ObjLoader.hpp",
+    "extern/eltopo/common/meshes/TriangleIndex.hpp",
+    "extern/eltopo/common/meshes/meshloader.h",
+    "extern/eltopo/eltopo3d/broadphase_blenderbvh.h"
+    )
+
+UTF8_CHECK = True
+
+SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))))
index 7a8158227a91b2e995a674296eccd3368f0450d6..8ae73451e318dd1a8cab02c18dc6567257fc403a 100644 (file)
@@ -1,6 +1,59 @@
 # -*- mode: cmake; indent-tabs-mode: t; -*-
 # $Id$
 
+
+# foo_bar.spam --> foo_barMySuffix.spam
+macro(file_suffix
+       file_name_new file_name file_suffix
+       )
+
+       get_filename_component(_file_name_PATH ${file_name} PATH)
+       get_filename_component(_file_name_NAME_WE ${file_name} NAME_WE)
+       get_filename_component(_file_name_EXT ${file_name} EXT)
+       set(${file_name_new} "${_file_name_PATH}/${_file_name_NAME_WE}${file_suffix}${_file_name_EXT}")
+
+       unset(_file_name_PATH)
+       unset(_file_name_NAME_WE)
+       unset(_file_name_EXT)
+endmacro()
+
+# usefil for adding debug suffix to library lists:
+# /somepath/foo.lib --> /somepath/foo_d.lib
+macro(file_list_suffix
+       fp_list_new fp_list fn_suffix
+       )
+
+       # incase of empty list
+       set(_fp)
+       set(_fp_suffixed)
+
+       set(fp_list_new)
+
+       foreach(_fp ${fp_list})
+               file_suffix(_fp_suffixed "${_fp}" "${fn_suffix}")
+               list(APPEND "${fp_list_new}" "${_fp_suffixed}")
+       endforeach()
+
+       unset(_fp)
+       unset(_fp_suffixed)
+
+endmacro()
+
+
+macro(target_link_libraries_optimized TARGET LIBS)
+       foreach(_LIB ${LIBS})
+               target_link_libraries(${TARGET} optimized "${_LIB}")
+       endforeach()
+       unset(_LIB)
+endmacro()
+
+macro(target_link_libraries_debug TARGET LIBS)
+       foreach(_LIB ${LIBS})
+               target_link_libraries(${TARGET} debug "${_LIB}")
+       endforeach()
+       unset(_LIB)
+endmacro()
+
 # Nicer makefiles with -I/1/foo/ instead of -I/1/2/3/../../foo/
 # use it instead of include_directories()
 macro(blender_include_dirs
@@ -37,7 +90,7 @@ macro(blender_source_group
 
        foreach(_SRC ${sources})
                get_filename_component(_SRC_EXT ${_SRC} EXT)
-               if(${_SRC_EXT} MATCHES ".h" OR ${_SRC_EXT} MATCHES ".hpp")
+               if((${_SRC_EXT} MATCHES ".h") OR (${_SRC_EXT} MATCHES ".hpp"))
                        source_group("Header Files" FILES ${_SRC})
                else()
                        source_group("Source Files" FILES ${_SRC})
@@ -127,7 +180,7 @@ macro(SETUP_LIBDIRS)
                link_directories(${SNDFILE_LIBPATH})
        endif()
        if(WITH_SAMPLERATE)
-               link_directories(${LIBSAMPLERATE_LIBPATH})
+               link_directories(${SAMPLERATE_LIBPATH})
        endif()
        if(WITH_FFTW3)
                link_directories(${FFTW3_LIBPATH})
@@ -163,11 +216,12 @@ macro(setup_liblinks
                target_link_libraries(${target} ${PYTHON_LINKFLAGS})
 
                if(WIN32 AND NOT UNIX)
-                       target_link_libraries(${target}
-                                       debug ${PYTHON_LIBRARY}_d
-                                       optimized ${PYTHON_LIBRARY})
+                       file_list_suffix(PYTHON_LIBRARIES_DEBUG "${PYTHON_LIBRARIES}" "_d")
+                       target_link_libraries_debug(${target} "${PYTHON_LIBRARIES_DEBUG}")
+                       target_link_libraries_optimized(${target} "${PYTHON_LIBRARIES}")
+                       unset(PYTHON_LIBRARIES_DEBUG)
                else()
-                       target_link_libraries(${target} ${PYTHON_LIBRARY})
+                       target_link_libraries(${target} ${PYTHON_LIBRARIES})
                endif()
        endif()
 
@@ -186,7 +240,7 @@ macro(setup_liblinks
                target_link_libraries(${target} ${GETTEXT_LIB})
 
                if(WIN32 AND NOT UNIX)
-                       target_link_libraries(${target} ${ICONV_LIB})
+                       target_link_libraries(${target} ${ICONV_LIBRARIES})
                endif()
        endif()
 
@@ -194,74 +248,72 @@ macro(setup_liblinks
                target_link_libraries(${target} ${OPENAL_LIBRARY})
        endif()
        if(WITH_FFTW3)
-               target_link_libraries(${target} ${FFTW3_LIB})
+               target_link_libraries(${target} ${FFTW3_LIBRARIES})
        endif()
        if(WITH_JACK)
-               target_link_libraries(${target} ${JACK_LIB})
+               target_link_libraries(${target} ${JACK_LIBRARIES})
        endif()
        if(WITH_CODEC_SNDFILE)
-               target_link_libraries(${target} ${SNDFILE_LIB})
+               target_link_libraries(${target} ${SNDFILE_LIBRARIES})
        endif()
        if(WITH_SAMPLERATE)
-               target_link_libraries(${target} ${LIBSAMPLERATE_LIB})
+               target_link_libraries(${target} ${SAMPLERATE_LIBRARIES})
        endif()
        if(WITH_SDL)
                target_link_libraries(${target} ${SDL_LIBRARY})
        endif()
        if(WITH_CODEC_QUICKTIME)
-               target_link_libraries(${target} ${QUICKTIME_LIB})
+               target_link_libraries(${target} ${QUICKTIME_LIBRARIES})
        endif()
        if(WITH_IMAGE_TIFF)
                target_link_libraries(${target} ${TIFF_LIBRARY})
        endif()
        if(WITH_IMAGE_OPENEXR)
                if(WIN32 AND NOT UNIX)
-                       foreach(_LOOP_VAR ${OPENEXR_LIBRARIES})
-                               string(REGEX REPLACE ".lib$" "_d.lib" _LOOP_VAR_DEBUG ${_LOOP_VAR})
-                               target_link_libraries(${target}
-                                               debug ${_LOOP_VAR_DEBUG}
-                                               optimized ${_LOOP_VAR})
-                       endforeach()
-                       unset(_LOOP_VAR)
-                       unset(_LOOP_VAR_DEBUG)
+                       file_list_suffix(OPENEXR_LIBRARIES_DEBUG "${OPENEXR_LIBRARIES}" "_d")
+                       target_link_libraries_debug(${target} "${OPENEXR_LIBRARIES_DEBUG}")
+                       target_link_libraries_optimized(${target} "${OPENEXR_LIBRARIES}")
+                       unset(OPENEXR_LIBRARIES_DEBUG)
                else()
                        target_link_libraries(${target} ${OPENEXR_LIBRARIES})
                endif()
        endif()
        if(WITH_IMAGE_OPENJPEG AND UNIX AND NOT APPLE)
-               target_link_libraries(${target} ${OPENJPEG_LIB})
+               target_link_libraries(${target} ${OPENJPEG_LIBRARIES})
        endif()
        if(WITH_CODEC_FFMPEG)
-               target_link_libraries(${target} ${FFMPEG_LIB})
+               target_link_libraries(${target} ${FFMPEG_LIBRARIES})
        endif()
        if(WITH_OPENCOLLADA)
                if(WIN32 AND NOT UNIX)
-                       foreach(_LOOP_VAR ${OPENCOLLADA_LIB})
-                               target_link_libraries(${target}
-                                               debug ${_LOOP_VAR}_d
-                                               optimized ${_LOOP_VAR})
-                       endforeach()
-                       unset(_LOOP_VAR)
-                       target_link_libraries(${target}
-                                       debug ${PCRE_LIB}_d
-                                       optimized ${PCRE_LIB})
+                       file_list_suffix(OPENCOLLADA_LIBRARIES_DEBUG "${OPENCOLLADA_LIBRARIES}" "_d")
+                       target_link_libraries_debug(${target} "${OPENCOLLADA_LIBRARIES_DEBUG}")
+                       target_link_libraries_optimized(${target} "${OPENCOLLADA_LIBRARIES}")
+                       unset(OPENCOLLADA_LIBRARIES_DEBUG)
+
+                       file_list_suffix(PCRE_LIB_DEBUG "${PCRE_LIB}" "_d")
+                       target_link_libraries_debug(${target} "${PCRE_LIB_DEBUG}")
+                       target_link_libraries_optimized(${target} "${PCRE_LIB}")
+                       unset(PCRE_LIB_DEBUG)
+
                        if(EXPAT_LIB)
-                               target_link_libraries(${target}
-                                               debug ${EXPAT_LIB}_d
-                                               optimized ${EXPAT_LIB})
+                               file_list_suffix(EXPAT_LIB_DEBUG "${EXPAT_LIB}" "_d")
+                               target_link_libraries_debug(${target} "${EXPAT_LIB_DEBUG}")
+                               target_link_libraries_optimized(${target} "${EXPAT_LIB}")
+                               unset(EXPAT_LIB_DEBUG)
                        endif()
                else()
                        target_link_libraries(${target}
-                                       ${OPENCOLLADA_LIB}
+                                       ${OPENCOLLADA_LIBRARIES}
                                        ${PCRE_LIB}
                                        ${EXPAT_LIB})
                endif()
        endif()
        if(WITH_MEM_JEMALLOC)
-               target_link_libraries(${target} ${JEMALLOC_LIBRARY})
+               target_link_libraries(${target} ${JEMALLOC_LIBRARIES})
        endif()
        if(WIN32 AND NOT UNIX)
-               target_link_libraries(${target} ${PTHREADS_LIB})
+               target_link_libraries(${target} ${PTHREADS_LIBRARIES})
        endif()
 endmacro()
 
index e8004338271528c6175d89ab31c20f1021e1a18d..f8b3e750e7457483746d657fec0b9f4b9b11141b 100644 (file)
@@ -76,11 +76,6 @@ BF_GETTEXT_INC = '${BF_GETTEXT}/include'
 BF_GETTEXT_LIB = 'gettextpo intl'
 BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
 
-WITH_BF_FTGL = 'false'
-BF_FTGL = '#extern/bFTGL'
-BF_FTGL_INC = '${BF_FTGL}/include'
-BF_FTGL_LIB = 'extern_ftgl'
-
 WITH_BF_GAMEENGINE='false'
 
 WITH_BF_BULLET = 'true'
index bc2917055fb68104f07fedfebc06eb9ade5a4d2c..328cd4cdb288fd55e3b1bfdd7ec25de63ed09c12 100644 (file)
@@ -93,7 +93,7 @@ BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
 #BF_GETTEXT_LIB_STATIC = '${BF_GETTEXT}/lib/libgettextlib.a'
 
 WITH_BF_GAMEENGINE = True
-WITH_BF_PLAYER = False
+WITH_BF_PLAYER = True
 
 WITH_BF_BULLET = True
 BF_BULLET = '#extern/bullet2/src'
index b5d44db8a92b40d3459aebf7038d93f64e382844..ab7b5ce7d1488b84a06a9458ac048bca9c27d311 100644 (file)
@@ -99,7 +99,7 @@ BF_GETTEXT_LIB = 'gnu_gettext'
 BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
 
 WITH_BF_GAMEENGINE = True
-WITH_BF_PLAYER = False
+WITH_BF_PLAYER = True
 
 WITH_BF_BULLET = True
 BF_BULLET = '#extern/bullet2/src'
@@ -170,7 +170,7 @@ BGE_CXXFLAGS = ['/O2', '/EHsc', '/GR', '/fp:fast', '/arch:SSE']
 
 BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr']
 
-CPPFLAGS = ['-DWIN32','-D_CONSOLE', '-D_LIB', '-DFTGL_LIBRARY_STATIC', '-D_CRT_SECURE_NO_DEPRECATE']
+CPPFLAGS = ['-DWIN32','-D_CONSOLE', '-D_LIB', '-D_CRT_SECURE_NO_DEPRECATE']
 REL_CFLAGS = ['-O2', '-DNDEBUG']
 REL_CCFLAGS = ['-O2', '-DNDEBUG']
 REL_CXXFLAGS = ['-O2', '-DNDEBUG']
@@ -181,7 +181,7 @@ CXX_WARN = []
 
 LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid']
 
-PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:IX86','/STACK:2097152','/INCREMENTAL:NO', '/LARGEADDRESSAWARE']
+PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:IX86','/STACK:2097152','/INCREMENTAL:NO', '/LARGEADDRESSAWARE', '/NODEFAULTLIB:"msvcrt.lib"', '/NODEFAULTLIB:"msvcmrt.lib"', '/NODEFAULTLIB:"msvcurt.lib"', '/NODEFAULTLIB:"msvcrtd.lib"']
 
 # # Todo
 # BF_PROFILE_CCFLAGS = ['-pg', '-g ']
index 3332a560ed2331508e4e1d2a3d1a3fc79ab04143..3abc466d33dbfbbb3220b9128a3bd87ae3013e77 100644 (file)
@@ -101,7 +101,7 @@ BF_GETTEXT_LIB = 'gettext'
 BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
 
 WITH_BF_GAMEENGINE = True
-WITH_BF_PLAYER = False
+WITH_BF_PLAYER = True
 
 WITH_BF_BULLET = True
 BF_BULLET = '#extern/bullet2/src'
@@ -172,7 +172,7 @@ BGE_CXXFLAGS = ['/O2', '/EHsc', '/GR', '/fp:fast']
 
 BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr', '/Od']
 
-CPPFLAGS = ['-DWIN32', '-D_CONSOLE', '-D_LIB', '-DFTGL_LIBRARY_STATIC', '-D_CRT_SECURE_NO_DEPRECATE']
+CPPFLAGS = ['-DWIN32', '-D_CONSOLE', '-D_LIB', '-D_CRT_SECURE_NO_DEPRECATE']
 REL_CFLAGS = ['-O2', '-DNDEBUG']
 REL_CCFLAGS = ['-O2', '-DNDEBUG']
 REL_CXXFLAGS = ['-O2', '-DNDEBUG']
@@ -188,7 +188,7 @@ if BF_DEBUG:
 else:
        BF_NUMJOBS=6
 
-PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:X64','/STACK:2097152','/OPT:NOREF','/INCREMENTAL:NO']
+PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:X64','/STACK:2097152','/OPT:NOREF','/INCREMENTAL:NO', '/NODEFAULTLIB:"msvcrt.lib"', '/NODEFAULTLIB:"msvcmrt.lib"', '/NODEFAULTLIB:"msvcurt.lib"', '/NODEFAULTLIB:"msvcrtd.lib"']
 
 BF_BUILDDIR = '..\\build\\blender25-win64-vc'
 BF_INSTALLDIR='..\\install\\blender25-win64-vc'
index afc58ce67303e4bb717a6208d5f7108314804e2d..988c992fd78d1f0ea40e2f3b64878a2775ba55ba 100755 (executable)
@@ -13,8 +13,8 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation, 
-# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # ***** END GPL LICENCE BLOCK *****
 
index 7003af10ac77e8e647c8e60a5190fcbd43b42e26..313c8c7ff5dfb26cb215279a24d9634ccb51db13 100644 (file)
@@ -13,8 +13,8 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation, 
-# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # ***** END GPL LICENCE BLOCK *****
 
index 89dcf834227ecf44e31472a7af4e2e8fdd41d59b..79b3f1a4160bb0707ed2a3818ebbe610abe53589 100644 (file)
@@ -31,7 +31,7 @@ PROJECT_NAME           = Blender
 # This could be handy for archiving the generated documentation or 
 # if some version control system is used.
 
-PROJECT_NUMBER         = "V2.57"
+PROJECT_NUMBER         = "V2.58"
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
 # for a project that appears at the top of each page and should give viewer
index a37ed730c22e574e0f007fa1119b2858f1c55745..88db31e15860007061c05be792d054431754452d 100644 (file)
@@ -8,7 +8,7 @@
 
 {%- macro relbar() %}
     <div class="subnav boxheader">
-       <ul class="noprint"><li><a href="http://www.blender.org/development/coding-guides/">Coding Guides</a></li><li>•</li><li><a href="http://www.blender.org/development/report-a-bug/">Report a Bug</a></li><li>•</li><li><a href="http://www.blender.org/development/submit-a-patch/">Submit a Patch</a></li><li>•</li><li><a href="http://www.blender.org/development/release-logs/">Release Logs</a></li><li>•</li><li><a href="http://www.blender.org/development/current-projects/">Current Projects</a></li><li>•</li><li><a href="http://www.blender.org/development/architecture/">Architecture</a></li><li>•</li><li><a href="http://www.blender.org/development/building-blender/">Building Blender</a></li><li>•</li><li class="subnav-active"><a href="http://www.blender.org/documentation/250PythonDoc/contents.html">PyAPI</a></li><li>•</li><li><a href="http://wiki.blender.org/index.php/Main_Page">Wiki</a></li></ul>
+       <ul class="noprint"><li><a href="http://wiki.blender.org/index.php/Dev:Contents">Documentation</a></li><li>•</li><li><a href="http://www.blender.org/development/report-a-bug/">Report a Bug</a></li><li>•</li><li><a href="http://wiki.blender.org/index.php/Dev:Doc/Process/Patches">Submit a Patch</a></li><li>•</li><li><a href="http://www.blender.org/development/release-logs/">Release Logs</a></li><li>•</li><li><a href="http://www.blender.org/development/building-blender/">Building Blender</a></li><li>•</li><li><a href="http://wiki.blender.org/index.php/Dev:Doc/Projects">Current Projects</a></li><li>•</li><li><a href="http://wiki.blender.org/index.php/Dev:Source/Architecture">Architecture</a></li><li>•</li><li><a href="http://www.blender.org/documentation/250PythonDoc/contents.html">Python API</a></li><li>•</li><li><a href="http://wiki.blender.org">Wiki</a></li></ul>
     </div>
     <div class="related subnav">
       <h3>{{ _('Navigation') }}</h3>
diff --git a/doc/python_api/examples/aud.py b/doc/python_api/examples/aud.py
new file mode 100644 (file)
index 0000000..e41e821
--- /dev/null
@@ -0,0 +1,21 @@
+"""
+Basic Sound Playback
+++++++++++++++++++++
+This script shows how to use the classes: :class:`Device`, :class:`Factory` and
+:class:`Handle`.
+"""
+import aud
+
+device = aud.device()
+# load sound file (it can be a video file with audio)
+factory = aud.Factory('music.ogg')
+
+# play the audio, this return a handle to control play/pause
+handle = device.play(sound)
+# if the audio is not too big and will be used often you can buffer it
+factory_buffered = aud.Factory.buffer(sound)
+handle_buffered = device.play(buffered)
+
+# stop the sounds (otherwise they play until their ends)
+handle.stop()
+handle_buffered.stop()
diff --git a/doc/python_api/examples/bpy.props.4.py b/doc/python_api/examples/bpy.props.4.py
new file mode 100644 (file)
index 0000000..2b44d94
--- /dev/null
@@ -0,0 +1,21 @@
+"""
+Update Example
+++++++++++++++
+
+It can be useful to perform an action when a property is changed and can be
+used to update other properties or synchronize with external data.
+
+All properties define update functions except for CollectionProperty.
+"""
+
+import bpy
+
+
+def update_func(self, context):
+    print("my test function", self)
+
+bpy.types.Scene.testprop = bpy.props.FloatProperty(update=update_func)
+
+bpy.context.scene.testprop = 11.0
+
+# >>> my test function <bpy_struct, Scene("Scene")>
index 7035ef4311bdbdadbe0b5cac7c89b51c1cd7c772..e7db5df4a1fbdb6b217f8af2e6c228d7d38bd9b0 100644 (file)
@@ -696,3 +696,216 @@ Renamed
 * **force** -> :class:`bpy.types.MaterialPhysics.fh_force`
 * **use_normal_align** -> :class:`bpy.types.MaterialPhysics.use_fh_normal`
 
+
+2.57 to 2.58
+============
+
+bpy_extras
+----------
+
+Added
+^^^^^
+
+* :mod:`bpy_extras`
+* :mod:`bpy_extras.view3d_utils`
+
+Moved
+^^^^^
+
+* io_utils -> :mod:`bpy_extras.io_utils`
+* image_utils -> :mod:`bpy_extras.image_utils`
+* mesh_utils -> :mod:`bpy_extras.mesh_utils`
+* object_utils -> :mod:`bpy_extras.object_utils`
+
+bpy.types.RenderSettings
+------------------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.RenderSettings.use_bake_lores_mesh`
+* :class:`bpy.types.RenderSettings.use_bake_multires`
+
+bpy.types.Camera
+----------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.Camera.show_guide`
+
+bpy.types.SpaceImageEditor
+--------------------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.SpaceImageEditor.zoom`
+
+bpy.types.SpaceView3D
+---------------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.SpaceView3D.lock_camera`
+
+bpy.types.RegionView3D
+----------------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.RegionView3D.is_perspective`
+
+bpy.types.Scene
+---------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.Scene.frame_subframe`
+
+bpy.types.Area
+--------------
+
+Removed
+^^^^^^^
+
+* **active_space**
+
+bpy.types.DisplaceModifier
+--------------------------
+
+Renamed
+^^^^^^^
+
+* **texture_coordinate_object** -> :class:`bpy.types.DisplaceModifier.texture_coords_object`
+
+bpy.types.UserPreferencesView
+-----------------------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.UserPreferencesView.use_camera_lock_parent`
+
+bpy.types.DomainFluidSettings
+-----------------------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.DomainFluidSettings.fluid_mesh_vertices`
+* :class:`bpy.types.DomainFluidSettings.surface_noobs`
+
+bpy.types.Sculpt
+----------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.Sculpt.use_deform_only`
+
+bpy.types.ClothCollisionSettings
+--------------------------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.ClothCollisionSettings.distance_repel`
+* :class:`bpy.types.ClothCollisionSettings.repel_force`
+
+bpy.types.UILayout
+------------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.UILayout.template_edit_mode_selection`
+
+bpy.types.ToolSettings
+----------------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.ToolSettings.use_snap_project_self`
+
+bpy.types.Mesh
+--------------
+
+Removed
+^^^^^^^
+
+* **edge_face_count**
+* **edge_face_count_dict**
+* **edge_loops_from_edges**
+* **edge_loops_from_faces**
+
+bpy.types.PointDensity
+----------------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.PointDensity.falloff_curve`
+* :class:`bpy.types.PointDensity.falloff_speed_scale`
+* :class:`bpy.types.PointDensity.use_falloff_curve`
+
+bpy.types.SpaceTextEditor
+-------------------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.SpaceTextEditor.use_match_case`
+
+bpy.types.CameraActuator
+------------------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.CameraActuator.damping`
+
+bpy.types.Property
+------------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.Property.is_skip_save`
+
+bpy.types.UserPreferencesSystem
+-------------------------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.UserPreferencesSystem.anisotropic_filter`
+
+bpy.types.Object
+----------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.Object.empty_image_offset`
+
+bpy.types.Image
+---------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.Image.resolution`
+
+bpy.types.SceneGameData
+-----------------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.SceneGameData.use_glsl_color_management`
+
index eb4fc4716e610f7e9dc9c0c2b76e472300861db6..7a56e73b7adce2ec6fd904dac8009d4e165f84aa 100644 (file)
@@ -24,17 +24,17 @@ Dump the python API into a text file so we can generate changelogs.
 output from this tool should be added into "doc/python_api/rst/change_log.rst"
 
 # dump api blender_version.py in CWD
-blender --background --python intern/tools/rna_api_dump.py -- --dump
+blender --background --python doc/python_api/sphinx_changelog_gen.py -- --dump
 
 # create changelog
-blender --background --python intern/tools/rna_api_dump.py -- \
+blender --background --python doc/python_api/sphinx_changelog_gen.py -- \
         --api_from blender_2_56_1.py \
         --api_to blender_2_57_0.py \
         --api_out changes.rst
 
 
 # Api comparison can also run without blender
-python intern/tools/rna_api_dump.py
+python doc/python_api/sphinx_changelog_gen.py \
         --api_from blender_api_2_56_6.py \
         --api_to blender_api_2_57.py \
         --api_out changes.rst
index e96b4d363b41022a0f8758cad1a1a24e4c267fd2..0112007ca7f58c574bb9660c3fa1c65fb73c05b2 100644 (file)
@@ -29,15 +29,15 @@ For HTML generation
 
     ./blender.bin --background --python doc/python_api/sphinx_doc_gen.py
 
-  This will generate python files in doc/python_api/sphinx-in/,
-  assuming that ./blender.bin is or links to the blender executable
+  This will generate python files in doc/python_api/sphinx-in/
+  providing ./blender.bin is or links to the blender executable
 
 - Generate html docs by running...
 
     cd doc/python_api
     sphinx-build sphinx-in sphinx-out
 
-  assuming that you have sphinx 1.0.7 installed
+  This requires sphinx 1.0.7 to be installed.
 
 For PDF generation
 ------------------
@@ -48,6 +48,15 @@ For PDF generation
     make
 '''
 
+# Check we're running in blender
+if __import__("sys").modules.get("bpy") is None:
+    print("\nError, this script must run from inside blender2.5")
+    print(script_help_msg)
+
+    import sys
+    sys.exit()
+
+
 # Switch for quick testing
 if 1:
     # full build
@@ -1196,72 +1205,67 @@ def rna2sphinx(BASEPATH):
 
 
 def main():
-    import bpy
-    if 'bpy' not in dir():
-        print("\nError, this script must run from inside blender2.5")
-        print(script_help_msg)
+    import shutil
+
+    script_dir = os.path.dirname(__file__)
+    path_in = os.path.join(script_dir, "sphinx-in")
+    path_out = os.path.join(script_dir, "sphinx-out")
+    path_examples = os.path.join(script_dir, "examples")
+    # only for partial updates
+    path_in_tmp = path_in + "-tmp"
+
+    if not os.path.exists(path_in):
+        os.mkdir(path_in)
+
+    for f in os.listdir(path_examples):
+        if f.endswith(".py"):
+            EXAMPLE_SET.add(os.path.splitext(f)[0])
+
+    # only for full updates
+    if _BPY_FULL_REBUILD:
+        shutil.rmtree(path_in, True)
+        shutil.rmtree(path_out, True)
     else:
-        import shutil
-
-        script_dir = os.path.dirname(__file__)
-        path_in = os.path.join(script_dir, "sphinx-in")
-        path_out = os.path.join(script_dir, "sphinx-out")
-        path_examples = os.path.join(script_dir, "examples")
-        # only for partial updates
-        path_in_tmp = path_in + "-tmp"
-
-        if not os.path.exists(path_in):
-            os.mkdir(path_in)
-
-        for f in os.listdir(path_examples):
-            if f.endswith(".py"):
-                EXAMPLE_SET.add(os.path.splitext(f)[0])
-
-        # only for full updates
-        if _BPY_FULL_REBUILD:
-            shutil.rmtree(path_in, True)
-            shutil.rmtree(path_out, True)
-        else:
-            # write here, then move
-            shutil.rmtree(path_in_tmp, True)
-
-        rna2sphinx(path_in_tmp)
-
-        if not _BPY_FULL_REBUILD:
-            import filecmp
-
-            # now move changed files from 'path_in_tmp' --> 'path_in'
-            file_list_path_in = set(os.listdir(path_in))
-            file_list_path_in_tmp = set(os.listdir(path_in_tmp))
-
-            # remove deprecated files that have been removed.
-            for f in sorted(file_list_path_in):
-                if f not in file_list_path_in_tmp:
-                    print("\tdeprecated: %s" % f)
-                    os.remove(os.path.join(path_in, f))
-
-            # freshen with new files.
-            for f in sorted(file_list_path_in_tmp):
-                f_from = os.path.join(path_in_tmp, f)
-                f_to = os.path.join(path_in, f)
-
-                do_copy = True
-                if f in file_list_path_in:
-                    if filecmp.cmp(f_from, f_to):
-                        do_copy = False
-
-                if do_copy:
-                    print("\tupdating: %s" % f)
-                    shutil.copy(f_from, f_to)
-                '''else:
-                    print("\tkeeping: %s" % f) # eh, not that useful'''
-
-        EXAMPLE_SET_UNUSED = EXAMPLE_SET - EXAMPLE_SET_USED
-        if EXAMPLE_SET_UNUSED:
-            print("\nUnused examples found in '%s'..." % path_examples)
-            for f in EXAMPLE_SET_UNUSED:
-                print("    %s.py" % f)
-            print("  %d total\n" % len(EXAMPLE_SET_UNUSED))
+        # write here, then move
+        shutil.rmtree(path_in_tmp, True)
+
+    rna2sphinx(path_in_tmp)
+
+    if not _BPY_FULL_REBUILD:
+        import filecmp
+
+        # now move changed files from 'path_in_tmp' --> 'path_in'
+        file_list_path_in = set(os.listdir(path_in))
+        file_list_path_in_tmp = set(os.listdir(path_in_tmp))
+
+        # remove deprecated files that have been removed.
+        for f in sorted(file_list_path_in):
+            if f not in file_list_path_in_tmp:
+                print("\tdeprecated: %s" % f)
+                os.remove(os.path.join(path_in, f))
+
+        # freshen with new files.
+        for f in sorted(file_list_path_in_tmp):
+            f_from = os.path.join(path_in_tmp, f)
+            f_to = os.path.join(path_in, f)
+
+            do_copy = True
+            if f in file_list_path_in:
+                if filecmp.cmp(f_from, f_to):
+                    do_copy = False
+
+            if do_copy:
+                print("\tupdating: %s" % f)
+                shutil.copy(f_from, f_to)
+            '''else:
+                print("\tkeeping: %s" % f) # eh, not that useful'''
+
+    EXAMPLE_SET_UNUSED = EXAMPLE_SET - EXAMPLE_SET_USED
+    if EXAMPLE_SET_UNUSED:
+        print("\nUnused examples found in '%s'..." % path_examples)
+        for f in EXAMPLE_SET_UNUSED:
+            print("    %s.py" % f)
+        print("  %d total\n" % len(EXAMPLE_SET_UNUSED))
 
     import sys
     sys.exit()
index bfc4b31689e6e38a856acc7d504b436c1c918d87..9cead6546b86220dab6ae6e69078e3c2434f6aa9 100644 (file)
@@ -149,6 +149,15 @@ set(SRC
        src/LinearMath/btGeometryUtil.cpp
        src/LinearMath/btQuickprof.cpp
        src/LinearMath/btSerializer.cpp
+       # UNUSED
+       # src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp
+       # src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp
+       # src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp
+       # src/BulletCollision/CollisionShapes/btBox2dShape.cpp
+       # src/BulletCollision/CollisionShapes/btConvex2dShape.cpp
+       # src/BulletDynamics/Character/btKinematicCharacterController.cpp
+       # src/BulletDynamics/ConstraintSolver/btHinge2Constraint.cpp
+       # src/BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp
 
        src/Bullet-C-Api.h
        src/BulletCollision/BroadphaseCollision/btAxisSweep3.h
@@ -217,6 +226,7 @@ set(SRC
        src/BulletCollision/CollisionShapes/btTriangleCallback.h
        src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h
        src/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.h
+       src/BulletCollision/CollisionShapes/btTriangleInfoMap.h
        src/BulletCollision/CollisionShapes/btTriangleMesh.h
        src/BulletCollision/CollisionShapes/btTriangleMeshShape.h
        src/BulletCollision/CollisionShapes/btTriangleShape.h
@@ -264,6 +274,7 @@ set(SRC
        src/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h
        src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h
        src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h
+       src/BulletDynamics/Character/btCharacterControllerInterface.h
        src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h
        src/BulletDynamics/ConstraintSolver/btConstraintSolver.h
        src/BulletDynamics/ConstraintSolver/btContactConstraint.h
@@ -291,9 +302,12 @@ set(SRC
        src/BulletSoftBody/btDefaultSoftBodySolver.h
        src/BulletSoftBody/btSoftBody.h
        src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.h
+       src/BulletSoftBody/btSoftBodyData.h
        src/BulletSoftBody/btSoftBodyHelpers.h
        src/BulletSoftBody/btSoftBodyInternals.h
        src/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.h
+       src/BulletSoftBody/btSoftBodySolverVertexBuffer.h
+       src/BulletSoftBody/btSoftBodySolvers.h
        src/BulletSoftBody/btSoftRigidCollisionAlgorithm.h
        src/BulletSoftBody/btSoftRigidDynamicsWorld.h
        src/BulletSoftBody/btSoftSoftCollisionAlgorithm.h
@@ -323,9 +337,16 @@ set(SRC
        src/LinearMath/btTransform.h
        src/LinearMath/btTransformUtil.h
        src/LinearMath/btVector3.h
-       
        src/btBulletCollisionCommon.h
        src/btBulletDynamicsCommon.h
+       # src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h
+       # src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h
+       # src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.h
+       # src/BulletCollision/CollisionShapes/btBox2dShape.h
+       # src/BulletCollision/CollisionShapes/btConvex2dShape.h
+       # src/BulletDynamics/Character/btKinematicCharacterController.h
+       # src/BulletDynamics/ConstraintSolver/btHinge2Constraint.h
+       # src/BulletDynamics/ConstraintSolver/btUniversalConstraint.h
 )
 
 if(CMAKE_COMPILER_IS_GNUCXX)
index fe03db830540272a9a9c0065674281a9ed9f5f1d..6f5056b341ad34a59fd48167b570cfd3907af63f 100644 (file)
@@ -32,6 +32,10 @@ set(INC_SYS
 
 )
 
+if(WIN32)
+       add_definitions(-DOPJ_STATIC)
+endif()
+
 set(SRC
        bio.c
        cio.c
index 33bf9bb476c00be323e1c4f3bd1b772f7db6efec..4c36cb43e7d90cd754653aa552bf8b15f1aea7cb 100644 (file)
@@ -24,7 +24,6 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-add_subdirectory(audaspace)
 add_subdirectory(string)
 add_subdirectory(ghost)
 add_subdirectory(guardedalloc)
@@ -35,6 +34,10 @@ add_subdirectory(opennl)
 add_subdirectory(smoke)
 add_subdirectory(mikktspace)
 
+if(WITH_AUDASPACE)
+       add_subdirectory(audaspace)
+endif()
+
 if(WITH_MOD_FLUID)
        add_subdirectory(elbeem)
 endif()
index b7a0b06d4911738642838d573a6ecb93d90386c5..ab88c9ecabd23601efdc48dc7c75f396825592ad 100644 (file)
@@ -1,7 +1,7 @@
 # $Id$
 # ***** BEGIN LGPL LICENSE BLOCK *****
 #
-# Copyright 2009 Jörg Hermann Müller
+# Copyright 2009 Jrg Hermann Mller
 #
 # This file is part of AudaSpace.
 #
@@ -29,7 +29,7 @@ set(INC
 )
 
 set(INC_SYS
-       ${PTHREADS_INC}
+       ${PTHREADS_INCLUDE_DIRS}
 )
 
 set(SRC
@@ -160,7 +160,7 @@ set(SRC
 if(WITH_CODEC_FFMPEG)
        add_definitions(-DWITH_FFMPEG)
        list(APPEND INC ffmpeg)
-       list(APPEND INC_SYS ${FFMPEG_INC})
+       list(APPEND INC_SYS ${FFMPEG_INCLUDE_DIRS})
        list(APPEND SRC
                ffmpeg/AUD_FFMPEGFactory.cpp
                ffmpeg/AUD_FFMPEGReader.cpp
@@ -195,7 +195,7 @@ endif()
 if(WITH_JACK)
        add_definitions(-DWITH_JACK)
        list(APPEND INC jack)
-       list(APPEND INC_SYS ${JACK_INC})
+       list(APPEND INC_SYS ${JACK_INCLUDE_DIRS})
        list(APPEND SRC
                jack/AUD_JackDevice.cpp
 
@@ -206,7 +206,7 @@ endif()
 if(WITH_CODEC_SNDFILE)
        add_definitions(-DWITH_SNDFILE)
        list(APPEND INC sndfile)
-       list(APPEND INC_SYS ${SNDFILE_INC})
+       list(APPEND INC_SYS ${SNDFILE_INCLUDE_DIRS})
        list(APPEND SRC
                sndfile/AUD_SndFileFactory.cpp
                sndfile/AUD_SndFileReader.cpp
@@ -218,7 +218,7 @@ endif()
 
 if(WITH_SAMPLERATE)
        add_definitions(-DWITH_SAMPLERATE)
-       list(APPEND INC_SYS ${LIBSAMPLERATE_INC})
+       list(APPEND INC_SYS ${SAMPLERATE_INCLUDE_DIRS})
        list(APPEND SRC
                SRC/AUD_SRCResampleFactory.cpp
                SRC/AUD_SRCResampleReader.cpp
@@ -231,7 +231,7 @@ endif()
 if(WITH_FFTW3 AND FALSE)
        add_definitions(-DWITH_FFTW3)
        list(APPEND INC fftw)
-       list(APPEND INC_SYS ${FFTW3_INC})
+       list(APPEND INC_SYS ${FFTW3_INCLUDE_DIRS})
        list(APPEND SRC
                fftw/AUD_BandPassFactory.cpp
                fftw/AUD_BandPassReader.cpp
index ab819f41ac31b83271cf045607bde34784b4647d..d8edffbfe0b9d646f7402b8de1701a3d7b19cf5a 100644 (file)
@@ -40,7 +40,7 @@
 #define FFMPEG_HAVE_AVIO 1
 #endif
 
-#if (LIBAVCODEC_VERSION_MAJOR > 53) || ((LIBAVCODEC_VERSION_MAJOR == 53) && (LIBAVCODEC_VERSION_MINOR > 1)) || ((LIBAVCODEC_VERSION_MAJOR == 53) && (LIBAVCODEC_VERSION_MINOR == 1) && (LIBAVCODEC_VERSION_MICRO >= 1))
+#if (LIBAVCODEC_VERSION_MAJOR > 53) || ((LIBAVCODEC_VERSION_MAJOR == 53) && (LIBAVCODEC_VERSION_MINOR > 1)) || ((LIBAVCODEC_VERSION_MAJOR == 53) && (LIBAVCODEC_VERSION_MINOR == 1) && (LIBAVCODEC_VERSION_MICRO >= 1)) || ((LIBAVCODEC_VERSION_MAJOR == 52) && (LIBAVCODEC_VERSION_MINOR >= 122))
 #define FFMPEG_HAVE_DEFAULT_VAL_UNION 1
 #endif
 
index bf401138cf1c35585d0ac295bda2e9c7b9d9748b..2649929713a449d255499e931ad024d68d4494e7 100644 (file)
@@ -741,11 +741,13 @@ GHOST_IWindow* GHOST_SystemCocoa::createWindow(
        NSRect contentRect = [NSWindow contentRectForFrameRect:frame
                                                                                                 styleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask)];
        
+       GHOST_TInt32 bottom = (contentRect.size.height - 1) - height - top;
+
        //Ensures window top left is inside this available rect
        left = left > contentRect.origin.x ? left : contentRect.origin.x;
-       top = top > contentRect.origin.y ? top : contentRect.origin.y;
-       
-       window = new GHOST_WindowCocoa (this, title, left, top, width, height, state, type, stereoVisual, numOfAASamples);
+       bottom = bottom > contentRect.origin.y ? bottom : contentRect.origin.y;
+
+       window = new GHOST_WindowCocoa (this, title, left, bottom, width, height, state, type, stereoVisual, numOfAASamples);
 
     if (window) {
         if (window->getValid()) {
@@ -809,7 +811,6 @@ GHOST_TSuccess GHOST_SystemCocoa::getCursorPosition(GHOST_TInt32& x, GHOST_TInt3
  */
 GHOST_TSuccess GHOST_SystemCocoa::setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y)
 {
-       GHOST_TInt32 wx,wy;
        GHOST_WindowCocoa* window = (GHOST_WindowCocoa*)m_windowManager->getActiveWindow();
        if (!window) return GHOST_kFailure;
 
@@ -820,8 +821,7 @@ GHOST_TSuccess GHOST_SystemCocoa::setCursorPosition(GHOST_TInt32 x, GHOST_TInt32
        CGAssociateMouseAndMouseCursorPosition(true);
        
        //Force mouse move event (not pushed by Cocoa)
-       window->screenToClient(x, y, wx, wy);
-       pushEvent(new GHOST_EventCursor(getMilliSeconds(), GHOST_kEventCursorMove, window, wx,wy));
+       pushEvent(new GHOST_EventCursor(getMilliSeconds(), GHOST_kEventCursorMove, window, x, y));
        m_outsideLoopEventProcessed = true;
        
        return GHOST_kSuccess;
@@ -1433,9 +1433,9 @@ GHOST_TSuccess GHOST_SystemCocoa::handleTabletEvent(void *eventPtr, short eventT
 GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
 {
        NSEvent *event = (NSEvent *)eventPtr;
-    GHOST_Window* window;
+    GHOST_WindowCocoa* window;
        
-       window = (GHOST_Window*)m_windowManager->getWindowAssociatedWithOSWindow((void*)[event window]);
+       window = (GHOST_WindowCocoa*)m_windowManager->getWindowAssociatedWithOSWindow((void*)[event window]);
        if (!window) {
                //printf("\nW failure for event 0x%x",[event type]);
                return GHOST_kFailure;
@@ -1499,7 +1499,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
                                switch (window->getCursorGrabMode()) {
                                        case GHOST_kGrabHide: //Cursor hidden grab operation : no cursor move
                                        {
-                                               GHOST_TInt32 x_warp, y_warp, x_accum, y_accum;
+                                               GHOST_TInt32 x_warp, y_warp, x_accum, y_accum, x, y;
                                                
                                                window->getCursorGrabInitPos(x_warp, y_warp);
                                                
@@ -1508,7 +1508,8 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
                                                y_accum += -[event deltaY]; //Strange Apple implementation (inverted coordinates for the deltaY) ...
                                                window->setCursorGrabAccum(x_accum, y_accum);
                                                
-                                               pushEvent(new GHOST_EventCursor([event timestamp]*1000, GHOST_kEventCursorMove, window, x_warp+x_accum, y_warp+y_accum));
+                                               window->clientToScreenIntern(x_warp+x_accum, y_warp+y_accum, x, y);
+                                               pushEvent(new GHOST_EventCursor([event timestamp]*1000, GHOST_kEventCursorMove, window, x, y));
                                        }
                                                break;
                                        case GHOST_kGrabWrap: //Wrap cursor at area/window boundaries
@@ -1516,19 +1517,16 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
                                                NSPoint mousePos = [event locationInWindow];
                                                GHOST_TInt32 x_mouse= mousePos.x;
                                                GHOST_TInt32 y_mouse= mousePos.y;
-                                               GHOST_TInt32 x_accum, y_accum, x_cur, y_cur;
-                                               GHOST_Rect bounds, windowBounds, correctedBounds;
+                                               GHOST_TInt32 x_accum, y_accum, x_cur, y_cur, x, y;
+                                               GHOST_Rect bounds, correctedBounds;
                                                
                                                /* fallback to window bounds */
                                                if(window->getCursorGrabBounds(bounds)==GHOST_kFailure)
                                                        window->getClientBounds(bounds);
                                                
                                                //Switch back to Cocoa coordinates orientation (y=0 at botton,the same as blender internal btw!), and to client coordinates
-                                               window->getClientBounds(windowBounds);
-                                               window->screenToClient(bounds.m_l,bounds.m_b, correctedBounds.m_l, correctedBounds.m_t);
-                                               window->screenToClient(bounds.m_r, bounds.m_t, correctedBounds.m_r, correctedBounds.m_b);
-                                               correctedBounds.m_b = (windowBounds.m_b - windowBounds.m_t) - correctedBounds.m_b;
-                                               correctedBounds.m_t = (windowBounds.m_b - windowBounds.m_t) - correctedBounds.m_t;
+                                               window->screenToClient(bounds.m_l, bounds.m_b, correctedBounds.m_l, correctedBounds.m_b);
+                                               window->screenToClient(bounds.m_r, bounds.m_t, correctedBounds.m_r, correctedBounds.m_t);
                                                
                                                //Update accumulation counts
                                                window->getCursorGrabAccum(x_accum, y_accum);
@@ -1547,19 +1545,24 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
                                                m_cursorDelta_y = y_mouse-mousePos.y;
                                                
                                                //Set new cursor position
-                                               window->clientToScreen(x_mouse, y_mouse, x_cur, y_cur);
+                                               window->clientToScreenIntern(x_mouse, y_mouse, x_cur, y_cur);
                                                setMouseCursorPosition(x_cur, y_cur); /* wrap */
                                                
                                                //Post event
                                                window->getCursorGrabInitPos(x_cur, y_cur);
-                                               pushEvent(new GHOST_EventCursor([event timestamp]*1000, GHOST_kEventCursorMove, window, x_cur + x_accum, y_cur + y_accum));
+                                               window->clientToScreenIntern(x_cur + x_accum, y_cur + y_accum, x, y);
+                                               pushEvent(new GHOST_EventCursor([event timestamp]*1000, GHOST_kEventCursorMove, window, x, y));
                                        }
                                                break;
                                        default:
                                        {
                                                //Normal cursor operation: send mouse position in window
                                                NSPoint mousePos = [event locationInWindow];
-                                               pushEvent(new GHOST_EventCursor([event timestamp]*1000, GHOST_kEventCursorMove, window, mousePos.x, mousePos.y));
+                                               GHOST_TInt32 x, y;
+
+                                               window->clientToScreenIntern(mousePos.x, mousePos.y, x, y);
+                                               pushEvent(new GHOST_EventCursor([event timestamp]*1000, GHOST_kEventCursorMove, window, x, y));
+
                                                m_cursorDelta_x=0;
                                                m_cursorDelta_y=0; //Mouse motion occurred between two cursor warps, so we can reset the delta counter
                                        }
@@ -1581,6 +1584,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
                                }
                                else {
                                        NSPoint mousePos = [event locationInWindow];
+                                       GHOST_TInt32 x, y;
                                        double dx = [event deltaX];
                                        double dy = -[event deltaY];
                                        
@@ -1597,7 +1601,10 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
                                        if (dy<0.0) dy-=0.5; else dy+=0.5;
                                        if (dy< -deltaMax) dy= -deltaMax; else if (dy>deltaMax) dy=deltaMax;
 
-                                       pushEvent(new GHOST_EventTrackpad([event timestamp]*1000, window, GHOST_kTrackpadEventScroll, mousePos.x, mousePos.y, dx, dy));
+                                       window->clientToScreenIntern(mousePos.x, mousePos.y, x, y);
+                                       dy = -dy;
+
+                                       pushEvent(new GHOST_EventTrackpad([event timestamp]*1000, window, GHOST_kTrackpadEventScroll, x, y, dx, dy));
                                }
                        }
                        break;
@@ -1605,7 +1612,9 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
                case NSEventTypeMagnify:
                        {
                                NSPoint mousePos = [event locationInWindow];
-                               pushEvent(new GHOST_EventTrackpad([event timestamp]*1000, window, GHOST_kTrackpadEventMagnify, mousePos.x, mousePos.y,
+                               GHOST_TInt32 x, y;
+                               window->clientToScreenIntern(mousePos.x, mousePos.y, x, y);
+                               pushEvent(new GHOST_EventTrackpad([event timestamp]*1000, window, GHOST_kTrackpadEventMagnify, x, y,
                                                                                                  [event magnification]*250.0 + 0.1, 0));
                        }
                        break;
@@ -1613,7 +1622,9 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
                case NSEventTypeRotate:
                        {
                                NSPoint mousePos = [event locationInWindow];
-                               pushEvent(new GHOST_EventTrackpad([event timestamp]*1000, window, GHOST_kTrackpadEventRotate, mousePos.x, mousePos.y,
+                               GHOST_TInt32 x, y;
+                               window->clientToScreenIntern(mousePos.x, mousePos.y, x, y);
+                               pushEvent(new GHOST_EventTrackpad([event timestamp]*1000, window, GHOST_kTrackpadEventRotate, x, y,
                                                                                                  -[event rotation] * 5.0, 0));
                        }
                case NSEventTypeBeginGesture:
index c518272d614cd1a30327ae8818e17d492517d69a..e34bfe7ff263bd8e3d7ce71778b024e6ca5390de 100644 (file)
@@ -41,8 +41,7 @@
 
 
 GHOST_Window::GHOST_Window(
-       const STR_String& /*title*/,
-       GHOST_TInt32 /*left*/, GHOST_TInt32 /*top*/, GHOST_TUns32 width, GHOST_TUns32 height,
+       GHOST_TUns32 width, GHOST_TUns32 height,
        GHOST_TWindowState state,
        GHOST_TDrawingContextType type,
        const bool stereoVisual,
index e0c676f53a579cbb0742f05cc7bd0a178b7a2187..66990abb555ea2b7e9f05907ff77c25ac2e53695 100644 (file)
@@ -76,9 +76,6 @@ public:
         * Constructor.
         * Creates a new window and opens it.
         * To check if the window was created properly, use the getValid() method.
-        * @param title                         The text shown in the title bar of the window.
-        * @param left                          The coordinate of the left edge of the window.
-        * @param top                           The coordinate of the top edge of the window.
         * @param width                         The width the window.
         * @param heigh                         The height the window.
         * @param state                         The state the window is initially opened with.
@@ -87,9 +84,6 @@ public:
         * @param numOfAASamples        Number of samples used for AA (zero if no AA)
         */
        GHOST_Window(
-               const STR_String& title, 
-               GHOST_TInt32 left,
-               GHOST_TInt32 top,
                GHOST_TUns32 width,
                GHOST_TUns32 height,
                GHOST_TWindowState state,
index 1ffd117d65880e5de213e57dcbbac7a3ed2bae65..c8bd67f9a5c66269829bd36ad4b34253d4f5aa2c 100644 (file)
@@ -102,7 +102,7 @@ GHOST_WindowCarbon::GHOST_WindowCarbon(
        const bool stereoVisual,
        const GHOST_TUns16 numOfAASamples
 ) :
-       GHOST_Window(title, left, top, width, height, state, GHOST_kDrawingContextTypeNone),
+       GHOST_Window(width, height, state, GHOST_kDrawingContextTypeNone),
        m_windowRef(0),
        m_grafPtr(0),
        m_aglCtx(0),
index 98e0f9cedd173a34f4ca6edea2add113ed3ebce4..e6de2bf07b4ee727b3d94887350152f2985b7293 100644 (file)
@@ -77,7 +77,7 @@ public:
                GHOST_SystemCocoa *systemCocoa,
                const STR_String& title,
                GHOST_TInt32 left,
-               GHOST_TInt32 top,
+               GHOST_TInt32 bottom,
                GHOST_TUns32 width,
                GHOST_TUns32 height,
                GHOST_TWindowState state,
@@ -180,6 +180,26 @@ public:
         */
        virtual void clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const;
 
+       /**
+        * Converts a point in screen coordinates to client rectangle coordinates
+        * but without the y coordinate conversion needed for ghost compatibility.
+        * @param inX   The x-coordinate in the client rectangle.
+        * @param inY   The y-coordinate in the client rectangle.
+        * @param outX  The x-coordinate on the screen.
+        * @param outY  The y-coordinate on the screen.
+        */
+       void clientToScreenIntern(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const;
+
+       /**
+        * Converts a point in screen coordinates to client rectangle coordinates,
+        * but without the y coordinate conversion needed for ghost compatibility.
+        * @param inX   The x-coordinate in the client rectangle.
+        * @param inY   The y-coordinate in the client rectangle.
+        * @param outX  The x-coordinate on the screen.
+        * @param outY  The y-coordinate on the screen.
+        */
+       void screenToClientIntern(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const;
+
        /**
         * Gets the screen the window is displayed in
         * @return The NSScreen object
index fb7d4a459c7497c3ef170d8f25da0c237783131b..93bc87b2458b48e67ff71bac643aa50cb1bfe5dc 100644 (file)
@@ -308,14 +308,14 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(
        GHOST_SystemCocoa *systemCocoa,
        const STR_String& title,
        GHOST_TInt32 left,
-       GHOST_TInt32 top,
+       GHOST_TInt32 bottom,
        GHOST_TUns32 width,
        GHOST_TUns32 height,
        GHOST_TWindowState state,
        GHOST_TDrawingContextType type,
        const bool stereoVisual, const GHOST_TUns16 numOfAASamples
 ) :
-       GHOST_Window(title, left, top, width, height, state, GHOST_kDrawingContextTypeNone, stereoVisual, numOfAASamples),
+       GHOST_Window(width, height, state, GHOST_kDrawingContextTypeNone, stereoVisual, numOfAASamples),
        m_customCursor(0)
 {
        NSOpenGLPixelFormatAttribute pixelFormatAttrsWindow[40];
@@ -327,13 +327,12 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(
        
        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
        
-
        //Creates the window
        NSRect rect;
        NSSize  minSize;
        
        rect.origin.x = left;
-       rect.origin.y = top;
+       rect.origin.y = bottom;
        rect.size.width = width;
        rect.size.height = height;
        
@@ -692,7 +691,30 @@ GHOST_TWindowState GHOST_WindowCocoa::getState() const
 void GHOST_WindowCocoa::screenToClient(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const
 {
        GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::screenToClient(): window invalid")
-       
+
+       screenToClientIntern(inX, inY, outX, outY);
+
+       /* switch y to match ghost convention */
+       GHOST_Rect cBnds;
+       getClientBounds(cBnds);
+       outY = (cBnds.getHeight() - 1) - outY;
+}
+
+
+void GHOST_WindowCocoa::clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const
+{
+       GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::clientToScreen(): window invalid")
+
+       /* switch y to match ghost convention */
+       GHOST_Rect cBnds;
+       getClientBounds(cBnds);
+       inY = (cBnds.getHeight() - 1) - inY;
+
+       clientToScreenIntern(inX, inY, outX, outY);
+}
+
+void GHOST_WindowCocoa::screenToClientIntern(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const
+{
        NSPoint screenCoord;
        NSPoint baseCoord;
        
@@ -705,11 +727,8 @@ void GHOST_WindowCocoa::screenToClient(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST
        outY = baseCoord.y;
 }
 
-
-void GHOST_WindowCocoa::clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const
+void GHOST_WindowCocoa::clientToScreenIntern(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const
 {
-       GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::clientToScreen(): window invalid")
-       
        NSPoint screenCoord;
        NSPoint baseCoord;
        
@@ -1211,7 +1230,7 @@ GHOST_TSuccess GHOST_WindowCocoa::setWindowCursorGrab(GHOST_TGrabCursorMode mode
                        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 
                        m_systemCocoa->getCursorPosition(x_old,y_old);
-                       screenToClient(x_old, y_old, m_cursorGrabInitPos[0], m_cursorGrabInitPos[1]);
+                       screenToClientIntern(x_old, y_old, m_cursorGrabInitPos[0], m_cursorGrabInitPos[1]);
                        //Warp position is stored in client (window base) coordinates
                        setCursorGrabAccum(0, 0);
                        
index aae1509fda15ec3d5aeb9526a3ce810e7bef3002..1ba51376ff92a54837bb111bfe28dffb705990a3 100644 (file)
@@ -136,7 +136,7 @@ GHOST_WindowWin32::GHOST_WindowWin32(
        GHOST_TSuccess msEnabled,
        int msPixelFormat)
 :
-       GHOST_Window(title, left, top, width, height, state, GHOST_kDrawingContextTypeNone,
+       GHOST_Window(width, height, state, GHOST_kDrawingContextTypeNone,
        stereoVisual,numOfAASamples),
        m_system(system),
        m_hDC(0),
index fc72ea09f4072a32b36dd4fff0fb27bf95222e07..de7251516079b134faaf33bf0caf87708a38019d 100644 (file)
@@ -164,7 +164,7 @@ GHOST_WindowX11(
        const bool stereoVisual,
        const GHOST_TUns16 numOfAASamples
 ) :
-       GHOST_Window(title,left,top,width,height,state,type,stereoVisual,numOfAASamples),
+       GHOST_Window(width,height,state,type,stereoVisual,numOfAASamples),
        m_context(NULL),
        m_display(display),
        m_normal_state(GHOST_kWindowStateNormal),
index 237edfd4594e67d41a0bccd10646a3d7dcba0ed1..df4fbc8fadd5b922dd4e3dcd2522eb5e444c8b04 100644 (file)
@@ -905,9 +905,6 @@ void IK_QElbowSegment::SetLimit(int axis, MT_Scalar lmin, MT_Scalar lmax)
        lmin = MT_clamp(lmin, -MT_PI, MT_PI);
        lmax = MT_clamp(lmax, -MT_PI, MT_PI);
 
-       lmin = lmin;
-       lmax = lmax;
-
        if (axis == 1) {
                m_min_twist = lmin;
                m_max_twist = lmax;
index 3b50e3537586c624d681b1c388e9fded1be1f781..b07dc5bb9837308d4066d462130e264cf6076781 100644 (file)
@@ -134,6 +134,7 @@ bool ConstraintSet::setControlParameter(int id, ConstraintAction action, double
                break;
        default:
                assert(action==ACT_NONE);
+               break;
        }
        return setControlParameters(&values, 1, timestep);
 }
index c787f54b284ffba1ce0aa415e1c17d829798324d..30313f45a92d64fecbed774fc3c6dffed2f36f45 100644 (file)
@@ -89,7 +89,7 @@ endif()
 
 if(WITH_FFTW3)
        add_definitions(-DFFTW3=1)
-       list(APPEND INC ${FFTW3_INC})
+       list(APPEND INC ${FFTW3_INCLUDE_DIRS})
 endif()
 
 blender_add_lib(bf_intern_smoke "${SRC}" "${INC}" "${INC_SYS}")
index cad2bc5f06cb7ad119c222d3ec448094f03cba42..d6ccdb5b733c56493eb27333ae73542ecae7a39b 100644 (file)
Binary files a/release/datafiles/splash.png and b/release/datafiles/splash.png differ
index f45f9c6f2258760a05d146fc8888485e53d67c31..551940b26e2ca88f44b7f577cdaa8b0359c5a0fb 100644 (file)
@@ -22,6 +22,7 @@ __all__ = (
     "load_image",
 )
 
+
 # limited replacement for BPyImage.comprehensiveImageLoad
 def load_image(imagepath,
                dirname="",
index b6d8a1fcf16a0a3550353d08231ccb0fed815d1c..2062fe4485ffd789d2c32c1d6624364ed31bc481 100644 (file)
@@ -27,6 +27,7 @@ __all__ = (
     "ngon_tesselate",
 )
 
+
 def mesh_linked_faces(mesh):
     """
     Splits the mesh into connected faces, use this for seperating cubes from
@@ -267,6 +268,7 @@ def ngon_tesselate(from_data, indices, fix_loops=True):
     fix_loops: If this is enabled polylines that use loops to make multiple polylines are delt with correctly.
     '''
 
+    from mathutils.geometry import tesselate_polygon
     from mathutils import Vector
     vector_to_tuple = Vector.to_tuple
 
index f2f2e53240b3a72b13721527a850f847e41e28b5..01ac543aec7ae416a49248b728e55607611e55c0 100644 (file)
@@ -25,6 +25,7 @@ __all__ = (
     "location_3d_to_region_2d",
 )
 
+
 def region_2d_to_vector_3d(region, rv3d, coord):
     """
     Return a direction vector from the viewport at the spesific 2d region
@@ -48,7 +49,7 @@ def region_2d_to_vector_3d(region, rv3d, coord):
         out = Vector(((2.0 * coord[0] / region.width) - 1.0,
                       (2.0 * coord[1] / region.height) - 1.0,
                       -0.5
-                    ))        
+                    ))
 
         w = (out[0] * persinv[0][3]) + \
             (out[1] * persinv[1][3]) + \
index 3c1b454e72ee0cd7a68a8b0341d23bd7221c100f..eaa7563c75786a8e8c9d701a57fb914bd3cd0de9 100644 (file)
@@ -20,7 +20,6 @@
 
 from _bpy import types as bpy_types
 import _bpy
-from mathutils import Vector
 
 StructRNA = bpy_types.Struct.__bases__[0]
 StructMetaPropGroup = _bpy.StructMetaPropGroup
@@ -144,18 +143,21 @@ class _GenericBone:
     def x_axis(self):
         """ Vector pointing down the x-axis of the bone.
         """
+        from mathutils import Vector
         return Vector((1.0, 0.0, 0.0)) * self.matrix.to_3x3()
 
     @property
     def y_axis(self):
         """ Vector pointing down the x-axis of the bone.
         """
+        from mathutils import Vector
         return Vector((0.0, 1.0, 0.0)) * self.matrix.to_3x3()
 
     @property
     def z_axis(self):
         """ Vector pointing down the x-axis of the bone.
         """
+        from mathutils import Vector
         return Vector((0.0, 0.0, 1.0)) * self.matrix.to_3x3()
 
     @property
index 9311987e2e7ea1a5ad4fa80026036303dd4feeed..b0fb3b66d0aad9d015304a2d04d895daa2e15f95 100644 (file)
@@ -111,12 +111,16 @@ def draw(layout, context, context_member, property_type, use_edit=True):
             continue
 
         row = layout.row()
-        convert_to_pyobject = getattr(val, "convert_to_pyobject", None)
+        to_dict = getattr(val, "to_dict", None)
+        to_list = getattr(val, "to_list", None)
 
         val_orig = val
-        if convert_to_pyobject:
-            val_draw = val = val.convert_to_pyobject()
-            val_draw = str(val_draw)
+        if to_dict:
+            val = to_dict()
+            val_draw = str(val)
+        elif to_list:
+            val = to_list()
+            val_draw = str(val)
         else:
             val_draw = val
 
@@ -131,7 +135,7 @@ def draw(layout, context, context_member, property_type, use_edit=True):
         row.label(text=key)
 
         # explicit exception for arrays
-        if convert_to_pyobject and not hasattr(val_orig, "len"):
+        if to_dict or to_list:
             row.label(text=val_draw)
         else:
             if key in rna_properties:
index 89802d7ba5cf759dfe98109b00b43dfd94209ed5..996b38ae5717592ca2009c2ea3f14f0024812295 100644 (file)
@@ -152,7 +152,6 @@ class MeshMirrorUV(bpy.types.Operator):
                 if j is not None:
                     fmap[i] = j
 
-        done = [False] * len(faces)
         for i, j in fmap.items():
 
             if not fuvsel[i] or not fuvsel[j]:
@@ -170,10 +169,10 @@ class MeshMirrorUV(bpy.types.Operator):
             v1 = faces[j].vertices[:]
             v2 = [vmap[k] for k in faces[i].vertices[:]]
 
-            for k in range(len(uv1)):
-                k_map = v1.index(v2[k])
-                uv1[k].x = - (uv2[k_map].x - 0.5) + 0.5
-                uv1[k].y = uv2[k_map].y
+            if len(v1) == len(v2):
+                for k in range(len(v1)):
+                    k_map = v1.index(v2[k])
+                    uv1[k].xy = - (uv2[k_map].x - 0.5) + 0.5, uv2[k_map].y
 
         if is_editmode:
             bpy.ops.object.mode_set(mode='EDIT', toggle=False)
index 7cbdaa3ddbfe95207c197b3b05f2d58765beb65b..469e9015e62ebb77a0cc1d71d9857ab8aa7837eb 100644 (file)
@@ -103,7 +103,7 @@ def bake(frame_start,
 
     # -------------------------------------------------------------------------
     # Collect transformations
-    
+
     # could speed this up by applying steps here too...
     for f in frame_range:
         scene.frame_set(f)
index 2ecca8ab168bb75beecca9423df72b494206956d..a8bb3227b3c378eceaab9dc8c9baac6831c55a8a 100644 (file)
@@ -244,6 +244,7 @@ class QuickExplode(bpy.types.Operator):
         self.frame_end = self.frame_start + self.frame_duration
         return self.execute(context)
 
+
 def obj_bb_minmax(obj, min_co, max_co):
     for i in range(0, 8):
         bb_vec = Vector(obj.bound_box[i]) * obj.matrix_world
index 4f5b1d8b2337038fa0505ab04e004c358e1b04fd..3e1ce621ec25c5a04c595eb5d9c3db800e593bf5 100644 (file)
@@ -16,7 +16,7 @@
 #
 # ##### END GPL LICENSE BLOCK #####
 
-# <pep8 compliant>
+# TODO <pep8 compliant>
 
 from mathutils import Matrix, Vector, geometry
 import bpy
@@ -812,21 +812,25 @@ def main(context, island_margin, projection_limit):
     global RotMatStepRotation
     main_consts()
 
-#XXX objects= bpy.data.scenes.active.objects
-    objects = context.selected_editable_objects
-
+    # 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.
-#XXX   ob = objects.active
-    ob= objects[0]
+    ob = context.active_object
 
     if ob and (not ob.select) and ob.type == 'MESH':
         # Add to the list
         obList =[ob]
     del objects
+    '''
+    
+    # quick workaround
+    obList =  [ob for ob in [context.active_object] if ob and ob.type == 'MESH']
 
     if not obList:
         raise('error, no selected mesh objects')
index fcc30ecbb4b4a18f585da8755a49cccb7b08c0a4..629a48d5750f2929543e4f188597baa09f9aa211 100644 (file)
@@ -462,7 +462,7 @@ class WM_OT_context_modal_mouse(bpy.types.Operator):
     '''Adjust arbitrary values with mouse input'''
     bl_idname = "wm.context_modal_mouse"
     bl_label = "Context Modal Mouse"
-    bl_options = {'INTERNAL'}
+    bl_options = {'GRAB_POINTER', 'BLOCKING', 'INTERNAL'}
 
     data_path_iter = StringProperty(description="The data path relative to the context, must point to an iterable.")
     data_path_item = StringProperty(description="The data path from each iterable to the value (int or float)")
index 11a129377e8a7a1976e023a8eb761526401f25a0..00d8d08852ef6a5950610b5c61440be1e8c6ba91 100644 (file)
@@ -113,13 +113,25 @@ class DATA_PT_shape_curve(CurveButtonsPanel, bpy.types.Panel):
             sub.prop(curve, "use_fill_back")
             col.prop(curve, "use_fill_deform", text="Fill Deformed")
 
-        col.label(text="Textures:")
-        col.prop(curve, "use_uv_as_generated")
-        col.prop(curve, "use_auto_texspace")
-        
+
+class DATA_PT_curve_texture_space(CurveButtonsPanel, bpy.types.Panel):
+    bl_label = "Texture Space"
+    bl_options = {'DEFAULT_CLOSED'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
+
+    def draw(self, context):
+        layout = self.layout
+
+        ob = context.object
+        curve = context.curve
+
+        row = layout.row()
+        row.prop(curve, "use_auto_texspace")
+        row.prop(curve, "use_uv_as_generated")
+
         row = layout.row()
-        row.column().prop(curve, "texspace_location")
-        row.column().prop(curve, "texspace_size")
+        row.column().prop(curve, "texspace_location", text="Location")
+        row.column().prop(curve, "texspace_size", text="Size")
 
 
 class DATA_PT_geometry_curve(CurveButtonsPanel, bpy.types.Panel):
index e2c8841317793c2ef9aa706d81fe2ffe96bc91ba..8c966825aeee5397fa61507806858861b73ed02d 100644 (file)
@@ -118,6 +118,7 @@ class DATA_PT_texture_space(MeshButtonsPanel, bpy.types.Panel):
         row.column().prop(mesh, "texspace_location", text="Location")
         row.column().prop(mesh, "texspace_size", text="Size")
 
+
 class DATA_PT_vertex_groups(MeshButtonsPanel, bpy.types.Panel):
     bl_label = "Vertex Groups"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
index c568d10b3b03ad0e5db63e17860ce3b4f98c7d6f..6dda99bc37f710db39dd4bc64d7138dbab129bc4 100644 (file)
@@ -70,10 +70,23 @@ class DATA_PT_metaball(DataButtonsPanel, bpy.types.Panel):
 
         layout.label(text="Update:")
         layout.prop(mball, "update_method", expand=True)
-        
+
+
+class DATA_PT_mball_texture_space(DataButtonsPanel, bpy.types.Panel):
+    bl_label = "Texture Space"
+    bl_options = {'DEFAULT_CLOSED'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
+
+    def draw(self, context):
+        layout = self.layout
+
+        mball = context.meta_ball
+
+        layout.prop(mball, "use_auto_texspace")
+
         row = layout.row()
-        row.column().prop(mball, "texspace_location")
-        row.column().prop(mball, "texspace_size")
+        row.column().prop(mball, "texspace_location", text="Location")
+        row.column().prop(mball, "texspace_size", text="Size")
 
 
 class DATA_PT_metaball_element(DataButtonsPanel, bpy.types.Panel):
index a82c4a479b870101c3da67fa8ce2552c6bc36304..2429ae630c8298f573580c26860cca45d8f425f7 100644 (file)
@@ -488,7 +488,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
 
         if md.wrap_method == 'PROJECT':
             split = layout.split(percentage=0.25)
-            
+
             col = split.column()
             col.label(text="Axis:")
             col.prop(md, "use_project_x")
index 52d6b5f1376e257e10cfacdbd1b469349868c6fd..31da9598641d93a9e775cea3d9ab751cbd68e4b2 100644 (file)
@@ -883,7 +883,7 @@ class MATERIAL_PT_volume_lighting(VolumeButtonsPanel, bpy.types.Panel):
             sub = col.column()
             sub.enabled = True
             sub.active = False
-            sub.prop(vol, "use_light_cache")
+            sub.label("Light Cache Enabled")
             col.prop(vol, "cache_resolution")
 
             sub = col.column(align=True)
index 03823ad7345ca68c2e88a4f8da343c30e9ac90d6..5f79dd3127ad15f9366776006df8533a5c90b4e6 100644 (file)
@@ -655,8 +655,8 @@ class ConstraintButtonsPanel():
         row = col.row()
         row.label(text="Source to Destination Mapping:")
 
-               # note: chr(187) is the ASCII arrow ( >> ). Blender Text Editor can't
-               # open it. Thus we are using the hardcoded value instead.
+        # note: chr(187) is the ASCII arrow ( >> ). Blender Text Editor can't
+        # open it. Thus we are using the hardcoded value instead.
         row = col.row()
         row.prop(con, "map_to_x_from", expand=False, text="")
         row.label(text=" %s    X" % chr(187))
index 63333083cb2129d904ff5d362b6d45be2b7770ca..7d4b78396bdfd0e45b8a34c60955f5c823947f4b 100644 (file)
@@ -878,6 +878,15 @@ class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel):
             col.prop(part, "billboard_tilt_random", text="Random", slider=True)
             col = row.column()
             col.prop(part, "billboard_offset")
+            
+            row = layout.row()
+            col = row.column()
+            col.prop(part, "billboard_size", text="Scale")
+            if part.billboard_align == 'VEL':
+                col = row.column(align=True)
+                col.label("Velocity Scale:")
+                col.prop(part, "billboard_velocity_head", text="Head")
+                col.prop(part, "billboard_velocity_tail", text="Tail")
 
             if psys:
                 col = layout.column()
index 1fb2e5b735e0c318dd9be69851d173c6b8ddc331..2b12e75564c0b4d4c01c37aa9e9e70348422b29e 100644 (file)
@@ -350,7 +350,7 @@ class INFO_MT_help(bpy.types.Menu):
         layout = self.layout
 
         layout.operator("wm.url_open", text="Manual", icon='HELP').url = 'http://wiki.blender.org/index.php/Doc:Manual'
-        layout.operator("wm.url_open", text="Release Log", icon='URL').url = 'http://www.blender.org/development/release-logs/blender-257/'
+        layout.operator("wm.url_open", text="Release Log", icon='URL').url = 'http://www.blender.org/development/release-logs/blender-258/'
 
         layout.separator()
 
index 7804a1a3c93560df2c1cc6052635cdb2c4b1a5d5..b9ac740eb5b21f50b3f7e232b903eb8fdcf01f25 100644 (file)
@@ -849,7 +849,7 @@ class USERPREF_PT_input(bpy.types.Panel, InputKeyMapPanel):
 
 
 class USERPREF_MT_addons_dev_guides(bpy.types.Menu):
-    bl_label = "Develoment Guides"
+    bl_label = "Development Guides"
 
     # menu to open webpages with addons development guides
     def draw(self, context):
index 02004283264ead9fc3c2deeceb23b4627282ee50..b989085939f29c68c641ad2b4dddbe8a84d07aec 100644 (file)
@@ -98,6 +98,8 @@ class VIEW3D_HT_header(bpy.types.Header):
             row.prop(toolsettings, "use_snap_peel_object", text="")
         elif toolsettings.snap_element == 'FACE':
             row.prop(toolsettings, "use_snap_project", text="")
+            if toolsettings.use_snap_project and obj.mode == 'EDIT':
+                row.prop(toolsettings, "use_snap_project_self", text="")
 
         # OpenGL render
         row = layout.row(align=True)
@@ -772,10 +774,16 @@ class VIEW3D_MT_object_specials(bpy.types.Menu):
         if obj.type == 'CAMERA':
             layout.operator_context = 'INVOKE_REGION_WIN'
 
-            props = layout.operator("wm.context_modal_mouse", text="Camera Lens Angle")
-            props.data_path_iter = "selected_editable_objects"
-            props.data_path_item = "data.lens"
-            props.input_scale = 0.1
+            if obj.data.type == 'PERSP':
+                props = layout.operator("wm.context_modal_mouse", text="Camera Lens Angle")
+                props.data_path_iter = "selected_editable_objects"
+                props.data_path_item = "data.lens"
+                props.input_scale = 0.1
+            else:
+                props = layout.operator("wm.context_modal_mouse", text="Camera Lens Scale")
+                props.data_path_iter = "selected_editable_objects"
+                props.data_path_item = "data.ortho_scale"
+                props.input_scale = 0.01
 
             if not obj.data.dof_object:
                 #layout.label(text="Test Has DOF obj");
@@ -1098,17 +1106,18 @@ class VIEW3D_MT_sculpt(bpy.types.Menu):
         layout.operator_menu_enum("brush.curve_preset", "shape")
         layout.separator()
 
-        sculpt_tool = brush.sculpt_tool
+        if brush is not None:  # unlikely but can happen
+            sculpt_tool = brush.sculpt_tool
 
-        if sculpt_tool != 'GRAB':
-            layout.prop_menu_enum(brush, "stroke_method")
+            if sculpt_tool != 'GRAB':
+                layout.prop_menu_enum(brush, "stroke_method")
 
-            if sculpt_tool in {'DRAW', 'PINCH', 'INFLATE', 'LAYER', 'CLAY'}:
-                layout.prop_menu_enum(brush, "direction")
+                if sculpt_tool in {'DRAW', 'PINCH', 'INFLATE', 'LAYER', 'CLAY'}:
+                    layout.prop_menu_enum(brush, "direction")
 
-            if sculpt_tool == 'LAYER':
-                layout.prop(brush, "use_persistent")
-                layout.operator("sculpt.set_persistent_base")
+                if sculpt_tool == 'LAYER':
+                    layout.prop(brush, "use_persistent")
+                    layout.operator("sculpt.set_persistent_base")
 
         layout.separator()
         layout.prop(sculpt, "use_threaded", text="Threaded Sculpt")
index 503a1d806ac698d1075663df59f9e352c47a6750..52eb76d071032d303663c89123b061ffb5269af2 100644 (file)
@@ -997,7 +997,11 @@ class VIEW3D_PT_tools_brush_appearance(PaintPanel, bpy.types.Panel):
 
     @classmethod
     def poll(cls, context):
-        return (context.sculpt_object and context.tool_settings.sculpt) or (context.vertex_paint_object and context.tool_settings.vertex_paint) or (context.weight_paint_object and context.tool_settings.weight_paint) or (context.image_paint_object and context.tool_settings.image_paint)
+        ts = context.tool_settings
+        return ((context.sculpt_object and ts.sculpt) or
+                (context.vertex_paint_object and ts.vertex_paint) or
+                (context.weight_paint_object and ts.weight_paint) or
+                (context.image_paint_object and ts.image_paint))
 
     def draw(self, context):
         layout = self.layout
@@ -1005,6 +1009,10 @@ class VIEW3D_PT_tools_brush_appearance(PaintPanel, bpy.types.Panel):
         settings = __class__.paint_settings(context)
         brush = settings.brush
 
+        if brush is None:  # unlikely but can happen
+            layout.label(text="Brush Unset")
+            return
+
         col = layout.column()
 
         if context.sculpt_object and context.tool_settings.sculpt:
index 8860b2a8afa8c8586992f7f374a099956563a152..e8c0353e734c2e928e3047e6a79885528103532e 100644 (file)
@@ -2,7 +2,7 @@
                       Version 2, June 1991
 
  Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 
index 1014d8ef80ab5510200bfe620a1e4a34fc03bf2e..2b5a4071a7fd1cd6f56048d50861a0d3f304f221 100644 (file)
   </style>
 </head>
 <body>
-<p class="title"><b>Blender 2.57</b></p>
+<p class="title"><b>Blender 2.58</b></p>
 <p><br></p>
 <p class="header"><b>About</b></p>
 <p class="body">Welcome to Blender, the free, open source 3D application for modeling, animation, rendering, compositing, video editing and game creation. Blender is available for Linux, Mac OS X, Windows, Solaris and FreeBSD and has a large world-wide community.</p>
 <p class="body">Blender can be used freely for any purpose, including commercial use and distribution. It's free and open-source software, released under the GNU GPL licence. The entire source code is available on our website.</p>
 <p class="body">For more information, visit <a href="http://www.blender.org">blender.org</a>.</p>
 <p><br></p>
-<p class="header"><b>2.57</b></p>
-<p class="body">The Blender Foundation and online developer community is proud to present Blender 2.57. This release is the first official stable release of the Blender 2.5 series, and represents the culmination of many years of redesign and development work. <a href="http://www.blender.org/development/release-logs/blender-256-beta/">More information about this release</a>.</p>
+<p class="header"><b>2.58</b></p>
+<p class="body">The Blender Foundation and online developer community is proud to present Blender 2.58. This release is the second official stable release of the Blender 2.5 series, and represents the culmination of many years of redesign and development work. <a href="http://www.blender.org/development/release-logs/blender-258/">More information about this release</a>.</p>
 <p class="body">What to Expect:</p>
 <p class="body">       •     Big improvements - This is our most exciting version to date, already a significant improvement in many ways over 2.49</p>
 <p class="body">       •     Missing/Incomplete Features - Although most of it is there, not all functionality from pre-2.5 versions has been restored yet. Some functionality may be re-implemented a different way.</p>
 <p class="body">       •     Changes - If you're used to the old Blenders, Blender 2.5 may seem quite different at first, but it won't be long before it grows on you even more than before.</p>
 <p><br></p>
 <p class="header"><b>Bugs</b></p>
-<p class="body">Although Blender 2.57 is considered a stable release, you may encounter a bug. If you do, please help us by posting it in the bug tracker or using Help → Report a Bug from inside Blender 2.57. If it wasn’t reported yet, please log in (or register) and fill in detailed information about the error. Please post detailed instructions on how to reproduce it or post a .blend file showcasing the bug.</p>
+<p class="body">Although Blender 2.58 is considered a stable release, you may encounter a bug. If you do, please help us by posting it in the bug tracker or using Help → Report a Bug from inside Blender 2.58. If it wasn’t reported yet, please log in (or register) and fill in detailed information about the error. Please post detailed instructions on how to reproduce it or post a .blend file showcasing the bug.</p>
 <p><br></p>
 <p class="header"><b>Package Contents</b></p>
 <p class="body">The downloaded Blender package includes:</p>
@@ -51,7 +51,7 @@
 <p class="header"><b>Links</b></p>
 <p class="body">Users:</p>
 <p class="body">       General information             <a href="http://www.blender.org">www.blender.org</a> <br>
-       Full release log                        <a href="http://www.blender.org/development/release-logs/blender-257/">www.blender.org/development/release-logs/blender-257/</a><br>
+       Full release log                        <a href="http://www.blender.org/development/release-logs/blender-258/">www.blender.org/development/release-logs/blender-258/</a><br>
        Tutorials                       <a href="http://www.blender.org/education-help/">www.blender.org/education-help/</a>    <br>
        Manual                  <a href="http://wiki.blender.org/index.php/Doc:Manual">wiki.blender.org/index.php/Doc:Manual</a><br>
        User Forum                      <a href="http://www.blenderartists.org">www.blenderartists.org</a><br>
index 07f0885372a4e4fe3f5b91ea1197655578db2a00..7c11f9e964e7d31f135df32dfd106bbe40ad1e34 100644 (file)
@@ -43,7 +43,7 @@ extern "C" {
 /* these lines are grep'd, watch out for our not-so-awesome regex
  * and keep comment above the defines.
  * Use STRINGIFY() rather than defining with quotes */
-#define BLENDER_VERSION                        257
+#define BLENDER_VERSION                        258
 #define BLENDER_SUBVERSION             1
 
 #define BLENDER_MINVERSION             250
@@ -51,9 +51,9 @@ extern "C" {
 
 /* used by packaging tools */
                /* can be left blank, otherwise a,b,c... etc with no quotes */
-#define BLENDER_VERSION_CHAR   b
+#define BLENDER_VERSION_CHAR
                /* alpha/beta/rc/release, docs use this */
-#define BLENDER_VERSION_CYCLE  beta
+#define BLENDER_VERSION_CYCLE  release
 
 struct ListBase;
 struct MemFile;
index feeab98ad78c272efafd566d9ced9b5df492eadf..5b565223ece06588961dd3b8446bffed48a3221e 100644 (file)
@@ -147,7 +147,8 @@ typedef struct ParticleBillboardData
        struct Object *ob;
        float vec[3], vel[3];
        float offset[2];
-       float size, tilt, random, time;
+       float size[2];
+       float tilt, random, time;
        int uv[3];
        int lock, num;
        int totnum;
index 8b6bca3805eb0d1cde081bd6e0897e7e75ee01ee..99b1ff98808e83fae81205db384791a8e42b9d71 100644 (file)
@@ -43,8 +43,6 @@ set(INC
        ../nodes
        ../editors/include
        ../render/extern/include
-       ../../../intern/audaspace/intern
-       ../../../intern/ffmpeg
        ../../../intern/bsp/extern ../blenfont
        ../../../intern/decimation/extern
        ../../../intern/elbeem/extern
@@ -238,6 +236,13 @@ set(SRC
 
 add_definitions(-DGLEW_STATIC)
 
+if(WITH_AUDASPACE)
+       list(APPEND INC
+               ../../../intern/audaspace/intern
+       )
+       add_definitions(-DWITH_AUDASPACE)
+endif()
+
 if(WITH_BULLET)
        list(APPEND INC ../../../extern/bullet2/src)
        add_definitions(-DUSE_BULLET)
@@ -274,12 +279,13 @@ endif()
 
 if(WITH_CODEC_QUICKTIME)
        list(APPEND INC ../quicktime)
-       list(APPEND INC_SYS ${QUICKTIME_INC})
+       list(APPEND INC_SYS ${QUICKTIME_INCLUDE_DIRS})
        add_definitions(-DWITH_QUICKTIME)
 endif()
 
 if(WITH_CODEC_FFMPEG)
-       list(APPEND INC_SYS ${FFMPEG_INC})
+       list(APPEND INC ../../../intern/ffmpeg)
+       list(APPEND INC_SYS ${FFMPEG_INCLUDE_DIRS})
        add_definitions(-DWITH_FFMPEG)
 endif()
 
index 1763866c00032a72a0c1c32a019a071eb8d04352..0747d87a0ab2c7a096e71ba1c40acaf085a6cd16 100644 (file)
@@ -171,7 +171,12 @@ bMotionPath *animviz_verify_motionpaths(Scene *scene, Object *ob, bPoseChannel *
                avs= &ob->avs;
                dst= &ob->mpath;
        }
-       
+
+       /* avoid 0 size allocs */
+       if(avs->path_sf >= avs->path_ef) {
+               return NULL;
+       }
+
        /* if there is already a motionpath, just return that,
         * but provided it's settings are ok 
         */
index 0f545ad3ff904b59274992865fd60eef1dca2337..8b4bbbd3c834ddb203978eefb3208fb747980e6d 100644 (file)
@@ -64,6 +64,7 @@
 #include "BLI_dynstr.h"
 #include "BLI_path_util.h"
 #include "BLI_utildefines.h"
+#include "BLI_callbacks.h"
 
 #include "IMB_imbuf.h"
 
@@ -96,7 +97,7 @@ UserDef U;
 /* ListBase = {NULL, NULL}; */
 short ENDIAN_ORDER;
 
-static char versionstr[48]= "";
+char versionstr[48]= "";
 
 /* ********** free ********** */
 
@@ -110,6 +111,9 @@ void free_blender(void)
        BKE_spacetypes_free();          /* after free main, it uses space callbacks */
        
        IMB_exit();
+
+       BLI_cb_finalize();
+
        seq_stripelem_cache_destruct();
        
        free_nodesystem();      
@@ -129,9 +133,9 @@ void initglobals(void)
        ENDIAN_ORDER= (((char*)&ENDIAN_ORDER)[0])? L_ENDIAN: B_ENDIAN;
 
        if(BLENDER_SUBVERSION)
-               BLI_snprintf(versionstr, sizeof(versionstr), "www.blender.org %d.%d", BLENDER_VERSION, BLENDER_SUBVERSION);
+               BLI_snprintf(versionstr, sizeof(versionstr), "blender.org %d.%d", BLENDER_VERSION, BLENDER_SUBVERSION);
        else
-               BLI_snprintf(versionstr, sizeof(versionstr), "www.blender.org %d", BLENDER_VERSION);
+               BLI_snprintf(versionstr, sizeof(versionstr), "blender.org %d", BLENDER_VERSION);
 
 #ifdef _WIN32  // FULLSCREEN
        G.windowstate = G_WINDOWSTATE_USERDEF;
index a4ceb62ab55dcbf2247afc76b88d0a16c9879b39..c497cd2813a84354cce302ff48e42c33cf1ee6b7 100644 (file)
@@ -235,8 +235,6 @@ void make_local_brush(Brush *brush)
                        if(paint_brush(&scene->toolsettings->imapaint.paint)==brush) {
                                if(scene->id.lib==NULL) {
                                        paint_brush_set(&scene->toolsettings->imapaint.paint, brushn);
-                                       brushn->id.us++;
-                                       brush->id.us--;
                                }
                        }
                }
index fa6a8239282338fef71845220e7f06717ace9480..91238f20337cb2fe4787a0189b8b70caef11ddfe 100644 (file)
@@ -719,7 +719,7 @@ void free_bvhtree_from_mesh(struct BVHTreeFromMesh *data)
                if(!data->cached)
                        BLI_bvhtree_free(data->tree);
 
-               memset( data, 0, sizeof(data) );
+               memset( data, 0, sizeof(*data) );
        }
 }
 
index 3a8a2ae9c09758d0d89c943e35c1e96a338955f3..64e374fe4c00d0b9f9d7c13b71dba6f03aed1181 100644 (file)
  */
 
 
-#ifdef WITH_PYTHON
-#include <Python.h>
+#if 0 /* pynodes commented for now */
+#  ifdef WITH_PYTHON
+#    include <Python.h>
+#  endif
 #endif
 
 #include "MEM_guardedalloc.h"
index 5be492d1108624e6ba751b561ca5592ba09e9b28..d00eb6192da6e59ad65f0841a716f9964c10ad5b 100644 (file)
@@ -85,8 +85,11 @@ Brush *paint_brush(Paint *p)
 
 void paint_brush_set(Paint *p, Brush *br)
 {
-       if(p)
+       if(p) {
+               id_us_min((ID *)p->brush);
+               id_us_plus((ID *)br);
                p->brush= br;
+       }
 }
 
 int paint_facesel_test(Object *ob)
@@ -110,12 +113,17 @@ void paint_init(Paint *p, const char col[3])
        p->flags |= PAINT_SHOW_BRUSH;
 }
 
-void free_paint(Paint *UNUSED(paint))
+void free_paint(Paint *paint)
 {
-       /* nothing */
+       id_us_min((ID *)paint->brush);
 }
 
+/* called when copying scene settings, so even if 'src' and 'tar' are the same
+ * still do a id_us_plus(), rather then if we were copying betweem 2 existing
+ * scenes where a matching value should decrease the existing user count as
+ * with paint_brush_set() */
 void copy_paint(Paint *src, Paint *tar)
 {
        tar->brush= src->brush;
+       id_us_plus((ID *)tar->brush);
 }
index 2dcefb980124914cdeebbce4766e4b7ff96b2891..5b7442fe5bce64e1738f56bc001d19e8c1f2e1a2 100644 (file)
@@ -3543,6 +3543,8 @@ static void default_particle_settings(ParticleSettings *part)
        part->path_start = 0.0f;
        part->path_end = 1.0f;
 
+       part->bb_size[0] = part->bb_size[1] = 1.0f;
+
        part->keyed_loops = 1;
 
        part->color_vec_max = 1.f;
@@ -4514,8 +4516,8 @@ void psys_make_billboard(ParticleBillboardData *bb, float xvec[3], float yvec[3]
        mul_v3_fl(tvec, -sin(bb->tilt * (float)M_PI));
        VECADD(yvec, yvec, tvec);
 
-       mul_v3_fl(xvec, bb->size);
-       mul_v3_fl(yvec, bb->size);
+       mul_v3_fl(xvec, bb->size[0]);
+       mul_v3_fl(yvec, bb->size[1]);
 
        VECADDFAC(center, bb->vec, xvec, bb->offset[0]);
        VECADDFAC(center, center, yvec, bb->offset[1]);
index b82ac69fc9e068166411a0932990fafcc1c15300..265cc3eeb79988315d84240467e5873ab106942c 100644 (file)
 
 #include "BKE_context.h"
 #include "BKE_sound.h"
-#include "AUD_C-API.h"
+
+#ifdef WITH_AUDASPACE
+#  include "AUD_C-API.h"
+#endif
 
 #ifdef WIN32
 #define snprintf _snprintf
@@ -697,6 +700,7 @@ void reload_sequence_new_file(Scene *scene, Sequence * seq, int lock_range)
                }
                seq->strip->len = seq->len;
        case SEQ_SOUND:
+#ifdef WITH_AUDASPACE
                if(!seq->sound)
                        return;
                seq->len = ceil(AUD_getInfo(seq->sound->playback_handle).length * FPS);
@@ -706,6 +710,9 @@ void reload_sequence_new_file(Scene *scene, Sequence * seq, int lock_range)
                        seq->len = 0;
                }
                seq->strip->len = seq->len;
+#else
+               return;
+#endif
                break;
        case SEQ_SCENE:
        {
@@ -3493,6 +3500,7 @@ Sequence *sequencer_add_image_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo
        return seq;
 }
 
+#ifdef WITH_AUDASPACE
 Sequence *sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo *seq_load)
 {
        Scene *scene= CTX_data_scene(C); /* only for sound */
@@ -3550,6 +3558,15 @@ Sequence *sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo
 
        return seq;
 }
+#else // WITH_AUDASPACE
+Sequence *sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo *seq_load)
+{
+       (void)C;
+       (void)seqbasep;
+       (void)seq_load;
+       return NULL;
+}
+#endif // WITH_AUDASPACE
 
 Sequence *sequencer_add_movie_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo *seq_load)
 {
index e0e456a371e213531cf2783f7ddcc53a3df173a6..f2e3537762ff1ad0595e0fe37ce94d2dfc76d326 100644 (file)
@@ -21,7 +21,9 @@
 #include "DNA_screen_types.h"
 #include "DNA_sound_types.h"
 
-#include "AUD_C-API.h"
+#ifdef WITH_AUDASPACE
+#  include "AUD_C-API.h"
+#endif
 
 #include "BKE_utildefines.h"
 #include "BKE_global.h"
 
 static int force_device = -1;
 
+
+struct bSound* sound_new_file(struct Main *bmain, const char *filename)
+{
+       bSound* sound = NULL;
+
+       char str[FILE_MAX];
+       char *path;
+
+       int len;
+
+       strcpy(str, filename);
+
+       path = /*bmain ? bmain->name :*/ G.main->name;
+
+       BLI_path_abs(str, path);
+
+       len = strlen(filename);
+       while(len > 0 && filename[len-1] != '/' && filename[len-1] != '\\')
+               len--;
+
+       sound = alloc_libblock(&bmain->sound, ID_SO, filename+len);
+       BLI_strncpy(sound->name, filename, FILE_MAX);
+// XXX unused currently        sound->type = SOUND_TYPE_FILE;
+
+       sound_load(bmain, sound);
+
+       if(!sound->playback_handle)
+       {
+               free_libblock(&bmain->sound, sound);
+               sound = NULL;
+       }
+
+       return sound;
+}
+
+void sound_free(struct bSound* sound)
+{
+       if (sound->packedfile)
+       {
+               freePackedFile(sound->packedfile);
+               sound->packedfile = NULL;
+       }
+
+#ifdef WITH_AUDASPACE
+       if(sound->handle)
+       {
+               AUD_unload(sound->handle);
+               sound->handle = NULL;
+               sound->playback_handle = NULL;
+       }
+#endif // WITH_AUDASPACE
+}
+
+
+#ifdef WITH_AUDASPACE
+
 #ifdef WITH_JACK
 static void sound_sync_callback(void* data, int mode, float time)
 {
@@ -123,40 +181,6 @@ void sound_exit(void)
        AUD_exit();
 }
 
-struct bSound* sound_new_file(struct Main *bmain, const char *filename)
-{
-       bSound* sound = NULL;
-
-       char str[FILE_MAX];
-       char *path;
-
-       int len;
-
-       strcpy(str, filename);
-
-       path = /*bmain ? bmain->name :*/ G.main->name;
-
-       BLI_path_abs(str, path);
-
-       len = strlen(filename);
-       while(len > 0 && filename[len-1] != '/' && filename[len-1] != '\\')
-               len--;
-
-       sound = alloc_libblock(&bmain->sound, ID_SO, filename+len);
-       BLI_strncpy(sound->name, filename, FILE_MAX);
-// XXX unused currently        sound->type = SOUND_TYPE_FILE;
-
-       sound_load(bmain, sound);
-
-       if(!sound->playback_handle)
-       {
-               free_libblock(&bmain->sound, sound);
-               sound = NULL;
-       }
-
-       return sound;
-}
-
 // XXX unused currently
 #if 0
 struct bSound* sound_new_buffer(struct bContext *C, struct bSound *source)
@@ -301,22 +325,6 @@ void sound_load(struct Main *bmain, struct bSound* sound)
        }
 }
 
-void sound_free(struct bSound* sound)
-{
-       if (sound->packedfile)
-       {
-               freePackedFile(sound->packedfile);
-               sound->packedfile = NULL;
-       }
-
-       if(sound->handle)
-       {
-               AUD_unload(sound->handle);
-               sound->handle = NULL;
-               sound->playback_handle = NULL;
-       }
-}
-
 static float sound_get_volume(Scene* scene, Sequence* sequence, float time)
 {
        AnimData *adt= BKE_animdata_from_id(&scene->id);
@@ -490,8 +498,9 @@ int sound_scene_playing(struct Scene *scene)
 int sound_read_sound_buffer(struct bSound* sound, float* buffer, int length, float start, float end)
 {
        AUD_Sound* limiter = AUD_limitSound(sound->cache, start, end);
-       return AUD_readSound(limiter, buffer, length);
+       int ret= AUD_readSound(limiter, buffer, length);
        AUD_unload(limiter);
+       return ret;
 }
 
 int sound_get_channels(struct bSound* sound)
@@ -502,3 +511,34 @@ int sound_get_channels(struct bSound* sound)
 
        return info.specs.channels;
 }
+
+#else // WITH_AUDASPACE
+
+#include "BLI_utildefines.h"
+
+int sound_define_from_str(const char *UNUSED(str)) { return -1;}
+void sound_force_device(int UNUSED(device)) {}
+void sound_init_once(void) {}
+void sound_init(struct Main *UNUSED(bmain)) {}
+void sound_exit(void) {}
+void sound_cache(struct bSound* UNUSED(sound), int UNUSED(ignore)) { }
+void sound_delete_cache(struct bSound* UNUSED(sound)) {}
+void sound_load(struct Main *UNUSED(bmain), struct bSound* UNUSED(sound)) {}
+void sound_create_scene(struct Scene *UNUSED(scene)) {}
+void sound_destroy_scene(struct Scene *UNUSED(scene)) {}
+void sound_mute_scene(struct Scene *UNUSED(scene), int UNUSED(muted)) {}
+void* sound_scene_add_scene_sound(struct Scene *UNUSED(scene), struct Sequence* UNUSED(sequence), int UNUSED(startframe), int UNUSED(endframe), int UNUSED(frameskip)) { return NULL; }
+void* sound_add_scene_sound(struct Scene *UNUSED(scene), struct Sequence* UNUSED(sequence), int UNUSED(startframe), int UNUSED(endframe), int UNUSED(frameskip)) { return NULL; }
+void sound_remove_scene_sound(struct Scene *UNUSED(scene), void* UNUSED(handle)) {}
+void sound_mute_scene_sound(struct Scene *UNUSED(scene), void* UNUSED(handle), char UNUSED(mute)) {}
+void sound_move_scene_sound(struct Scene *UNUSED(scene), void* UNUSED(handle), int UNUSED(startframe), int UNUSED(endframe), int UNUSED(frameskip)) {}
+static void sound_start_play_scene(struct Scene *UNUSED(scene)) {}
+void sound_play_scene(struct Scene *UNUSED(scene)) {}
+void sound_stop_scene(struct Scene *UNUSED(scene)) {}
+void sound_seek_scene(struct bContext *UNUSED(C)) {}
+float sound_sync_scene(struct Scene *UNUSED(scene)) { return 0.0f; }
+int sound_scene_playing(struct Scene *UNUSED(scene)) { return 0; }
+int sound_read_sound_buffer(struct bSound* UNUSED(sound), float* UNUSED(buffer), int UNUSED(length), float UNUSED(start), float UNUSED(end)) { return 0; }
+int sound_get_channels(struct bSound* UNUSED(sound)) { return 1; }
+
+#endif // WITH_AUDASPACE
index c729565533fd8ae586efb49a4fb311de8f0aeac7..4db53999f10eb6bea2aec247c2add55c601cb0d8 100644 (file)
@@ -49,7 +49,9 @@
 
 #include "BLI_blenlib.h"
 
-#include "AUD_C-API.h" /* must be before BKE_sound.h for define */
+#ifdef WITH_AUDASPACE
+#  include "AUD_C-API.h"
+#endif
 
 #include "BKE_global.h"
 #include "BKE_idprop.h"
@@ -89,7 +91,9 @@ static uint8_t* audio_output_buffer = 0;
 static int audio_outbuf_size = 0;
 static double audio_time = 0.0f;
 
+#ifdef WITH_AUDASPACE
 static AUD_Device* audio_mixdown_device = 0;
+#endif
 
 #define FFMPEG_AUTOSPLIT_SIZE 2000000000
 
@@ -103,6 +107,7 @@ static void delete_picture(AVFrame* f)
        }
 }
 
+#ifdef WITH_AUDASPACE
 static int write_audio_frame(void) 
 {
        AVCodecContext* c = NULL;
@@ -145,6 +150,7 @@ static int write_audio_frame(void)
        }
        return 0;
 }
+#endif // #ifdef WITH_AUDASPACE
 
 /* Allocate a temporary frame */
 static AVFrame* alloc_picture(int pix_fmt, int width, int height) 
@@ -851,7 +857,7 @@ int start_ffmpeg(struct Scene *scene, RenderData *rd, int rectx, int recty, Repo
        ffmpeg_autosplit_count = 0;
 
        success = start_ffmpeg_impl(rd, rectx, recty, reports);
-
+#ifdef WITH_AUDASPACE
        if(audio_stream)
        {
                AVCodecContext* c = audio_stream->codec;
@@ -861,12 +867,13 @@ int start_ffmpeg(struct Scene *scene, RenderData *rd, int rectx, int recty, Repo
                specs.rate = rd->ffcodecdata.audio_mixrate;
                audio_mixdown_device = sound_mixdown(scene, specs, rd->sfra, rd->ffcodecdata.audio_volume);
        }
-
+#endif
        return success;
 }
 
 void end_ffmpeg(void);
 
+#ifdef WITH_AUDASPACE
 static void write_audio_frames(double to_pts)
 {
        int finished = 0;
@@ -878,6 +885,7 @@ static void write_audio_frames(double to_pts)
                }
        }
 }
+#endif
 
 int append_ffmpeg(RenderData *rd, int frame, int *pixels, int rectx, int recty, ReportList *reports) 
 {
@@ -905,8 +913,9 @@ int append_ffmpeg(RenderData *rd, int frame, int *pixels, int rectx, int recty,
                }
        }
 
+#ifdef WITH_AUDASPACE
        write_audio_frames((frame - rd->sfra) / (((double)rd->frs_sec) / rd->frs_sec_base));
-
+#endif
        return success;
 }
 
@@ -920,12 +929,14 @@ void end_ffmpeg(void)
                write_audio_frames();
        }*/
 
+#ifdef WITH_AUDASPACE
        if(audio_mixdown_device)
        {
                AUD_closeReadDevice(audio_mixdown_device);
                audio_mixdown_device = 0;
        }
-       
+#endif
+
        if (video_stream && video_stream->codec) {
                fprintf(stderr, "Flushing delayed frames...\n");
                flush_ffmpeg ();                
diff --git a/source/blender/blenlib/BLI_callbacks.h b/source/blender/blenlib/BLI_callbacks.h
new file mode 100644 (file)
index 0000000..1735848
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): mar 2001 Nzc
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/blenlib/BLI_callbacks.h
+ *  \ingroup bli
+ */
+
+
+#ifndef BLI_CALLBACKS_H
+#define BLI_CALLBACKS_H
+
+struct bContext;
+struct Main;
+struct ID;
+
+typedef enum {
+       BLI_CB_EVT_RENDER_PRE,
+       BLI_CB_EVT_RENDER_POST,
+       BLI_CB_EVT_LOAD_PRE,
+       BLI_CB_EVT_LOAD_POST,
+       BLI_CB_EVT_SAVE_PRE,
+       BLI_CB_EVT_SAVE_POST,
+       BLI_CB_EVT_TOT
+} eCbEvent;
+
+
+typedef struct {
+       struct bCallbackFuncStore *next, *prev;
+       void (* func)(struct Main *, struct ID *, void *arg);
+       void *arg;
+       short alloc;
+} bCallbackFuncStore;
+
+
+void BLI_exec_cb(struct Main *main, struct ID *self, eCbEvent evt);
+void BLI_add_cb(bCallbackFuncStore *funcstore, eCbEvent evt);
+
+#endif
+
+
+void BLI_cb_init(void);
+void BLI_cb_finalize(void);
+
+
+/* This is blenlib internal only, unrelated to above */
+void callLocalErrorCallBack(const char* msg);
index fe09706cb3d727c5db63ed9229fc39fb4da54b4b..a6a1238a0640c57048163a3aeaa9c7ad823121bb 100644 (file)
@@ -70,6 +70,7 @@ unsigned int rgb_to_cpack(float r, float g, float b);
 unsigned int hsv_to_cpack(float h, float s, float v);
 
 float rgb_to_grayscale(float rgb[3]);
+unsigned char rgb_to_grayscale_byte(unsigned char rgb[3]);
 
 /***************** Profile Transformations ********************/
 
index d83a2ac6ad57b6e57ccd1e013ee4385af5f665da..234c191eb6b537840c838b0feeb1906325238b11 100644 (file)
@@ -67,6 +67,9 @@ float closest_to_line_v3(float r[3], const float p[3], const float l1[3], const
 float closest_to_line_v2(float r[2], const float p[2], const float l1[2], const float l2[2]);
 void closest_to_line_segment_v3(float r[3], const float p[3], const float l1[3], const float l2[3]);
 
+float line_point_factor_v3(const float p[3], const float l1[3], const float l2[3]);
+float line_point_factor_v2(const float p[2], const float l1[2], const float l2[2]);
+
 /******************************* Intersection ********************************/
 
 /* TODO int return value consistency */
@@ -79,6 +82,8 @@ void closest_to_line_segment_v3(float r[3], const float p[3], const float l1[3],
 
 int isect_line_line_v2(const float a1[2], const float a2[2], const float b1[2], const float b2[2]);
 int isect_line_line_v2_int(const int a1[2], const int a2[2], const int b1[2], const int b2[2]);
+int isect_line_sphere_v3(const float l1[3], const float l2[3], const float sp[3], const float r, float r_p1[3], float r_p2[3]);
+int isect_line_sphere_v2(const float l1[2], const float l2[2], const float sp[2], const float r, float r_p1[2], float r_p2[2]);
 int isect_seg_seg_v2_point(const float v1[2], const float v2[2], const float v3[2], const float v4[2], float vi[2]);
 
 /* Returns the number of point of interests
index 0c25da325ad55f0878fc1dd0a6bf824a96ea26ec..2e05ac7892b39bcc13d4ba4050c41de735363066 100644 (file)
@@ -52,6 +52,7 @@ set(SRC
        intern/DLRB_tree.c
        intern/boxpack2d.c
        intern/bpath.c
+       intern/callbacks.c
        intern/cpu.c
        intern/dynlib.c
        intern/edgehash.c
@@ -89,6 +90,7 @@ set(SRC
        BLI_blenlib.h
        BLI_boxpack2d.h
        BLI_bpath.h
+       BLI_callbacks.h
        BLI_cpu.h
        BLI_dlrbTree.h
        BLI_dynlib.h
@@ -132,12 +134,11 @@ set(SRC
        BLI_voxel.h
        BLI_winstuff.h
        PIL_time.h
-       intern/BLI_callbacks.h
        intern/dynamiclist.h
 )
 
 if(WITH_BINRELOC)
-       list(APPEND INC_SYS "${BINRELOC_INC}")
+       list(APPEND INC_SYS "${BINRELOC_INCLUDE_DIRS}")
        add_definitions(-DWITH_BINRELOC)
 endif()
 
diff --git a/source/blender/blenlib/intern/callbacks.c b/source/blender/blenlib/intern/callbacks.c
new file mode 100644 (file)
index 0000000..a033e01
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s): Blender Foundation (2011)
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include "BLI_utildefines.h"
+#include "BLI_listbase.h"
+#include "BLI_callbacks.h"
+
+#include "MEM_guardedalloc.h"
+
+static ListBase callback_slots[BLI_CB_EVT_TOT]= {{0}};
+
+void BLI_exec_cb(struct Main *main, struct ID *self, eCbEvent evt)
+{
+       ListBase *lb= &callback_slots[evt];
+       bCallbackFuncStore *funcstore;
+
+       for(funcstore= (bCallbackFuncStore *)lb->first; funcstore; funcstore= (bCallbackFuncStore *)funcstore->next) {
+               funcstore->func(main, self, funcstore->arg);
+       }
+}
+
+void BLI_add_cb(bCallbackFuncStore *funcstore, eCbEvent evt)
+{
+       ListBase *lb= &callback_slots[evt];
+       BLI_addtail(lb, funcstore);
+}
+
+void BLI_cb_init(void)
+{
+       /* do nothing */
+}
+
+/* call on application exit */
+void BLI_cb_finalize(void)
+{
+       eCbEvent evt;
+       for(evt= 0; evt < BLI_CB_EVT_TOT; evt++) {
+               ListBase *lb= &callback_slots[evt];
+               bCallbackFuncStore *funcstore;
+               bCallbackFuncStore *funcstore_next;
+               for(funcstore= (bCallbackFuncStore *)lb->first; funcstore; funcstore= funcstore_next) {
+                       funcstore_next= (bCallbackFuncStore *)funcstore->next;
+                       BLI_remlink(lb, funcstore);
+                       if(funcstore->alloc) {
+                               MEM_freeN(funcstore);
+                       }
+               }
+       }
+}
index ef1d5da56d82146e477f16e3e1e767580e99afa3..93143eb7db3bce0ba63d7f7d9c4e3825d031cfde 100644 (file)
@@ -488,6 +488,11 @@ float rgb_to_grayscale(float rgb[3])
        return 0.3f*rgb[0] + 0.58f*rgb[1] + 0.12f*rgb[2];
 }
 
+unsigned char rgb_to_grayscale_byte(unsigned char rgb[3])
+{
+       return (76*(unsigned short)rgb[0] + 148*(unsigned short)rgb[1] + 31*(unsigned short)rgb[2]) / 255;
+}
+
 /* ********************************* lift/gamma/gain / ASC-CDL conversion ********************************* */
 
 void lift_gamma_gain_to_asc_cdl(float *lift, float *gamma, float *gain, float *offset, float *slope, float *power)
index 9a543a3f4a3d19288509b2ddaad47b781c604ebd..47bbb93d01d157104c7e09f98db432b942dc2f3f 100644 (file)
@@ -37,8 +37,6 @@
 #include "BLI_memarena.h"
 #include "BLI_utildefines.h"
 
-static float lambda_cp_line(const float p[3], const float l1[3], const float l2[3]);
-
 /********************************** Polygons *********************************/
 
 void cent_tri_v3(float cent[3], const float v1[3], const float v2[3], const float v3[3])
@@ -364,6 +362,133 @@ int isect_seg_seg_v2_point(const float v1[2], const float v2[2], const float v3[
        return -1;
 }
 
+int isect_line_sphere_v3(const float l1[3], const float l2[3],
+                         const float sp[3], const float r,
+                         float r_p1[3], float r_p2[3])
+{
+       /* l1:         coordinates (point of line)
+        * l2:         coordinates (point of line)
+        * sp, r:      coordinates and radius (sphere)
+        * r_p1, r_p2: return intersection coordinates
+        */
+
+
+       /* adapted for use in blender by Campbell Barton - 2011
+        *
+        * atelier iebele abel - 2001
+        * atelier@iebele.nl
+        * http://www.iebele.nl
+        *
+        * sphere_line_intersection function adapted from:
+        * http://astronomy.swin.edu.au/pbourke/geometry/sphereline
+        * Paul Bourke pbourke@swin.edu.au
+        */
+
+       const float ldir[3]= {
+           l2[0] - l1[0],
+           l2[1] - l1[1],
+           l2[2] - l1[2]
+       };
+
+       const float a= dot_v3v3(ldir, ldir);
+
+       const float b= 2.0f *
+               (ldir[0] * (l1[0] - sp[0]) +
+                ldir[1] * (l1[1] - sp[1]) +
+                ldir[2] * (l1[2] - sp[2]));
+
+       const float c=
+               dot_v3v3(sp, sp) +
+               dot_v3v3(l1, l1) -
+               (2.0f * dot_v3v3(sp, l1)) -
+               (r * r);
+
+       const float i = b * b - 4.0f * a * c;
+
+       float mu;
+
+       if (i < 0.0f) {
+               /* no intersections */
+               return 0;
+       }
+       else if (i == 0.0f) {
+               /* one intersection */
+               mu = -b / (2.0f * a);
+               madd_v3_v3v3fl(r_p1, l1, ldir, mu);
+               return 1;
+       }
+       else if (i > 0.0) {
+               const float i_sqrt= sqrt(i); /* avoid calc twice */
+
+               /* first intersection */
+               mu = (-b + i_sqrt) / (2.0f * a);
+               madd_v3_v3v3fl(r_p1, l1, ldir, mu);
+
+               /* second intersection */
+               mu = (-b - i_sqrt) / (2.0f * a);
+               madd_v3_v3v3fl(r_p2, l1, ldir, mu);
+               return 2;
+       }
+       else {
+               /* math domain error - nan */
+               return -1;
+       }
+}
+
+/* keep in sync with isect_line_sphere_v3 */
+int isect_line_sphere_v2(const float l1[2], const float l2[2],
+                         const float sp[2], const float r,
+                         float r_p1[2], float r_p2[2])
+{
+       const float ldir[2]= {
+           l2[0] - l1[0],
+           l2[1] - l1[1]
+       };
+
+       const float a= dot_v3v3(ldir, ldir);
+
+       const float b= 2.0f *
+               (ldir[0] * (l1[0] - sp[0]) +
+                ldir[1] * (l1[1] - sp[1]));
+
+       const float c=
+               dot_v2v2(sp, sp) +
+               dot_v2v2(l1, l1) -
+               (2.0f * dot_v2v2(sp, l1)) -
+               (r * r);
+
+       const float i = b * b - 4.0f * a * c;
+
+       float mu;
+
+       if (i < 0.0f) {
+               /* no intersections */
+               return 0;
+       }
+       else if (i == 0.0f) {
+               /* one intersection */
+               mu = -b / (2.0f * a);
+               madd_v2_v2v2fl(r_p1, l1, ldir, mu);
+               return 1;
+       }
+       else if (i > 0.0) {
+               const float i_sqrt= sqrt(i); /* avoid calc twice */
+
+               /* first intersection */
+               mu = (-b + i_sqrt) / (2.0f * a);
+               madd_v2_v2v2fl(r_p1, l1, ldir, mu);
+
+               /* second intersection */
+               mu = (-b - i_sqrt) / (2.0f * a);
+               madd_v2_v2v2fl(r_p2, l1, ldir, mu);
+               return 2;
+       }
+       else {
+               /* math domain error - nan */
+               return -1;
+       }
+}
+
 /*
 -1: colliniar
  1: intersection
@@ -683,7 +808,7 @@ int isect_line_plane_v3(float out[3], const float l1[3], const float l2[3], cons
 
                add_v3_v3v3(l1_plane, l1, p_no);
 
-               dist = lambda_cp_line(plane_co, l1, l1_plane);
+               dist = line_point_factor_v3(plane_co, l1, l1_plane);
 
                /* treat line like a ray, when 'no_flip' is set */
                if(no_flip && dist < 0.0f) {
@@ -1133,7 +1258,7 @@ float closest_to_line_v2(float cp[2],const float p[2], const float l1[2], const
 }
 
 /* little sister we only need to know lambda */
-static float lambda_cp_line(const float p[3], const float l1[3], const float l2[3])
+float line_point_factor_v3(const float p[3], const float l1[3], const float l2[3])
 {
        float h[3],u[3];
        sub_v3_v3v3(u, l2, l1);
@@ -1141,6 +1266,14 @@ static float lambda_cp_line(const float p[3], const float l1[3], const float l2[
        return(dot_v3v3(u,h)/dot_v3v3(u,u));
 }
 
+float line_point_factor_v2(const float p[2], const float l1[2], const float l2[2])
+{
+       float h[2], u[2];
+       sub_v2_v2v2(u, l2, l1);
+       sub_v2_v2v2(h, p, l1);
+       return(dot_v2v2(u, h)/dot_v2v2(u, u));
+}
+
 /* Similar to LineIntersectsTriangleUV, except it operates on a quad and in 2d, assumes point is in quad */
 void isect_point_quad_uv_v2(const float v0[2], const float v1[2], const float v2[2], const float v3[2], const float pt[2], float *uv)
 {
index 19f520033adaf3ad3478abccb9265106372bc8ed..55933c1bf6587b2b76bce9fc1343f3c4e9fd686d 100644 (file)
@@ -3539,6 +3539,18 @@ static void direct_link_mesh(FileData *fd, Mesh *mesh)
                mesh->mr->edge_creases= newdataadr(fd, mesh->mr->edge_creases);
 
                mesh->mr->verts = newdataadr(fd, mesh->mr->verts);
+               
+               /* If mesh has the same number of vertices as the
+                  highest multires level, load the current mesh verts
+                  into multires and discard the old data. Needed
+                  because some saved files either do not have a verts
+                  array, or the verts array contains out-of-date
+                  data. */
+               if(mesh->totvert == ((MultiresLevel*)mesh->mr->levels.last)->totvert) {
+                       if(mesh->mr->verts)
+                               MEM_freeN(mesh->mr->verts);
+                       mesh->mr->verts = MEM_dupallocN(mesh->mvert);
+               }
                        
                for(; lvl; lvl= lvl->next) {
                        lvl->verts= newdataadr(fd, lvl->verts);
@@ -3548,16 +3560,11 @@ static void direct_link_mesh(FileData *fd, Mesh *mesh)
                }
        }
 
-       /* Gracefully handle corrupted mesh */
+       /* if multires is present but has no valid vertex data,
+          there's no way to recover it; silently remove multires */
        if(mesh->mr && !mesh->mr->verts) {
-               /* If totals match, simply load the current mesh verts into multires */
-               if(mesh->totvert == ((MultiresLevel*)mesh->mr->levels.last)->totvert)
-                       mesh->mr->verts = MEM_dupallocN(mesh->mvert);
-               else {
-                       /* Otherwise, we can't recover the data, silently remove multires */
-                       multires_free(mesh->mr);
-                       mesh->mr = NULL;
-               }
+               multires_free(mesh->mr);
+               mesh->mr = NULL;
        }
        
        if((fd->flags & FD_FLAGS_SWITCH_ENDIAN) && mesh->tface) {
@@ -11636,9 +11643,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                                        }
        }
 
-       /* put compatibility code here until next subversion bump */
-
-       {
+       if (main->versionfile < 258 || (main->versionfile == 258 && main->subversionfile < 1)){
                /* screen view2d settings were not properly initialized [#27164]
                 * v2d->scroll caused the bug but best reset other values too which are in old blend files only.
                 * need to make less ugly - possibly an iterator? */
@@ -11705,6 +11710,20 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                                }
                        }
                }
+
+               {
+                       ParticleSettings *part;
+                       for(part = main->particle.first; part; part = part->id.next) {
+                               /* Initialize particle billboard scale */
+                               part->bb_size[0] = part->bb_size[1] = 1.0f;
+                       }
+               }
+       }
+       
+       /* put compatibility code here until next subversion bump */
+
+       {
+       
        }
        
        /* WATCH IT!!!: pointers from libdata have not been converted yet here! */
@@ -11787,7 +11806,8 @@ static BHead *read_userdef(BlendFileData *bfd, FileData *fd, BHead *bhead)
 
        // XXX
        user->uifonts.first= user->uifonts.last= NULL;
-       user->uistyles.first= user->uistyles.last= NULL;
+       
+       link_list(fd, &user->uistyles);
 
        /* free fd->datamap again */
        oldnewmap_free_unused(fd->datamap);
index 97e5c300eab6cb14ef2eddb7e4f13cdf42f62d51..b8dbacdbef949b020d89cb0ec9673e34808e645c 100644 (file)
@@ -724,7 +724,8 @@ static void write_userdef(WriteData *wd)
        wmKeyMap *keymap;
        wmKeyMapItem *kmi;
        bAddon *bext;
-
+       uiStyle *style;
+       
        writestruct(wd, USER, "UserDef", 1, &U);
 
        for(btheme= U.themes.first; btheme; btheme=btheme->next)
@@ -743,6 +744,10 @@ static void write_userdef(WriteData *wd)
 
        for(bext= U.addons.first; bext; bext=bext->next)
                writestruct(wd, DATA, "bAddon", 1, bext);
+       
+       for(style= U.uistyles.first; style; style= style->next) {
+               writestruct(wd, DATA, "uiStyle", 1, style);
+       }
 }
 
 static void write_boid_state(WriteData *wd, BoidState *state)
index c3aad25ccbeabdd9fe7f0a5670974ac509f9a186..a5af15d7f550204fe4283ac620ec2ff3be187347 100644 (file)
@@ -50,7 +50,7 @@ set(SRC
 )
 
 if(WITH_CODEC_QUICKTIME)
-       list(APPEND INC_SYS ${QUICKTIME_INC})
+       list(APPEND INC_SYS ${QUICKTIME_INCLUDE_DIRS})
        add_definitions(-DWITH_QUICKTIME)
 endif()
 
index a166324bde793451c2d9b3d7c4f3593da79cea5a..336f127b11f5bdf2a4fdb4b175fc5db49650463c 100644 (file)
 
 #include <algorithm>
 
-// use this for retrieving bone names, since these must be unique
+// first try node name, if not available (since is optional), fall back to original id
 template<class T>
 static const char *bc_get_joint_name(T *node)
 {
-       const std::string& id = node->getOriginalId();
-       return id.size() ? id.c_str() : node->getName().c_str();
+       const std::string& id = node->getName();
+       return id.size() ? id.c_str() : node->getOriginalId().c_str();
 }
 
 FCurve *AnimationImporter::create_fcurve(int array_index, const char *rna_path)
@@ -827,7 +827,8 @@ void AnimationImporter::evaluate_transform_at_frame(float mat[4][4], COLLADAFW::
 
                unit_m4(m);
 
-               if (!evaluate_animation(tm, m, fra, node->getOriginalId().c_str())) {
+               std::string nodename = node->getName().size() ? node->getName() : node->getOriginalId();
+               if (!evaluate_animation(tm, m, fra, nodename.c_str())) {
                        switch (type) {
                        case COLLADAFW::Transformation::ROTATE:
                                dae_rotate_to_mat4(tm, m);
index 8987e4ffaf7b5c55f2cf349a6cbad496d3b7cd1e..8b8e89fd4f5a0557480fbc48acb257c209ddb2e4 100644 (file)
 
 #include "ArmatureImporter.h"
 
-// use this for retrieving bone names, since these must be unique
+// use node name, or fall back to original id if not present (name is optional)
 template<class T>
 static const char *bc_get_joint_name(T *node)
 {
-       const std::string& id = node->getOriginalId();
-       return id.size() ? id.c_str() : node->getName().c_str();
+       const std::string& id = node->getName();
+       return id.size() ? id.c_str() : node->getOriginalId().c_str();
 }
 
 ArmatureImporter::ArmatureImporter(UnitConverter *conv, MeshImporterBase *mesh, AnimationImporterBase *anim, Scene *sce) :
index a7e7c973f361e364c7d1d324a3adce19432ea10a..07da532146f03b40a9ed1547ecbe842899a62c09 100644 (file)
@@ -44,19 +44,19 @@ set(INC_SYS
 
 if(APPLE)
        list(APPEND INC_SYS
-               ${OPENCOLLADA_INC}/COLLADAStreamWriter
-               ${OPENCOLLADA_INC}/COLLADABaseUtils
-               ${OPENCOLLADA_INC}/COLLADAFramework
-               ${OPENCOLLADA_INC}/COLLADASaxFrameworkLoader
-               ${OPENCOLLADA_INC}/GeneratedSaxParser 
+               ${OPENCOLLADA_INCLUDE_DIR}/COLLADAStreamWriter
+               ${OPENCOLLADA_INCLUDE_DIR}/COLLADABaseUtils
+               ${OPENCOLLADA_INCLUDE_DIR}/COLLADAFramework
+               ${OPENCOLLADA_INCLUDE_DIR}/COLLADASaxFrameworkLoader
+               ${OPENCOLLADA_INCLUDE_DIR}/GeneratedSaxParser
        )
 else()
        list(APPEND INC_SYS
-               ${OPENCOLLADA_INC}/COLLADAStreamWriter/include
-               ${OPENCOLLADA_INC}/COLLADABaseUtils/include
-               ${OPENCOLLADA_INC}/COLLADAFramework/include
-               ${OPENCOLLADA_INC}/COLLADASaxFrameworkLoader/include 
-               ${OPENCOLLADA_INC}/GeneratedSaxParser/include 
+               ${OPENCOLLADA_INCLUDE_DIR}/COLLADAStreamWriter/include
+               ${OPENCOLLADA_INCLUDE_DIR}/COLLADABaseUtils/include
+               ${OPENCOLLADA_INCLUDE_DIR}/COLLADAFramework/include
+               ${OPENCOLLADA_INCLUDE_DIR}/COLLADASaxFrameworkLoader/include
+               ${OPENCOLLADA_INCLUDE_DIR}/GeneratedSaxParser/include
        )
 endif()
 
index 10e6d611cc5f77a0314e1ec8c7f2d1c0167e05de..78ee444bb4e5ef59533a73e8794e0364c2b1dd5d 100644 (file)
@@ -309,7 +309,7 @@ Object* DocumentImporter::create_lamp_object(COLLADAFW::InstanceLight *lamp, Sce
        return ob;
 }
 
-Object* DocumentImporter::create_instance_node(Object *source_ob, COLLADAFW::Node *source_node, COLLADAFW::Node *instance_node, Scene *sce, bool is_library_node)
+Object* DocumentImporter::create_instance_node(Object *source_ob, COLLADAFW::Node *source_node, COLLADAFW::Node *instance_node, Scene *sce, Object *par_ob, bool is_library_node)
 {
        Object *obn = copy_object(source_ob);
        obn->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
@@ -353,10 +353,10 @@ Object* DocumentImporter::create_instance_node(Object *source_ob, COLLADAFW::Nod
                        Object *new_child = NULL;
                        if (inodes.getCount()) { // \todo loop through instance nodes
                                const COLLADAFW::UniqueId& id = inodes[0]->getInstanciatedObjectId();
-                               new_child = create_instance_node(object_map[id], node_map[id], child_node, sce, is_library_node);
+                               new_child = create_instance_node(object_map[id], node_map[id], child_node, sce, NULL, is_library_node);
                        }
                        else {
-                               new_child = create_instance_node(object_map[child_id], child_node, NULL, sce, is_library_node);
+                               new_child = create_instance_node(object_map[child_id], child_node, NULL, sce, NULL, is_library_node);
                        }
                        bc_set_parent(new_child, obn, mContext, true);
 
@@ -367,7 +367,12 @@ Object* DocumentImporter::create_instance_node(Object *source_ob, COLLADAFW::Nod
 
        // when we have an instance_node, don't return the object, because otherwise
        // its correct location gets overwritten in write_node(). Fixes bug #26012.
-       if(instance_node) return NULL;
+       if(instance_node) {
+               if (par_ob && obn)
+                       bc_set_parent(obn, par_ob, mContext);
+               return NULL;
+       }
+
        else return obn;
 }
 
@@ -385,11 +390,11 @@ void DocumentImporter::write_node (COLLADAFW::Node *node, COLLADAFW::Node *paren
                COLLADAFW::InstanceLightPointerArray &lamp = node->getInstanceLights();
                COLLADAFW::InstanceControllerPointerArray &controller = node->getInstanceControllers();
                COLLADAFW::InstanceNodePointerArray &inst_node = node->getInstanceNodes();
-               int geom_done = 0;
-               int camera_done = 0;
-               int lamp_done = 0;
-               int controller_done = 0;
-               int inst_done = 0;
+               size_t geom_done = 0;
+               size_t camera_done = 0;
+               size_t lamp_done = 0;
+               size_t controller_done = 0;
+               size_t inst_done = 0;
 
                // XXX linking object with the first <instance_geometry>, though a node may have more of them...
                // maybe join multiple <instance_...> meshes into 1, and link object with it? not sure...
@@ -423,7 +428,7 @@ void DocumentImporter::write_node (COLLADAFW::Node *node, COLLADAFW::Node *paren
                                Object *source_ob = object_map[node_id];
                                COLLADAFW::Node *source_node = node_map[node_id];
 
-                               ob = create_instance_node(source_ob, source_node, node, sce, is_library_node);
+                               ob = create_instance_node(source_ob, source_node, node, sce, par, is_library_node);
                        }
                        ++inst_done;
                }
@@ -436,7 +441,8 @@ void DocumentImporter::write_node (COLLADAFW::Node *node, COLLADAFW::Node *paren
                // check if object is not NULL
                if (!ob) return;
                
-               rename_id(&ob->id, (char*)node->getOriginalId().c_str());
+               std::string nodename = node->getName().size() ? node->getName() : node->getOriginalId();
+               rename_id(&ob->id, (char*)nodename.c_str());
 
                object_map[node->getUniqueId()] = ob;
                node_map[node->getUniqueId()] = node;
@@ -518,7 +524,7 @@ bool DocumentImporter::writeMaterial( const COLLADAFW::Material* cmat )
        if(mImportStage!=General)
                return true;
                
-       const std::string& str_mat_id = cmat->getOriginalId();
+       const std::string& str_mat_id = cmat->getName().size() ? cmat->getName() : cmat->getOriginalId();
        Material *ma = add_material((char*)str_mat_id.c_str());
        
        this->uid_effect_map[cmat->getInstantiatedEffect()] = ma;
@@ -670,6 +676,18 @@ void DocumentImporter::write_profile_COMMON(COLLADAFW::EffectCommon *ef, Materia
                        i++;
                }
        }
+       
+       if(ef->getOpacity().isTexture()) {
+               COLLADAFW::Texture ctex = ef->getOpacity().getTexture();
+               mtex = create_texture(ef, ctex, ma, i, texindex_texarray_map);
+               if(mtex != NULL) {
+                       mtex->mapto = MAP_ALPHA;
+                       mtex->tex->imaflag |= TEX_USEALPHA;
+                       i++;
+                       ma->spectra = ma->alpha = 0;
+                       ma->mode |= MA_ZTRANSP|MA_TRANSP;
+               }
+       }
        // TRANSPARENT
        // color
 //     if (ef->getOpacity().isColor()) {
index e57d621eeefda7cbd9e72503a773d4141cfd6173..5ccec534680fc813da36617d13264870d2fb2f36 100644 (file)
@@ -72,7 +72,7 @@ public:
        /** these should not be here */
        Object* create_camera_object(COLLADAFW::InstanceCamera*, Scene*);
        Object* create_lamp_object(COLLADAFW::InstanceLight*, Scene*);
-       Object* create_instance_node(Object*, COLLADAFW::Node*, COLLADAFW::Node*, Scene*, bool);
+       Object* create_instance_node(Object*, COLLADAFW::Node*, COLLADAFW::Node*, Scene*, Object*, bool);
        void write_node(COLLADAFW::Node*, COLLADAFW::Node*, Scene*, Object*, bool);
        MTex* create_texture(COLLADAFW::EffectCommon*, COLLADAFW::Texture&, Material*, int, TexIndexTextureArrayMap&);
        void write_profile_COMMON(COLLADAFW::EffectCommon*, Material*);
index 12ccf77f6adc45e09401a91a383d5f945b75d25f..13eb62ca9694c1bfa1f550e79372e1ca361fd75c 100644 (file)
@@ -67,7 +67,7 @@ void LightsExporter::operator()(Object *ob)
        std::string la_id(get_light_id(ob));
        std::string la_name(id_name(la));
        COLLADASW::Color col(la->r * la->energy, la->g * la->energy, la->b * la->energy);
-       float e, d, constatt, linatt, quadatt;
+       float d, constatt, linatt, quadatt;
        
        d = la->dist;
        
@@ -84,7 +84,7 @@ void LightsExporter::operator()(Object *ob)
        
        // sun
        if (la->type == LA_SUN) {
-               COLLADASW::DirectionalLight cla(mSW, la_id, la_name, e);
+               COLLADASW::DirectionalLight cla(mSW, la_id, la_name);
                cla.setColor(col);
                cla.setConstantAttenuation(constatt);
                exportBlenderProfile(cla, la);
@@ -92,7 +92,7 @@ void LightsExporter::operator()(Object *ob)
        }
        // hemi
        else if (la->type == LA_HEMI) {
-               COLLADASW::AmbientLight cla(mSW, la_id, la_name, e);
+               COLLADASW::AmbientLight cla(mSW, la_id, la_name);
                cla.setColor(col);
                cla.setConstantAttenuation(constatt);
                exportBlenderProfile(cla, la);
@@ -100,7 +100,7 @@ void LightsExporter::operator()(Object *ob)
        }
        // spot
        else if (la->type == LA_SPOT) {
-               COLLADASW::SpotLight cla(mSW, la_id, la_name, e);
+               COLLADASW::SpotLight cla(mSW, la_id, la_name);
                cla.setColor(col);
                cla.setFallOffAngle(la->spotsize);
                cla.setFallOffExponent(la->spotblend);
@@ -112,7 +112,7 @@ void LightsExporter::operator()(Object *ob)
        }
        // lamp
        else if (la->type == LA_LOCAL) {
-               COLLADASW::PointLight cla(mSW, la_id, la_name, e);
+               COLLADASW::PointLight cla(mSW, la_id, la_name);
                cla.setColor(col);
                cla.setConstantAttenuation(constatt);
                cla.setLinearAttenuation(linatt);
@@ -123,7 +123,7 @@ void LightsExporter::operator()(Object *ob)
        // area lamp is not supported
        // it will be exported as a local lamp
        else {
-               COLLADASW::PointLight cla(mSW, la_id, la_name, e);
+               COLLADASW::PointLight cla(mSW, la_id, la_name);
                cla.setColor(col);
                cla.setConstantAttenuation(constatt);
                cla.setLinearAttenuation(linatt);
index b6576858c51ab7dd8c1cea0757bf0f01181f7abf..d1977d15fb2cb98f2443516def1b4496eba8d6db 100644 (file)
@@ -62,7 +62,7 @@ extern "C" {
 #include "MeshImporter.h"
 #include "collada_utils.h"
 
-// works for COLLADAFW::Node, COLLADAFW::Geometry
+// get node name, or fall back to original id if not present (name is optional)
 template<class T>
 static const char *bc_get_dae_name(T *node)
 {
@@ -755,9 +755,11 @@ MTex *MeshImporter::assign_textures_to_uvlayer(COLLADAFW::TextureCoordinateBindi
                                                                 MTex *color_texture)
 {
        const COLLADAFW::TextureMapId texture_index = ctexture.getTextureMapId();
-       const size_t setindex = ctexture.getSetIndex();
+       size_t setindex = ctexture.getSetIndex();
        std::string uvname = ctexture.getSemantic();
        
+       if(setindex==-1) return NULL;
+       
        const CustomData *data = &me->fdata;
        int layer_index = CustomData_get_layer_index(data, CD_MTFACE);
        CustomDataLayer *cdl = &data->layers[layer_index+setindex];
@@ -833,7 +835,6 @@ MTFace *MeshImporter::assign_material_to_geom(COLLADAFW::MaterialBinding cmateri
        if (*color_texture &&
                strlen((*color_texture)->uvname) &&
                strcmp(layername, (*color_texture)->uvname) != 0) {
-               
                texture_face = (MTFace*)CustomData_get_layer_named(&me->fdata, CD_MTFACE,
                                                                                                                   (*color_texture)->uvname);
                strcpy(layername, (*color_texture)->uvname);
@@ -903,7 +904,7 @@ Object *MeshImporter::create_mesh_object(COLLADAFW::Node *node, COLLADAFW::Insta
        uid_object_map[*geom_uid] = ob;
        
        // name Object
-       const std::string& id = node->getOriginalId();
+       const std::string& id = node->getName().size() ? node->getName() : node->getOriginalId();
        if (id.length())
                rename_id(&ob->id, (char*)id.c_str());
        
@@ -915,6 +916,7 @@ Object *MeshImporter::create_mesh_object(COLLADAFW::Node *node, COLLADAFW::Insta
        if (old_mesh->id.us == 0) free_libblock(&G.main->mesh, old_mesh);
        
        char layername[100];
+       layername[0] = '\0';
        MTFace *texture_face = NULL;
        MTex *color_texture = NULL;
        
@@ -957,7 +959,7 @@ bool MeshImporter::write_geometry(const COLLADAFW::Geometry* geom)
                return true;
        }
        
-       const std::string& str_geom_id = mesh->getOriginalId();
+       const std::string& str_geom_id = mesh->getName().size() ? mesh->getName() : mesh->getOriginalId();
        Mesh *me = add_mesh((char*)str_geom_id.c_str());
 
        // store the Mesh pointer to link it later with an Object
index 10780de2e70a97e8172454a9bf69ae993223fa98..83b9449c8f2ccee9108355047bb0a3611b11b371 100644 (file)
 #include "SkinInfo.h"
 #include "collada_utils.h"
 
-// use this for retrieving bone names, since these must be unique
+// use name, or fall back to original id if name not present (name is optional)
 template<class T>
 static const char *bc_get_joint_name(T *node)
 {
-       const std::string& id = node->getOriginalId();
-       return id.size() ? id.c_str() : node->getName().c_str();
+       const std::string& id = node->getName();
+       return id.size() ? id.c_str() : node->getOriginalId().c_str();
 }
 
 // This is used to store data passed in write_controller_data.
index 4f4d16d3b0da5dbc3c5e4d95ecc252641b5cd43a..9cb6a227fc906f2c219bf0e5ca2490ded1a6502a 100644 (file)
@@ -265,7 +265,7 @@ std::string get_light_id(Object *ob)
 
 std::string get_joint_id(Bone *bone, Object *ob_arm)
 {
-       return translate_id(id_name(ob_arm) + "_" + bone->name);
+       return translate_id(bone->name);
 }
 
 std::string get_camera_id(Object *ob)
index aea2a9a1a14b838951003b153fdaabf1930948f5..aa358275335e2954c3974021ee9483e306a1ffa0 100644 (file)
 /* DataToC output of file <splash_png> */
 
-int datatoc_splash_png_size= 268962;
+int datatoc_splash_png_size= 201866;
 char datatoc_splash_png[]= {
-137, 80,
- 78, 71, 13, 10, 26, 10,  0,  0,  0, 13, 73, 72, 68, 82,  0,  0,  1,245,  0,  0,  1, 26,  8,  6,  0,  0,  0,  8, 90,206, 70,  0,
-  0, 10, 78,105, 67, 67, 80, 80,104,111,116,111,115,104,111,112, 32, 73, 67, 67, 32,112,114,111,102,105,108,101,  0,  0,120, 94,
-157,147,103, 84,147,103, 27,199,175,231,121,178,  7, 35,  9, 17,144,241,176,151, 76, 25,  1,100,134, 21,  1, 25, 34, 75, 20, 66,
- 18, 32,140, 16, 67,  2, 14, 92,136,168, 64, 69, 81, 17,193,137, 84, 69, 44, 88,173,128,212,137, 40, 14,138,162,226,214,130, 20,
- 17,181, 22,171,184,112,244,  3,231, 84,223,158,119,244,237,239,211,255, 92,227, 92,247, 53,110,  0, 70, 72,152, 84,150,139,106,
-  0,228,200,148,138,232, 96,127, 60, 62, 33, 17, 39,247,  0, 10, 84, 32,129, 35,128, 80,148, 39, 15,159, 25, 20,  3,  0, 32,  8,
-228,227,121,209,193,254,240,  5,  4,224,245, 13, 64,  0,  0,174,217,134, 68,226, 56,252,127,104,138,228, 10, 37,  0, 18,  9,  0,
- 83,197,146, 60, 17,  0, 82, 12,  0,217,  5, 74,185, 18,  0, 25,  5,  0, 78,106,150, 92,  9,128, 18,  0,128,163,136, 79, 72,  4,
- 64,181,  1,128,147, 62,161,167,  0,  0, 39,117, 66,251,  2,  0, 71,156, 35, 19,  3,160, 49,  0, 32, 23,231,136,197,  0,104, 39,
-  0,172,206, 87, 73,196,  0, 88, 24,  0,148,228, 75, 37,  5,  0,216,117,  0, 48,205, 86,229, 72,  1,176,183,  0,192,201,145,  8,
-243,  0,  8, 12,  0, 48, 85, 74, 68, 25,  0,  4,  7,  0, 96, 40, 98,162,249,  0,132,105,  0, 20, 70,250, 87, 58,245, 43,173,148,
-204, 87,  2,  0,240,115,229, 11, 20,210,244, 12, 37,110, 41,178,194, 29,221,221,121,120,136,164, 32, 91,162, 84,218, 70, 10, 69,
- 89, 66,133, 24,231,231,230,200,133,178,  5,  0, 19, 61,  3,  0,  0, 43, 47, 58,216, 31, 23,  4,242, 93, 29,221, 93, 93,109,157,
-236, 28,191,204,233,191, 59,255, 38,241,  9,137,248,132,122, 25,  5,  8,  0, 32,220,238, 47,182,127, 23,151, 91,  7,192, 27,  3,
-192,214,125,177,165,110,  1,104, 93,  9,160,125,231,139,205,116, 39,128,122, 49, 64,203,229,175,250,225, 10,  2,249,120,134, 82,
- 41,247,176,183, 47, 40, 40,176,147, 74, 68,118,162,140,175,234,252,207,128,191,193, 87,245,236,  4,129,124,252,207,241,224,  1,
-146, 52,161, 42, 91,137, 71,  7,251,227,162,220,236, 92,149,  2,207,147, 11, 69, 18,220,246,175, 71,252,143, 19,191,226,171,119,
- 76,137,150,164, 73, 20, 18,153, 72,130,199, 74, 37,  5, 82, 89, 58,206,207,149,137,165, 74,105,174, 12,151,202,254,211, 18,255,
- 97,218, 95,152,184,107,  0, 96,215,127,  2, 78,178, 29,104, 92,230,  0,246,107, 55, 16,216,116,192,146,182,  3,  0,242,231,222,
-194,168,177, 16,  9,  0,113,134,195, 19,119, 15,  0, 48,241,155,255, 21,180,  2,  0,208, 60,105, 58, 14,  0,192,143,142,193, 69,
- 42, 69,254,132,143,  0,  0, 64,  4, 26,168,  3,  7,116,192,  0, 76,192, 18,108,193,  9,220,192, 19,124, 33, 16,166, 67,  4,196,
- 64,  2,204,  5, 17,100, 64, 14, 40,160,  0, 10, 97, 57,148, 64, 25,172,131, 77, 80,  3, 59,160, 30, 26,160,  9, 14, 65, 43, 28,
-131,211,112, 14, 46,193, 21,232,131,187,208, 15, 67,240, 20, 70,225, 53,140, 35,  8, 66, 70,152,  8, 27,209, 65, 12, 17, 51,196,
-  6,113, 66,120,136, 55, 18,136,132, 33,209, 72,  2,146,130,164, 35, 50, 68,133, 20, 34, 43,144, 50,164, 18,169, 65,118, 33, 13,
-200,247,200, 81,228, 52,114,  1,233, 69,110, 35,  3,200,  8,242, 59,242, 30,197, 80,  6,202, 65,245, 81,115,212, 30,229,161,126,
-104, 40, 26,131,206, 65,211,209,121,232, 66,180, 24, 93,139, 86,163,117,232,  1,180,  5, 61,141, 94, 66,251,208,126,244, 41, 58,
-134,  1, 70,199,184,152, 17,102,139,241, 48, 62, 22,129, 37, 98,105,152,  2, 91,130,149, 98, 85, 88, 29,214,132,181, 99, 93,216,
- 53,172, 31,123,134,189, 35,144,  8,108,  2, 78,176, 37,120, 18, 66,  8,179,  8, 34,194, 60,194, 18, 66, 57,161,134,176,143,208,
- 66,232, 36, 92, 35, 12, 16, 70,  9,159,136, 76,162, 30,209,134,232, 65, 20, 16,227,137,233,196,  2, 98,  9,177,138,184,135,120,
-132,120,150,216, 71, 28, 34,190, 38,145, 72, 92,146,  5,201,141, 20, 66, 74, 32,101,146, 22,145,202, 73,219, 72,205,164, 83,164,
- 94,210, 32,105,140, 76, 38,235,144,109,200, 94,228,  8,178,144,172, 36,151,144,183,144, 15,144, 79,146,175,146,135,200,111, 41,
-116,138, 33,197,137, 18, 68, 73,164,200, 40, 69,148, 42,202,126,202,  9,202, 85,202, 48,101,156,170, 65, 53,163,122, 80, 35,168,
- 98,234,  2,106,  5,181,158,218, 78,189, 76, 29,162,142,211, 52,105, 22, 52, 47, 90, 12, 45,147,182,156, 86, 77,107,162,157,165,
-221,163,189,164,211,233,198,116,119,122, 20, 93, 74, 95, 70,175,166, 31,164,159,167, 15,208,223, 49, 88, 12,107,  6,159,145,196,
- 80, 49,214, 50,246, 50, 78, 49,110, 51, 94, 50,153, 76,115,166, 47, 51,145,169,100,174,101, 54, 48,207, 48, 31, 48,223,170,177,
-213,236,212,  4,106, 98,181,165,106,181,106, 45,106, 87,213,158,171, 83,213,205,212,253,212,231,170, 47, 84,175, 82, 63,172,126,
- 89,253,153,  6, 85,195, 92,131,175, 33,212, 88,162, 81,171,113, 84,227,166,198,152, 38, 91,211, 81, 51, 66, 51, 71,179, 92,115,
-191,230,  5,205,199, 44, 50,203,156, 21,200, 18,179,138, 89,187, 89,103, 88,131,108,140,109,194,230,179, 69,236, 21,236,122,246,
- 89,246, 16,135,196,177,224,  8, 56,153,156, 50,206,119,156, 30,206,168, 22, 75,203, 89, 43, 86,107,190, 86,173,214,113,173,126,
- 46,198, 53,231, 10,184,217,220, 10,238, 33,238, 13,238,251, 73,250,147,252, 38, 73, 38,173,153,212, 52,233,234,164, 55,218,147,
-181,125,181, 37,218,165,218,205,218,125,218,239,117,112,157, 64,157, 44,157,245, 58,173, 58,247,117,  9,186,214,186, 81,186,  5,
-186,219,117,207,234, 62,155,204,153,236, 57, 89, 52,185,116,242,161,201,119,244, 80, 61,107,189,104,189, 69,122,187,245,186,245,
-198,244, 13,244,131,245,229,250, 91,244,207,232, 63, 51,224, 26,248, 26,100, 26,108, 52, 56, 97, 48, 98,200, 54,244, 54,148, 26,
-110, 52, 60,105,248,  4,215,194,253,240,108,188, 26,239,196, 71,141,244,140, 66,140, 84, 70,187,140,122,140,198,141, 45,140,103,
- 25, 23, 25, 55, 27,223, 55,161,153,240, 76,210, 76, 54,154,116,152,140,154, 26,154,134,155, 22,154, 54,154,222, 49,163,154,241,
-204, 50,204, 54,155,117,153,189, 49,183, 48,143, 51, 95,101,222,106,254,216, 66,219, 66, 96,177,208,162,209,226,158, 37,211,210,
-199,114,158,101,157,229,117, 43,146, 21,207, 42,203,106,155,213, 21,107,212,218,197, 58,195,186,214,250,178, 13,106,227,106, 35,
-181,217,102,211, 59,133, 56,197,125,138,108, 74,221,148,155,182, 12, 91, 63,219,124,219, 70,219,  1, 59,174, 93,152, 93,145, 93,
-171,221,115,123, 83,251, 68,251,245,246, 93,246,159, 28, 92, 28,178, 29,234, 29,238, 58,178, 28,167, 59, 22, 57,182, 59,254,238,
-100,237, 36,114,170,117,186, 62,149, 57, 53,104,234,210,169,109, 83, 95, 56,219, 56, 75,156,183, 59,223,114, 97,187,132,187,172,
-114,233,112,249,232,234,230,170,112,109,114, 29,113, 51,117, 75,113,219,234,118,147,199,225, 69,242,202,121,231,221,137,238,254,
-238, 75,221,143,185,191,243,112,245, 80,122, 28,242,248,205,211,214, 51,203,115,191,231,227,105, 22,211, 36,211,234,167, 13,122,
- 25,123,  9,189,118,121,245,123,227,222, 41,222, 59,189,251,125,140,124,132, 62,117, 62, 15,125, 77,124,197,190,123,124,135,253,
-172,252, 50,253, 14,248, 61,247,119,240, 87,248, 31,241,127,195,247,224, 47,230,159, 10,192,  2,130,  3, 74,  3,122,  2, 89,129,
-179,  2,107,  2, 31,  4, 25,  7,165,  7, 53,  6,141,  6,187,  4, 47, 10, 62, 21, 66, 12,  9, 13, 89, 31,114, 83,160, 47, 16,  9,
- 26,  4,163,211,221,166, 47,158,222, 25,202,  8,157, 25, 90, 19,250, 48,204, 58, 76, 17,214, 30,142,134, 79, 15,223, 16,126,111,
-134,217, 12,217,140,214,  8,136, 16, 68,108,136,184, 31,105, 17, 57, 47,242,199, 40, 82, 84,100, 84,109,212,163,104,199,232,194,
-232,174,153,236,153,201, 51,247,207,124, 29,227, 31, 83, 17,115,119,150,229, 44,213,172,142, 88,245,216,164,216,134,216, 55,113,
-  1,113,149,113,253,241,246,241,139,227, 47, 37,232, 38, 72, 19,218, 18,201,137,177,137,123, 18,199,102,  7,206,222, 52,123, 40,
-201, 37,169, 36,233,198, 28,139, 57,243,231, 92,152,171, 59, 55,123,238,241,100,245,100, 97,242,225, 20, 98, 74, 92,202,254,148,
- 15,194,  8, 97,157,112, 44, 85,144,186, 53,117, 84,196, 23,109, 22, 61, 21,251,138, 55,138, 71, 36, 94,146, 74,201,112,154, 87,
- 90,101,218,227,116,175,244, 13,233, 35, 25, 62, 25, 85, 25,207,164,124,105,141,244, 69,102, 72,230,142,204, 55, 89, 17, 89,123,
-179, 62,103,199,101, 55,231, 80,114, 82,114,142,202, 88,178, 44, 89,103,174, 65,238,252,220, 94,185,141,188, 68,222, 63,207, 99,
-222,166,121,163,138, 80,197,158, 60, 36,111, 78, 94,155,146,163,148, 43,187, 85,150,170,149,170,129,124,239,252,218,252,183,  5,
-177,  5,135,231,107,206,151,205,239, 94, 96,189, 96,205,130,225,133, 65, 11,191, 93, 68, 88, 36, 90,212, 81,104, 84,184,188,112,
- 96,177,223,226, 93, 75,144, 37,169, 75, 58,150,154, 44, 45, 94, 58,180, 44,120,217,190,229,180,229, 89,203,127, 42,114, 40,170,
- 44,122,181, 34,110, 69,123,177,126,241,178,226,193,149,193, 43, 27, 75,212, 74, 20, 37, 55, 87,121,174,218,177,154,176, 90,186,
-186,103,205,212, 53, 91,214,124, 42, 21,151, 94, 44,115, 40,171, 42,251, 80, 46, 42,191,248,141,227, 55,213,223,124, 94,155,182,
-182,167,194,181, 98,251, 58,210, 58,217,186, 27,235,125,214,239,171,212,172, 92, 88, 57,184, 33,124, 67,203, 70,124, 99,233,198,
- 87,155,146, 55, 93,168,114,174,218,177,153,182, 89,181,185,191, 58,172,186,109,139,233,150,117, 91, 62,212,100,212,244,213,250,
-215, 54,111,213,219,186,102,235,155,109,226,109, 87,183,251,110,111,218,161,191,163,108,199,251,157,210,157,183,118,  5,239,106,
-169, 51,175,171,218, 77,218,157,191,251, 81,125,108,125,215,183,188,111, 27,246,232,238, 41,219,243,113,175,108,111,255,190,232,
-125,157, 13,110, 13, 13,251,245,246, 87, 52,162,141,170,198,145,  3, 73,  7,174,124, 23,240, 93, 91,147,109,211,174,102,110,115,
-217, 65, 56,168, 58,248,228,251,148,239,111, 28, 10, 61,212,113,152,119,184,233,  7,179, 31,182, 30, 97, 31, 41,109, 65, 90, 22,
-180,140,182,102,180,246,183, 37,180,245, 30,157,126,180,163,221,179,253,200,143,118, 63,238, 61,102,116,172,246,184,214,241,138,
- 19,180, 19,197, 39, 62,159, 92,120,114,236,148,252,212,179,211,233,167,  7, 59,146, 59,238,158,137, 63,115,189, 51,170,179,231,
-108,232,217,243,231,130,206,157,233,242,235, 58,121,222,235,252,177, 11, 30, 23,142, 94,228, 93,108,189,228,122,169,165,219,165,
-251,200, 79, 46, 63, 29,233,113,237,105,185,236,118,185,237,138,251,149,246,222,105,189, 39,174,250, 92, 61,125, 45,224,218,185,
-235,130,235,151,250,102,244,245,222,152,117,227,214,205,164,155,253,183,196,183, 30,223,206,190,253,226, 78,254,157,241,187,203,
-238, 17,239,149,222,215,184, 95,245, 64,239, 65,221,207, 86, 63, 55,247,187,246, 31, 31,  8, 24,232,126, 56,243,225,221, 65,209,
-224,211, 95,242,126,249, 48, 84,252,136,249,168,106,216,112,184,225,177,211,227, 99, 35, 65, 35, 87,158,204,126, 50,244, 84,254,
-116,252, 89,201,175,154,191,110,125,110,249,252,135,223,124,127,235, 30,141, 31, 29,122,161,120,241,249,247,242,151, 58, 47,247,
-190,114,126,213, 49, 22, 57,246,224,117,206,235,241, 55,165,111,117,222,238,123,199,123,215,245, 62,238,253,240,120,193,  7,242,
-135,234,143, 86, 31,219, 63,133,126,186,247, 57,231,243,231, 63,  0,  3,152,243,252,228,233,233, 61,  0,  0,  0,  6, 98, 75, 71,
- 68,  0,255,  0,255,  0,255,160,189,167,147,  0,  0,  0,  9,112, 72, 89,115,  0,  0, 11, 19,  0,  0, 11, 19,  1,  0,154,156, 24,
-  0,  0,  0,  7,116, 73, 77, 69,  7,219,  4,  4, 19, 16, 22,110,185,205,242,  0,  0, 32,  0, 73, 68, 65, 84,120, 94,236,189,123,
-180,109, 87, 93,231,249,249,205, 57,215,115,239,115, 78, 94, 36,225, 37, 33,188, 21,161, 48,160, 85, 42, 74, 73, 40, 69, 75, 27,
-149,132,194,  6, 44, 69,161,203,238,174, 70,187, 17,170,171,122,104,141, 18,  5,202,106,180, 91,233, 38,165,229,168, 82, 75,139,
- 72,169, 77, 15,149, 78,240,  5,104,161,166,  4, 31, 32, 96, 66,124,  0,  9, 33,185,185,231,236,189,215, 99, 62,126,253,199, 92,
-231,220,115,111,238, 59,185, 33,129,245,201,216, 57,247,156,189,246,218,115,174, 53,215,252,254, 94,107, 46,152,153,153,153,153,
-153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,
-153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,121, 80,176,103,218,224,  1, 70,166, 87, 13, 92,109, 12,143,
- 80,101,  3,248,233,239, 51, 51, 51, 51, 51, 51, 51, 15,  3,  4, 48,198,200, 19,255,249,117,207,252,197, 15,252,232,139, 62,253,
-103, 63,246,205,119,255,240,203,190,228, 87, 75,103,174, 57,180,205,204,204,204,204,204,204,204,121,240, 96,122,234,  2,148,223,
-243,194,167,188,225, 71, 95,252,212, 87, 92,225,187,197, 35,182, 23,205,115,191,236, 73, 79,249,202,167, 62,226,218,247,126,248,
-142, 59,142,172,198,143,  2,202, 44,238, 51, 51, 51, 51, 51, 51,231,204,131, 41,234,  6,104,191,250,170,230, 91,255,193,229,225,
-233,221, 93,247,224,143,220, 77,232,  6,158,252,228,199, 93,252,226,175,124,194, 55,126,228, 19, 71,236,199, 62,185,251, 65,160,
- 99, 22,246,153,153,153,153,153,153,115,226,193, 20,117,  1,170,247,223,190,123,199,165, 59,229, 51,190,226,  9,219, 87,106, 80,
-226,222, 46, 97,111,143,139, 47,191,220,189,244,249, 95,248,213, 49,133, 39,189,247, 67,119,252, 49,112, 55,179,176,207,204,204,
-204,204,204,156, 53, 15,166,168,  3,136, 42,123,191,246,161,163, 31,184,179,139,151,190,224,105, 23, 61,185,182, 14,223,117,196,
-123,239,129,170,229,  5, 95,241,133, 79,123,198,227,118,158,247, 59,127,246,201,219, 87,125,184,237, 76, 59,156,153,153,153,153,
-153,153,201, 60,216,158,240,126,229,251, 14,240,152,175,124,226,214,183,255,220, 75,175,254,174,199, 53,174,222,108, 60, 88,139,
-121,212, 85,212,143,125, 44,183,126,242,238,221, 87,255,196,111,255,200,187, 63,240,137,183,  2,123,211,231,245,148,123,126,  8,
-160,170,215,  0, 23, 79,191,222, 38, 34,159,211, 70,201,231, 91,127,103,102,102,102, 30,234, 60,216,162,190,143,  1,182,129, 43,
-174,220,118,223,244,159,190,253,  9,223,247,149, 87, 46,174,236,187,  8, 36,228,138,199,208,124,193,227, 25, 53,241,191,252,204,
-251,254,195,255,249,171,127,250, 47,128,191, 33,183,247,126, 11,187,170, 94, 13, 92,125,166,237, 38,142,136,200, 45,103,218,  8,
- 64, 85,111,  2,174,157,126,125,189,136,188,233,116,219, 63,220,249, 92,233,239,100,156, 92, 75, 54, 80,246,239,196,  0,184,  5,
-184, 13,184, 81, 68,142,156,236,179,231,130,170,158,184,255,179,229,172,199,224,204,204,204,231, 55,238, 76, 27,156,  2,  3, 36,
- 96,235,210,101,241,197,151, 46,220,165, 73,229,192, 64,144,233,127, 34, 34,186,255, 23,217,255,251,193,187, 14,104,125,212,238,
-123,127,237,211,191,241, 99, 47,122,236,139,190,252,242,197, 69,163, 87, 56,114, 55,125,187,164,184,244, 10,254,143, 87, 63,239,
- 21,215, 60,241,138,167,188,230,109,191,251,218,123, 87,227,123,121, 96,132,253, 58,224,141,103,218,104, 31, 85,  5,184, 17,184,
- 89, 68,110, 56,195,230, 51, 15,  3, 38, 33,191,110,122,157,202,192,219, 55, 88,222,166,170, 55,144, 13,151,251, 35,238,215,  0,
- 55,157,105,163,147,112, 51,240,130, 51,109, 52, 51, 51, 51,115, 62,162, 46,128, 44, 42,123,205, 15,189,240,113, 63,252,210,103,
- 94,254,188,157,166, 40,147,152, 44,216,198,228,151,  8,226,236,113,191, 99, 12, 98,237,177,223, 37,191,151, 16,245, 42, 41, 56,
-135, 57,180,159, 16, 61,169, 19,190,253,  5, 79,255,178,103, 61,241, 17,239,120,229, 91,110,254,129, 63,250,232, 93, 63,  3, 12,
-220,127, 97, 63, 87,174,  3,174, 83,213,235,128,235,239,231,228, 62,243,217,231,143,206,180,193,  9,188, 10,184, 86, 85,175,159,
-189,230,153,153,153,135, 42,231, 35,234,  0,143,120,243, 55, 62,254, 45,223,243,229,143,126,238,184, 73,104, 18,172, 17,192,128,
- 74,126, 97,144, 36, 89,122, 21, 48,146,125,251,164, 96, 65, 68,178,191,175, 96, 69,196, 25,177,147, 71,156, 69, 93,  1, 85,146,
-  8,195,102,228, 25,143,187,252, 17, 55,253,240,183,252,196,247,188,245,183,158,244, 11,191,249,209, 31,  1,238,226,129,241,218,
- 33,123, 66,167,226, 90,142,231, 90,224, 38, 85,125,193, 44,236,159, 51,220, 66,142,196,220, 34, 34, 55,195, 65,168,252, 90, 38,
- 49,159,182,187, 26,120,187,170, 62,251,  1, 58,247, 55,144,195,251,103,226,129,248,174,153,153,153,207,  3,206, 71,212,165, 42,
-204,213,255,240,105, 23, 63, 71,215, 30,223, 15,144, 82, 22,233,131,200, 58,211,107,255, 31, 10,214, 96, 46,189,124, 18,247,132,
- 24, 32, 77, 81,124,129,  3,133, 55, 41, 11,191, 49, 16,201,245,249,  2,227,224,217, 41, 75,243, 31,191,255,235,191,247, 57, 79,
-185,242,139,255,217, 79,189,239,251,  7, 31, 63,112,236, 11,206, 31, 17, 57,109,104,115,242,206,223,200,177, 48,237, 53,228,201,
-254, 97,153, 67,158, 57,224,  6,224,134,147,121,222,147,104,223,  8,220,168,170,111, 35,159,111,200, 99,224,129, 58,247, 55,238,
- 27, 17, 51, 51, 51, 51, 15,  4,230, 76, 27,156,  4, 59,250,116,247, 47,254,201, 93,239, 23, 51,176, 40, 35,139,  6,218, 90,167,
- 87, 58,246,239, 42, 81,155, 17,162, 71,170, 54,139,124, 74,144, 18,  7, 94, 57,  0, 35,164, 30, 82,  7,218,  3, 67,254, 93,199,
-105,123, 69, 53,225, 99, 34, 12,145,239,253,214,231, 92,123,211,155,191,245, 87,174,186, 98,251, 91,200,178,127, 62,253, 56,107,
- 68,228, 70,114, 78,243,176,199,116,221, 41, 54,159,121,120,240,  2, 17,121,245,217,132,210, 69,228,213, 28,239, 81,191,238, 84,
-219,206,204,204,204,124, 54, 57, 31, 79, 29,133,187, 95,247,171,183,255,192,175,253,217,103,190,229,105, 87, 54,143, 19, 48, 73,
- 53,229,119,133,164, 89,178, 55, 99, 50,207,250,130,173, 47,252,238,175,122,226,213,181,171, 77, 74,  9,172,205,190,117, 74,232,
-184, 66,172, 96, 30,251, 76,204, 35,158,136,108, 95,137,212,219, 16,  6,210,250, 46,116,239, 83,164,187, 62, 10,161,  3,105, 80,
- 34, 81, 33,173, 70,158,251,244, 47,248,130,119,189,249, 91,127,250,235, 94,255,159,237,199, 63,117,244, 29, 28, 43,222,187, 32,
-136,200,109,170,122, 35,199, 60,182,243,169, 98,190, 15, 39,169,136,190,229,129,  8,237,158, 80,225,127, 94,183,155, 61, 16,251,
- 56,145, 11,209,223, 19,218,121, 86,251, 59, 15, 15,249,  6,142, 21, 87, 94,172,170,215,156,141, 65, 48, 51, 51, 51,243, 96,114,
- 62,162, 30,129, 53,240,225,223,185,117,245,150,223,185,117,213,112,242, 69,108, 46,125,225, 51, 46,127,229,183, 60,251,241,143,
-108, 77,105, 66,210, 28,122,239,123,116, 88, 67, 92, 99,159,252, 92,220,179,191, 13,251,248,191,123,159, 15,239,187,222,122,207,
-237,132, 91,223, 77,252,171,247, 33,182,  4, 85, 84, 96,220,140, 60,249, 81,151,238,252,202,191,252,111,126,242,249,175,125,251,
- 61,159, 57,218,255, 38, 15, 64, 40,254, 12,220,111, 81,131,  3, 97,123, 21,217,219,191,143,113,160,170,183,113, 44, 52,124, 82,
-129, 82,213, 55,114,236,179, 55,138,200, 13,135,246,251, 42, 78,168,232,158,246,249,166,179,169,222, 87,213, 87,145,189,209,147,
-237,227,180,237, 58, 25,247,183,191,167,233,235,235,200,251,221,191, 87, 30, 46, 92,165,248,137,  2,126,248, 59,103,102,102,102,
- 30, 18,156,143,168, 39,160,  7,  2,121, 81,152, 41,235,125,112,207,187,138,240,133,111,122,241,147,127,240,181,207,187,234,121,
-113,132, 49, 70,212, 15,104,191,129, 48,128, 83,170,175,255,103,184,103,191,244, 20, 95,113, 12,185,228, 42,138, 75, 94,137,185,
-242, 25,132, 63,252, 41, 48, 17,200, 21,242,227,198,243,140, 39, 61,242,178,183,252,147,231,189,249,229,111,252,141,111,  1,254,
-154, 11, 43,234,135, 39,242,179, 22,181,195,168,234,181,192,219, 57,189, 40, 92, 77,246, 10, 95,117,154,106,235,253,123,171,  1,
-110,214,124,139,214,219, 56,117,  4,225,106,242,173, 89,215, 76,225,228,251, 48,  9,229,219, 56,117,106, 97,191, 93,215,169,234,
- 89,  9,231,  3,212,223,147,245,245, 38,102, 97,157,153,153,153, 57,142,243, 17,117,200,194,233,167, 23, 28, 19,116,251,184,203,
-234,111,124,219, 75,159,250,166,175,125,242,101, 79, 26,186, 68,140, 30,134, 14,130,  7, 81,164,128,234,155,127,  4,251,244,111,
- 56,216,217,110, 55,240,174, 15,220,206,187, 62,120, 59,247,172, 58, 10, 43, 60,237, 81,151,240, 77,207,126, 34, 95,242,132, 71,
-230, 29, 63,246, 57, 72,185,133,127,239,191,129,210,229, 38, 24, 33,172,  6, 94,246,252,167, 63,235,231,222,253, 23,175,124,215,
- 31,222,254,  6, 46,208,237,110,147,224, 29, 22,187,115, 13,223,238, 23,220,189,253,132, 63,223, 66,222,215,190,145,112,216,155,
-189,154, 99,149,246,167, 11,245, 94, 76,222,239,190,103,125, 35,199, 60,203,253,251,177,247,121,149,170,222, 38, 39, 95, 40,230,
-141,220, 87,208, 15,239,107,191,109,215,112,223,126,220,135, 11,212,223,139, 57, 94,208,143,112,172,125,199, 69, 22, 30, 96, 78,
-188, 11,226,  1,  9,189, 95,136,116,196,204,204,204,231, 47,194,253,103, 63,228,189,243,194,167, 95,242,189, 55, 92,255,148,239,
-127,204,178,105,186, 81,209, 56,128, 31,242, 86, 70, 32,172, 41,190,250,187, 40,190,230,251, 14, 62,252, 95, 62,246, 41, 94,251,
-243,239,225,182,207,236, 81, 87,  5,133, 51, 24,133, 20, 60, 46,  5,190,241,217, 79,224,127,187,238,185,180, 85,  1, 64,252,200,
- 77,132, 63,254, 25,100,235,138,233,107,133,178, 44,120,255, 71, 62,113,199,223,251,167,255,241,235, 84,249, 51,114,138,224,148,
-168,234,235, 56,180,248,140,136,156,246, 56,156,194,131,125,193,137,121, 89, 61,205, 10,107, 83,222,247,143, 56,180,172, 42,240,
-234,147,229,118, 79,226,221,222, 34, 34,207, 62, 97,155,195,223,181,207,141,228,125, 30, 39, 10,211,119,191,157, 99,226,113,  4,
-120,194,225,237,166,144,251,219, 14,125,236, 22,242,253,248,199,165, 28, 78,227,121, 95,176,254,158,162,175,183,145,191,243,198,
-195,127, 84,213,139, 47,132, 40,170,234,173, 28,159,183, 63,238,124,156, 13, 83, 63, 15, 47, 62,115,132,147, 71, 27,110, 35,159,
-203, 27, 78, 60,254, 51, 51, 51, 51,167,227,124, 61,245,125,246,  5,253,241,175,249,154, 71,255,171, 55,190,240,170,255,214, 37,
-199,102,240, 16, 71,136, 33,139,185,  0, 26,145,203, 30,139,251,210, 87, 28,124,248, 99,119, 28,225, 21, 63,249, 46, 62,221,  5,
-218, 69,131,183,150,162,176,148, 86,176, 90, 34, 49,240,142,247,255, 37,214, 24,126,232,219,158,  7,128,125,226,223, 39,126,228,
- 55, 32,174,192, 53, 32, 16, 70,207,179,158,112,249,149, 95,250,180, 43,191,246,253, 31,186,227,195,228, 20,193, 89,123,235,147,
-200,159,138,107,185,175,160,156, 84,156,206,192,219, 56,222,187, 60,229,189,206, 34,114,243, 20,222,222,247, 72,175, 81,213, 87,
-157, 33, 31,126,179,136, 92,127,178, 55, 36, 23,249,189,158, 99,130,178,127, 15,246, 97, 65, 60,124, 12,110, 35, 27, 45,247,105,
-223,161,182,157,105,241,150, 11,217,223,219, 56,197,254, 46,144,160,159, 88, 95,112,198,186,132,179,228, 84,233,131,171,201,231,
-227,117,170,250,176, 93,126,119,102,102,230,193,231,254,136,186,  0,114,201,194, 61,255,173,215, 61,225, 71, 95,242,140,203,158,
- 57,244, 48,136,135,148, 67,237, 20,230, 96, 75,245, 35,238,201, 95,133, 44, 47, 59,216,193,235,127,254,125,124,236,111,143,194,
-206,146,163,171,  0, 18,177,  2,173, 21, 46, 91, 56, 46,110, 28, 59, 59, 75,126,229, 15, 62,198,243,190,232,113, 92,251,204,199,
-131,117,216,171,191,138,240,129,127,143, 60,226, 42,208, 68, 18,161,108, 74, 94,242,188,167, 92,251,254, 15,221,241,239,128,123,
- 56,  7, 81,231,236,151,140,189,129,243,184,183, 88,143,173, 45,190,207, 25,151, 27, 21,145, 91, 52, 47, 77,186, 47,182,215,114,
-122, 49, 57,105,158,124,159, 73, 56,111,225,248, 80, 55,112, 16, 38, 63, 44, 90,111, 58, 93,251, 14,181,237, 85,156,132,  7,161,
-191,167,109,223,  3,201,212,151,195,227,227,150, 51, 24, 87,103,203,254,186,242,135,195,248,135,215,160,223,231,141,170,122,181,
-156,162, 14, 98,102,102,102,230, 48,231,115,127,247,126, 81,220,242,185, 79,216,250,190,247,253,247, 95,244, 75, 47,121,218, 37,
-207,220,108, 34,145,152,  5,221,  0, 86, 16, 43,136, 19,196, 26,196,  9,230, 81, 79, 63,216,201,199,239,188,151, 95,255,192, 95,
- 67,219,228,219,220,140,  1,107,137, 24,246,134,200,199,239,218,112,219,167, 55,120, 21,146,181,188,251, 79,255,234, 88,  3, 46,
-123, 34,218,237,  2, 97,106,141, 66, 72, 60,245, 49,151, 60,  1,120, 36, 15, 76, 90,225,100, 92, 71,246, 34,207,181, 64,235,176,
-192, 29, 57,  7, 81, 56,108, 60,156,238,190,248, 91,206, 50, 76,123, 88, 64, 14,183,233,184, 72,196, 89,182,239,184,176,247,  9,
- 92,200,254,222,118, 14,251,187, 95, 76, 41,132, 19,195,229,247, 71, 92,143,  0,175, 39,167, 62,158, 45, 34,215,139,200,155, 14,
-189,174, 23,145, 75,166,109, 14, 27, 45,175,154, 12,175,153,153,153,153,211,114,174,158,250,126,184,253, 81,223,249,119, 31,241,
-131,111,253,198,199,125,119,145, 44,155, 49,129, 85,208,132, 40, 72, 18,212,202, 20,122,207, 31, 17, 87, 98, 46,254,130,131, 29,
-221,126,215, 46,221,198,195,118,197,129,157,176,239, 91, 27,  3,170,220,187,242,248, 49,240,152, 29,199, 94,191, 95,147,199,148,
- 79,183, 48,108,144,102, 11, 69, 33,  4, 30,127,197,214,229, 85,105,175, 28,198,248, 97,206,141,215,159,230,189,171,201, 34,117,
- 53,217,131, 58,168,254, 62,  7,111,241,176,200,157,117,129,213,228, 93, 31,252,174,167,190, 55,250,108, 35,  7,167, 18,254,195,
- 94,250, 89,237,235,196,182,157,192,133,236,239, 89,239,239,254, 48, 25,110, 39,214, 14,188,254, 20,199,255,172,152, 62,123,198,
-207,139,200,155, 84,245,102,142, 79,113,188,145,211, 27, 82, 51, 51, 51, 51,231, 36,234,  2,176, 85,219, 47,255,215,223,240,152,
- 55,191,250,154, 71,124,197, 56, 66, 95,228, 37, 95, 53, 42,226, 19,101,105, 56, 26, 99,106, 48,  6,103, 15,238, 96, 23,  0, 13,
-  7, 59,187,124,167,197,150,  5, 49, 65, 94, 47, 94, 39, 81,159,126,170,128, 53,172, 55,158,191,234,123,170,103, 30,106,170, 70,
- 80, 15,161,  7,179,141,104, 66, 83,226,146, 69,209,238,180,229,197,159, 30,187,115,138, 64,200, 89,228, 44,167,188,234,235, 56,
-246,120,206,155,128,179, 45,150, 58, 92,221,124,181,230,194,175,243,225, 84, 17,130,179, 53, 46, 78,197,121,137, 48,121,219,147,
-221, 66,119, 33,251,123, 46,237, 59, 47, 38, 65,191,137,227,251,241,234,  7, 43, 66,  0,  7,233,136,215,115, 44,244,127,181,170,
- 94, 39, 39, 20,  6,206,204,204,204, 28,230,108, 68,125, 63,148, 93, 60,245,138,250,219,126,254, 37,143,127,211,151, 92,222, 94,
-222,141,  9, 42,151,  5,221, 39,156, 79,148,141,229,159,191,251, 19, 31,124,220, 69,229, 69,223,125,205, 35, 30,215, 43,200,190,
-183,238, 61,233, 51,127,137,121,236,115,  0,120,218,163, 47,229,203,158,116, 57,191,247,225,187,192,185, 44,226,102, 18,244,253,
-117,225, 82,254,108,127,207,154, 39, 93,121,108,126,215,221, 79,194,176,139, 14, 23, 33,211, 19, 99, 52,237, 27,  5,152, 67,109,
-126,192,152,188, 39, 56, 54,201,158,169,152,235, 48,135,197,233,106, 46,236,173, 87,247,151,115, 49, 16, 78,181,237,195,169,191,
-199,113, 10, 65,127,253, 89,158,231,  7,154,195,171,216,193,195,232, 56,206,204,204,124,118, 56,147,168,239,135,219, 47,191,254,
-239, 92,242,218, 31,255,250,199,252,211, 43,235,162,220, 36, 65,218,236,130,235,152,168,147,210,151,240, 63,190,243,175,222,121,
-195,251, 62,253,203, 63,125,253, 85,223, 47, 58, 69,222,237, 84,253,238, 12,122,231,159, 29,236,216, 24,225, 95,124,243,179,249,
-250, 15,253,191,208,123,168,202, 44,236, 48, 61,205, 13,208,  4,171, 13,207,250,194, 71,243,242,175,254,162,131,207,166, 79,127,
- 24, 85,143,196, 49,111,168,138, 17,229,158, 85,223,237,110,198, 61, 46, 16,147,176, 31,158,100,175,227,220, 43,161,111,227,252,
- 87,166, 59, 23,193,125,168,240,112,235,239,137,130,126,195,217, 68,114, 46,  4, 34,114,228,132,226,198,107,121, 96, 30, 36, 51,
- 51, 51,243, 57,202,233, 68, 93,  0,113, 86,158,252,134,175,123,212,143,191,246,239, 93,249,181, 33,192,198, 25,164, 50,104, 82,
-180,139, 44,156,112,251, 16,250,239,248,185,143,255,212,111,127,116,247,231,129,244,215, 71,253,157,136, 62, 85, 15, 60,117,160,
-110,137,183,191, 23,119,228,118,228,226,171,  0,120,225,179,174,226,134,127,242,247,121,205, 79,191,135,205,189,  3,212, 21,216,
-156, 79,103,244,176,233,248,146,167, 94,193, 47,189,246, 27, 88,212,249, 62,117,124, 71,252,208, 59,144,178,  2,137,160,  9, 77,
- 17,140,225,214, 59,238,189,171, 31,227,254, 35, 89, 47, 20, 55,115, 44, 92,125,226,173,110,103,195,103, 77, 36, 62, 75, 60,108,
-250,171,249,105,108, 39, 10,250,253, 41,140,123, 32,248,108, 24, 54, 51, 51, 51, 15, 83, 78,151,123, 22,224,242, 55,126,253,163,
-127,242,251,191,226,202,175,237,  3,248,214, 33,141, 69, 19,176,137, 44,106,203,111,125,114,125,231,243,222,250, 23, 63,240,219,
- 31,221,253,191,128,219,129, 79,124,228, 51,253, 71, 48,  2,113, 42,122,178, 38,135,216,195, 10,255,222,183, 28,247, 37,223,253,
-252, 47,226,247,127,228,197,188,230, 31,126, 49,143,191,164,162, 86,207,210, 68,190,252, 73,151,241, 19,223,243, 53,252,238, 27,
-174,227,241, 87,236, 28,108, 31,254,240,167,208,123,111,135,162, 66,167, 34, 60, 66,  4, 35,124,228,111,143,252, 21,249, 57,235,
-251,  1,252,135, 10,167,170, 58,127,168,112,190,237, 59,213,182,231,187,191,207, 26,122,252,227, 85,225,161, 33,232, 51, 51, 51,
- 51,231,196,105,195,239,143,189,184,124,222,119,124,241, 37,207, 31,251,  4,203,  2, 41,  5, 29, 21,219,  7,170,133,229,103, 63,
-120,247, 95,252, 15,191,116,251,191,222,237,226,123,128,187,201, 15,122,169,127,247,214,189, 63,248,212,158,255,206,203,218,194,
- 69,213,131,226,118,154,150,244,215,191, 75,120,223,143,225,190,226, 53,  7,223,243,140,199, 93,198, 91,190,243,171,248,145,151,
-  7,238,184,103, 77, 89, 56, 30,117,201,226, 62,237,137, 31,250, 85,194,159,252, 44,212, 45,  0, 98, 44, 26, 19, 18, 19,190, 31,
-120,199,123,110,125, 31,121, 61,250, 11, 41,234,231,147,215, 60, 46,132,170, 23,104,213,179,251,193,109, 28,107,223,169,214,142,
- 63,142,233,254,237, 83,241, 80,239,239,113, 60,196,  5,253,124,139, 24,103,102,102, 62, 15, 57,157,167,238,174,186,164,122,210,
-197,149, 37,164, 92,221,174,155, 72, 57, 70,164, 18, 94,251,174,191,185,249, 21, 63,123,235,255,188,219,197,119,  3,119,  2, 71,
-129, 17,240,159,188,119,252,131,119,124,248,200,  7, 10,  7,218, 71, 64, 17, 67,190, 95,189,221, 34,254,201,127,192,223,252, 47,
-208,205,103,142,251,194,186,112, 92,117,197,206,125,  5,221,119,196,247,191,149,240,158, 55, 32, 85,137, 88,155,243,245, 69,  5,
- 62, 80, 24,248, 47, 31,249,212, 29,191,247,161, 59,111, 38,175,253,126, 65, 68, 93,143,127,196, 39,156,253, 36,123,226,109, 98,
- 39, 93,180,229,179,200,225,246, 93,172,121, 57,211, 51,113,186,109, 30,234,253, 61,224,161, 44,232,154,151,238, 61,204,249,214,
- 38,204,204,204,124,158,112, 58, 81,183, 31,186,179,251,232,223,142, 49,180,173,165,245,145,214,194,202, 38,125,217,219,111,251,
-133, 31,189,233, 83, 63,  8,124, 16,248, 12,217, 67,207,234,157, 31,242,114,231,143,255,206,157, 55, 30,245, 17,231, 35,248,148,
-171,230,166, 69,105, 88,108,145,110,253,117,198,119,188,130,248,231,239, 64,119, 63,113,210,  6,232,250, 46,210,173, 55, 51,254,
-242,119, 18,254,248,223, 66, 93,131,117, 48, 85,225,137, 41,144,222,131, 85,126,232, 23,255,248,151,129,191,156,190,255,  1, 23,
-245, 67,247, 45, 31,230,172,110, 47,154,110, 67, 58, 60, 33,191,238, 12,158,238,131,205,141, 28,159,187, 61,221,178,185,251,199,
-226,148,219, 60, 12,250, 11,156, 84,208,111,225,244,107, 22,156, 22, 85,189, 90, 85, 95,119,232,117,237,161,247,206,105,193,162,
-105,251,195, 69,153, 71, 56,203,241, 54, 51, 51,243,249,203,105,195,239,119,175,194, 31,190,228, 23, 62,254,166,215,124,213, 21,
-215, 93,218,186,157, 15,127,166,255,219,255,251,189,159,126,231,159,127,114,243,255,  0,159,  2,238, 37,123,231,135, 69, 52,  2,
-221, 95,222,213,255,250, 27,126,243,142,107,223,252, 13,143,125, 65, 88,  5,112,  6,169,236,177, 18,182,118, 27,194, 81,252,123,
-127, 24, 41,151,200,165, 79,197, 92,242,  4,112, 53, 36, 79,186,247,175,209,187,254, 28,250,123,161, 40, 96,113, 44,175,158,111,
-123, 51,232, 32,148, 75,195,191,191,249, 35, 31,250,255,254,235, 39,126,129, 28,122, 63,182, 74,205,  3,192,228,157, 95,203,125,
-159, 47,126,132,115,171,124,127, 53,199,175,189,126,147,230,199,140,158,118,177,151,233,251,175,131,179,187,159,254,124,152,170,
-172,223,196, 49, 17,185, 86, 85,223,118, 50,143,245,208, 45, 95,103, 18,169,135,108,127,225,148,130,126, 46, 11, 10,157,140,171,
- 57, 94,136, 95,207,177,168,197, 53,154,215, 58,184,225, 76,247,154,235,177,199,232, 30, 62,198, 15,218,210,184, 51, 51, 51, 15,
- 95, 78, 39,234, 30,184,231,247,111,219,251,119,191,127,219,222, 77,192, 22, 57,111,126,  7, 57,212,190,154,182, 57,113, 89,177,
- 68,126,222,250, 29,255,230,221,159,122,203,179, 30,219, 62,254,165,207,188,244,137,221,238,136,108,151, 80,153,188,210, 28, 10,
- 69,129, 20, 69,174, 96,191,251,131,132, 79,223,114,176, 59, 49, 14, 92,  9,139,229,241,123, 87, 96,140,104,106,168,171,146, 91,
- 62,118,231,145,255,233,223,190,255,205,100, 47,189,227, 12, 79,104, 59, 25,170,167, 94, 26,237, 52,220,231,105,104,167, 67,242,
-106,105,175,230,216,147,208,246,133,238,102,242,196,127, 56,148,191, 31,230,191,150, 99,185,233,243,246, 32,207,146, 27, 56,254,
- 49,168,175,154, 60,205, 27, 56,214,182,107,201, 66,120, 49,217, 19, 63,194, 41,114,240, 15,229,254, 78,253, 58, 89, 74,224,237,
-231, 48, 20,110, 60,143,123,215,175, 37, 27, 76,183,145,143,193,201,214,126,191,134,251, 46,145,123,203,133, 52,112,102,102,102,
- 62,119, 56,157,168, 71,178,112,  7,178,136,155,233,111,195,244,218, 15,183,159,140,  0,172,146,234,159,254,119,191,248,241, 31,
-186,116,225,222,240, 15,158,184,243,232,254,232,  8, 91,  5, 82,219, 99,247,175,  3,136,129,178, 62,253,125,104, 10, 36,133, 33,
-146,118, 71,154, 71, 94,193,135, 63,117,100,117,253,155,126,231, 77, 71,215,254, 61, 28, 51, 50, 46, 52,183,144,  5,253,108,243,
-233,  7,136,200, 13,122,108,  1,155,125, 47,236, 90, 30,  2, 21,226,147,183,126, 61,217,187,222,143, 72,156,232,121,238,115,  4,
-184,254, 20,239, 29,240, 80,238,239, 73, 56,215,244,192, 89, 45,167,123, 10,174,230,236,235, 12,110,224,  2, 26, 56, 51, 51, 51,
-159, 91,156, 46,167,174,100,113, 94,147, 39,241,123,200,225,246,205,244,247,211,185, 52, 74, 22,254,163,187, 93,252,237,111,190,
-225,163,255,235,207,254,241,221,127, 81,151,134, 98,215,147,142,122,232,211,193, 94,  4, 65,228, 36,175,233, 63, 34, 48, 38,116,
- 55, 32, 71,  6,154,139, 47,226,183,111, 59,122,199,215,254,192,205, 63,112,219,157,171,255, 76,110,219,134, 11,144, 75,159,184,
-153, 60,185, 94, 47,249, 65, 28,231, 44,232,251, 76,222,221,179,201,251, 59, 27, 79,255, 70,114, 40,251, 92,189,194,115, 70,242,
- 67, 97,246,219,118, 42,110, 38, 63,246,244,172,142,193, 67,185,191, 15, 50,251,249,250,179, 58,110,228,227,240,  2, 17, 57,167,
-136,208,204,204,204,231, 55, 23,114,145, 22,200, 43,191,183,100, 47,237,139,190,227,203, 47,255,174,127,245,194, 71,127,211,163,
-119, 74, 23,  6, 37, 56,129,218, 34,206,100,207,221, 28,106,142, 42, 68,208,144,160,143, 88,159, 40, 10, 97, 55,194, 15,191,231,
-158,223,250,223,223,121,235,219,124, 76,127,200,177, 91,233,142, 45, 44,255, 48, 98, 10,  5,159,232, 37,222, 70,126,186,217,253,
-241,  6,239, 23,135,106,  9,246, 61,236, 35,228,103,182,223,175, 10,236,135,106,127, 31,108,166,227,112, 53,247,173, 77,184,133,
- 28,110,159,133,124,102,102,230,156,185,208,162, 14, 89,216,107, 96,  7,184,242, 11, 46,169,190,230, 85,207,189,252, 69,223,126,
-205,101, 95,250,152,173,162, 64,  5, 85, 37,137,144, 14,181,198, 40, 24,213,124,235,154,192,221,125, 76,255,233,131,247,252,233,
-219,222,247,233,119,254,201,223,172,127, 13,248, 91,114,228,160,227, 97, 42,232, 51, 51, 51, 51, 51, 51, 15, 36, 15,134,168, 67,
-254,158, 18, 88,  0,219,192,149,151, 44,221,223,249,210,171,150, 95,250,226,103, 94,242,156,103, 62,186,125,228,197,149, 93, 44,
-156,148,206,136,  9,  9,221,196, 52, 30, 29,211,230, 99,159,238,238,186,241,  3,247,252,215,223,187,109,245,  7,159,188,119,188,
-  5,248,  4,176, 75,206,161, 95,176,123,210,103,102,102,102,102,102, 30,110, 60, 88,162, 14,249,187, 12, 80,145, 67,242, 45,185,
-162,254, 18,224,138,182, 50,151,214,206,108, 23, 86,202,144, 52,244, 65,247, 54, 67,188, 91,149, 79,147, 67,236,187,228,188,249,
-154, 51, 23,234,205,204,204,204,204,204,124,222,241, 96,138,250, 62,251,226, 94,144,189,247,253,151,227,224,233,235, 64,246,192,
-253,244, 26,201, 66, 30,152,197,124,102,102,102,102,102,230,164,124, 54, 68,253, 48,251,171,194,155, 67, 63,247, 73,112,240,116,
-117,101, 22,242,153,153,153,153,153,153,211,242,217, 22,245, 19, 57,220,158, 89,196,103,102,102,102,102,102,102,102,102,102,102,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102, 30,214,168,234, 67,109,109,135,153,207,  2,251,
-227,224,225, 56, 30, 30,142,109,158, 57,123,228, 69, 47,122,209, 59, 49, 70,173,115,118,123,103,199, 42, 36, 69,195, 48, 12,106,
-173,141, 85, 89,177, 94,175,147,247, 94, 83, 74,130,106,126,200,121,  2, 98,216, 95,237,205, 80,150,169,114,142,132,138,247, 94,
- 68, 68,  4,149,194, 57,134,113, 80,146,106, 89, 87,148,101, 21, 68, 36, 24, 99,  8, 33,226,189, 79, 34,146,218,182,101, 24,122,
-234,186,166, 31,  6,170,178,100,181, 90,153, 24,163,180, 77, 43,174,112, 98,172, 53,170, 68,231, 92, 24,135,209,132, 24,197, 90,
-171, 41,165,  4, 98,140, 65,140,181, 54,165,100, 54,155,141, 69, 49,228,135,189, 37, 85, 85, 64, 52, 37,213,148, 60,170, 17,103,
- 77, 93, 85,146, 98, 76,136,104, 81, 20,  9, 85,188,247, 70,193,166,148, 68,140, 25,173, 49, 94, 85, 36,165, 40,128,136,128, 42,
-209, 88,139,181,214,132, 16,168,235, 90,134,190, 71, 85, 17, 17,170,162, 72,170, 42,170,138,130,136, 17, 20,193,136, 96,140, 33,
-134,160,235,245, 74, 72, 73, 16,209,170,105, 84,196,184, 24,163, 17, 48, 34, 32,214,210, 52, 77, 74, 41, 69, 85,245, 64, 68,196,
-105, 74,210,117,157, 90,107, 83,233, 74, 99,172, 49,  8,118,244, 35,101, 81,202, 48,142, 38,120,239,131, 15,201,216,188, 72, 95,
- 10, 33,185,178, 50, 41, 70,147, 52,  9, 32, 77,211, 90, 99, 76, 49,142, 99, 97,140, 72, 81, 20,132, 24, 99, 12, 49,198, 24, 99,
- 26,135,128,152,100,203,146, 24,131,  2, 52, 77, 75,140,193,146,212, 98,140,166, 24, 49,214,138, 17,172, 49,166,142, 41,133,186,
- 44,147, 49, 70,197,152,  8,224, 67, 32,134,  0, 34,120,239,173,136, 72, 83, 85,  0, 66, 62, 22,164,148,108,225, 10,235, 67,  8,
-198,152, 96,173, 21,  4,141, 41, 98,141,181, 49,198, 34,165, 36,198, 26,  9, 33,146, 98,212,148, 18, 34,130,177,198,107, 82, 10,
-231,176,214,202, 56,142, 86, 85,169,171, 74,250, 97, 64, 68,196, 57,139,117, 78,140,136, 87, 77,253, 56,122,181,214, 74, 81,184,
- 50,132, 96, 64, 72, 41, 73, 76, 81,157,117, 41,166, 68, 89, 20, 69, 74,201,168, 42, 33,  4, 81, 77, 24, 99, 83, 93, 87, 81,140,
-213, 20,147,128, 98,173, 85, 85, 13, 73, 53, 10,168,170,106,138,193, 90, 99,  5,129,190, 31,196,123,159,202,170,242, 58, 13,198,
-194, 57, 21, 17, 66,  8, 54,198,136,177,  6, 52,175,156,232,172, 53, 69, 89,210,117,157,169,235, 26,239, 71, 82, 74, 38,165, 36,
-206, 57,140,177, 41,166,132,115, 86, 68,140,196,152,  8, 49,136, 51, 70,139,178,  8,154, 52, 57,107,211,122,179,161, 44, 11,107,
-173,  3, 85, 73, 41, 50,250,160,206,218,100,114,155, 25,199,209,150,101,201, 56,142, 34,130, 56,231,140, 49,198,245, 67,111, 10,
- 87, 56, 49,198,160,138, 15, 97, 52, 34, 49,132, 96,140,181,210, 52, 13,193,  7, 49, 34, 54,169, 26, 64,  5, 72, 41,145, 82, 10,
-214,154,  0,146, 47, 77, 20, 17,131, 76,179,130,181,150,144, 98, 10,222, 39,103,157,186,178, 48,128,  9, 33, 48,122, 47,109,219,
-  0,176, 89,173,109, 82,213,186,110,162,247, 62,150, 69, 17, 99,138, 41,198,136,170, 74, 83,215, 38, 95,211,138,115,142,164, 81,
- 11, 87,  4, 31, 66, 66,140,166, 16,213,135,144,140, 49, 18, 83, 34,165, 40, 34, 72, 97, 11,131, 32, 41,165,252, 16, 72, 49,168,
- 38,172, 53, 73,196, 36, 99, 13, 49,  4,107,172, 37,134, 40,154, 18, 73,213,136,136, 49,198, 88,  5,103, 68,204, 24, 60,198, 24,
-113,206,217, 97, 24,  4, 69, 52,207, 25, 24, 99, 48, 34,136, 49,234,156,245, 41,166,100,140,164,148, 82, 12, 33,132, 24,147,148,
-101,105,247,143, 25,130, 22, 69, 65, 74,137, 16, 66,112,174, 16,107,173,132, 16,108, 82, 21, 99, 76,190, 94, 84, 77, 74,201,166,
- 20,197, 57,  7, 64,  8,  1, 31,252,168, 81,125,219,182,211, 53, 97,163, 24,241, 49,196, 81, 53, 37,231, 10,188, 31,147,136, 32,
- 34, 41,132,160, 34, 66,254,250, 68,204,115,169, 53,198,152, 73,244,213, 57,171,249, 18, 53,196, 24, 41,138,194, 42,152, 24,130,
-  5,138,148,146,  3,108, 81,150, 70, 83,114,195, 48,104,254,184,166,162,112, 41,132,168,144, 47,136,148, 82,180,214,170,136, 80,
-148,  5,133, 43,152,222,179,170, 74,140, 49,166,152,210,254, 92,137,130,181,118,127,124, 73, 76,209,146,212,133, 24,141, 32, 41,
- 75,  1, 70,192, 41,152,148, 18,198, 26, 66,  8, 88,147,127, 26, 99, 16, 17, 92, 81,160,154, 72, 49, 33, 34,162, 40,130,164, 24,
-227,  8, 36, 85, 69, 85, 35,228,201,189, 44,203, 36, 34,201, 90, 27, 99, 74, 18,125, 16, 31, 60,136,224,156, 75,198,152,164,170,
-234,189,199,123, 15, 40,154,123,106,243,252,110,197, 24, 73,227,152,143,119, 81, 20,140,163,183,160,249,  2, 64,172,136, 56, 80,
-151, 82,210,148,146, 26, 99,146,181, 70, 67,136, 41,132, 16, 81, 77,206, 21, 89, 79,140,193, 26, 67, 74,202, 56, 14,178, 92, 46,
-196, 57, 39, 73,147, 76,199, 78,234,186, 46, 69,164, 80,212,200,139,255,209, 63, 58,202, 36, 68,198, 90,163,104, 82,160,109, 22,
- 82,148, 46,197, 20,117,236, 71,181, 69,193,122,181, 18, 64,130,247,200, 56,130, 49,186,223,163,164,  9, 91, 22,136, 88, 89,110,
-111,137,247,158,245,106,143,182,109,232,214,107, 92, 93,169,247, 94, 76, 34,137,179,105,123,107, 11, 48, 42,249,201,171, 24,147,
-  7,207, 56,142, 84, 85,197, 56,142, 24, 99, 56,122,244,168,160, 72, 89, 87, 52,117,  3, 24,181,206,168, 49,134, 49, 68, 41,172,
-165,235, 58, 45,139,130,193,143,121,114,115,133, 25,251, 94,218,118,145,175,  4,129, 97,136, 24,  7,133, 45, 88,237,173, 99, 12,
-163,154,124,122,  5,231, 40,203, 50,141, 93,167, 34,194, 69, 59,219,  2,198, 68, 77,236,237,237,233,246,246,118, 26,199, 81,179,
-237,226, 88,173,214, 41,145,216,106,183,101,181, 89,137, 17, 97,107,107, 75, 54,155,142,162, 40,112, 70,216,221,221, 37,165,168,
- 70,133, 40, 73, 16, 75, 89,215,212,101, 73, 34,177, 58,186,  2, 18,139,182,213,222,123,146,247, 32, 98,156, 43,164,105,106, 49,
- 54, 47,131, 47,198,176,238,186, 24,198, 49,138,170,184,186, 38,198, 32,154,148,210, 21,218,182, 45,123,187, 71,141,117, 78, 20,
- 72, 41,210,182, 11,185,247,222,123,163,136,104, 76, 72, 93,186,212,111, 58,182,118,118,196,154, 60,255,238,173, 55,162,154, 68,
- 68, 76,211, 44,108, 81,  8,123,123,107,209,164,201, 21, 46, 13,163, 87, 17,163,181, 51, 58,166,188,184,159,179, 14,213,128,113,
-133, 56, 99,179,225, 33,162,146, 23,  2,148,105,144,166,177,239,247, 39, 51,196, 88, 98, 76, 44,151, 11, 52, 37, 66, 74,178, 94,
-175,217, 94, 44,100,111,179, 65,128,162, 40,180, 44, 10,193, 58,237,250, 46, 57,231,132,164,132, 24,104,234,154, 24,163,108, 54,
- 27,113,206,137, 15,249, 41,187,206, 57,181,214, 72, 85, 84, 32,176,238, 58,109,202, 26, 17,197, 24, 35,128,236,237,237,177,181,
-181,197, 62,125,223, 17, 66,208,178, 44, 21, 72,227, 56,178,216, 90, 72,191,233,141,115, 78,202,178,212, 97,232, 84, 48,136, 49,
- 98,140,145,162, 40, 36,248, 32,171,245, 10,231, 44,117, 89, 39,175, 17, 13, 17, 48, 88,103, 53,132, 17,148,100,156,211, 48,142,
- 36,205,  6,134, 49, 34,170, 42, 97,140, 72, 33,154,148,148, 98,212,229,114, 59,105,138,210,117,157, 44,151, 75, 73, 33, 74, 63,
-246, 44,154, 86, 49, 70,251,126, 64, 53, 73,211, 52,178,183,183, 71,190,128,145, 24,188,110,111,111, 43,130,174, 86, 27, 98, 10,
- 44,151, 91,  6,144, 16,163, 90, 81,173,203, 38, 41, 74,223,247,200,244,115,185,189, 35,221,106, 37, 33, 37,182,182,150,  8,162,
-187,123, 43, 77, 41, 98,173,165,170, 10,233,251, 65,202,186,164, 46,107, 70, 31, 12,146,100,232,  6,105,155,214,142, 49, 36, 17,
- 73,146,167, 81, 77, 33, 74,219, 46,100,189, 94,171,106, 36, 69,149,124,254, 17, 64,155,170, 73, 42,170,195,144,231,204,113, 12,
- 76,154,143,136, 80,215, 53, 77,211, 32, 70,180,235, 58, 77,160, 22, 36, 29,136,190, 33,248, 64, 85, 85,248, 16,232,215, 61, 69,
-229,212, 26,171,198, 26,  5, 48,198,176, 94,109, 68,242, 68,169, 34, 34,219, 59,219,154, 82, 74, 49, 70, 85,205,162, 20,162, 18,
-131, 23,177,  6, 81, 88,119,107, 49, 98, 76,221,212,106,197, 72,240, 35,195,224, 49,198, 80,213, 21,227, 56,170, 49, 70,  5,165,
- 44,107,137, 41, 72, 30,163,213, 65, 31, 85, 84,194, 56, 10,226, 36,165,128, 70,149,162, 42, 37,198,132, 21, 68, 69,196, 57,167,
- 86, 12, 74, 82,239,125,244, 49,138, 31, 70,221,218,218, 74, 49, 70, 29,186, 94,140, 19, 69, 39, 93,215, 40, 69, 97, 68, 36,207,
-103,174, 40,212, 26, 43,131, 31,166,227,155,143, 95, 85, 86,136,136, 32, 70,172,129, 24,  2,174, 40,180,239,187, 52,142,158,170,
-172, 52,132,160, 85,213,164,164, 49, 86, 85,153, 84, 84, 83,  8,234,125, 36,198,132,106, 62, 62, 77,211, 96,173, 48,142,163, 58,
- 87,106, 74,201, 84, 85,101, 68, 68, 82, 74,  2,164, 16, 70,170,170, 65, 68, 88,175,215,162,170,214, 57, 35,101,153, 13,170, 97,
- 24, 12, 96, 98,140,120,239, 89, 46,151,108, 54,155,148, 82,164, 40, 10,169,235, 70,214,235,181,214,117,173,198,144, 48,134,232,
- 35, 24,104,235,  6, 85, 36,165,164,206, 57, 69,209,  4, 98, 68,166, 99,173, 26, 99,144,148,144,245,106,133, 24, 35, 62,  4, 17,
-144,162,176,106,140, 69, 85,197, 24, 43,162,136, 58,136, 62, 34,198, 16,194, 72, 81, 20, 84, 69, 37,123,123,123,212, 85,133,171,
- 42, 52, 70, 82, 74, 88,107, 53,134, 16, 93, 81, 98, 12,164,148,109,113, 64,173, 21,233,199, 49, 37, 31, 53,229,246, 25, 72,196,
- 56,205,131,165,211, 24, 83,210, 20,113,198,226,202,146,113, 28, 40,139, 34, 27, 34, 70, 36,166, 68,240, 65,247,246,246,212, 90,
-199,114,185, 16,107,140, 12,163,151,162, 40,196, 90,179,223, 71,233,251, 65, 55,155,141,170,170,150,117,137,136, 17,174,172,  0,
-  0, 32,  0, 73, 68, 65, 84, 17,203,208,245, 74,202, 13,  2, 37,198,124,173, 26,131, 24, 83,224, 74, 35,206, 24,170,166, 33,197,
-196,102,179, 49, 34, 98,170,178, 18,121,217, 63,254,199,169,176, 22, 87, 85, 34, 36,134,209,171, 40, 98,156,209,110, 51,224, 42,
-167,126, 12, 84,101, 73,239,189, 20,214,230, 11,237,200, 17,196, 24,133,108,  6, 72, 81,208,182, 11,182, 46,222,146,187, 63,115,
- 15, 33, 69,210, 56,130, 40, 34, 14,209, 68, 82, 69, 69,213,136, 85,227, 28,146, 80, 33,129,177,164, 20,105,154, 10,107, 45,222,
-123,234,186, 38, 37,208,164,146, 52,177, 94,173, 49,214, 96,140, 85, 99, 12,214, 57,140,113, 82,183, 13,253,102,163,227,232, 17,
-201, 86,139,  8,236,236, 92, 36, 70,140,116,131,  7,141, 56,107, 69,213,168,146,152,188,117, 69, 32, 38, 48, 86,176, 34,186, 90,
-173,168,219,154,194, 58, 17, 17,250,193, 83, 58,  7, 70,213, 76,226, 84, 20,133,134, 16,179,140, 25, 80,  4,107, 77,150, 54, 81,
- 52,102,119,107,239,232, 81,234,166,226,232,238, 10,153, 44, 23, 99, 64, 85, 40,235,154,210, 58,250,177,  7, 17,173,202, 82,156,
-113, 32,138, 38,149,117,183,198, 40,168,  8,117,219, 98, 64,119, 87, 43,173,155,134,182,105, 49,198, 72,140, 30,  5, 45,140, 35,
-197, 40,187,123,123, 44,150, 75, 17, 35, 72,  2,149,148,246,246,246, 72, 49,169,170,138, 88, 55,  9,104,137,113, 86, 52, 69,138,
-170,148,190,239, 69, 35, 24,131,148,101,133,181,162,187, 71,247,112,133,211,177,235,243,136,154, 80, 17,154,197,  2, 35, 34, 67,
-215, 35, 70,164, 93,180, 58,140, 30, 85, 21,141, 65, 84,149,173,173,133,110, 54, 61, 59,219, 59, 32, 50,121, 31,254,192,114,238,
-134, 65,156, 49, 56,231,212,136,128, 49, 12, 93, 39, 82, 20, 26, 99,164, 42, 10,198, 16, 40,178, 97, 35,155,205, 70,139,178, 20,
-128,194, 57,196, 90,140,  8,154, 18,137, 36, 34,194, 56,120, 29,135,  1,  1,156,115, 84, 85, 37,154,192, 24,  8, 41,177, 89,175,
-105,219, 22, 85,212, 90, 97,179,233,181,169, 74, 66,138,146,141,108,161, 40, 44,206, 58,214,221, 26, 99, 44, 70, 84,196, 90, 74,
- 87, 18, 99, 36,133, 64, 72,138,115, 86, 99,140, 18, 85, 41,157,197,217, 82, 49, 16, 83, 82,141,145,190,239,217, 90, 44,216,116,
-157, 44, 22, 45, 49,  6, 48, 78, 37, 65,212,160,198, 89,192,144, 98, 22, 59, 35, 14,107, 21, 99, 10, 82,  8, 58,248,  0, 32, 49,
-  6, 93, 44, 22,144,146, 36,178, 71,102,173,232,224,189, 24,177,140,227,136,181,  5,206, 57, 25,135, 78,155, 69, 67,142,168, 41,
- 26, 19,117,211,208,111, 54, 84, 85, 35, 98, 64, 99,162, 31,123, 10, 91, 80, 55,181,238,238,238, 97,157,101,217, 46,  4,  3,187,
-171, 21, 86,132,197,162, 21,128,148,162, 12,195,  0,  8,206, 57, 84, 85,187,110, 96,107,185, 64,172, 37,248,128,177, 22,163,199,
-188,171,148,  2,128,218,201,203,240, 62,104, 24, 71, 73,192, 56, 14,  7,145, 44,107, 13,203,108,112,169,247, 35,195, 16,144,210,
-192,152,112,149,195, 90, 39, 67,215, 81, 20,165,122,239,137, 41, 49, 41, 56,144,175, 39,231,140, 84,101, 61,141,133,200, 56,122,
- 77,162, 16,243,100, 40, 34,186, 88, 44,241,126, 16, 68, 16, 21, 48, 16, 98, 16, 13,145,162, 40, 40,202,146, 77,215, 83, 90, 71,
-210,  4, 36,172, 41,116,211,109,168,170, 74, 68,  4,  3,132,148,164,180,150,110, 24, 36,105,142, 60, 44,182, 22, 18, 98,196, 88,
- 97,179,187, 66, 21, 92, 81,176, 88, 44, 64, 19,155,205,154,170,170, 25,134, 17, 65, 16, 35, 90, 56, 71,136,  1, 17,209, 16,  3,
-133, 41,168,154,138,164,137,148, 18,130, 48,142,163, 24, 43,106, 77,  9,154,136, 36, 73, 49, 97,109,193,166, 91, 97,129,160, 42,
-154,178,149, 97,173,209,182,173,136, 94,212, 71,143,100, 71, 75,125,  8, 32,164,182,173,113,174, 84,213, 68, 74,  0,137,148,208,
-113, 28,178,240, 85, 21, 49, 70,134,161, 71, 68,196, 90,145,188,157, 76, 17, 58,161,105, 26,  0, 25,199, 81,124,244, 82,216, 98,
- 26,163, 81,178,  1,218,  2,176, 90,173,180,109, 91,140, 49, 12,195, 32,206, 57, 68,132,190,239, 85, 85, 85,140, 96,197,128,  8,
- 34, 66, 81, 56,196, 58,242,133, 37,144,144,170,168,136,154,164, 31,123,141,222, 75, 85, 53,196, 24,113,206,202, 56,246,120, 31,
-  1,149,186,170, 53,169, 82, 20,133, 24,107,114,196, 67,149, 20, 35,131, 15, 44, 23, 45,125,215, 49, 70,207,178, 89,178, 90,175,
- 40,203, 18, 99, 12,155,174, 87, 52, 81, 85, 21, 85, 85,146,146,234, 56,142, 58, 12,  3,198, 24,150,203,101,158,159,140, 21, 77,
-138, 78,194,218,117, 29,198,136,198,144, 72,154, 16,201, 81,140,170, 46,137, 97,196, 90,155,181, 99,211, 51,122, 79,  8, 65,197,
- 90,170,170,148,182,174,177,206, 73,214,184, 32,125,223,211,182, 53, 32, 28, 61,122, 84,151,203, 37, 41, 68, 70, 63,238,183, 83,
-167, 40, 10, 93,215,163, 49, 18, 82,226,162,139, 46,202,199, 85, 19,138, 64, 10, 36, 17,  9, 49,137,181, 22,121,201,203, 94,166,
-154, 18, 26,  2,106,114, 40, 72, 21, 22,203, 45,156,115, 32,249, 98,213, 28,162, 96,140, 30, 63,122,194, 48, 16, 83,162,110, 27,
- 70, 31, 89,182,205, 36,202,142,123,143, 28, 33,198,136,166,124,208,178,244,  9,193,143,132,152, 88,110,109,145, 82,160, 31,  3,
-190,239, 73,170, 88, 17,140,179,108,111,111, 79, 94,238,100,163,168, 34, 42,136,217, 23,148, 60, 57, 85, 77,133,152, 28,126,242,
-227,128,181,142, 20, 19, 42,121,123,235,242, 69,108,139,130,189,221, 85, 54, 50, 80, 82, 84, 72,  9,146,130, 81,150, 91, 75,  4,
-131,170,178,183,183, 55, 89,113,  6,149,156, 99, 72, 41, 79, 66, 34,134,162,172,104,155,  6, 65, 80, 32,169, 50,133,222, 81,160,
-219, 91,145, 82, 68,156,163, 42, 10, 98,140,172, 54, 27,218,186,158,250, 18, 89,119,  3, 26, 35, 34,194, 98,185,196,218, 28,161,
-  0,195,106,111,143, 16, 98, 54,128,242,164,  4, 34,185,207, 34, 56, 91,176,189,179,  4,  4,146,210, 13,  3,214,  8,133, 43, 88,
-173, 86,104, 74,168,  1,107, 44,203,229, 18,200,231,211,199,  8,  9,202,210, 98,140, 67,140,224,135,145,132, 82, 85, 21,193,135,
-233,194, 27,104,218, 26, 77,202,222,122,143,182,110, 89,111,214,180,117,155,207, 39, 74,140,158,177, 31, 40,155,150,166,174,177,
-214,230,118,  2, 73, 19,123,123, 43, 68,148,237,157,139,176,  2,171,213,  6, 69,169,202, 44,140, 34,146,197,218, 24,214,235, 53,
-  0, 91, 91, 91,232,116, 44, 55,235, 53,198,185, 28, 62,  3, 48,134,173,169, 47,171,205,134,229,162,  1, 21, 54, 93, 71,221,180,
-  4, 63, 48,142, 30, 16, 22,109,  3,228,243,168,170,217, 28,145, 44,214,227,152,207,211, 56, 14,136, 24,118,118,182,  9, 33, 32,
-214, 50,246, 61, 34,194, 16,  6, 22,245,130, 76,  2, 76,158,140, 37,143,191,253,126,122,239, 17, 85,162, 42, 67,223,231,107,196,
-  0, 10,139,186,101,211,119, 52,109, 75, 97, 76, 30,115, 33,226,156,101,244,129,178,112,132,152, 24, 71, 79, 89,150,244,125,143,
-155, 38,250,220,190,145,186,174,  8, 49,224,140, 35,  1,195,102,195, 98,177, 64,140,193,251,  0, 10,198, 57, 52,142, 24, 87,162,
- 40,171,189, 61,170,210, 81,149, 21, 73,132, 20,  2, 34, 57,245,162,154, 64,133,193, 15, 56,235, 40,171,138, 16, 19,  6,176, 86,
- 16, 99,217,172, 54,212, 77,193,166, 31, 40, 93,193, 48, 14,184,178,162,176,197,254,  4,157,195,230, 97,196,  7, 79,158,156, 45,
-206, 88,198, 56,210, 84, 53,198, 22,120, 63, 96,172, 99, 28,122, 82, 74,108, 45,183,240,126,160, 31, 70,202,162,156,246, 17, 32,
-101,  3,192,185, 50,143,137,186, 96,181,183,162, 46, 74,108, 89,128, 66,240, 99,182,202, 84, 48,206,128, 24,178,  5, 33, 24, 53,
-172,214, 43, 76, 30, 36,121,110,136, 74,210, 72,223, 15, 32, 89, 96,147, 38,172,  8, 93, 63, 80, 55, 21,214, 88,114,148, 47,208,
-173,215,212, 85,147, 39,228, 20,243, 28,152,  4,159, 60,209, 71,218, 69,203, 24,  3,206, 90, 98,  8,248, 16,105,234,138, 20, 82,
-158,219,138,130,126, 24,105,202, 10, 77,145,189,161,195, 21, 21,133,115, 12,126,192, 96, 72, 49,178,181,179,133, 32,244, 99,143,
-115,150, 20, 66,190, 14,167,241,100,140, 33,140, 35,221, 48, 96, 68,136,192,114,177, 32,134, 44, 34,  2, 96, 13, 77,189,152, 28,
-131, 60, 23,199,148,144,  4,166, 48,168, 26,186,245, 30,139,197,130,245,122, 77,219, 44, 48,162,140, 33, 18, 99,160, 40, 74,186,
-174,163, 40,242,245, 90,215, 53,195, 56, 98, 39, 67,123, 24,  6,140, 43,113, 70, 41,138, 44,242,217,  0, 99,186,198,243, 85,161,
- 73, 73,170, 32, 16, 98,160,116, 37, 10,244,253,128,160, 52, 77,195,238,238, 46,144,175,235,174,235, 24,135,129,168,202, 98,185,
-192, 24, 11, 41, 29, 24,119, 41, 37,140, 49, 24, 35,140, 33,226, 68,  8, 33,224,202,146,178, 40, 88,175, 87,148, 69,137,154, 44,
-148,170,138,117,118,138,218, 66,223,247, 68,141, 44,218,  5,155,110,147, 67,236, 70,216,217,218, 38,248,128,143,121,172,146,229,
-100,210, 55,  5, 99, 80,141,132, 49,167,135,114,152, 32,191, 87,215, 37, 77,211, 98, 93,113,112,142, 66,  8, 56,235,  8,193,179,
-187,187, 59, 69, 60, 18, 85, 85, 83, 20,  5,198, 76,115,196,100,112,174, 86,107,186,126,147,175, 11, 99,  8,