merge from trunk #37722
authorXiao Xiangquan <xiaoxiangquan@gmail.com>
Fri, 24 Jun 2011 03:30:50 +0000 (03:30 +0000)
committerXiao Xiangquan <xiaoxiangquan@gmail.com>
Fri, 24 Jun 2011 03:30:50 +0000 (03:30 +0000)
219 files changed:
CMakeLists.txt
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: 0755]
build_files/cmake/Modules/FindJack.cmake [new file with mode: 0755]
build_files/cmake/Modules/FindJeMalloc.cmake [new file with mode: 0755]
build_files/cmake/Modules/FindOpenEXR.cmake [new file with mode: 0755]
build_files/cmake/Modules/FindOpenJPEG.cmake [new file with mode: 0755]
build_files/cmake/Modules/FindPythonLibsUnix.cmake [new file with mode: 0755]
build_files/cmake/Modules/FindSamplerate.cmake [new file with mode: 0755]
build_files/cmake/Modules/FindSndFile.cmake [new file with mode: 0755]
build_files/cmake/cmake_consistency_check.py
build_files/cmake/macros.cmake
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/bpy.props.4.py [new file with mode: 0755]
doc/python_api/rst/bge.logic.rst
doc/python_api/rst/bge.types.rst
extern/bullet2/CMakeLists.txt
extern/libopenjpeg/CMakeLists.txt
intern/audaspace/CMakeLists.txt
intern/elbeem/extern/elbeem.h
intern/elbeem/intern/simulation_object.cpp
intern/elbeem/intern/solver_class.h
intern/elbeem/intern/solver_init.cpp
intern/elbeem/intern/solver_interface.h
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/console/intellisense.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_align.py
release/scripts/startup/bl_operators/object_quick_effects.py
release/scripts/startup/bl_operators/object_randomize_transform.py
release/scripts/startup/bl_operators/uvcalc_smart_project.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_object_constraint.py
release/scripts/startup/bl_ui/properties_physics_fluid.py
release/scripts/startup/bl_ui/space_sequencer.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/blenfont/intern/blf_lang.c
source/blender/blenkernel/BKE_action.h
source/blender/blenkernel/BKE_blender.h
source/blender/blenkernel/BKE_depsgraph.h
source/blender/blenkernel/BKE_displist.h
source/blender/blenkernel/BKE_particle.h
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/depsgraph_private.h
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/bvhutils.c
source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/sca.c
source/blender/blenlib/CMakeLists.txt
source/blender/blenloader/intern/readfile.c
source/blender/blenpluginapi/CMakeLists.txt
source/blender/blenpluginapi/iff.h
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/animation/anim_markers.c
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.c
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/interface_widgets.c
source/blender/editors/interface/resources.c
source/blender/editors/interface/view2d.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/mesh_data.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_bake.c
source/blender/editors/object/object_modifier.c
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_transform.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/physics/physics_fluid.c
source/blender/editors/render/CMakeLists.txt
source/blender/editors/render/render_internal.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_draw.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_image/image_buttons.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_intern.h
source/blender/editors/space_node/space_node.c
source/blender/editors/space_outliner/outliner.c
source/blender/editors/space_sequencer/sequencer_add.c
source/blender/editors/space_sequencer/sequencer_edit.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_edit.c
source/blender/editors/space_view3d/view3d_intern.h
source/blender/editors/transform/transform.h
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_snap.c
source/blender/editors/util/ed_util.c
source/blender/editors/util/undo.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/gpu/GPU_draw.h
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/intern/gpu_material.c
source/blender/imbuf/CMakeLists.txt
source/blender/imbuf/IMB_imbuf.h
source/blender/imbuf/intern/openexr/CMakeLists.txt
source/blender/imbuf/intern/openexr/openexr_api.cpp
source/blender/imbuf/intern/rectop.c
source/blender/imbuf/intern/util.c
source/blender/makesdna/DNA_actuator_types.h
source/blender/makesdna/DNA_object_fluidsim.h
source/blender/makesdna/DNA_object_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_space_types.h
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_actuator.c
source/blender/makesrna/intern/rna_camera.c
source/blender/makesrna/intern/rna_controller.c
source/blender/makesrna/intern/rna_fluidsim.c
source/blender/makesrna/intern/rna_group.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_texture.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/modifiers/intern/MOD_explode.c
source/blender/modifiers/intern/MOD_fluidsim_util.c
source/blender/modifiers/intern/MOD_mask.c
source/blender/nodes/intern/SHD_nodes/SHD_material.c
source/blender/python/generic/IDProp.c
source/blender/python/generic/IDProp.h
source/blender/python/generic/mathutils_Vector.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_interface.c
source/blender/python/intern/bpy_intern_string.c [new file with mode: 0755]
source/blender/python/intern/bpy_intern_string.h [new file with mode: 0755]
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/render/CMakeLists.txt
source/blender/render/extern/include/RE_pipeline.h
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/zbuf.c
source/blender/windowmanager/CMakeLists.txt
source/blender/windowmanager/intern/wm_init_exit.c
source/blender/windowmanager/intern/wm_operators.c
source/creator/CMakeLists.txt
source/gameengine/Converter/BL_ActionActuator.cpp
source/gameengine/Converter/KX_ConvertActuators.cpp
source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
source/gameengine/GameLogic/SCA_2DFilterActuator.h
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
source/gameengine/Ketsji/BL_Texture.cpp
source/gameengine/Ketsji/KX_Camera.cpp
source/gameengine/Ketsji/KX_CameraActuator.cpp
source/gameengine/Ketsji/KX_CameraActuator.h
source/gameengine/Physics/Bullet/CcdPhysicsController.h
source/gameengine/VideoTexture/CMakeLists.txt

index e9a72cf6e51cfa89c02e78c1aded6e8711a6b0fe..52773a40ce351100731cdf4b54549c37d96c13b5 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)
@@ -223,9 +228,6 @@ if(WITH_PYTHON_MODULE)
        set(WITH_HEADLESS ON)
 endif()
 
-# remove old vars
-unset(WITH_INSTALL CACHE)
-
 TEST_SSE_SUPPORT()
 
 #-----------------------------------------------------------------------------
@@ -234,6 +236,9 @@ TEST_SSE_SUPPORT()
 # linux only, not cached
 set(WITH_BINRELOC OFF)
 
+# MAXOSX only, set to avoid uninitialized 
+set(EXETYPE "")
+
 # these are added to later on.
 set(C_WARNINGS "")
 set(CXX_WARNINGS "")
@@ -246,13 +251,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 +272,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,71 +328,71 @@ if(UNIX AND NOT APPLE)
                endif()
        endif()
 
-       if(WITH_IMAGE_OPENEXR)
-               set(OPENEXR /usr CACHE FILEPATH "OPENEXR Directory")
-               mark_as_advanced(OPENEXR)
-               find_path(OPENEXR_INC
-                       ImfXdr.h
-                       PATHS
-                       ${OPENEXR}/include/OpenEXR
-                       /usr/local/include/OpenEXR
-                       /sw/include/OpenEXR
-                       /opt/local/include/OpenEXR
-                       /opt/csw/include/OpenEXR
-                       /opt/include/OpenEXR
-               )
-               mark_as_advanced(OPENEXR_INC)
-
-               set(OPENEXR_LIB Half IlmImf Iex Imath)
-               
-               if(NOT OPENEXR_INC)
-                       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)
@@ -419,12 +406,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
@@ -446,10 +431,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()
@@ -502,16 +485,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")
@@ -533,9 +516,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)
@@ -547,8 +530,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()
 
@@ -611,9 +594,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)
@@ -622,31 +605,41 @@ 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()
 
                if(WITH_IMAGE_OPENEXR)
-                       if(MSVC80)
-                               set(MSVC_LIB _vs2005)
-                               set(MSVC_INC)
-                       elseif(MSVC90)
+                       if(MSVC90)
                                set(MSVC_LIB _vs2008)
                                set(MSVC_INC)
                        elseif(MSVC10)
@@ -656,11 +649,24 @@ elseif(WIN32)
                                set(MSVC_LIB msvc)
                                set(MSVC_INC)
                        endif()
-                       set(OPENEXR ${LIBDIR}/openexr)                  
-                       set(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
+                       set(OPENEXR ${LIBDIR}/openexr)
                        set(OPENEXR_LIBPATH ${OPENEXR}/lib${MSVC_LIB})
+                       set(OPENEXR_LIBRARIES
+                               ${OPENEXR_LIBPATH}/Iex.lib
+                               ${OPENEXR_LIBPATH}/Half.lib
+                               ${OPENEXR_LIBPATH}/IlmImf.lib
+                               ${OPENEXR_LIBPATH}/Imath.lib
+                               ${OPENEXR_LIBPATH}/IlmThread.lib
+                       )
                        set(OPENEXR_INCUDE ${OPENEXR}/include${MSVC_INC})
-                       set(OPENEXR_INC ${OPENEXR_INCUDE}/ ${OPENEXR_INCUDE}/IlmImf ${OPENEXR_INCUDE}/Iex ${OPENEXR_INCUDE}/Imath)
+                       set(OPENEXR_INCLUDE_DIRS
+                               ${OPENEXR_INCUDE}
+                               ${OPENEXR_INCUDE}/IlmImf
+                               ${OPENEXR_INCUDE}/Iex
+                               ${OPENEXR_INCUDE}/Imath
+                       )
+                       unset(OPENEXR_INCUDE)
+                       unset(OPENEXR_LIBPATH)
                endif()
 
                if(WITH_IMAGE_TIFF)
@@ -672,18 +678,16 @@ 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
@@ -726,9 +730,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)
@@ -737,30 +741,30 @@ 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()
 
                if(WITH_IMAGE_OPENEXR)
                        set(OPENEXR ${LIBDIR}/gcc/openexr)
-                       set(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/OpenEXR)
-                       set(OPENEXR_LIB Half IlmImf Imath IlmThread)
+                       set(OPENEXR_INCLUDE_DIRS ${OPENEXR}/include/OpenEXR)
+                       set(OPENEXR_LIBRARIES Half IlmImf Imath IlmThread)
                        set(OPENEXR_LIBPATH ${OPENEXR}/lib)
 
                        # TODO, gives linking errors, force off
@@ -776,8 +780,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
@@ -789,7 +793,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 python32mw)
                        set(PYTHON_LIBPATH ${PYTHON}/lib)
                endif()
 
@@ -798,7 +802,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)
 
@@ -829,16 +833,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)
@@ -849,7 +853,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()
@@ -859,7 +863,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()
@@ -873,8 +877,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()
 
@@ -892,24 +896,24 @@ elseif(APPLE)
 
        if(WITH_IMAGE_OPENEXR)
                set(OPENEXR ${LIBDIR}/openexr)
-               set(OPENEXR_INC ${OPENEXR}/include/OpenEXR ${OPENEXR}/include)
-               set(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
+               set(OPENEXR_INCLUDE_DIRS ${OPENEXR}/include/OpenEXR)
+               set(OPENEXR_LIBRARIES Iex Half IlmImf Imath IlmThread)
                set(OPENEXR_LIBPATH ${OPENEXR}/lib)
        endif()
 
        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)
@@ -934,9 +938,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)
@@ -1012,13 +1016,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()
 
@@ -1188,3 +1188,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 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 2554b8a..0000000
+++ /dev/null
@@ -1,81 +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)
-       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)
-       
-endif()
-
-unset(_Python_ABI_FLAGS)
-unset(_Python_PATHS)
-
-#=============================================================================
-# now the python versions are found
-
-
-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 "")
-
-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 100755 (executable)
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 100755 (executable)
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 100755 (executable)
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
+)
diff --git a/build_files/cmake/Modules/FindOpenEXR.cmake b/build_files/cmake/Modules/FindOpenEXR.cmake
new file mode 100755 (executable)
index 0000000..546f690
--- /dev/null
@@ -0,0 +1,92 @@
+# - Find OpenEXR library
+# Find the native OpenEXR includes and library
+# This module defines
+#  OPENEXR_INCLUDE_DIRS, where to find ImfXdr.h, etc. Set when
+#                        OPENEXR_INCLUDE_DIR is found.
+#  OPENEXR_LIBRARIES, libraries to link against to use OpenEXR.
+#  OPENEXR_ROOT_DIR, The base directory to search for OpenEXR.
+#                    This can also be an environment variable.
+#  OPENEXR_FOUND, If false, do not try to use OpenEXR.
+#
+# For indervidual library access these advanced settings are available
+#  OPENEXR_HALF_LIBRARY, Path to Half library
+#  OPENEXR_IEX_LIBRARY, Path to Half library
+#  OPENEXR_ILMIMF_LIBRARY, Path to Ilmimf library
+#  OPENEXR_ILMTHREAD_LIBRARY, Path to IlmThread library
+#  OPENEXR_IMATH_LIBRARY, Path to Imath library
+#
+# also defined, but not for general use are
+#  OPENEXR_LIBRARY, where to find the OpenEXR 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 OPENEXR_ROOT_DIR was defined in the environment, use it.
+IF(NOT OPENEXR_ROOT_DIR AND NOT $ENV{OPENEXR_ROOT_DIR} STREQUAL "")
+  SET(OPENEXR_ROOT_DIR $ENV{OPENEXR_ROOT_DIR})
+ENDIF()
+
+SET(_openexr_FIND_COMPONENTS
+  Half
+  Iex
+  IlmImf
+  IlmThread
+  Imath
+)
+
+SET(_openexr_SEARCH_DIRS
+  ${OPENEXR_ROOT_DIR}
+  /usr/local
+  /sw # Fink
+  /opt/local # DarwinPorts
+  /opt/csw # Blastwave
+)
+
+FIND_PATH(OPENEXR_INCLUDE_DIR
+  NAMES
+    ImfXdr.h
+  HINTS
+    ${_openexr_SEARCH_DIRS}
+  PATH_SUFFIXES
+    include/OpenEXR
+)
+
+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
+    )
+  LIST(APPEND _openexr_LIBRARIES "${OPENEXR_${UPPERCOMPONENT}_LIBRARY}")
+ENDFOREACH()
+
+# handle the QUIETLY and REQUIRED arguments and set OPENEXR_FOUND to TRUE if 
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR  DEFAULT_MSG
+    _openexr_LIBRARIES OPENEXR_INCLUDE_DIR)
+
+IF(OPENEXR_FOUND)
+  SET(OPENEXR_LIBRARIES ${_openexr_LIBRARIES})
+  SET(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR})
+ENDIF()
+
+MARK_AS_ADVANCED(OPENEXR_INCLUDE_DIR)
+FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
+  STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
+  MARK_AS_ADVANCED(OPENEXR_${UPPERCOMPONENT}_LIBRARY)
+ENDFOREACH()
diff --git a/build_files/cmake/Modules/FindOpenJPEG.cmake b/build_files/cmake/Modules/FindOpenJPEG.cmake
new file mode 100755 (executable)
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 100755 (executable)
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 100755 (executable)
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 100755 (executable)
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 f55b2e95d5e36c02e9fd96b44f2bba337d543a3c..ebcc75ade2b4ee323b0368f5138605ef77717818 100755 (executable)
 
 # <pep8 compliant>
 
-IGNORE = \
-    "/test/",\
-    "/decimate_glut_test/",\
-    "/BSP_GhostTest/",\
-    "/release/",\
-    "/xembed/",\
-    "/decimation/intern/future/",\
-    "/TerraplayNetwork/",\
-    "/ik_glut_test/"
+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"
+    )
+
 
 import os
 from os.path import join, dirname, normpath, abspath, splitext
@@ -104,7 +138,7 @@ def cmake_get_src(f):
                     found = True
                     break
 
-                if "list(APPEND SRC" in l:
+                if "list(APPEND SRC" in l or ('list(APPEND ' in l and l.endswith("SRC")):
                     if l.endswith(")"):
                         raise Exception("strict formatting not kept 'list(APPEND SRC...)' on 1 line %s:%d" % (f, i))
                     found = True
@@ -136,7 +170,9 @@ def cmake_get_src(f):
                     if not l:
                         pass
                     elif l.startswith("$"):
-                        print("Cant use var '%s' %s:%d" % (l, f, i))
+                        # assume if it ends with SRC we know about it
+                        if not l.split("}")[0].endswith("SRC"):
+                            print("Can't use var '%s' %s:%d" % (l, f, i))
                     elif len(l.split()) > 1:
                         raise Exception("Multi-line define '%s' %s:%d" % (l, f, i))
                     else:
index 6c6621b74668d7b8b9de8277f501ac0032bdded7..bb3761d45396d26fcd541a09df07bf71c97daf94 100644 (file)
@@ -1,6 +1,44 @@
 # -*- 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()
+
 # 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 +75,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 +165,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})
@@ -150,17 +188,26 @@ macro(setup_liblinks
        target)
        set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS} ")
 
-       target_link_libraries(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${LLIBS})
+       target_link_libraries(${target}
+                       ${OPENGL_gl_LIBRARY}
+                       ${OPENGL_glu_LIBRARY}
+                       ${JPEG_LIBRARIES}
+                       ${PNG_LIBRARIES}
+                       ${ZLIB_LIBRARIES}
+                       ${LLIBS})
 
        # since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions
        if(WITH_PYTHON)  # AND NOT WITH_PYTHON_MODULE  # WIN32 needs
                target_link_libraries(${target} ${PYTHON_LINKFLAGS})
 
                if(WIN32 AND NOT UNIX)
-                       target_link_libraries(${target} debug ${PYTHON_LIBRARY}_d)
-                       target_link_libraries(${target} optimized ${PYTHON_LIBRARY})
+                       file_list_suffix(PYTHON_LIBRARIES_DEBUG "${PYTHON_LIBRARIES}" "_d")
+                       target_link_libraries(${target}
+                                       debug ${PYTHON_LIBRARIES_DEBUG}
+                                       optimized ${PYTHON_LIBRARIES})
+                       unset(PYTHON_LIBRARIES_DEBUG)
                else()
-                       target_link_libraries(${target} ${PYTHON_LIBRARY})
+                       target_link_libraries(${target} ${PYTHON_LIBRARIES})
                endif()
        endif()
 
@@ -168,14 +215,18 @@ macro(setup_liblinks
                target_link_libraries(${target} ${GLEW_LIBRARY})
        endif()
 
-       target_link_libraries(${target} ${OPENGL_glu_LIBRARY} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES})
-       target_link_libraries(${target} ${FREETYPE_LIBRARY})
+       target_link_libraries(${target}
+                       ${OPENGL_glu_LIBRARY}
+                       ${JPEG_LIBRARIES}
+                       ${PNG_LIBRARIES}
+                       ${ZLIB_LIBRARIES}
+                       ${FREETYPE_LIBRARY})
 
        if(WITH_INTERNATIONAL)
                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()
 
@@ -183,67 +234,76 @@ 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_LIB})
-                               target_link_libraries(${target} debug ${_LOOP_VAR}_d)
-                               target_link_libraries(${target} optimized ${_LOOP_VAR})
-                       endforeach()
-                       unset(_LOOP_VAR)
+                       file_list_suffix(OPENEXR_LIBRARIES_DEBUG "${OPENEXR_LIBRARIES}" "_d")
+                       target_link_libraries(${target}
+                                       debug ${OPENEXR_LIBRARIES_DEBUG}
+                                       optimized ${OPENEXR_LIBRARIES})
+                       unset(OPENEXR_LIBRARIES_DEBUG)
                else()
-                       target_link_libraries(${target} ${OPENEXR_LIB})
+                       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)
-                               target_link_libraries(${target} optimized ${_LOOP_VAR})
-                       endforeach()
-                       unset(_LOOP_VAR)
-                       target_link_libraries(${target} debug ${PCRE_LIB}_d)
-                       target_link_libraries(${target} optimized ${PCRE_LIB})
+                       file_list_suffix(OPENCOLLADA_LIBRARIES_DEBUG "${OPENCOLLADA_LIBRARIES}" "_d")
+                       target_link_libraries(${target}
+                                       debug ${OPENCOLLADA_LIBRARIES_DEBUG}
+                                       optimized ${OPENCOLLADA_LIBRARIES})
+                       unset(OPENCOLLADA_LIBRARIES_DEBUG)
+
+                       file_list_suffix(PCRE_LIB_DEBUG "${PCRE_LIB}" "_d")
+                       target_link_libraries(${target}
+                                       debug ${PCRE_LIB_DEBUG}
+                                       optimized ${PCRE_LIB})
+                       unset(PCRE_LIB_DEBUG)
+
                        if(EXPAT_LIB)
-                               target_link_libraries(${target} debug ${EXPAT_LIB}_d)
-                               target_link_libraries(${target} optimized ${EXPAT_LIB})
+                               file_list_suffix(EXPAT_LIB_DEBUG "${EXPAT_LIB}" "_d")
+                               target_link_libraries(${target}
+                                               debug ${EXPAT_LIB_DEBUG}
+                                               optimized ${EXPAT_LIB})
+                               unset(EXPAT_LIB_DEBUG)
                        endif()
                else()
-                       target_link_libraries(${target} ${OPENCOLLADA_LIB})
-                       target_link_libraries(${target} ${PCRE_LIB})
-                       target_link_libraries(${target} ${EXPAT_LIB})
+                       target_link_libraries(${target}
+                                       ${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()
 
@@ -484,8 +544,8 @@ macro(blender_project_hack_post)
        unset(_reset_standard_cflags_rel)
        unset(_reset_standard_cxxflags_rel)
 
-       # --------------------------------------------------
-       # workaround for omission in cmake 2.8.4's GNU.cmake
+       # ------------------------------------------------------------------
+       # workaround for omission in cmake 2.8.4's GNU.cmake, fixed in 2.8.5
        if(CMAKE_COMPILER_IS_GNUCC)
                if(NOT DARWIN)
                        set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ")
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 a0dade8bdf67a84ad7c470a9bcc213f668c5a0f4..e46b5269d22f643c219a5820d6631bea6ac78891 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'
@@ -118,7 +118,7 @@ BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
 BF_FREETYPE_LIB = 'freetype2ST'
 BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
 
-WITH_BF_QUICKTIME = True # -DWITH_QUICKTIME
+WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
 BF_QUICKTIME = LIBDIR + '/QTDevWin'
 BF_QUICKTIME_INC = '${BF_QUICKTIME}/CIncludes'
 BF_QUICKTIME_LIB = 'qtmlClient'
@@ -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..45a4ea5b178eb82068de09b5b725a8b5d05b497d 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'
@@ -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/bpy.props.4.py b/doc/python_api/examples/bpy.props.4.py
new file mode 100755 (executable)
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 20a3a68b387d558bb93b11f2482ef8bbb750416c..0af4a1184d6cff20670aef013c3cbab1d028f815 100644 (file)
@@ -345,9 +345,9 @@ Utility functions
 
 .. function:: getAverageFrameRate()
 
-   Gets the estimated average framerate
-   
-   :return: The estimed average framerate in frames per second
+   Gets the estimated/average framerate for all the active scenes, not only the current scene.
+
+   :return: The estimated average framerate in frames per second
    :rtype: float
 
 .. function:: getBlendFileList(path = "//")
index b54eca07e552f0cbc471182208d377d28d13ff6c..e42b362c771df5d2eb39368e5c3f7dc926f64819 100644 (file)
@@ -710,6 +710,12 @@ Game Engine  bge.types Module
 
    Applies changes to a camera.
 
+   .. attribute:: damping
+
+      strength of of the camera following movement.
+
+      :type: float
+   
    .. attribute:: min
 
       minimum distance to the target object maintained by the actuator.
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 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 f5538df88054d4588a68efd8a8c4898e7a026865..6df08ccebd2e44d7435304d3204a96d6161e6fdf 100644 (file)
@@ -77,6 +77,10 @@ typedef struct elbeemSimulationSettings {
        /* boundary types and settings for domain walls */
        short domainobsType;
        float domainobsPartslip;
+
+       /* what surfaces to generate */
+       int mFsSurfGenSetting;
+
        /* generate speed vectors for vertices (e.g. for image based motion blur)*/
        short generateVertexVectors;
        /* strength of surface smoothing */
@@ -108,10 +112,12 @@ typedef struct elbeemSimulationSettings {
 #define OB_FLUIDSIM_PARTICLE    64
 #define OB_FLUIDSIM_CONTROL    128
 
-// defines for elbeemMesh->obstacleType below
+// defines for elbeemMesh->obstacleType below (low bits) high bits (>=64) are reserved for mFsSurfGenSetting flags which are defined in solver_class.h
 #define FLUIDSIM_OBSTACLE_NOSLIP     1
 #define FLUIDSIM_OBSTACLE_PARTSLIP   2
 #define FLUIDSIM_OBSTACLE_FREESLIP   3
+#define FLUIDSIM_FSSG_NOOBS                     64
+
 
 #define OB_VOLUMEINIT_VOLUME 1
 #define OB_VOLUMEINIT_SHELL  2
index 2544b8fe29c6272e79324b1c802ff03ff0fc7526..87828b260888a075b2f7ffe0c92b7d649b4db064 100644 (file)
@@ -181,6 +181,9 @@ int SimulationObject::initializeLbmSimulation(ntlRenderGlobals *glob)
                mpLbm->setGenerateParticles(mpElbeemSettings->generateParticles);
                // set initial particles
                mpParts->setNumInitialParticles(mpElbeemSettings->numTracerParticles);
+               
+               // surface generation flag
+               mpLbm->setSurfGenSettings(mpElbeemSettings->mFsSurfGenSetting);
 
                string dinitType = string("no");
                if     (mpElbeemSettings->domainobsType==FLUIDSIM_OBSTACLE_PARTSLIP) dinitType = string("part"); 
index 8662ac3f12a1d6eb9cccbdd0baa929c2becc8f12..1548aaa19bc60d53cadb86c22f8361e5f91dae13 100644 (file)
@@ -308,6 +308,9 @@ class LbmFsgrSolver :
                //! for raytracing, preprocess
                void prepareVisualization( void );
 
+               /* surface generation settings */
+               virtual void setSurfGenSettings(short value);
+
        protected:
 
                //! internal quick print function (for debugging) 
index 899b1e0ecbc64f9b747b5f446edfd17355958852..7e9f5e7f4202e0d085d925623ecb05e74ceaae3b 100644 (file)
@@ -538,6 +538,15 @@ void LbmFsgrSolver::parseAttrList()
 }
 
 
+/******************************************************************************
+ * (part of enabling chapter 6 of "Free Surface Flows with Moving and Deforming Objects for LBM")
+ *****************************************************************************/
+void LbmFsgrSolver::setSurfGenSettings(short value)
+{
+       mFsSurfGenSetting = value;
+}
+
+
 /******************************************************************************
  * Initialize omegas and forces on all levels (for init/timestep change)
  *****************************************************************************/
index 71b347d683dafc6305e726393fa497cd246ddb85..8f3181a307d314c58775367a2796e14e3586d466 100644 (file)
@@ -271,6 +271,9 @@ class LbmSolverInterface
                /*! debug object display */
                virtual vector<ntlGeometryObject*> getDebugObjects() { vector<ntlGeometryObject*> empty(0); return empty; }
 
+               /* surface generation settings */
+               virtual void setSurfGenSettings(short value) = 0;
+
 #if LBM_USE_GUI==1
                /*! show simulation info */
                virtual void debugDisplay(int) = 0;
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 45f537ebd2fb4ce9a77a4ab2746bb2574653838c..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]) + \
@@ -114,6 +115,8 @@ def location_3d_to_region_2d(region, rv3d, coord):
     :return: 2d location
     :rtype: :class:`Vector`
     """
+    from mathutils import Vector
+
     prj = Vector((coord[0], coord[1], coord[2], 1.0)) * rv3d.perspective_matrix
     if prj.w > 0.0:
         width_half = region.width / 2.0
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 00f7dbd3657b5d437dbbfbffc2cd7e78fa4dd275..072d467ff86855c10436ba9b4a6374085513e256 100644 (file)
@@ -120,22 +120,25 @@ def expand(line, cursor, namespace, private=True):
         from . import complete_calltip
         matches, word, scrollback = complete_calltip.complete(line,
             cursor, namespace)
+        prefix = os.path.commonprefix(matches)[len(word):]
         no_calltip = False
     else:
         matches, word = complete(line, cursor, namespace, private)
+        prefix = os.path.commonprefix(matches)[len(word):]
         if len(matches) == 1:
             scrollback = ''
         else:
             # causes blender bug [#27495] since string keys may contain '.'
             # scrollback = '  '.join([m.split('.')[-1] for m in matches])
+            word_prefix = word + prefix
             scrollback = '  '.join(
-                    [m[len(word):]
-                     if (word and m.startswith(word))
+                    [m[len(word_prefix):]
+                     if (word_prefix and m.startswith(word_prefix))
                      else m.split('.')[-1]
                      for m in matches])
 
         no_calltip = True
-    prefix = os.path.commonprefix(matches)[len(word):]
+
     if prefix:
         line = line[:cursor] + prefix + line[cursor:]
         cursor += len(prefix)
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 923ca92a16297d804f505838d2389c36b5acb18f..469e9015e62ebb77a0cc1d71d9857ab8aa7837eb 100644 (file)
 #
 # ##### END GPL LICENSE BLOCK #####
 
-# <pep8 compliant>
+# <pep8-80 compliant>
 
 import bpy
 
 
-def pose_info():
+def pose_frame_info(obj):
     from mathutils import Matrix
 
     info = {}
 
-    obj = bpy.context.object
     pose = obj.pose
 
     pose_items = pose.bones.items()
@@ -51,7 +50,6 @@ def pose_info():
         except:
             binfo["matrix_pose_inv"] = Matrix()
 
-        print(binfo["matrix_pose"])
         info[name] = binfo
 
     for name, pbone in pose_items:
@@ -67,45 +65,86 @@ def pose_info():
             matrix = binfo_parent["matrix_pose_inv"] * matrix
             rest_matrix = binfo_parent["matrix_local_inv"] * rest_matrix
 
-        matrix = rest_matrix.inverted() * matrix
+        binfo["matrix_key"] = rest_matrix.inverted() * matrix
+
+    return info
 
-        binfo["matrix_key"] = matrix.copy()
 
+def obj_frame_info(obj):
+    info = {}
+    # parent = obj.parent
+    info["matrix_key"] = obj.matrix_local.copy()
     return info
 
 
-def bake(frame_start, frame_end, step=1, only_selected=False):
+def bake(frame_start,
+         frame_end, step=1,
+         only_selected=False,
+         do_pose=True,
+         do_object=True,
+         do_constraint_clear=False,
+         ):
+
     scene = bpy.context.scene
     obj = bpy.context.object
     pose = obj.pose
+    frame_back = scene.frame_current
+
+    if pose is None:
+        do_pose = False
 
-    info_ls = []
+    if do_pose is None and do_object is None:
+        return None
+
+    pose_info = []
+    obj_info = []
 
     frame_range = range(frame_start, frame_end + 1, step)
 
-    # could spped this up by applying steps here too...
+    # -------------------------------------------------------------------------
+    # Collect transformations
+
+    # could speed this up by applying steps here too...
     for f in frame_range:
         scene.frame_set(f)
 
-        info = pose_info()
-        info_ls.append(info)
+        if do_pose:
+            pose_info.append(pose_frame_info(obj))
+        if do_object:
+            obj_info.append(obj_frame_info(obj))
+
         f += 1
 
+    # -------------------------------------------------------------------------
+    # Create action
+
+    # incase animation data hassnt been created
+    atd = obj.animation_data_create()
     action = bpy.data.actions.new("Action")
+    atd.action = action
 
-    bpy.context.object.animation_data.action = action
+    if do_pose:
+        pose_items = pose.bones.items()
+    else:
+        pose_items = []  # skip
 
-    pose_items = pose.bones.items()
+    # -------------------------------------------------------------------------
+    # Apply transformations to action
 
-    for name, pbone in pose_items:
+    # pose
+    for name, pbone in (pose_items if do_pose else ()):
         if only_selected and not pbone.bone.select:
             continue
 
+        if do_constraint_clear:
+            while pbone.constraints:
+                pbone.constraints.remove(pbone.constraints[0])
+
         for f in frame_range:
-            matrix = info_ls[int((f - frame_start) / step)][name]["matrix_key"]
+            matrix = pose_info[(f - frame_start) // step][name]["matrix_key"]
 
-            #pbone.location = matrix.to_translation()
-            #pbone.rotation_quaternion = matrix.to_quaternion()
+            # pbone.location = matrix.to_translation()
+            # pbone.rotation_quaternion = matrix.to_quaternion()
             pbone.matrix_basis = matrix
 
             pbone.keyframe_insert("location", -1, f, name)
@@ -121,10 +160,35 @@ def bake(frame_start, frame_end, step=1, only_selected=False):
 
             pbone.keyframe_insert("scale", -1, f, name)
 
+    # object. TODO. multiple objects
+    if do_object:
+        if do_constraint_clear:
+            while obj.constraints:
+                obj.constraints.remove(obj.constraints[0])
+
+        for f in frame_range:
+            matrix = obj_info[(f - frame_start) // step]["matrix_key"]
+            obj.matrix_local = matrix
+
+            obj.keyframe_insert("location", -1, f)
+
+            rotation_mode = obj.rotation_mode
+
+            if rotation_mode == 'QUATERNION':
+                obj.keyframe_insert("rotation_quaternion", -1, f)
+            elif rotation_mode == 'AXIS_ANGLE':
+                obj.keyframe_insert("rotation_axis_angle", -1, f)
+            else:  # euler, XYZ, ZXY etc
+                obj.keyframe_insert("rotation_euler", -1, f)
+
+            obj.keyframe_insert("scale", -1, f)
+
+    scene.frame_set(frame_back)
+
     return action
 
 
-from bpy.props import IntProperty, BoolProperty
+from bpy.props import IntProperty, BoolProperty, EnumProperty
 
 
 class BakeAction(bpy.types.Operator):
@@ -144,10 +208,31 @@ class BakeAction(bpy.types.Operator):
             default=1, min=1, max=120)
     only_selected = BoolProperty(name="Only Selected",
             default=True)
+    clear_consraints = BoolProperty(name="Clear Constraints",
+            default=False)
+    bake_types = EnumProperty(
+            name="Bake Data",
+            options={'ENUM_FLAG'},
+            items=(('POSE', "Pose", ""),
+                   ('OBJECT', "Object", ""),
+                   ),
+            default={'POSE'},
+            )
 
     def execute(self, context):
 
-        action = bake(self.frame_start, self.frame_end, self.step, self.only_selected)
+        action = bake(self.frame_start,
+                      self.frame_end,
+                      self.step,
+                      self.only_selected,
+                      'POSE' in self.bake_types,
+                      'OBJECT' in self.bake_types,
+                      self.clear_consraints,
+                      )
+
+        if action is None:
+            self.report({'INFO'}, "Nothing to bake")
+            return {'CANCELLED'}
 
         # basic cleanup, could move elsewhere
         for fcu in action.fcurves:
index 89b02fc98b05dbb3cfe921aa7761483016aef326..889972da53c0a3f81b46e16e54b4634ca083f555 100644 (file)
@@ -22,6 +22,7 @@ import bpy
 from mathutils import Vector
 from blf import gettext as _
 
+
 def align_objects(align_x, align_y, align_z, align_mode, relative_to):
 
     cursor = bpy.context.scene.cursor_location
index 21640fa3ee6bef24823f2d0eb099b8ac672807c6..a8bb3227b3c378eceaab9dc8c9baac6831c55a8a 100644 (file)
@@ -23,9 +23,26 @@ import bpy
 from bpy.props import BoolProperty, EnumProperty, IntProperty, FloatProperty, FloatVectorProperty
 
 
-class MakeFur(bpy.types.Operator):
-    bl_idname = "object.make_fur"
-    bl_label = "Make Fur"
+def object_ensure_material(obj, mat_name):
+    """ Use an existing material or add a new one.
+    """
+    mat = mat_slot = None
+    for mat_slot in obj.material_slots:
+        mat = mat_slot.material
+        if mat:
+            break
+    if mat is None:
+        mat = bpy.data.materials.new(mat_name)
+        if mat_slot:
+            mat_slot.material = mat
+        else:
+            obj.data.materials.append(mat)
+    return mat
+
+
+class QuickFur(bpy.types.Operator):
+    bl_idname = "object.quick_fur"
+    bl_label = "Quick Fur"
     bl_options = {'REGISTER', 'UNDO'}
 
     density = EnumProperty(items=(
@@ -80,9 +97,157 @@ class MakeFur(bpy.types.Operator):
         return {'FINISHED'}
 
 
+class QuickExplode(bpy.types.Operator):
+    bl_idname = "object.quick_explode"
+    bl_label = "Quick Explode"
+    bl_options = {'REGISTER', 'UNDO'}
+
+    style = EnumProperty(items=(
+                        ('EXPLODE', "Explode", ""),
+                        ('BLEND', "Blend", "")),
+                name="Explode Style",
+                description="",
+                default='EXPLODE')
+
+    amount = IntProperty(name="Amount of pieces",
+            default=100, min=2, max=10000, soft_min=2, soft_max=10000)
+
+    frame_duration = IntProperty(name="Duration",
+            default=50, min=1, max=300000, soft_min=1, soft_max=10000)
+
+    frame_start = IntProperty(name="Start Frame",
+            default=1, min=1, max=300000, soft_min=1, soft_max=10000)
+
+    frame_end = IntProperty(name="End Frame",
+            default=10, min=1, max=300000, soft_min=1, soft_max=10000)
+
+    velocity = FloatProperty(name="Outwards Velocity",
+            default=1, min=0, max=300000, soft_min=0, soft_max=10)
+
+    fade = BoolProperty(name="Fade",
+                description="Fade the pieces over time.",
+                default=True)
+
+    def execute(self, context):
+        fake_context = bpy.context.copy()
+        obj_act = context.active_object
+
+        if obj_act.type != 'MESH':
+            self.report({'ERROR'}, "Active object is not a mesh")
+            return {'CANCELLED'}
+
+        mesh_objects = [obj for obj in context.selected_objects
+                        if obj.type == 'MESH' and obj != obj_act]
+        mesh_objects.insert(0, obj_act)
+
+        if self.style == 'BLEND' and len(mesh_objects) != 2:
+            self.report({'ERROR'}, "Select two mesh objects")
+            return {'CANCELLED'}
+        elif not mesh_objects:
+            self.report({'ERROR'}, "Select at least one mesh object")
+            return {'CANCELLED'}
+
+        for obj in mesh_objects:
+            if obj.particle_systems:
+                self.report({'ERROR'}, "Object %r already has a particle system" % obj.name)
+                return {'CANCELLED'}
+
+        if self.fade:
+            tex = bpy.data.textures.new("Explode fade", 'BLEND')
+            tex.use_color_ramp = True
+
+            if self.style == 'BLEND':
+                tex.color_ramp.elements[0].position = 0.333
+                tex.color_ramp.elements[1].position = 0.666
+
+            tex.color_ramp.elements[0].color[3] = 1.0
+            tex.color_ramp.elements[1].color[3] = 0.0
+
+        if self.style == 'BLEND':
+            from_obj = mesh_objects[1]
+            to_obj = mesh_objects[0]
+
+        for obj in mesh_objects:
+            fake_context["object"] = obj
+            bpy.ops.object.particle_system_add(fake_context)
+
+            settings = obj.particle_systems[-1].settings
+            settings.count = self.amount
+            settings.frame_start = self.frame_start
+            settings.frame_end = self.frame_end - self.frame_duration
+            settings.lifetime = self.frame_duration
+            settings.normal_factor = self.velocity
+            settings.render_type = 'NONE'
+
+            explode = obj.modifiers.new(name='Explode', type='EXPLODE')
+            explode.use_edge_cut = True
+
+            if self.fade:
+                explode.show_dead = False
+                bpy.ops.mesh.uv_texture_add(fake_context)
+                uv = obj.data.uv_textures[-1]
+                uv.name = "Explode fade"
+                explode.particle_uv = uv.name
+
+                mat = object_ensure_material(obj, "Explode Fade")
+
+                mat.use_transparency = True
+                mat.use_transparent_shadows = True
+                mat.alpha = 0.0
+                mat.specular_alpha = 0.0
+
+                tex_slot = mat.texture_slots.add()
+
+                tex_slot.texture = tex
+                tex_slot.texture_coords = 'UV'
+                tex_slot.uv_layer = uv.name
+
+                tex_slot.use_map_alpha = True
+
+                if self.style == 'BLEND':
+                    if obj == to_obj:
+                        tex_slot.alpha_factor = -1.0
+                        elem = tex.color_ramp.elements[1]
+                        elem.color = mat.diffuse_color
+                    else:
+                        elem = tex.color_ramp.elements[0]
+                        elem.color = mat.diffuse_color
+                else:
+                    tex_slot.use_map_color_diffuse = False
+
+            if self.style == 'BLEND':
+                settings.physics_type = 'KEYED'
+                settings.use_emit_random = False
+                settings.rotation_mode = 'NOR'
+
+                psys = obj.particle_systems[-1]
+
+                fake_context["particle_system"] = obj.particle_systems[-1]
+                bpy.ops.particle.new_target(fake_context)
+                bpy.ops.particle.new_target(fake_context)
+
+                if obj == from_obj:
+                    psys.targets[1].object = to_obj
+                else:
+                    psys.targets[0].object = from_obj
+                    settings.normal_factor = -self.velocity
+                    explode.show_unborn = False
+                    explode.show_dead = True
+            else:
+                settings.factor_random = self.velocity
+                settings.angular_velocity_factor = self.velocity / 10.0
+
+        return {'FINISHED'}
+
+    def invoke(self, context, event):
+        self.frame_start = context.scene.frame_current
+        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][0], obj.bound_box[i][1], obj.bound_box[i][2])) * obj.matrix_world
+        bb_vec = Vector(obj.bound_box[i]) * obj.matrix_world
 
         min_co[0] = min(bb_vec[0], min_co[0])
         min_co[1] = min(bb_vec[1], min_co[1])
@@ -92,9 +257,9 @@ def obj_bb_minmax(obj, min_co, max_co):
         max_co[2] = max(bb_vec[2], max_co[2])
 
 
-class MakeSmoke(bpy.types.Operator):
-    bl_idname = "object.make_smoke"
-    bl_label = "Make Smoke"
+class QuickSmoke(bpy.types.Operator):
+    bl_idname = "object.quick_smoke"
+    bl_label = "Quick Smoke"
     bl_options = {'REGISTER', 'UNDO'}
 
     style = EnumProperty(items=(
@@ -112,8 +277,8 @@ class MakeSmoke(bpy.types.Operator):
     def execute(self, context):
         fake_context = bpy.context.copy()
         mesh_objects = [obj for obj in context.selected_objects if obj.type == 'MESH']
-        min_co = Vector((100000, 100000, 100000))
-        max_co = Vector((-100000, -100000, -100000))
+        min_co = Vector((100000.0, 100000.0, 100000.0))
+        max_co = -min_co
 
         if not mesh_objects:
             self.report({'ERROR'}, "Select at least one mesh object.")
@@ -201,9 +366,9 @@ class MakeSmoke(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class MakeFluid(bpy.types.Operator):
-    bl_idname = "object.make_fluid"
-    bl_label = "Make Fluid"
+class QuickFluid(bpy.types.Operator):
+    bl_idname = "object.quick_fluid"
+    bl_label = "Quick Fluid"
     bl_options = {'REGISTER', 'UNDO'}
 
     style = EnumProperty(items=(
index 68f97f63c735776bcc9070f4ec74ec3cd9c304b7..d95a21cca8180bf0fe84e197f7d77972c02af697 100644 (file)
@@ -21,6 +21,7 @@
 import bpy
 from blf import gettext as _
 
+
 def randomize_selected(seed, delta, loc, rot, scale, scale_even):
 
     import random
index 4f5b1d8b2337038fa0505ab04e004c358e1b04fd..c70b90719856dc50de1b7bdd58911585d66bbea6 100644 (file)
@@ -16,7 +16,7 @@
 #
 # ##### END GPL LICENSE BLOCK #####
 
-# <pep8 compliant>
+# TODO <pep8 compliant>
 
 from mathutils import Matrix, Vector, geometry
 import bpy
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 586675f2ca013e296701420253fc3ab07e484e94..ce6d0990f05293a8dc713e3db01cf2b7fb3039b2 100644 (file)
@@ -485,7 +485,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 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 5da89d0090a59dbc1a51d0a1fbb26477687e1ad9..c7e3a9e722007efcf4150e305caeb3606dcc4ed7 100644 (file)
@@ -257,6 +257,7 @@ class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, bpy.types.Panel):
         col.prop(fluid, "slip_type", text="")
         if fluid.slip_type == 'PARTIALSLIP':
             col.prop(fluid, "partial_slip_factor", slider=True, text="Amount")
+        col.prop(fluid, "surface_noobs")
 
         col = split.column()
         col.label(text="Surface:")
index 858c619d3c14bd52045837aaccbb9470d46fc957..c477a2ff62baf15470c88e529d57644b8eb872dc 100644 (file)
@@ -42,7 +42,7 @@ class SEQUENCER_HT_header(bpy.types.Header):
             sub = row.row(align=True)
             sub.menu("SEQUENCER_MT_view")
 
-            if (st.view_type == 'SEQUENCER') or (st.view_type == 'SEQUENCER_PREVIEW'):
+            if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}:
                 sub.menu("SEQUENCER_MT_select")
                 sub.menu("SEQUENCER_MT_marker")
                 sub.menu("SEQUENCER_MT_add")
@@ -50,17 +50,17 @@ class SEQUENCER_HT_header(bpy.types.Header):
 
         layout.prop(st, "view_type", expand=True, text="")
 
-        if (st.view_type == 'PREVIEW') or (st.view_type == 'SEQUENCER_PREVIEW'):
+        if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}:
             layout.prop(st, "display_mode", expand=True, text="")
 
-        if (st.view_type == 'SEQUENCER'):
+        if st.view_type == 'SEQUENCER':
             row = layout.row(align=True)
             row.operator("sequencer.copy", text="", icon='COPYDOWN')
             row.operator("sequencer.paste", text="", icon='PASTEDOWN')
 
             layout.separator()
             layout.operator("sequencer.refresh_all")
-        elif (st.view_type == 'SEQUENCER_PREVIEW'):
+        elif st.view_type == 'SEQUENCER_PREVIEW':
             layout.separator()
             layout.operator("sequencer.refresh_all")
             layout.prop(st, "display_channel", text="Channel")
@@ -101,9 +101,9 @@ class SEQUENCER_MT_view(bpy.types.Menu):
 
         layout.separator()
 
-        if (st.view_type == 'SEQUENCER') or (st.view_type == 'SEQUENCER_PREVIEW'):
+        if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}:
             layout.operator("sequencer.view_all", text='View all Sequences')
-        if (st.view_type == 'PREVIEW') or (st.view_type == 'SEQUENCER_PREVIEW'):
+        if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}:
             layout.operator_context = 'INVOKE_REGION_PREVIEW'
             layout.operator("sequencer.view_all_preview", text='Fit preview in window')
             layout.operator("sequencer.view_zoom_ratio", text='Show preview 1:1').ratio = 1.0
@@ -300,7 +300,7 @@ class SequencerButtonsPanel():
 
     @staticmethod
     def has_sequencer(context):
-        return (context.space_data.view_type == 'SEQUENCER') or (context.space_data.view_type == 'SEQUENCER_PREVIEW')
+        return (context.space_data.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'})
 
     @classmethod
     def poll(cls, context):
@@ -313,7 +313,7 @@ class SequencerButtonsPanel_Output():
 
     @staticmethod
     def has_preview(context):
-        return (context.space_data.view_type == 'PREVIEW') or (context.space_data.view_type == 'SEQUENCER_PREVIEW')
+        return (context.space_data.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'})
 
     @classmethod
     def poll(cls, context):
@@ -657,11 +657,17 @@ class SEQUENCER_PT_scene(SequencerButtonsPanel, bpy.types.Panel):
 
         layout.template_ID(strip, "scene")
 
+        scene = strip.scene
+        if scene:
+            layout.prop(scene.render, "use_sequencer")
+
         layout.label(text="Camera Override")
         layout.template_ID(strip, "scene_camera")
 
-        sce = strip.scene
-        layout.label(text="Original frame range: %d-%d (%d)" % (sce.frame_start, sce.frame_end, sce.frame_end - sce.frame_start + 1))
+        if scene:
+            sta = scene.frame_start
+            end = scene.frame_end
+            layout.label(text="Original frame range: %d-%d (%d)" % (sta, end, end - sta + 1))
 
 
 class SEQUENCER_PT_filter(SequencerButtonsPanel, bpy.types.Panel):
index ed4f47860a33b6bda26febf40ceaa6724577a13a..a78a5ceba808be26856754f293de13cefaa77ff1 100644 (file)
@@ -24,6 +24,7 @@ import addon_utils
 from bpy.props import StringProperty, BoolProperty, EnumProperty
 from blf import gettext as _
 
+
 def ui_items_general(col, context):
     """ General UI Theme Settings (User Interface)
     """
@@ -94,7 +95,7 @@ class USERPREF_HT_header(bpy.types.Header):
             layout.operator("wm.keyconfig_import")
         elif userpref.active_section == 'ADDONS':
             layout.operator("wm.addon_install")
-            layout.menu("USERPREF_MT_addons_dev_guides", text=_("  Addons Developer Guides"), icon='INFO')
+            layout.menu("USERPREF_MT_addons_dev_guides")
         elif userpref.active_section == 'THEMES':
             layout.operator("ui.reset_default_theme")
 
@@ -438,6 +439,8 @@ class USERPREF_PT_system(bpy.types.Panel):
         col.label(text=_("OpenGL:"))
         col.prop(system, "gl_clip_alpha", slider=True)
         col.prop(system, "use_mipmaps")
+        col.label(text=_("Anisotropic Filtering"))
+        col.prop(system, "anisotropic_filter", text="")
         col.prop(system, "use_vertex_buffer_objects")
         #Anti-aliasing is disabled as it breaks broder/lasso select
         #col.prop(system, "use_antialiasing")
@@ -847,17 +850,14 @@ class USERPREF_PT_input(bpy.types.Panel, InputKeyMapPanel):
 
 
 class USERPREF_MT_addons_dev_guides(bpy.types.Menu):
-    bl_label = _("Addons develoment guides")
+    bl_label = _("Develoment Guides")
 
     # menu to open webpages with addons development guides
     def draw(self, context):
         layout = self.layout
-        layout.operator('wm.url_open', text=_('API Concepts')
-            ).url = 'http://wiki.blender.org/index.php/Dev:2.5/Py/API/Intro'
-        layout.operator('wm.url_open', text=_('Addons guidelines')
-            ).url = 'http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Guidelines/Addons'
-        layout.operator('wm.url_open', text=_('How to share your addon')
-            ).url = 'http://wiki.blender.org/index.php/Dev:Py/Sharing'
+        layout.operator('wm.url_open', text=_('API Concepts'), icon='URL').url = 'http://wiki.blender.org/index.php/Dev:2.5/Py/API/Intro'
+        layout.operator('wm.url_open', text=_('Addon Guidelines'), icon='URL').url = 'http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Guidelines/Addons'
+        layout.operator('wm.url_open', text=_('How to share your addon'), icon='URL').url = 'http://wiki.blender.org/index.php/Dev:Py/Sharing'
 
 
 class USERPREF_PT_addons(bpy.types.Panel):
@@ -890,7 +890,7 @@ class USERPREF_PT_addons(bpy.types.Panel):
         col = split.column()
         col.prop(context.window_manager, "addon_search", text="", icon='VIEWZOOM')
         col.label(text=_("Categories"))
-        col.prop(context.window_manager, "addon_filter", text="")  # , expand=True, too slow with dynamic enum.
+        col.prop(context.window_manager, "addon_filter", expand=True)
 
         col.label(text=_("Supported Level"))
         col.prop(context.window_manager, "addon_support", expand=True)
index 76748e6164078774ac7c813f148d7278c731aea4..6a518e15f95b584863aeb5f13c248f19106174b2 100644 (file)
@@ -20,6 +20,7 @@
 import bpy
 from blf import gettext as _
 
+
 class VIEW3D_HT_header(bpy.types.Header):
     bl_space_type = 'VIEW_3D'
 
@@ -98,6 +99,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)
index 5bb41942e7c8fb66760d0b3a1ab40b5160d16774..b02f7dd75c1032cfd1064a855152f5fb5f938795 100644 (file)
@@ -20,6 +20,7 @@
 import bpy
 from blf import gettext as _
 
+
 class View3DPanel():
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'TOOLS'
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 4a32d5270b446aed06f2393f7ff1f1bbd68ba786..6a3e5b1f2ef8a82f45f20ebadf3517400c70eb83 100644 (file)
@@ -39,7 +39,7 @@
 #ifdef INTERNATIONAL
 
 #include <locale.h>
-#include <libintl.h>
+#include "libintl.h"
 
 
 #include "DNA_listBase.h"
index 698f0f0fecf8459378c875b59f7c6b7e67f2a83f..7d3de68c005e608d784ddcaa28b2f9d930849532 100644 (file)
@@ -216,7 +216,7 @@ void pose_remove_group(struct Object *ob);
 /* Assorted Evaluation ----------------- */    
 
 /* Used for the Action Constraint */
-void what_does_obaction(struct Scene *scene, struct Object *ob, struct Object *workob, struct bPose *pose, struct bAction *act, char groupname[], float cframe);
+void what_does_obaction(struct Object *ob, struct Object *workob, struct bPose *pose, struct bAction *act, char groupname[], float cframe);
 
 /* for proxy */
 void copy_pose_result(struct bPose *to, struct bPose *from);
index 07f0885372a4e4fe3f5b91ea1197655578db2a00..4ea5db933505a103e30c7c4684dad3a4d1b95b14 100644 (file)
@@ -43,17 +43,17 @@ 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_SUBVERSION             1
+#define BLENDER_VERSION                        258
+#define BLENDER_SUBVERSION             0
 
 #define BLENDER_MINVERSION             250
 #define BLENDER_MINSUBVERSION  0
 
 /* 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 14251fb1762360e278d90052dac557b2a5e769f1..f36073ba8416d61aac5617b458be1ad15c5e08c1 100644 (file)
@@ -51,22 +51,23 @@ struct GHash;
 /* **** DAG relation types *** */
 
        /* scene link to object */
-#define DAG_RL_SCENE           1
+#define DAG_RL_SCENE           (1<<0)
        /* object link to data */
-#define DAG_RL_DATA                    2
+#define DAG_RL_DATA                    (1<<1)
 
        /* object changes object (parent, track, constraints) */
-#define DAG_RL_OB_OB           4
+#define DAG_RL_OB_OB           (1<<2)
        /* object changes obdata (hooks, constraints) */
-#define DAG_RL_OB_DATA         8
+#define DAG_RL_OB_DATA         (1<<3)
        /* data changes object (vertex parent) */
-#define DAG_RL_DATA_OB         16
+#define DAG_RL_DATA_OB         (1<<4)
        /* data changes data (deformers) */
-#define DAG_RL_DATA_DATA       32
+#define DAG_RL_DATA_DATA       (1<<5)
 
-#define DAG_NO_RELATION                64
-#define DAG_RL_ALL                     63
-#define DAG_RL_ALL_BUT_DATA 61
+#define DAG_NO_RELATION                (1<<6)
+
+#define DAG_RL_ALL_BUT_DATA (DAG_RL_SCENE|DAG_RL_OB_OB|DAG_RL_OB_DATA|DAG_RL_DATA_OB|DAG_RL_DATA_DATA)
+#define DAG_RL_ALL                     (DAG_RL_ALL_BUT_DATA|DAG_RL_DATA)
 
 
 typedef void (*graph_action_func)(void * ob, void **data);
index 68745975dae17fd41725efd252e170b333830412..b00db53a1991147e3c5dd8e8831b6b90b771302c 100644 (file)
@@ -97,15 +97,10 @@ extern void makeDispListCurveTypes_forRender(struct Scene *scene, struct Object
 extern void makeDispListCurveTypes_forOrco(struct Scene *scene, struct Object *ob, struct ListBase *dispbase);
 extern void makeDispListMBall(struct Scene *scene, struct Object *ob);
 extern void makeDispListMBall_forRender(struct Scene *scene, struct Object *ob, struct ListBase *dispbase);
-extern void shadeDispList(struct Scene *scene, struct Base *base);
-extern void shadeMeshMCol(struct Scene *scene, struct Object *ob, struct Mesh *me);
 
 int surfindex_displist(DispList *dl, int a, int *b, int *p1, int *p2, int *p3, int *p4);
-void reshadeall_displist(struct Scene *scene);
 void filldisplist(struct ListBase *dispbase, struct ListBase *to, int flipnormal);
 
-void fastshade_free_render(void);
-
 float calc_taper(struct Scene *scene, struct Object *taperobj, int cur, int tot);
 
 /* add Orco layer to the displist object which has got derived mesh and return orco */
index 4dfc53e1734f316721933d96f8e6930ebc4b4b63..feeab98ad78c272efafd566d9ced9b5df492eadf 100644 (file)
@@ -300,6 +300,8 @@ void psys_get_pointcache_start_end(struct Scene *scene, ParticleSystem *psys, in
 
 void psys_check_boid_data(struct ParticleSystem *psys);
 
+void psys_get_birth_coordinates(struct ParticleSimulationData *sim, struct ParticleData *pa, struct ParticleKey *state, float dtime, float cfra);
+
 void particle_system_update(struct Scene *scene, struct Object *ob, struct ParticleSystem *psys);
 
 /* ----------- functions needed only inside particlesystem ------------ */
index 5078657588dc40ff36f0b975c68f5fc7d3c0c13b..9c06e325ce2a46c97f9e020901cc725d9b146745 100644 (file)
@@ -273,12 +273,12 @@ 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_SYS ${FFMPEG_INCLUDE_DIRS})
        add_definitions(-DWITH_FFMPEG)
 endif()
 
index 1fed115893cdbd74e75fa9e7cb64025dd0eee6e2..ef4f320602b1d7f071d0c83bd0c1c7acd696aed9 100644 (file)
@@ -69,8 +69,9 @@ typedef struct DagNode
        void * ob;
        void * first_ancestor;
        int ancestor_count;
-       unsigned int lay;                       // accumulated layers of its relations + itself
+       unsigned int lay;                               // accumulated layers of its relations + itself
        unsigned int scelay;                    // layers due to being in scene
+       unsigned int customdata_mask;   // customdata mask
        int lasttime;           // if lasttime != DagForest->time, this node was not evaluated yet for flushing
        int BFS_dist;           // BFS distance
        int DFS_dist;           // DFS distance
index 77f56058a4f89755310b9a2e55cb52784658f24a..f7086c817560043fcf03bf5ee3dbb13dbc7ac0d4 100644 (file)
@@ -1128,7 +1128,7 @@ void copy_pose_result(bPose *to, bPose *from)
 /* For the calculation of the effects of an Action at the given frame on an object 
  * This is currently only used for the Action Constraint 
  */
-void what_does_obaction (Scene *UNUSED(scene), Object *ob, Object *workob, bPose *pose, bAction *act, char groupname[], float cframe)
+void what_does_obaction (Object *ob, Object *workob, bPose *pose, bAction *act, char groupname[], float cframe)
 {
        bActionGroup *agrp= action_groups_find_named(act, groupname);
        
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 fd25ebe266f42ccbdd6e97c4c8647cab5a7ac89a..0b31e51d62e430910dc46551403b62c34d9e1500 100644 (file)
@@ -1343,8 +1343,12 @@ void vec_roll_to_mat3(float *vec, float roll, float mat[][3])
        cross_v3_v3v3(axis,target,nor);
 
        /* was 0.0000000000001, caused bug [#23954], smaller values give unstable
-        * roll when toggling editmode */
-       if (dot_v3v3(axis,axis) > 0.00001f) {
+        * roll when toggling editmode.
+        *
+        * was 0.00001, causes bug [#27675], with 0.00000495,
+        * so a value inbetween these is needed.
+        */
+       if (dot_v3v3(axis,axis) > 0.000001f) {
                /* if nor is *not* a multiple of target ... */
                normalize_v3(axis);
                
index 5a9432552d287d18b2879aea7bb787b249df931e..0f545ad3ff904b59274992865fd60eef1dca2337 100644 (file)
@@ -154,7 +154,6 @@ static void clear_global(void)
 {
 //     extern short winqueue_break;    /* screen.c */
 
-       fastshade_free_render();        /* lamps hang otherwise */
        free_main(G.main);                      /* free all lib data */
        
 //     free_vertexpaint();
index 5520e4d1d412cb129edf8c4e3175a1aa23b23304..cc45abb5998b61f9cf099d326789483be3f4906d 100644 (file)
@@ -493,7 +493,7 @@ static void mesh_edges_nearest_point(void *userdata, int index, const float *co,
        
        // NOTE: casts to "float*" here are due to co being "const float*"
        closest_to_line_segment_v3(nearest_tmp, (float*)co, t0, t1);
-       dist = len_v3v3(nearest_tmp, (float*)co);
+       dist = len_squared_v3v3(nearest_tmp, (float*)co);
        
        if(dist < nearest->dist)
        {
index d3c14a9dd12c57f3f836b4f9e94578ae98a5709d..7be4744a224ba1c1494502d8b37633d9ffbae575 100644 (file)
@@ -424,7 +424,7 @@ void constraint_mat_convertspace (Object *ob, bPoseChannel *pchan, float mat[][4
 /* ------------ General Target Matrix Tools ---------- */
 
 /* function that sets the given matrix based on given vertex group in mesh */
-static void contarget_get_mesh_mat (Scene *scene, Object *ob, const char *substring, float mat[][4])
+static void contarget_get_mesh_mat (Object *ob, const char *substring, float mat[][4])
 {
        DerivedMesh *dm = NULL;
        Mesh *me= ob->data;
@@ -449,16 +449,9 @@ static void contarget_get_mesh_mat (Scene *scene, Object *ob, const char *substr
                freeDM= 1;
        }
        else {
-               /* when not in EditMode, use the 'final' derived mesh 
-                *      - check if the custom data masks for derivedFinal mean that we can just use that
-                *        (this is more effficient + sufficient for most cases)
-                */
-               if (!(ob->lastDataMask & CD_MASK_MDEFORMVERT)) {
-                       dm = mesh_get_derived_final(scene, ob, CD_MASK_MDEFORMVERT);
-                       freeDM= 1;
-               }
-               else 
-                       dm = (DerivedMesh *)ob->derivedFinal;
+               /* when not in EditMode, use the 'final' derived mesh, depsgraph
+                * ensures we build with CD_MDEFORMVERT layer */
+               dm = (DerivedMesh *)ob->derivedFinal;
        }
        
        /* only continue if there's a valid DerivedMesh */
@@ -587,7 +580,7 @@ static void contarget_get_lattice_mat (Object *ob, const char *substring, float
 
 /* generic function to get the appropriate matrix for most target cases */
 /* The cases where the target can be object data have not been implemented */
-static void constraint_target_to_mat4 (Scene *scene, Object *ob, const char *substring, float mat[][4], short from, short to, float headtail)
+static void constraint_target_to_mat4 (Object *ob, const char *substring, float mat[][4], short from, short to, float headtail)
 {
        /*      Case OBJECT */
        if (!strlen(substring)) {
@@ -604,7 +597,7 @@ static void constraint_target_to_mat4 (Scene *scene, Object *ob, const char *sub
         *              way as constraints can only really affect things on object/bone level.
         */
        else if (ob->type == OB_MESH) {
-               contarget_get_mesh_mat(scene, ob, substring, mat);
+               contarget_get_mesh_mat(ob, substring, mat);
                constraint_mat_convertspace(ob, NULL, mat, from, to);
        }
        else if (ob->type == OB_LATTICE) {
@@ -684,10 +677,10 @@ static bConstraintTypeInfo CTI_CONSTRNAME = {
 /* This function should be used for the get_target_matrix member of all 
  * constraints that are not picky about what happens to their target matrix.
  */
-static void default_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float UNUSED(ctime))
+static void default_get_tarmat (bConstraint *con, bConstraintOb *UNUSED(cob), bConstraintTarget *ct, float UNUSED(ctime))
 {
        if (VALID_CONS_TARGET(ct))
-               constraint_target_to_mat4(cob->scene, ct->tar, ct->subtarget, ct->matrix, CONSTRAINT_SPACE_WORLD, ct->space, con->headtail);
+               constraint_target_to_mat4(ct->tar, ct->subtarget, ct->matrix, CONSTRAINT_SPACE_WORLD, ct->space, con->headtail);
        else if (ct)
                unit_m4(ct->matrix);
 }
@@ -1159,7 +1152,7 @@ static void kinematic_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstra
        bKinematicConstraint *data= con->data;
        
        if (VALID_CONS_TARGET(ct)) 
-               constraint_target_to_mat4(cob->scene, ct->tar, ct->subtarget, ct->matrix, CONSTRAINT_SPACE_WORLD, ct->space, con->headtail);
+               constraint_target_to_mat4(ct->tar, ct->subtarget, ct->matrix, CONSTRAINT_SPACE_WORLD, ct->space, con->headtail);
        else if (ct) {
                if (data->flag & CONSTRAINT_IK_AUTO) {
                        Object *ob= cob->ob;
@@ -2046,7 +2039,7 @@ static void pycon_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraintT
                /* firstly calculate the matrix the normal way, then let the py-function override
                 * this matrix if it needs to do so
                 */
-               constraint_target_to_mat4(cob->scene, ct->tar, ct->subtarget, ct->matrix, CONSTRAINT_SPACE_WORLD, ct->space, con->headtail);
+               constraint_target_to_mat4(ct->tar, ct->subtarget, ct->matrix, CONSTRAINT_SPACE_WORLD, ct->space, con->headtail);
                
                /* only execute target calculation if allowed */
 #ifdef WITH_PYTHON
@@ -2165,7 +2158,7 @@ static void actcon_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraint
                unit_m4(ct->matrix);
                
                /* get the transform matrix of the target */
-               constraint_target_to_mat4(cob->scene, ct->tar, ct->subtarget, tempmat, CONSTRAINT_SPACE_WORLD, ct->space, con->headtail);
+               constraint_target_to_mat4(ct->tar, ct->subtarget, tempmat, CONSTRAINT_SPACE_WORLD, ct->space, con->headtail);
                
                /* determine where in transform range target is */
                /* data->type is mapped as follows for backwards compatability:
@@ -2216,7 +2209,7 @@ static void actcon_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraint
                        tchan->rotmode= pchan->rotmode;
                        
                        /* evaluate action using workob (it will only set the PoseChannel in question) */
-                       what_does_obaction(cob->scene, cob->ob, &workob, pose, data->act, pchan->name, t);
+                       what_does_obaction(cob->ob, &workob, pose, data->act, pchan->name, t);
                        
                        /* convert animation to matrices for use here */
                        pchan_calc_mat(tchan);
@@ -2230,7 +2223,7 @@ static void actcon_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraint
                        
                        /* evaluate using workob */
                        // FIXME: we don't have any consistent standards on limiting effects on object...
-                       what_does_obaction(cob->scene, cob->ob, &workob, NULL, data->act, NULL, t);
+                       what_does_obaction(cob->ob, &workob, NULL, data->act, NULL, t);
                        object_to_mat4(&workob, ct->matrix);
                }
                else {
index 472d7d77b80fd654bf882e56387822d3d643d135..c2800410657a83a602c6309cf34a502321f33e11 100644 (file)
@@ -372,6 +372,9 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
                node2->first_ancestor = ob;
                node2->ancestor_count += 1;
        }
+
+       /* also build a custom data mask for dependencies that need certain layers */
+       node->customdata_mask= 0;
        
        if (ob->type == OB_ARMATURE) {
                if (ob->pose){
@@ -451,8 +454,12 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
                        case PARSKEL:
                                dag_add_relation(dag,node2,node,DAG_RL_DATA_DATA|DAG_RL_OB_OB, "Parent");
                                break;
-                       case PARVERT1: case PARVERT3: case PARBONE:
+                       case PARVERT1: case PARVERT3:
                                dag_add_relation(dag,node2,node,DAG_RL_DATA_OB|DAG_RL_OB_OB, "Vertex Parent");
+                               node2->customdata_mask |= CD_MASK_ORIGINDEX;
+                               break;
+                       case PARBONE:
+                               dag_add_relation(dag,node2,node,DAG_RL_DATA_OB|DAG_RL_OB_OB, "Bone Parent");
                                break;
                        default:
                                if(ob->parent->type==OB_LATTICE) 
@@ -647,8 +654,11 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
                                if (ELEM(con->type, CONSTRAINT_TYPE_FOLLOWPATH, CONSTRAINT_TYPE_CLAMPTO))
                                        dag_add_relation(dag, node2, node, DAG_RL_DATA_OB|DAG_RL_OB_OB, cti->name);
                                else {
-                                       if (ELEM3(obt->type, OB_ARMATURE, OB_MESH, OB_LATTICE) && (ct->subtarget[0]))
+                                       if (ELEM3(obt->type, OB_ARMATURE, OB_MESH, OB_LATTICE) && (ct->subtarget[0])) {
                                                dag_add_relation(dag, node2, node, DAG_RL_DATA_OB|DAG_RL_OB_OB, cti->name);
+                                               if (obt->type == OB_MESH)
+                                                       node2->customdata_mask |= CD_MASK_MDEFORMVERT;
+                                       }
                                        else
                                                dag_add_relation(dag, node2, node, DAG_RL_OB_OB, cti->name);
                                }
@@ -722,6 +732,9 @@ struct DagForest *build_dag(Main *bmain, Scene *sce, short mask)
                                        itA->node->color |= itA->type;
                                }
                        }
+
+                       /* also flush custom data mask */
+                       ((Object*)node->ob)->customdata_mask= node->customdata_mask;
                }
        }
        /* now set relations equal, so that when only one parent changes, the correct recalcs are found */
index 9aa794aa97e19571b44fab96c4ac92e4e22038e0..8f57490d0575726faa684fb93d9cf62c70eec79f 100644 (file)
@@ -65,9 +65,6 @@
 #include "BKE_lattice.h"
 #include "BKE_modifier.h"
 
-#include "RE_pipeline.h"
-#include "RE_shader_ext.h"
-
 #include "BLO_sys_types.h" // for intptr_t support
 
 #include "ED_curve.h" /* for BKE_curve_nurbs */
@@ -286,499 +283,6 @@ int surfindex_displist(DispList *dl, int a, int *b, int *p1, int *p2, int *p3, i
        return 1;
 }
 
-/* ***************************** shade displist. note colors now are in rgb(a) order ******************** */
-
-/* create default shade input... save cpu cycles with ugly global */
-/* XXXX bad code warning: local ShadeInput initialize... */
-static ShadeInput shi;
-static void init_fastshade_shadeinput(Render *re)
-{
-       memset(&shi, 0, sizeof(ShadeInput));
-       shi.lay= RE_GetScene(re)->lay;
-       shi.view[2]= -1.0f;
-       shi.passflag= SCE_PASS_COMBINED;
-       shi.combinedflag= -1;
-}
-
-static Render *fastshade_get_render(Scene *UNUSED(scene))
-{
-       // XXX 2.5: this crashes combined with previewrender
-       // due to global R so disabled for now
-#if 0
-       /* XXX ugly global still, but we can't do preview while rendering */
-       if(G.rendering==0) {
-               
-               Render *re= RE_GetRender("_Shade View_");
-               if(re==NULL) {
-                       re= RE_NewRender("_Shade View_");
-               
-                       RE_Database_Baking(re, scene, 0, 0);    /* 0= no faces */
-               }
-               return re;
-       }
-#endif
-       
-       return NULL;
-}
-
-/* called on file reading */
-void fastshade_free_render(void)
-{
-       Render *re= RE_GetRender("_Shade View_");
-       
-       if(re) {
-               RE_Database_Free(re);
-               RE_FreeRender(re);
-       }
-}
-
-
-static void fastshade_customdata(CustomData *fdata, int a, int j, Material *ma)
-{
-       CustomDataLayer *layer;
-       MTFace *mtface;
-       int index, needuv= ma->texco & TEXCO_UV;
-       char *vertcol;
-
-       shi.totuv= 0;
-       shi.totcol= 0;
-
-       for(index=0; index<fdata->totlayer; index++) {
-               layer= &fdata->layers[index];
-               
-               if(needuv && layer->type == CD_MTFACE && shi.totuv < MAX_MTFACE) {
-                       mtface= &((MTFace*)layer->data)[a];
-
-                       shi.uv[shi.totuv].uv[0]= 2.0f*mtface->uv[j][0]-1.0f;
-                       shi.uv[shi.totuv].uv[1]= 2.0f*mtface->uv[j][1]-1.0f;
-                       shi.uv[shi.totuv].uv[2]= 1.0f;
-
-                       shi.uv[shi.totuv].name= layer->name;
-                       shi.totuv++;
-               }
-               else if(layer->type == CD_MCOL && shi.totcol < MAX_MCOL) {
-                       vertcol= (char*)&((MCol*)layer->data)[a*4 + j];
-
-                       shi.col[shi.totcol].col[0]= ((float)vertcol[3])/255.0f;
-                       shi.col[shi.totcol].col[1]= ((float)vertcol[2])/255.0f;
-                       shi.col[shi.totcol].col[2]= ((float)vertcol[1])/255.0f;
-
-                       shi.col[shi.totcol].name= layer->name;
-                       shi.totcol++;
-               }
-       }
-
-       if(needuv && shi.totuv == 0)
-               VECCOPY(shi.uv[0].uv, shi.lo);
-
-       if(shi.totcol)
-               VECCOPY(shi.vcol, shi.col[0].col);
-}
-
-static void fastshade(float *co, float *nor, float *orco, Material *ma, char *col1, char *col2)
-{
-       ShadeResult shr;
-       int a;
-       
-       VECCOPY(shi.co, co);
-       shi.vn[0]= -nor[0];
-       shi.vn[1]= -nor[1];
-       shi.vn[2]= -nor[2];
-       VECCOPY(shi.vno, shi.vn);
-       VECCOPY(shi.facenor, shi.vn);
-       
-       if(ma->texco) {
-               VECCOPY(shi.lo, orco);
-               
-               if(ma->texco & TEXCO_GLOB) {
-                       VECCOPY(shi.gl, shi.lo);
-               }
-               if(ma->texco & TEXCO_WINDOW) {
-                       VECCOPY(shi.winco, shi.lo);
-               }
-               if(ma->texco & TEXCO_STICKY) {
-                       VECCOPY(shi.sticky, shi.lo);
-               }
-               if(ma->texco & TEXCO_OBJECT) {
-                       VECCOPY(shi.co, shi.lo);
-               }
-               if(ma->texco & TEXCO_NORM) {
-                       VECCOPY(shi.orn, shi.vn);
-               }
-               if(ma->texco & TEXCO_REFL) {
-                       float inp= 2.0f * (shi.vn[2]);
-                       shi.ref[0]= (inp*shi.vn[0]);
-                       shi.ref[1]= (inp*shi.vn[1]);
-                       shi.ref[2]= (-1.0f + inp*shi.vn[2]);
-               }
-       }
-       
-       shi.mat= ma;    /* set each time... node shaders change it */
-       RE_shade_external(NULL, &shi, &shr);
-       
-       a= 256.0f*(shr.combined[0]);
-       col1[0]= CLAMPIS(a, 0, 255);
-       a= 256.0f*(shr.combined[1]);
-       col1[1]= CLAMPIS(a, 0, 255);
-       a= 256.0f*(shr.combined[2]);
-       col1[2]= CLAMPIS(a, 0, 255);
-       
-       if(col2) {
-               shi.vn[0]= -shi.vn[0];
-               shi.vn[1]= -shi.vn[1];
-               shi.vn[2]= -shi.vn[2];
-               
-               shi.mat= ma;    /* set each time... node shaders change it */
-               RE_shade_external(NULL, &shi, &shr);
-               
-               a= 256.0f*(shr.combined[0]);
-               col2[0]= CLAMPIS(a, 0, 255);
-               a= 256.0f*(shr.combined[1]);
-               col2[1]= CLAMPIS(a, 0, 255);
-               a= 256.0f*(shr.combined[2]);
-               col2[2]= CLAMPIS(a, 0, 255);
-       }
-}
-
-static void init_fastshade_for_ob(Render *re, Object *ob, int *need_orco_r, float mat[4][4], float imat[3][3])
-{
-       float tmat[4][4];
-       float amb[3]= {0.0f, 0.0f, 0.0f};
-       int a;
-       
-       /* initialize globals in render */
-       RE_shade_external(re, NULL, NULL);
-
-       /* initialize global here */
-       init_fastshade_shadeinput(re);
-       
-       RE_DataBase_GetView(re, tmat);
-       mul_m4_m4m4(mat, ob->obmat, tmat);
-       
-       invert_m4_m4(tmat, mat);
-       copy_m3_m4(imat, tmat);
-       if(ob->transflag & OB_NEG_SCALE) mul_m3_fl(imat, -1.0);
-       
-       if (need_orco_r) *need_orco_r= 0;
-       for(a=0; a<ob->totcol; a++) {
-               Material *ma= give_current_material(ob, a+1);
-               if(ma) {
-                       init_render_material(ma, 0, amb);
-
-                       if(ma->texco & TEXCO_ORCO) {
-                               if (need_orco_r) *need_orco_r= 1;
-                       }
-               }
-       }
-}
-
-static void end_fastshade_for_ob(Object *ob)
-{
-       int a;
-       
-       for(a=0; a<ob->totcol; a++) {
-               Material *ma= give_current_material(ob, a+1);
-               if(ma)
-                       end_render_material(ma);
-       }
-}
-
-
-static void mesh_create_shadedColors(Render *re, Object *ob, int onlyForMesh, unsigned int **col1_r, unsigned int **col2_r)
-{
-       Mesh *me= ob->data;
-       DerivedMesh *dm;
-       MVert *mvert;
-       MFace *mface;
-       unsigned int *col1, *col2;
-       float *orco, *vnors, *nors, imat[3][3], mat[4][4], vec[3];
-       int a, i, need_orco, totface, totvert;
-       CustomDataMask dataMask = CD_MASK_BAREMESH | CD_MASK_MCOL
-                                                         | CD_MASK_MTFACE | CD_MASK_NORMAL;
-
-
-       init_fastshade_for_ob(re, ob, &need_orco, mat, imat);
-
-       if(need_orco)
-               dataMask |= CD_MASK_ORCO;
-
-       if (onlyForMesh)
-               dm = mesh_get_derived_deform(RE_GetScene(re), ob, dataMask);
-       else
-               dm = mesh_get_derived_final(RE_GetScene(re), ob, dataMask);
-       
-       mvert = dm->getVertArray(dm);
-       mface = dm->getFaceArray(dm);
-       nors = dm->getFaceDataArray(dm, CD_NORMAL);
-       totvert = dm->getNumVerts(dm);
-       totface = dm->getNumFaces(dm);
-       orco= dm->getVertDataArray(dm, CD_ORCO);
-
-       if (onlyForMesh) {
-               col1 = *col1_r;
-               col2 = NULL;
-       } else {
-               *col1_r = col1 = MEM_mallocN(sizeof(*col1)*totface*4, "col1");
-
-               if (col2_r && (me->flag & ME_TWOSIDED))
-                       col2 = MEM_mallocN(sizeof(*col2)*totface*4, "col2");
-               else
-                       col2 = NULL;
-               
-               if (col2_r) *col2_r = col2;
-       }
-
-               /* vertexnormals */
-       vnors= MEM_mallocN(totvert*3*sizeof(float), "vnors disp");
-       for (a=0; a<totvert; a++) {
-               MVert *mv = &mvert[a];
-               float *vn= &vnors[a*3];
-               float xn= mv->no[0]; 
-               float yn= mv->no[1]; 
-               float zn= mv->no[2];
-               
-                       /* transpose ! */
-               vn[0]= imat[0][0]*xn+imat[0][1]*yn+imat[0][2]*zn;
-               vn[1]= imat[1][0]*xn+imat[1][1]*yn+imat[1][2]*zn;
-               vn[2]= imat[2][0]*xn+imat[2][1]*yn+imat[2][2]*zn;
-               normalize_v3(vn);
-       }               
-
-       for (i=0; i<totface; i++) {
-               MFace *mf= &mface[i];
-               Material *ma= give_current_material(ob, mf->mat_nr+1);
-               int j, vidx[4], nverts= mf->v4?4:3;
-               unsigned char *col1base= (unsigned char*) &col1[i*4];
-               unsigned char *col2base= (unsigned char*) (col2?&col2[i*4]:NULL);
-               float nor[3], n1[3];
-               
-               if(ma==NULL) ma= &defmaterial;
-               
-               vidx[0]= mf->v1;
-               vidx[1]= mf->v2;
-               vidx[2]= mf->v3;
-               vidx[3]= mf->v4;
-
-               if (nors) {
-                       VECCOPY(nor, &nors[i*3]);
-               } else {
-                       if (mf->v4)
-                               normal_quad_v3( nor,mvert[mf->v1].co, mvert[mf->v2].co, mvert[mf->v3].co, mvert[mf->v4].co);
-                       else
-                               normal_tri_v3( nor,mvert[mf->v1].co, mvert[mf->v2].co, mvert[mf->v3].co);
-               }
-
-               n1[0]= imat[0][0]*nor[0]+imat[0][1]*nor[1]+imat[0][2]*nor[2];
-               n1[1]= imat[1][0]*nor[0]+imat[1][1]*nor[1]+imat[1][2]*nor[2];
-               n1[2]= imat[2][0]*nor[0]+imat[2][1]*nor[1]+imat[2][2]*nor[2];
-               normalize_v3(n1);
-
-               for (j=0; j<nverts; j++) {
-                       MVert *mv= &mvert[vidx[j]];
-                       char *col1= (char*)&col1base[j*4];
-                       char *col2= (char*)(col2base?&col2base[j*4]:NULL);
-                       float *vn = (mf->flag & ME_SMOOTH)?&vnors[3*vidx[j]]:n1;
-
-                       mul_v3_m4v3(vec, mat, mv->co);
-
-                       mul_v3_v3fl(vec, vn, 0.001f);
-
-                       fastshade_customdata(&dm->faceData, i, j, ma);
-                       fastshade(vec, vn, orco?&orco[vidx[j]*3]:mv->co, ma, col1, col2);
-               }
-       } 
-       MEM_freeN(vnors);
-
-       dm->release(dm);
-
-       end_fastshade_for_ob(ob);
-}
-
-void shadeMeshMCol(Scene *scene, Object *ob, Mesh *me)
-{
-       Render *re= fastshade_get_render(scene);
-       int a;
-       char *cp;
-       unsigned int *mcol= (unsigned int*)me->mcol;
-       
-       if(re) {
-               mesh_create_shadedColors(re, ob, 1, &mcol, NULL);
-               me->mcol= (MCol*)mcol;
-
-               /* swap bytes */
-               for(cp= (char *)me->mcol, a= 4*me->totface; a>0; a--, cp+=4) {
-                       SWAP(char, cp[0], cp[3]);
-                       SWAP(char, cp[1], cp[2]);
-               }
-       }
-}
-
-/* has base pointer, to check for layer */
-/* called from drawobject.c */
-void shadeDispList(Scene *scene, Base *base)
-{
-       Object *ob= base->object;
-       DispList *dl, *dlob;
-       Material *ma = NULL;
-       Render *re;
-       float imat[3][3], mat[4][4], vec[3];
-       float *fp, *nor, n1[3];
-       unsigned int *col1;
-       int a, need_orco;
-       
-       re= fastshade_get_render(scene);
-       if(re==NULL)
-               return;
-       
-       dl = find_displist(&ob->disp, DL_VERTCOL);
-       if (dl) {
-               BLI_remlink(&ob->disp, dl);
-               free_disp_elem(dl);
-       }
-
-       if(ob->type==OB_MESH) {
-               dl= MEM_callocN(sizeof(DispList), "displistshade");
-               dl->type= DL_VERTCOL;
-
-               mesh_create_shadedColors(re, ob, 0, &dl->col1, &dl->col2);
-
-               /* add dl to ob->disp after mesh_create_shadedColors, because it
-                  might indirectly free ob->disp */
-               BLI_addtail(&ob->disp, dl);
-       }
-       else {
-
-               init_fastshade_for_ob(re, ob, &need_orco, mat, imat);
-               
-               if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
-               
-                       /* now we need the normals */
-                       dl= ob->disp.first;
-                       
-                       while(dl) {
-                               dlob= MEM_callocN(sizeof(DispList), "displistshade");
-                               BLI_addtail(&ob->disp, dlob);
-                               dlob->type= DL_VERTCOL;
-                               dlob->parts= dl->parts;
-                               dlob->nr= dl->nr;
-                               
-                               if(dl->type==DL_INDEX3) {
-                                       col1= dlob->col1= MEM_mallocN(sizeof(int)*dl->nr, "col1");
-                               }
-                               else {
-                                       col1= dlob->col1= MEM_mallocN(sizeof(int)*dl->parts*dl->nr, "col1");
-                               }
-                               
-                       
-                               ma= give_current_material(ob, dl->col+1);
-                               if(ma==NULL) ma= &defmaterial;
-                               
-                               if(dl->type==DL_INDEX3) {
-                                       if(dl->nors) {
-                                               /* there's just one normal */
-                                               n1[0]= imat[0][0]*dl->nors[0]+imat[0][1]*dl->nors[1]+imat[0][2]*dl->nors[2];
-                                               n1[1]= imat[1][0]*dl->nors[0]+imat[1][1]*dl->nors[1]+imat[1][2]*dl->nors[2];
-                                               n1[2]= imat[2][0]*dl->nors[0]+imat[2][1]*dl->nors[1]+imat[2][2]*dl->nors[2];
-                                               normalize_v3(n1);
-                                               
-                                               fp= dl->verts;
-                                               
-                                               a= dl->nr;              
-                                               while(a--) {
-                                                       mul_v3_m4v3(vec, mat, fp);
-                                                       
-                                                       fastshade(vec, n1, fp, ma, (char *)col1, NULL);
-                                                       
-                                                       fp+= 3; col1++;
-                                               }
-                                       }
-                               }
-                               else if(dl->type==DL_SURF) {
-                                       if(dl->nors) {
-                                               a= dl->nr*dl->parts;
-                                               fp= dl->verts;
-                                               nor= dl->nors;
-                                               
-                                               while(a--) {
-                                                       mul_v3_m4v3(vec, mat, fp);
-                                                       
-                                                       n1[0]= imat[0][0]*nor[0]+imat[0][1]*nor[1]+imat[0][2]*nor[2];
-                                                       n1[1]= imat[1][0]*nor[0]+imat[1][1]*nor[1]+imat[1][2]*nor[2];
-                                                       n1[2]= imat[2][0]*nor[0]+imat[2][1]*nor[1]+imat[2][2]*nor[2];
-                                                       normalize_v3(n1);
-                               
-                                                       fastshade(vec, n1, fp, ma, (char *)col1, NULL);
-                                                       
-                                                       fp+= 3; nor+= 3; col1++;
-                                               }
-                                       }
-                               }
-                               dl= dl->next;
-                       }
-               }
-               else if(ob->type==OB_MBALL) {
-                       /* there are normals already */
-                       dl= ob->disp.first;
-                       
-                       while(dl) {
-                               
-                               if(dl->type==DL_INDEX4) {
-                                       if(dl->nors) {
-                                               if(dl->col1) MEM_freeN(dl->col1);
-                                               col1= dl->col1= MEM_mallocN(sizeof(int)*dl->nr, "col1");
-                               
-                                               ma= give_current_material(ob, dl->col+1);
-                                               if(ma==NULL) ma= &defmaterial;
-                                               
-                                               fp= dl->verts;
-                                               nor= dl->nors;
-                                               
-                                               a= dl->nr;              
-                                               while(a--) {
-                                                       mul_v3_m4v3(vec, mat, fp);
-                                                       
-                                                       /* transpose ! */
-                                                       n1[0]= imat[0][0]*nor[0]+imat[0][1]*nor[1]+imat[0][2]*nor[2];
-                                                       n1[1]= imat[1][0]*nor[0]+imat[1][1]*nor[1]+imat[1][2]*nor[2];
-                                                       n1[2]= imat[2][0]*nor[0]+imat[2][1]*nor[1]+imat[2][2]*nor[2];
-                                                       normalize_v3(n1);
-                                               
-                                                       fastshade(vec, n1, fp, ma, (char *)col1, NULL);
-                                                       
-                                                       fp+= 3; col1++; nor+= 3;
-                                               }
-                                       }
-                               }
-                               dl= dl->next;
-                       }
-               }
-               
-               end_fastshade_for_ob(ob);
-       }
-}
-
-/* frees render and shade part of displists */
-/* note: dont do a shade again, until a redraw happens */
-void reshadeall_displist(Scene *scene)
-{
-       Base *base;
-       Object *ob;
-       
-       fastshade_free_render();
-       
-       for(base= scene->base.first; base; base= base->next) {
-               ob= base->object;
-
-               if(ELEM5(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL))
-                       freedisplist(&ob->disp);
-
-               if(base->lay & scene->lay) {
-                       /* Metaballs have standard displist at the Object */
-                       if(ob->type==OB_MBALL) shadeDispList(scene, base);
-               }
-       }
-}
-
 /* ****************** make displists ********************* */
 
 static void curve_to_displist(Curve *cu, ListBase *nubase, ListBase *dispbase, int forRender)
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 16fa16054674ead7fd31cd523b752747695b0499..dff62b05bd35fc0a6763f17448dea71772456f19 100644 (file)
@@ -2641,11 +2641,12 @@ void object_handle_update(Scene *scene, Object *ob)
 
 #else                          /* ensure CD_MASK_BAREMESH for now */
                                        EditMesh *em = (ob == scene->obedit)? BKE_mesh_get_editmesh(ob->data): NULL;
+                                       unsigned int data_mask= scene->customdata_mask | ob->customdata_mask | CD_MASK_BAREMESH;
                                        if(em) {
-                                               makeDerivedMesh(scene, ob, em,  scene->customdata_mask | CD_MASK_BAREMESH); /* was CD_MASK_BAREMESH */
+                                               makeDerivedMesh(scene, ob, em,  data_mask); /* was CD_MASK_BAREMESH */
                                                BKE_mesh_end_editmesh(ob->data, em);
                                        } else
-                                               makeDerivedMesh(scene, ob, NULL, scene->customdata_mask | CD_MASK_BAREMESH);
+                                               makeDerivedMesh(scene, ob, NULL, data_mask);
 #endif
 
                                }
index fca8d470dc17a62d788038ba9ae45481988a8cef..4e3840832bb126889adb2a6fa82ee5f15646271c 100644 (file)
@@ -1562,8 +1562,7 @@ static void initialize_all_particles(ParticleSimulationData *sim)
                }
        }
 }
-/* sets particle to the emitter surface with initial velocity & rotation */
-void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime, float cfra)
+void psys_get_birth_coordinates(ParticleSimulationData *sim, ParticleData *pa, ParticleKey *state, float dtime, float cfra)
 {
        Object *ob = sim->ob;
        ParticleSystem *psys = sim->psys;
@@ -1575,17 +1574,6 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime,
        float q_phase[4];
        int p = pa - psys->particles;
        part=psys->part;
-       
-       /* get precise emitter matrix if particle is born */
-       if(part->type!=PART_HAIR && dtime > 0.f && pa->time < cfra && pa->time >= sim->psys->cfra) {
-               /* we have to force RECALC_ANIM here since where_is_objec_time only does drivers */
-               while(ob) {
-                       BKE_animsys_evaluate_animdata(&ob->id, ob->adt, pa->time, ADT_RECALC_ANIM);
-                       ob = ob->parent;
-               }
-               ob = sim->ob;
-               where_is_object_time(sim->scene, ob, pa->time);
-       }
 
        /* get birth location from object               */
        if(part->tanfac != 0.f)
@@ -1594,7 +1582,7 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime,
                psys_particle_on_emitter(sim->psmd, part->from,pa->num, pa->num_dmcache, pa->fuv,pa->foffset,loc,nor,0,0,0,0);
                
        /* get possible textural influence */
-       psys_get_texture(sim, pa, &ptex, PAMAP_IVEL|PAMAP_LIFE, cfra);
+       psys_get_texture(sim, pa, &ptex, PAMAP_IVEL, cfra);
 
        /* particles live in global space so    */
        /* let's convert:                                               */
@@ -1654,37 +1642,27 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime,
                mat4_to_quat(rot,ob->obmat);
                mul_qt_qtqt(r_rot,r_rot,rot);
        }
-#if 0
-       }
-#endif
 
        if(part->phystype==PART_PHYS_BOIDS && pa->boid) {
-               BoidParticle *bpa = pa->boid;
                float dvec[3], q[4], mat[3][3];
 
-               copy_v3_v3(pa->state.co,loc);
+               copy_v3_v3(state->co,loc);
 
                /* boids don't get any initial velocity  */
-               zero_v3(pa->state.vel);
+               zero_v3(state->vel);
 
                /* boids store direction in ave */
                if(fabsf(nor[2])==1.0f) {
-                       sub_v3_v3v3(pa->state.ave, loc, ob->obmat[3]);
-                       normalize_v3(pa->state.ave);
+                       sub_v3_v3v3(state->ave, loc, ob->obmat[3]);
+                       normalize_v3(state->ave);
                }
                else {
-                       VECCOPY(pa->state.ave, nor);
+                       VECCOPY(state->ave, nor);
                }
-               /* and gravity in r_ve */
-               bpa->gravity[0] = bpa->gravity[1] = 0.0f;
-               bpa->gravity[2] = -1.0f;
-               if((sim->scene->physics_settings.flag & PHYS_GLOBAL_GRAVITY)
-                       && sim->scene->physics_settings.gravity[2]!=0.0f)
-                       bpa->gravity[2] = sim->scene->physics_settings.gravity[2];
 
                /* calculate rotation matrix */
-               project_v3_v3v3(dvec, r_vel, pa->state.ave);
-               sub_v3_v3v3(mat[0], pa->state.ave, dvec);
+               project_v3_v3v3(dvec, r_vel, state->ave);
+               sub_v3_v3v3(mat[0], state->ave, dvec);
                normalize_v3(mat[0]);
                negate_v3_v3(mat[2], r_vel);
                normalize_v3(mat[2]);
@@ -1692,12 +1670,7 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime,
                
                /* apply rotation */
                mat3_to_quat_is_ok( q,mat);
-               copy_qt_qt(pa->state.rot, q);
-
-               bpa->data.health = part->boids->health;
-               bpa->data.mode = eBoidMode_InAir;
-               bpa->data.state_id = ((BoidState*)part->boids->states.first)->id;
-               bpa->data.acc[0]=bpa->data.acc[1]=bpa->data.acc[2]=0.0f;
+               copy_qt_qt(state->rot, q);
        }
        else {
                /* conversion done so now we apply new: */
@@ -1710,7 +1683,7 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime,
 
                /*              *emitter velocity                               */
                if(dtime != 0.f && part->obfac != 0.f){
-                       sub_v3_v3v3(vel, loc, pa->state.co);
+                       sub_v3_v3v3(vel, loc, state->co);
                        mul_v3_fl(vel, part->obfac/dtime);
                }
                
@@ -1747,13 +1720,13 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime,
                if(part->partfac != 0.f)
                        madd_v3_v3fl(vel, p_vel, part->partfac);
                
-               mul_v3_v3fl(pa->state.vel, vel, ptex.ivel);
+               mul_v3_v3fl(state->vel, vel, ptex.ivel);
 
                /* -location from emitter                               */
-               copy_v3_v3(pa->state.co,loc);
+               copy_v3_v3(state->co,loc);
 
                /* -rotation                                                    */
-               unit_qt(pa->state.rot);
+               unit_qt(state->rot);
 
                if(part->rotmode){
                        /* create vector into which rotation is aligned */
@@ -1793,32 +1766,74 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime,
                        axis_angle_to_quat( q_phase,x_vec, phasefac*(float)M_PI);
 
                        /* combine base rotation & phase */
-                       mul_qt_qtqt(pa->state.rot, rot, q_phase);
+                       mul_qt_qtqt(state->rot, rot, q_phase);
                }
 
                /* -angular velocity                                    */
 
-               zero_v3(pa->state.ave);
+               zero_v3(state->ave);
 
                if(part->avemode){
                        switch(part->avemode){
                                case PART_AVE_SPIN:
-                                       copy_v3_v3(pa->state.ave, vel);
+                                       copy_v3_v3(state->ave, vel);
                                        break;
                                case PART_AVE_RAND:
-                                       copy_v3_v3(pa->state.ave, r_ave);
+                                       copy_v3_v3(state->ave, r_ave);
                                        break;
                        }
-                       normalize_v3(pa->state.ave);
-                       mul_v3_fl(pa->state.ave,part->avefac);
+                       normalize_v3(state->ave);
+                       mul_v3_fl(state->ave, part->avefac);
                }
        }
+}
+/* sets particle to the emitter surface with initial velocity & rotation */
+void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime, float cfra)
+{
+       Object *ob = sim->ob;
+       ParticleSystem *psys = sim->psys;
+       ParticleSettings *part;
+       ParticleTexture ptex;
+       int p = pa - psys->particles;
+       part=psys->part;
+       
+       /* get precise emitter matrix if particle is born */
+       if(part->type!=PART_HAIR && dtime > 0.f && pa->time < cfra && pa->time >= sim->psys->cfra) {
+               /* we have to force RECALC_ANIM here since where_is_objec_time only does drivers */
+               while(ob) {
+                       BKE_animsys_evaluate_animdata(&ob->id, ob->adt, pa->time, ADT_RECALC_ANIM);
+                       ob = ob->parent;
+               }
+               ob = sim->ob;
+               where_is_object_time(sim->scene, ob, pa->time);
+       }
+
+       psys_get_birth_coordinates(sim, pa, &pa->state, dtime, cfra);
+
+       if(part->phystype==PART_PHYS_BOIDS && pa->boid) {
+               BoidParticle *bpa = pa->boid;
+
+               /* and gravity in r_ve */
+               bpa->gravity[0] = bpa->gravity[1] = 0.0f;
+               bpa->gravity[2] = -1.0f;
+               if((sim->scene->physics_settings.flag & PHYS_GLOBAL_GRAVITY)
+                       && sim->scene->physics_settings.gravity[2]!=0.0f)
+                       bpa->gravity[2] = sim->scene->physics_settings.gravity[2];
+
+               bpa->data.health = part->boids->health;
+               bpa->data.mode = eBoidMode_InAir;
+               bpa->data.state_id = ((BoidState*)part->boids->states.first)->id;
+               bpa->data.acc[0]=bpa->data.acc[1]=bpa->data.acc[2]=0.0f;
+       }
 
 
        if(part->type == PART_HAIR){
                pa->lifetime = 100.0f;
        }
        else{
+               /* get possible textural influence */
+               psys_get_texture(sim, pa, &ptex, PAMAP_LIFE, cfra);
+
                pa->lifetime = part->lifetime * ptex.life;
 
                if(part->randlife != 0.0f)
@@ -1904,6 +1919,7 @@ static void set_keyed_keys(ParticleSimulationData *sim)
        PARTICLE_P;
        ParticleKey *key;
        int totpart = psys->totpart, k, totkeys = psys->totkeyed;
+       int keyed_flag = 0;
 
        ksim.scene= sim->scene;
        
@@ -1933,6 +1949,8 @@ static void set_keyed_keys(ParticleSimulationData *sim)
        for(k=0; k<totkeys; k++) {
                ksim.ob = pt->ob ? pt->ob : sim->ob;
                ksim.psys = BLI_findlink(&ksim.ob->particlesystem, pt->psys - 1);
+               keyed_flag = (ksim.psys->flag & PSYS_KEYED);
+               ksim.psys->flag &= ~PSYS_KEYED;
 
                LOOP_PARTICLES {
                        key = pa->keys + k;
@@ -1956,6 +1974,8 @@ static void set_keyed_keys(ParticleSimulationData *sim)
                if(psys->flag & PSYS_KEYED_TIMING && pt->duration!=0.0f)
                        k++;
 
+               ksim.psys->flag |= keyed_flag;
+
                pt = (pt->next && pt->next->flag & PTARGET_VALID)? pt->next : psys->targets.first;
        }
 
index 16cef67ea6d2c098c67435e2a193ff573cf9864f..0d5235995984b38372a37f1bad723084d6a2ac09 100644 (file)
@@ -430,6 +430,7 @@ void init_actuator(bActuator *act)
                act->data= MEM_callocN(sizeof(bCameraActuator), "camact");
                ca = act->data;
                ca->axis = ACT_CAMERA_X;
+               ca->damping = 1.0/32.0;
                break;
        case ACT_EDIT_OBJECT:
                act->data= MEM_callocN(sizeof(bEditObjectActuator), "editobact");
index 0c25da325ad55f0878fc1dd0a6bf824a96ea26ec..c6848346220b39ab5aa975c6ff85f236f2630e9d 100644 (file)
@@ -137,7 +137,7 @@ set(SRC
 )
 
 if(WITH_BINRELOC)
-       list(APPEND INC_SYS "${BINRELOC_INC}")
+       list(APPEND INC_SYS "${BINRELOC_INCLUDE_DIRS}")
        add_definitions(-DWITH_BINRELOC)
 endif()
 
index 9d3035057ba3fcc38aa15197c9f1c0d60be76927..222c4bcf6fc0a3f29d03d163db8b0f5abe93fa5b 100644 (file)
@@ -4321,6 +4321,7 @@ static void direct_link_object(FileData *fd, Object *ob)
                MEM_freeN(hook);
        }
        
+       ob->customdata_mask= 0;
        ob->bb= NULL;
        ob->derivedDeform= NULL;
        ob->derivedFinal= NULL;
@@ -11647,6 +11648,21 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                                }
                        }
                }
+
+               {
+                       /* add default value for behind strength of camera actuator */
+                       Object *ob;
+                       bActuator *act;
+                       for(ob = main->object.first; ob; ob= ob->id.next) {
+                               for(act= ob->actuators.first; act; act= act->next) {
+                                       if (act->type == ACT_CAMERA) {
+                                               bCameraActuator *ba= act->data;
+
+                                               ba->damping = 1.0/32.0;
+                                       }
+                               }
+                       }
+               }
        }
        
        /* WATCH IT!!!: pointers from libdata have not been converted yet here! */
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 bccc7bdb769f70b1e6bd52afc4b06733c8c50b4b..77cdf889ea55159443bc0de57ada7863b258083b 100644 (file)
@@ -113,9 +113,10 @@ LIBIMPORT void interlace(struct ImBuf *ib);
 LIBIMPORT void IMB_rectcpy(struct ImBuf *dbuf, struct ImBuf *sbuf, 
        int destx, int desty, int srcx, int srcy, int width, int height);
 
-LIBIMPORT void IMB_rectfill(struct ImBuf *drect, float col[4]);
+LIBIMPORT void IMB_rectfill(struct ImBuf *drect, const float col[4]);
 LIBIMPORT void IMB_rectfill_area(struct ImBuf *ibuf, float *col, int x1, int y1, int x2, int y2);
 LIBIMPORT void buf_rectfill_area(unsigned char *rect, float *rectf, int width, int height, float *col, int x1, int y1, int x2, int y2);
+LIBIMPORT void IMB_rectfill_alpha(struct ImBuf *drect, const float value);
 
 #endif /* IFF_H */
 
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 72341e1caa21356ff5ddba8941b42febf029de4e..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()) {
@@ -959,12 +977,12 @@ bool DocumentImporter::writeLight( const COLLADAFW::Light* light )
 
                if(IS_EQ(linatt, 0.0f) && quadatt > 0.0f) {
                        att2 = quadatt;
-                       d = (1.0f/quadatt) * 2;
+                       d = sqrt(1.0f/quadatt);
                }
                // linear light
                else if(IS_EQ(quadatt, 0.0f) && linatt > 0.0f) {
                        att1 = linatt;
-                       d = (1.0f/linatt) * 2;
+                       d = (1.0f/linatt);
                } else if (IS_EQ(constatt, 1.0f)) {
                        att1 = 1.0f;
                } else {
@@ -987,9 +1005,12 @@ bool DocumentImporter::writeLight( const COLLADAFW::Light* light )
                        case COLLADAFW::Light::SPOT_LIGHT:
                                {
                                        lamp->type = LA_SPOT;
-                                       lamp->falloff_type = LA_FALLOFF_INVSQUARE;
                                        lamp->att1 = att1;
                                        lamp->att2 = att2;
+                                       if(IS_EQ(att1, 0.0f) && att2 > 0)
+                                               lamp->falloff_type = LA_FALLOFF_INVSQUARE;
+                                       if(IS_EQ(att2, 0.0f) && att1 > 0)
+                                               lamp->falloff_type = LA_FALLOFF_INVLINEAR;
                                        lamp->spotsize = light->getFallOffAngle().getValue();
                                        lamp->spotblend = light->getFallOffExponent().getValue();
                                }
@@ -1004,9 +1025,12 @@ bool DocumentImporter::writeLight( const COLLADAFW::Light* light )
                        case COLLADAFW::Light::POINT_LIGHT:
                                {
                                        lamp->type = LA_LOCAL;
-                                       lamp->falloff_type = LA_FALLOFF_INVSQUARE;
                                        lamp->att1 = att1;
                                        lamp->att2 = att2;
+                                       if(IS_EQ(att1, 0.0f) && att2 > 0)
+                                               lamp->falloff_type = LA_FALLOFF_INVSQUARE;
+                                       if(IS_EQ(att2, 0.0f) && att1 > 0)
+                                               lamp->falloff_type = LA_FALLOFF_INVLINEAR;
                                }
                                break;
                        case COLLADAFW::Light::UNDEFINED:
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 89599c62768eca7f94523f15baa99e97d906f5a8..13eb62ca9694c1bfa1f550e79372e1ca361fd75c 100644 (file)
@@ -67,26 +67,24 @@ 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 r;
+       float d, constatt, linatt, quadatt;
        
        d = la->dist;
-       r = d/2.0f;
        
        constatt = 1.0f;
        
        if(la->falloff_type==LA_FALLOFF_INVLINEAR) {
-               linatt = 1.0f / r;
+               linatt = 1.0f / d;
                quadatt = 0.0f;
        }
        else {
                linatt = 0.0f;
-               quadatt = 1.0f / r;
+               quadatt = 1.0f / (d * d);
        }
        
        // 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);
@@ -94,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);
@@ -102,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);
@@ -114,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);
@@ -125,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 b880ed30a6369aeda91dd736bf12cfb66c951877..3aee5f1ab5a369a84614a03bff9a2fe477927625 100644 (file)
@@ -719,7 +719,7 @@ static void ed_marker_move_apply(wmOperator *op)
 }
 
 /* only for modal */
-static void ed_marker_move_cancel(bContext *C, wmOperator *op)
+static int ed_marker_move_cancel(bContext *C, wmOperator *op)
 {
        RNA_int_set(op->ptr, "frames", 0);
        ed_marker_move_apply(op);
@@ -727,6 +727,8 @@ static void ed_marker_move_cancel(bContext *C, wmOperator *op)
        
        WM_event_add_notifier(C, NC_SCENE|ND_MARKERS, NULL);
        WM_event_add_notifier(C, NC_ANIMATION|ND_MARKERS, NULL);
+
+       return OPERATOR_CANCELLED;
 }
 
 
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,